allista

[1.7] Configurable Containers

Recommended Posts

9 hours ago, Nori said:

Would you be able to add a default TankType for LH2 and LH2O? CryoEngines and a few other mods use these.

Assuming that you get 0.45LF and 0.55OX per 1 volume, a LH2 tank would give you 10LH2 units per volume. A LH2O would give you 6LH2 and 0.4Ox per volume.

I thought about it already, but there's a little... lore problem. Such tanks (unless you use them in the first rocket stage), should be cryogenic, meaning they should consume energy, leak fuel and explode if left alone without electricity. Some mods (e.g. KSPIE) have modules that emulate all this. Adding a cryotank here would either unbalance such mods (providing an easier way to store same things), or require me to implement this functionality inside CC.

Share this post


Link to post
Share on other sites
5 hours ago, CraftyDwarf said:

So  all I did so far is alter the line you had, saying:


@TANKTYPE[Soil]:NEEDS[KolonyTools]
{ @PossibleResources ^= :$: Dirt 0.7; Mulch 0.7; Fertilizer 0.7; ExoticMinerals 0.7; MetallicOre 0.7;  Rock 0.7;: }

now there isn't much consensus between this mod and most others about much but liquid fuel and ox, but even that varies some. Way more than I want to deal with right now.

However, I am reporting that I may, and I am not definite on this yet, be starting an engine mod that I have been thinking about, and evidently I wasn't alone, as I read today.  Basically, E.LF. engines, Standing for Electrodeless Lorentz Force.

This works like the mass driver from USI, but takes one more step. Heat material to near plasma, then ionize and and use like you would Xenon, Plus a bit. Because you use rock, you have a high matter density. but also a high energy cost to approach plasma. So, initially, it uses Rock for mass, but eventually anything, the denser the (generally) better. Not everything takes the same engergy to reach the right state. So I am starting with a quartz model of usage.

Yea, balancing with other mods is a great pain, because it's all done manually, and then a mod changes something and you need to start all over. It will by some time before everything will come to some sort of equilibrium, I guess.

4 hours ago, Nori said:

Ok, here it is. This will take any LFO tank and convert it to Configurable Containers. Took a hour to get it all working right.


@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[InterstellarFuelSwitch],!MODULE[ConfigurableContainers],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch]]:NEEDS[!modularFuelTanks&!RealFuels]:FOR[ConfigurableContainers]
{
    %LF = #$RESOURCE[LiquidFuel]/maxAmount$
    @LF *= 0.013717
    MODULE
    {
        name = ModuleTankManager
        Volume = #$../LF$
        DoCostPatch = True
        TANK
        {
            name = LFO
            Volume = 100.0
        }
    }
	!RESOURCE[LiquidFuel] {}
	!RESOURCE[Oxidizer] {}
}

 

Thanks for the work!!!

This will do the trick. Unless something changes in TankTypes.cfg (which is unlikely for LFO, but still).

And very tempting. But I don't know if I will use it, though: uncontrollable conversion of every LFO (and then LF, Xe, MP) tank in game? I'm still not comfortable with the idea...

 

Share this post


Link to post
Share on other sites
1 hour ago, Bit Fiddler said:

and this could then be easily ported to water, Monoprop, KerbalJuice(from my blender part), etc?  so it can grab all those tanks from this or that mod that are not specifically LFO?

and sort of related to this...   can we get ElectricCharge added in to the resources?  I guess I can do this myself but just thinking it could be there by default.   the reason I ask is the "Procedural Parts" mod allows EC as a resource type...  so ya just thinking aloud again.  I will add that patch above into my MM patch folder and give it a go.

This could be adapted for other resources, yea. The problem is the magic unit to volume conversion rate which is calculated here manually. So for every resource you (or rather I, if I add this to the mod) will need to sync between this patch and TankTypes.cfg. But I can build such patches programmatically as I do now with individual part patches!

ElectricCharge could be added, I just never considered batteries to be a resource; they're more devices. But you can pack a can full of batteries, I guess.

So as soon as I add mass differentiation between tank types I'll add EC. Before that... well, who wants massless batteries anyway? :rolleyes:

Share this post


Link to post
Share on other sites
6 minutes ago, Bit Fiddler said:

no I... I want batteries for the masses.

You can't make the "electric charge" resource have equivalent battery mass. As the tanks filled up the ship would get heavier, and as you used power it'd get lighter.

