Jump to content

Dynamic part payload (not just fuel) switching in VAB/SPH -- does this exist yet?


Recommended Posts

I'm looking for functionality to enable the player to change the internal payload of a part while in the VAB/SPH. I am aware that this functionality already exists for different fuel loads, e.g. Firespitter's FSfuelSwitch -- but I'd like to be able to also include other PartModule options besides RESOURCE, such as ModuleGenerator or even mod modules, like KASModuleContainer.

The use case is my WIP airstairs part here, relevant discussion starts top of page 3. tl;dr: I'd like the player to be able to select between, say, the default "empty" part, some battery capacity, an APU (ModuleGenerator), or cargo capacity (KASModuleContainer) while in the editor. Different payload configurations should of course alter part cost and mass.

If this kind of functionality already exists in some mod somewhere, please point me to it; if someone is already working on something like this or plans to do so, I would be willing to help where I can and/or be your guinea pig.

If not, I might consider taking a stab at this sometimeâ„¢. (Not in the near future, though, got other things in the pipeline atm.)

Edited by cake>pie
spelling
Link to comment
Share on other sites

Yeah figures -- if it weren't so troublesome someone would probably have already done it.

Just to check my understanding, the persistence issue would entail requiring such a plugin to define a (not dynamic) module as a wrapper to take care of serializing and unserializing the dynamic modules, that should do the trick, yes?

Link to comment
Share on other sites

Yep. OnSave it would create a node for each dynamic module and call each dynamic module's OnSave on those nodes; OnLoad it would recreate the modules (if they don't exist) and call their onloads on the nodes.

What about having a new module that references these, and having an enable/disable option? Then all of the possible modules would be loaded but not active, depending on selection.

I have no idea though, just a thought.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...