SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

How to use SSTUVolumeContainer

Jimbodiah opened this issue ยท 8 comments

commented

Hi Mage,

I'm making new TAC-LS patches and am copying your USI versions. I have the basic A/B/C/E modules done but am fighting with the other parts that use the configurable container. Below is a MM patch that is not working, can you point me to what I need to look at (it doesnt work and am wonderinf if the values are actually integers and not reals like I am trying?

@part[SSTU-LC2-POD]:NEEDS[TacLifeSupport&!RealismOverhaul] // 2-person pod
{
@module[SSTUVolumeContainer]
{
@Volume = 330
@container,0
{
@defaultResources = MonoPropellant,25;ElectricCharge,300;Food,2.2,2.2;Water,1.39,1.39;Oxygen,222,222;Waste,0.19,0;WasteWater,1.8,0;CarbonDioxide,192,0
resource = Food
resource = Water
resource = Oxygen
resource = Waste
resource = WasteWater
resource = CarbonDioxide
}
}
@module[SSTUModelSwitch]
{
@baseVolume = 330
}
}

commented

How do you multiply up in that line? i.e. "22/10" instead of "2.2"?

commented
@defaultResources = MonoPropellant,2500;ElectricCharge,30000;Food,220,220;Water,139,139;Oxygen,22200,22200;Waste,19,0;WasteWater,180,0;CarbonDioxide,19200,0

Something about like that ^^^. Might be off on some of those. But basically as you have two decimal places on some of the values, you need to multiply all of them by 100 to arrive at an integer ratio.

commented

ah, like that, just do the same with the original resources so the ratio stays the same in the end... gotcha. Thank you.

commented

Yes, the default resources use integers to define the ratios. You will need to multiply up the fractional values out to whole numbers.

(Yes, it is kind of a pain when putting together tank definitions such as that; however the integer ratios are far too deeply rooted into the container code to allow for easily changing it at this point)

commented

LOL... that SC-B-SM also does some funky thing: engine always lights up and the option to shut down is no longer there. Something is up with changing the resources... better pull them all for now, Mage.

No idea what is causing the strange behavior. Already checked if TAC wasn't adding anything by itself (it tries to add standard resouce definitions), but it does not seem to add anything to SSTU parts, at least I can't find any resource in the persistent file when I create a new apollo CM/SM.

commented

OK, LC pods are done. Now working on the DOS/COS/HAB/CFG but for some reason the model keeps disappearing in-game when I load with the patch.

Below is a copy of the USI version but with other resources to suit TAC, yet it bugs the part. Any suggestions? The handling is different than with the LC pods, where the existing container is expanded upon. In the station core parts a new container is made and percentages altered, yet with the new resources it goes funky. Testing some things now, so maybe I will solve it and facepalm again...

@part[SSTU-ST-DOS-COM]:AFTER[SSTU]:NEEDS[TacLifeSupport&!RealismOverhaul]
{
@module[SSTUModularStationCore]
{
@core,0
{
%mass = 4.3928
%volume = 3.9545
}
}
@module[SSTUVolumeContainer]
{
@container[Propellant]
{
%percent = 47.67
}
@container[Battery]
{
%percent = 47.41
}
CONTAINER
{
name = Supplies
percent = 4.92
tankageVolume = 0
tankageMass = 0
defaultModifier = standard
defaultResources = Food,219,219;Water,145,145;Oxygen,22207,22207;Waste,200,0;WasteWater,185,0;CarbonDioxide,19183,0
resource = Food
resource = Water
resource = Oxygen
resource = Waste
resource = WasteWater
resource = CarbonDioxide
modifier = standard
}
}
%MODULE // % instead of @ as TAC itself tries to add this module to all crewed pods as well.
{
%name = LifeSupportModule // yes, named differently but almost the same as USI
}
}

commented

I'm not sure you can add modules with the % sign.

%MODULE // % instead of @ as TAC itself tries to add this module to all crewed pods as well.
{
%name = LifeSupportModule // yes, named differently but almost the same as USI
}

Might try adding that as a regular module definition; basically just like you have it but remove the % sign before the module and name

Other than that I'm not sure what could be going on. I know in the past USI-LS had issues where it would 'force-activate' every module on a part -- that included decouplers and engines. Not sure if TAC has those problems, its been years since I've used it.

Are there any null-refs in the log when it is loading the prefab parts, or when the craft is put out to launch?

commented

Seems TAC is doing the same with the module activations. I;ve always had a love-hate relationship with all the LS and boil-off/antimatter containment mods as they tend to break easily, not hold up to time warps etc... TAC just seems more realistic to me and didn't need a manual like USI at the time, but I uninstalled it last night so I could just play :)

Maybe just drop the TAC patch all together for now? With the SSTU volume containers the old version doesn't work properly anymore anyhow.