You need to make the TANK have a mass equal to its total electric charge in batteries, which - if I'm reading allista correctly above - is not yet an option.

Share this post


Link to post
Share on other sites

true... but that is what he is working on next...  tank masses.

 

 

or on the other hand they may be alkaline not NiCad...  

Share this post


Link to post
Share on other sites

I tried this yesterday, but ran into a little problem: CC isn't mod compatible, it doesn't work on other mods. 

Also, you could talk to @Nertea about boiloff, he could probably help you with integrating his own boiloff plugin.

Share this post


Link to post
Share on other sites

I forgot to mention, that in my chase for a bigger rock box, I have Interstellar fuel switch and Kontainers(from USI/UKS), as well as tweakscale.

Because of this I found a glitch using tweakscale with CC, if you feel a need to address it. CC only sees a tanks ORIGINAL size, so if you resize with Tweak, then edit tanks, you get sizes based on the orriginal. This both makes cheaty and unfair tanks, as original 2.5/3.75 tanks being shrunk will have too much, and .625 small radials and such made larger have to little. You can work around it with an order of affects. First set tank content in original size, then resize object. IDK if its perfect, but it is somewhat proportional.

 

Share this post


Link to post
Share on other sites
1 hour ago, CraftyDwarf said:

I forgot to mention, that in my chase for a bigger rock box, I have Interstellar fuel switch and Kontainers(from USI/UKS), as well as tweakscale.

Because of this I found a glitch using tweakscale with CC, if you feel a need to address it. CC only sees a tanks ORIGINAL size, so if you resize with Tweak, then edit tanks, you get sizes based on the orriginal. This both makes cheaty and unfair tanks, as original 2.5/3.75 tanks being shrunk will have too much, and .625 small radials and such made larger have to little. You can work around it with an order of affects. First set tank content in original size, then resize object. IDK if its perfect, but it is somewhat proportional.

Current version of CC simply does not support TweakScale. A have added the support and am currently testing it. It will be included in the next release, as well as ProceduralParts support.

1 hour ago, awsumindyman said:

I tried this yesterday, but ran into a little problem: CC isn't mod compatible, it doesn't work on other mods. 

Also, you could talk to @Nertea about boiloff, he could probably help you with integrating his own boiloff plugin.

Yep. We're trying to deal with it right here (see the posts with the proposed MM patches).

What's boiloff? You mean the "leakage" of cryo-fuels?

Share this post


Link to post
Share on other sites
1 minute ago, awsumindyman said:

@allista, yes, boiloff is the "leaking" of cryo-fuels. @Nertea added it to Cryo-engines to better balance it against stock parts.

If I'm not mistaken, KSPIE also has something like that. At least they have specialized cryostorage module.

Anyway, I don't know what's right here: to depend upon a foreign module from one of the mods with cryo-fuels or to implement something simple right here. I think I'll look at the CryoEngines code first and see what it does...

Share this post


Link to post
Share on other sites
8 hours ago, allista said:

Thanks for the work!!!

This will do the trick. Unless something changes in TankTypes.cfg (which is unlikely for LFO, but still).

And very tempting. But I don't know if I will use it, though: uncontrollable conversion of every LFO (and then LF, Xe, MP) tank in game? I'm still not comfortable with the idea...

 

I can understand this. But you do control what it applies to pretty well. It isn't going to mess up anyone else's tank switching since those are excluded so it seems like a pretty "safe" add in my opinion. Up to you though.

Also I forgot the B9 part switcher. So here it is with that.

@PART[*]:HAS[@RESOURCE[LiquidFuel],@RESOURCE[Oxidizer],!MODULE[InterstellarFuelSwitch],!MODULE[ModuleB9PartSwitch],!MODULE[ConfigurableContainers],!MODULE[ModuleEnginesFX],!MODULE[ModuleEngines],!MODULE[FSfuelSwitch]]:NEEDS[!modularFuelTanks&!RealFuels]:FOR[ConfigurableContainers]
{
    %LF = #$RESOURCE[LiquidFuel]/maxAmount$
    @LF *= 0.013717
    MODULE
    {
        name = ModuleTankManager
        Volume = #$../LF$
        DoCostPatch = True
        TANK
        {
            name = LFO
            Volume = 100.0
        }
    }
	!RESOURCE[LiquidFuel] {}
	!RESOURCE[Oxidizer] {}
}

 

Share this post


