shadowmage45 / SSTULabs

Dev repository for testing/unfinished KSP parts/plugins/etc.
Other
62 stars 41 forks source link

Request - additional CRP resources in tanks #692

Closed norcalplanner closed 6 years ago

norcalplanner commented 6 years ago

Any chance of getting additional CRP resources added to configurable fuel tanks? I really enjoy the ability right now to add LF, O, EC, MP, Supplies, Mulch, and Fertilizer (from USI-LS) into a single tank, and would like to expand that to other CRP resources. In particular I'm looking for the ability for tanks to hold Karbonite, Karborundum, and Water. The goal is to allow better looking and lower part count tankers, miners, and motherships. Sorry I didn't do a pull request, but I know next to nothing about coding. :-(

Jimbodiah commented 6 years ago

make a cfg file like karbonite.cfg and put this into it with notepad or some other text editor. Not sure it works as I don't use the mods myself:

@PART[SSTU-SC-TANK-MFT-A|SSTU-SC-TANK-MFT-S|SSTU-SC-TANK-MFT-R|SSTU-SC-TANK-MFT-LV|SSTU-SC-TANK-MUS|SSTU-SC-TANK-MFT-D]:FOR[SSTU]:NEEDS[Karbonite] { @MODULE[SSTUVolumeContainer] { @CONTAINER,0 { resource = Karbonite } } }

@PART[SSTU-SC-TANK-MFT-A|SSTU-SC-TANK-MFT-S|SSTU-SC-TANK-MFT-R|SSTU-SC-TANK-MFT-LV|SSTU-SC-TANK-MUS|SSTU-SC-TANK-MFT-D]:FOR[SSTU]:NEEDS[KarbonitePlus] { @MODULE[SSTUVolumeContainer] { @CONTAINER,0 { resource = Karborundum } } }

@PART[SSTU-SC-TANK-MFT-A|SSTU-SC-TANK-MFT-S|SSTU-SC-TANK-MFT-R|SSTU-SC-TANK-MFT-LV|SSTU-SC-TANK-MUS|SSTU-SC-TANK-MFT-D]:FOR[SSTU]:NEEDS[KarbonitePlus&!TacLifeSupport] { @MODULE[SSTUVolumeContainer] { @CONTAINER,0 { resource = Water } } }

Jimbodiah commented 6 years ago

ah wait, here it is

Karbonite.zip

Jimbodiah commented 6 years ago

I just did a PR for the following USI mods:

Hopefully it wil be integrated for the next release, but that will be for 1.4.x I believe. Here are the files if you or anyone else wants them: USI.zip Place them in the SSTU/ModIntegrations/USI folder

norcalplanner commented 6 years ago

Jimbodiah, I finally had a chance to play some KSP and added the Karbonite config file you posted. Works like a charm, no glitches or weirdness that I can see. Many thanks, sir!

Jimbodiah commented 6 years ago

Phew! ;)

shadowmage45 commented 6 years ago

While I have no problems with the PR's to add new resources to the MFT tanks -- they will all need to be redone to be based on the KSP141 branch; preferably after I'm done with the update work.

Many of the part-names have changed / will be changing, so the patches, as-is, will not work with the KSP-1.4.x versions of SSTU.

Jimbodiah commented 6 years ago

NP... I even noticed you already have some of these in one of your additional patches. Maybe a good time to clean up some things while moving to 1.4?

Also, regarding double resources (ie Water being used by multiple mods and possibly causing conflicts); you mentioned you were working on a different system to add resources and not cause conflicts. Is there any word on this, does it affect the patches? I could revise all the resource patches once things have crystalized, just let me know.

shadowmage45 commented 6 years ago

Yes, and yes.

Certainly a good time for patch cleanup, or almost (probably another week or two).

Yes the changes should allow for loading of 'duplicate' SSTU resource definitions. It should now log the problem, and continue loading.

Jimbodiah commented 6 years ago

Should I reflect that in the patch updates for 1.4 if I PR them? Anything different in the defintions?

shadowmage45 commented 6 years ago

One thing to keep in mind with these patches -- they need to be activated by specific mods being present or not. Stock + SSTU only supports a limited number of resources, all of which should already be in the MFT tanks resource-lists.

Any inclusion of Near-Future, MKS, EL, or other non-stock resources need to be tied to those mods, so as to not add completely un-needed resources to the UIs.

Jimbodiah commented 6 years ago

That's they way they all work right now.