Link to post
Share on other sites
  • TankType.AddMassPerVolume --- done
  • Added mass to: Gases (thick walls), Food, Components (fastening), Radioactives (heavy thick walls)
  • TANKTYPE[Battery].PossibleResources =  ElectricCharge --- done

So now we have stock batteries and tanks with additional mass.

Does anyone know if I can somehow set an MM patch belonging to a mod to run after this mod? I mean something like this PART[*]:FOR[ConfigurableContainers]:AFTER[ConfigurableContainers], but working...

Share this post


Link to post
Share on other sites
8 minutes ago, allista said:
  • TankType.AddMassPerVolume --- done
  • Added mass to: Gases (thick walls), Food, Components (fastening), Radioactives (heavy thick walls)
  • TANKTYPE[Battery].PossibleResources =  ElectricCharge --- done

So now we have stock batteries and tanks with additional mass.

Does anyone know if I can somehow set an MM patch belonging to a mod to run after this mod? I mean something like this PART[*]:FOR[ConfigurableContainers]:AFTER[ConfigurableContainers], but working...

You can't specify more than one position argument as far as I know. So you would have to drop the FOR[ConfigurableContainers] in this example. This is why you see heavy use of the NEED/HAS parameters.

Share this post


Link to post
Share on other sites
1 minute ago, Nori said:

You can't specify more than one position argument as far as I know. So you would have to drop the FOR[ConfigurableContainers] in this example. This is why you see heavy use of the NEED/HAS parameters.

Nah, FOR is just a tag, so that other mods could use NEEDS/HAS.

Positionals are: BEFORE, AFTER and FINAL. And my question was: is it possible to be after self, not after another. I guess, I need to repost this question to MM thread.

Share this post


Link to post
Share on other sites

Ah I see. I don't think you can do that. But yeah I would ask in MM's thread.

Share this post


Link to post
Share on other sites

So, at the end of the day, using "conventional" script-generated patches, we have this (including LF, Ox, LFO, MP, Ore and Xe tanks):

"supports":
    [
        { "name": "TweakScale" },
        { "name": "ProceduralParts" },
        { "name": "KWRocketry" },
        { "name": "Mk2Expansion" },
        { "name": "SpaceY-Lifters" },
        { "name": "SpaceY-Expanded" },
        { "name": "FuelTanksPlus" },
        { "name": "ModRocketSys" }
    ],

Any other requests/suggestions?

Share this post


Link to post
Share on other sites
3 hours ago, allista said:

Nah, FOR is just a tag, so that other mods could use NEEDS/HAS.

Positionals are: BEFORE, AFTER and FINAL. And my question was: is it possible to be after self, not after another. I guess, I need to repost this question to MM thread.

FOR also acts a positional. And of course you can run patches BEFORE or AFTER your own mod. All these are just times with a name attached to them.

Edited by pellinor

Share this post


Link to post
Share on other sites
1 hour ago, allista said:

So, at the end of the day, using "conventional" script-generated patches, we have this (including LF, Ox, LFO, MP, Ore and Xe tanks):


"supports":
    [
        { "name": "TweakScale" },
        { "name": "ProceduralParts" },
        { "name": "KWRocketry" },
        { "name": "Mk2Expansion" },
        { "name": "SpaceY-Lifters" },
        { "name": "SpaceY-Expanded" },
        { "name": "FuelTanksPlus" },
        { "name": "ModRocketSys" }
    ],

Any other requests/suggestions?

Covers all the stuff I use (minus USI, but those are FSswitch so I'll do those myself).

Don't suppose you could add default tank parts for the rest of MKS (KolonyTools) resources?

I also made a few notes on things that are no longer around or have changed. The number is their density as per the resource definition.

MetallicOre - 0.00550000000  - There is a MetalOre in your config, but the name must have changed.
Uraninite - 0.0075
Substrate - 0.0016
Minerals - 0.00270000000
Metals - 0.0078  - ScrapMetal and Metal (no "s") no longer appear to be used
Polymers - 0.00104000000
SpecializedParts - 0.00378 - ReplacementParts is gone
Hydrates - 0.00150000000
Gypsum - 0.00550000000
Silicates - 0.00025
Silicon - 0.0002329
RefinedExotics - 0.0052
ColonySupplies - 0.001556
Organics - 0.001


ArgonGas - Near Future Propulsion uses this
Water - 0.0010000000 - KolonyTools uses water now
Chemicals - 0.00250000000
LqdHydrogen - You don't need Karbonite to use this. Near Future Propulsion uses this as do some other mods

 

Edited by Nori

Share this post


Link to post
Share on other sites

as for other mods to support...   every wing, OPT, quiztech,  Dr_jet,  Mk2/MK3 stockaliake expansion, B9, B9 procedural wings, KAX, LLL, all of USI, kerbal planetary base, pwings, spherical and toroidal tanks pack, universal Storage, SDHI, KW, ...

 

and many others I cant recall off the top of my head, I have them all.  lol yes this is why I was hoping for a dynamic method to do it, I use just about every "part mod" out there as I like to be able to build interesting things so the more parts I have to play with the better.  I really do not expect you to manually add support for all these mods it is far more effort for you to keep it all up just to make my mod list 100% compatible.   if the dynamic system does not work, it would probably be better for me to go to each of the mods in question and ask them to support your mod from their end. lol but you did ask...

Share this post


Link to post
Share on other sites
17 hours ago, Nori said:

Covers all the stuff I use (minus USI, but those are FSswitch so I'll do those myself).

Don't suppose you could add default tank parts for the rest of MKS (KolonyTools) resources?

I also made a few notes on things that are no longer around or have changed. The number is their density as per the resource definition.


MetallicOre - 0.00550000000  - There is a MetalOre in your config, but the name must have changed.
Uraninite - 0.0075
Substrate - 0.0016
Minerals - 0.00270000000
Metals - 0.0078  - ScrapMetal and Metal (no "s") no longer appear to be used
Polymers - 0.00104000000
SpecializedParts - 0.00378 - ReplacementParts is gone
Hydrates - 0.00150000000
Gypsum - 0.00550000000
Silicates - 0.00025
Silicon - 0.0002329
RefinedExotics - 0.0052
ColonySupplies - 0.001556
Organics - 0.001


ArgonGas - Near Future Propulsion uses this
Water - 0.0010000000 - KolonyTools uses water now
Chemicals - 0.00250000000
LqdHydrogen - You don't need Karbonite to use this. Near Future Propulsion uses this as do some other mods

What do you mean by "add default tank parts for the rest of MKS"?

ReplacementParts are present in USI parts both as part RESOURCE and in Converters.

MetalOre, Metal, ScrapMetal are from TAC Life Support.

Other things corrected.

By the way, USI uses a hell lot of specific resources internally, within the life cycle of a base. Do you even need tanks for these?

Share this post


Link to post
Share on other sites
14 minutes ago, allista said:

What do you mean by "add default tank parts for the rest of MKS"?

ReplacementParts are present in USI parts both as part RESOURCE and in Converters.

MetalOre, Metal, ScrapMetal are from TAC Life Support.

Other things corrected.

By the way, USI uses a hell lot of specific resources internally, within the life cycle of a base. Do you even need tanks for these?

I meant the TankType.cfg configs.

Yeah ReplacementParts isn't really needed.

I think you mean MetalOre/Metal/ScrapMetal are from ExtraplanetaryLaunchpads. Just checked and you are right. I find that odd as the CRP doesn't have those listed anymore.

USI does use a lot of resources internally, but most of the time you need at least some storage. Being able to switch on the fly would be amazing. As would the ability to have one big tank with all the resources to cut down on parts and complexity.

Share this post


Link to post
Share on other sites
1 minute ago, Nori said:

I meant the TankType.cfg configs.

Yeah ReplacementParts isn't really needed.

I think you mean MetalOre/Metal/ScrapMetal are from ExtraplanetaryLaunchpads. Just checked and you are right. I find that odd as the CRP doesn't have those listed anymore.

USI does use a lot of resources internally, but most of the time you need at least some storage. Being able to switch on the fly would be amazing. As would the ability to have one big tank with all the resources to cut down on parts and complexity.

Yep, ExLP it is. Tired a little... :confused:

Don't know why they removed them from CRP. Someone is eliminating competitors? :cool:

Ah, you just want to add USI resources to some (new or existing) tank types. I agree that this should be done.

But the thing is, I never played with USI, never liked what they do game-lore-wise. And their resource system is awfully complex. So I need help here from some experienced USI user.

Share this post


Link to post
Share on other sites

oh USI is a must for me.  I use TAC-LS not USI  but I do use every other USI mod. they are my must have mods.  every thing I use must work with them as I consider them the "Base Game"

however I am fine with make the "resource configs" and such on my own like I did for TAC.  I just need the mod controller added to the tanks.

Share this post


Link to post
Share on other sites

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.