Jump to content

[1.9-1.10] Configurable Containers


allista

Recommended Posts

can we get the "SpareParts" from the dangit mod by @linuxgurugamer added to the resource list?  According to the community resource pack by @RoverDude this is the pertinent information.

 

RESOURCE_DEFINITION
{
   name = SpareParts
 displayName = #LOC_CRP_SpareParts_DisplayName
   density = 0.00378
   flowMode = NO_FLOW
   transfer = NONE
   isTweakable = true
   isVisible = true
   unitCost = 12.6
 volume = 1
}

 

 

Link to comment
Share on other sites

I have a wierd issue where tweak-scaled containers are not reporting correct volumes or seemingly random volumes at times when using CC to set non-typical resource types. I can't tell if it's cc causing it or if it's tweak scale.. anyone experienced this before that may be able to give me some guidance?

Link to comment
Share on other sites

i have seen this with the "Procedural Parts" mod as well.   probably something that happens when a part is resized or changed in some way, as both tweak scale and Procedural parts do just that.

 

 

EDIT:  @allista is there a "How To" document somewhere that tells us how to use the texture switcher for custom parts we make?

Edited by Bit Fiddler
Link to comment
Share on other sites

  • 2 weeks later...

I'm having the same issue reported here:

https://github.com/allista/ConfigurableContainers/issues/23

Quote

Procedural Tanks No Longer Auto-Updates With Resources #23

Open
Nerdy314159265 opened this Issue on Jan 7 · 0 comments

Configurable Containers / Core: 1.4.1.2
KSP Version: 1.3.1.1891
Procedural Parts Version: 1.2.12

I recently updated my version of Configurable Containers to the latest (1.4.1.2) and attempted to build a rocket. When adding a Procedural Tank it adds just fine, I could fix this by editing the resource types to something else and back or re-adding them. However, the restored resources immediately disappear when the tank is modified.

I uninstalled Configurable Containers and manually installed 1.4.1 with CKAN over command-line and that issue goes away (some config issues appear but I am assuming it's due to the reinstall?).

I reinstalled CC and tested further while typing this. When the tanks is the first part it shows with resources no issue, only when added to an existing root does it show with no resources. Also the volumes of the resources inside the tank do update to the new tank sizes within CC but don't seem to get applied through to the actual tank.

Is this a universal issue, or do others not have this problem? Is there a workarond? Do Procedural Parts and Configurable Containers just not play well together? Thanks!

Link to comment
Share on other sites

I think it is a bug that has come up...  as it is happening to several people.   it is interesting however that you say if the tank is the root part that everything works ok.

 

 

EDIT:  Oh I guess you did not say it....    and after trying it myself I see I was misunderstanding nerdy's post.

as it does not work fine, it just has fuel in it when you place it.  however as soon as it is resized the problem is back.

 

 

 

 

@allista 

Is it possible to have the texture switcher select the default texture based on the resource placed in the tank?

for instance if I define a list of textures on the part     "LF, Oxi, LFO, Xe, Mono"   is it possible to make the texture switcher select LFO for example, if I define the tank as "LFO"?

 

 

 

 

as another thought...

Not sure how all this would work but maybe if you talk it over with @RoverDudesomething could be worked out.  the idea is basically to have a tag in the CRP that defines the "type" of resource.  like in your containers you have "Liquid Chemical" "Gases" "Cryogenic" "Life support" etc.    If the CRP had a tag that went along with the tank groupings you could then just read the CRP file directly and add every resource it contains to your tank switcher.  as if I am not mistaken the CRP has all the information you need to add a resource to the switcher yes?   Other than the few instances like Liquid hydrogen where there is just no common ground between the mods.  but maybe something can be worked out to make this "CRP import" as quick and painless as possible.

 

 

Edited by Bit Fiddler
Link to comment
Share on other sites

  • 2 weeks later...
On 2/10/2018 at 9:32 AM, Bit Fiddler said:

I think it is a bug that has come up...  as it is happening to several people.   it is interesting however that you say if the tank is the root part that everything works ok.

 

I found this to be the case as well. If I use configurable containers on a tweak scaled container and it is root, no problem. If I try to mirror it, the volumes get spazzy. I haven't had resources vanish, but I have some some ridiculously large volume calculations that are definitely not accurate.. on the orders of magnitude of hundreds to thousands of times the expected volume of the tank. The worst part, the bug usually does not mirror so the craft is extremely difficult to balance, if it can be at all.

Link to comment
Share on other sites

  • 1 month later...

I have a couple of things to say.

1. This mod is under rated. Why do folks not see the benefit of being able to store multiple 'things' in the one tank? This is a part count GOD.

2. I too have some problems with volume. I play 1.3.1 atm. I have a craft where I have multiple 'things' stored in a tank. If I later load that craft with the intent of adjusting the proportions of the multiple 'things' I see the volume for the complete tank has gone insane. For example. I tweakscaled a tank to 3.75. It fits well inside a hollow OPT plane part. I set it to store a few different soil 'things' and a few 'metal' things. When I play tested I saw that I needed to increase the proportions of a few 'things' and consequently take a hit on the amount of other 'things'. But I have to make a new tank each time I want to make adjustments as the total tank volume is no longer 24.7m3 but some insane value, huge, really huge.

3. I am trying to increase the number of types of 'things' I can store. I do not have KolonyTools, but I do have Pathfinder & Workshop. Even some WarpPlugin types are missing. If you take a look at the ISRU available, lots of gases and soil types are currently not available.

Spoiler

But I have run into a bit of a brain freeze, I see values in \GameData\WarpPlugin\Patches which are listed as densities, ie RareMetals density = 0.0078. What is the formula I need to use to get a value that makes sense for soil tanktype possibleresouces that makes sense? Other thank sticking in a default value of 1.

3. cont. Then there are the Lqd Gases, missing from TankTypes.cfg and Cryogenics.cfg. Plus gases missing from tanktypes Gases, which I now see are stored "highly pressurized: ~200 atm".

Spoiler

erm so yeah. I spent a day getting data together for a patch for me, so I could personally be able to store the 'things' I want. Only to fail because I am stupid and could not work out how to use the stuff.

erm so yeah. I spent a day getting data together for a patch for me, so I could personally be able to store the 'things' I want. Only to fail because I am stupid and could not work out how to use the stuff.

Here is how far I have got:

 

@allistaI have no idea if these files will help if you accept the request to add more support for mods like Pathfinder etc. I don't know if you intend on doing any more 1.3.1 releases, but I guess if the format is similar I can back port a 1.4.1 release for my own needs.

Edited by Apaseall
Link to comment
Share on other sites

Found a place to obtain data for gases at 200 atm and 0oC. Or more correctly, any kind of data you want :) Here: https://webbook.nist.gov/chemistry/

Still would love to understand the relationship between units per liter and kg per m3. what is a unit of something? 1 yes but one what? 1 mole?

Here is an example of my lack of understanding. In this mod, file: TankTypes.cfg we have an entry of XenonGas 11.7 in the TANKTYPE[Gases]. Nearby is a reference to 200 atm. Now I am presuming that we are talking 11.7 at 200 atm and 0oC. Likewise for ArgonGas 209.47892118355594.

Looking online at say https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7440633&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF we find XenonGas density = 2322.9 (kg/m3). With https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7440371&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF we find ArgonGas density = 391.09 (kg/m3).

How do I go from 2322.9 to 11.7 ? or from 391.09 to 209.47892118355594 ?

Simply put, given SomeResource has ANumber density as kg/m3 what do I need to do to get a correct value to enter in @PossibleResources ^= :$: SomeResource AnotherNumber;:

Edited by Apaseall
Link to comment
Share on other sites

1 hour ago, Apaseall said:

Found a place to obtain data for gases at 200 atm and 0oC. Or more correctly, any kind of data you want :) Here: https://webbook.nist.gov/chemistry/

Still would love to understand the relationship between units per liter and kg per m3. what is a unit of something? 1 yes but one what? 1 mole?

Here is an example of my lack of understanding. In this mod, file: TankTypes.cfg we have an entry of XenonGas 11.7 in the TANKTYPE[Gases]. Nearby is a reference to 200 atm. Now I am presuming that we are talking 11.7 at 200 atm and 0oC. Likewise for ArgonGas 209.47892118355594.

Looking online at say https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7440633&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF we find XenonGas density = 2322.9 (kg/m3). With https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7440371&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF we find ArgonGas density = 391.09 (kg/m3).

How do I go from 2322.9 to 11.7 ? or from 391.09 to 209.47892118355594 ?

Simply put, given SomeResource has ANumber density as kg/m3 what do I need to do to get a correct value to enter in @PossibleResources ^= :$: SomeResource AnotherNumber;:

Good question. But I can only cite the header of the TankTypes.cfg:

//It's a shame that resource density is defined per unit, not per volume.
//This means that any procedural tank should do some kind of conversion
//which will be susceptible to Squad and modders changes of resource definitions.
//But than again, this situation allows to build different tanks with different
//final density for the same resource (compressed gas, liquid gas, etc.)


//                             Format:
//TANKTYPE
//{
//	name = SimilarResources
//
//                      name      units/L  
//	PossibleResources = Resource1    1.23;

So XenonGas 11.7 means 11.7 dimensionless units per liter.

Notion of 200atm comes from a) a resource config that defines density in tons/unit and b) the volume of existing an tanks for this resource calculated from its model (in blender).

E.g. we have a xenon tank of volume Vm3 with the mass of the xenon Mt; this allows to calculate roughly the pressure at some standard temperature. And I have probably used 25C, not 0C. Can't remember :rolleyes:

Link to comment
Share on other sites

3 minutes ago, allista said:

Good question. But I can only cite the header of the TankTypes.cfg:


//It's a shame that resource density is defined per unit, not per volume.
//This means that any procedural tank should do some kind of conversion
//which will be susceptible to Squad and modders changes of resource definitions.
//But than again, this situation allows to build different tanks with different
//final density for the same resource (compressed gas, liquid gas, etc.)


//                             Format:
//TANKTYPE
//{
//	name = SimilarResources
//
//                      name      units/L  
//	PossibleResources = Resource1    1.23;

So XenonGas 11.7 means 11.7 dimensionless units per liter.

Notion of 200atm comes from a) a resource config that defines density in tons/unit and b) the volume of existing an tanks for this resource calculated from its model (in blender).

E.g. we have a xenon tank of volume Vm3 with the mass of the xenon Mt; this allows to calculate roughly the pressure at some standard temperature. And I have probably used 25C, not 0C. Can't remember :rolleyes:

Hi @allista. Thank you for you reply/post.

I had read the header, whilst it outlines the situation and why it is not clear to me if it answers my question. Namely given that data in the real world is available in kg/m3 or other units or measurement i.e. lb/ft3 etc, how do I go from that to a number that makes sense in @PossibleResources ^= :$: SomeResource AnotherNumber;:  ?

I understand that 11.7 means 11.7 units per liter. I am not sure how to arrive at that value from a density.

I see you mention "a resource config that defines density in tons/unit". Where can I find such information, which file contains it? Since given mass/unit I can easily go from kg/m3 to units per liter.

I suspected that one solution would be to comb through existing parts to find their volumes and corresponding number of units held. However that sounds like a royal pain to do, especially when it is fairly trivial to locate data for kg/m3.

I was not sure what temperature to use, but given that I have entries now like this:

//    Oxygen                    density = 1.4290                (kg/m3)            STP - Standard Temperature and Pressure - is defined as  0oC (273.15 K, 32oF) and 1 atm (101.325 kN/m2, 101.325 kPa, 14.7 psia, 0 psig, 30 in Hg, 760 torr)
//    Oxygen                    ^^^^^^^                                           https://www.engineeringtoolbox.com/gas-density-d_158.html
//    Oxygen                    density = 315.79                (kg/m3)            200 atm 0oC
//    Oxygen       https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7782447&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF

I thought it would be wise to go from STP to ST 200atm.

So unless I have completely missed something I am still none the wiser how to go from kg/m3 to units per liter, as I have no idea how much mass one unit has or what volume one unit has.

Additionally given that WBI and especially WarpPlugin (KSPI?), which includes references to CRP ALL appear to list resources densities as kg/m3 or variation i.e. g/cm3 (basically dance the decimal point) I still wish to understand how to go from those to units per liter.

Sorry if I keep repeating the same question, but I am either being very stupid or there is some data I am missing.

Link to comment
Share on other sites

12 minutes ago, Apaseall said:

Hi @allista. Thank you for you reply/post.

I had read the header, whilst it outlines the situation and why it is not clear to me if it answers my question. Namely given that data in the real world is available in kg/m3 or other units or measurement i.e. lb/ft3 etc, how do I go from that to a number that makes sense in @PossibleResources ^= :$: SomeResource AnotherNumber;:  ?

I understand that 11.7 means 11.7 units per liter. I am not sure how to arrive at that value from a density.

I see you mention "a resource config that defines density in tons/unit". Where can I find such information, which file contains it? Since given mass/unit I can easily go from kg/m3 to units per liter.

I suspected that one solution would be to comb through existing parts to find their volumes and corresponding number of units held. However that sounds like a royal pain to do, especially when it is fairly trivial to locate data for kg/m3.

I was not sure what temperature to use, but given that I have entries now like this:

//    Oxygen                    density = 1.4290                (kg/m3)            STP - Standard Temperature and Pressure - is defined as  0oC (273.15 K, 32oF) and 1 atm (101.325 kN/m2, 101.325 kPa, 14.7 psia, 0 psig, 30 in Hg, 760 torr)
//    Oxygen                    ^^^^^^^                                           https://www.engineeringtoolbox.com/gas-density-d_158.html
//    Oxygen                    density = 315.79                (kg/m3)            200 atm 0oC
//    Oxygen       https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7782447&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF

I thought it would be wise to go from STP to ST 200atm.

So unless I have completely missed something I am still none the wiser how to go from kg/m3 to units per liter, as I have no idea how much mass one unit has or what volume one unit has.

Additionally given that WBI and especially WarpPlugin (KSPI?), which includes references to CRP ALL appear to list resources densities as kg/m3 or variation i.e. g/cm3 (basically dance the decimal point) I still wish to understand how to go from those to units per liter.

Sorry if I keep repeating the same question, but I am either being very stupid or there is some data I am missing.

Squad resources: GameData/Squad/Resources/ResourcesGeneric.cfg

CRP resources: GameData/CommunityResourcePack/CommonResources.cfg

Volumes of existing parts I've calculated using Blender (its 3d-printing tools) and .mu import plugin.

Link to comment
Share on other sites

On 1/25/2018 at 10:09 PM, Bit Fiddler said:

can we get the "SpareParts" from the dangit mod by @linuxgurugamer added to the resource list?  According to the community resource pack by @RoverDude this is the pertinent information.

RESOURCE_DEFINITION
{
   name = SpareParts
 displayName = #LOC_CRP_SpareParts_DisplayName
   density = 0.00378
   flowMode = NO_FLOW
   transfer = NONE
   isTweakable = true
   isVisible = true
   unitCost = 12.6
 volume = 1
}

Is the SpareParts resource used by any other mod than Dangit? Just to add the :NEEDS stanza to MM patch.

Link to comment
Share on other sites

6 minutes ago, allista said:

Squad resources: GameData/Squad/Resources/ResourcesGeneric.cfg

CRP resources: GameData/CommunityResourcePack/CommonResources.cfg

Volumes of existing parts I've calculated using Blender (its 3d-printing tools) and .mu import plugin.

From \GameData\Squad\Resources\ResourcesGeneric.cfg I find XenonGas density = 0.0001. So that is a third value for XenonGas.

Re: \GameData\CommunityResourcePack\CommonResources.cfg, well I now feel right stupid. You see this is the same file [data value wise] as \GameData\WarpPlugin\Patches\CommonResources.cfg which is where I got this lot from:

Spoiler

//1    Minerals                density = 0.00270000000
//1    MetallicOre                density = 0.00550000000
//1    Organics                density = 0.001
//1    Oxygen                    density = 0.00000141
//+    Oxygen                    density = 1.4290                (kg/m3)            STP - Standard Temperature and Pressure - is defined as  0oC (273.15 K, 32oF) and 1 atm (101.325 kN/m2, 101.325 kPa, 14.7 psia, 0 psig, 30 in Hg, 760 torr)
//+    Oxygen                    ^^^^^^^                                           https://www.engineeringtoolbox.com/gas-density-d_158.html
//+    Oxygen                    density = 315.79                (kg/m3)            200 atm 0oC
//+    Oxygen       https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7782447&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF
//1    Polymers                density = 0.00104000000
//1    RareMetals                  density = 0.0078

I took the file contents and stripped away all the stuff that I thought I did not need, so I went from this:

Spoiler

RESOURCE_DEFINITION
{
    name = Minerals
    displayName = #LOC_CRP_Minerals_DisplayName
    density = 0.00270000000
    flowMode = ALL_VESSEL
    transfer = PUMP
    isTweakable = true
       isVisible = true
    unitCost = 0.80
    volume = 1
    color = .75,0,1
}

To this:

Spoiler

//    Minerals                density = 0.00270000000

See how I cunningly stripped away the volume?

It appears then that all resources listed as having volume = 1. Which is nice. If you look closely above you will see I have added data from different sources/pressure denoted with +

So now I know that CRP has densities listed per volume I can see for example CRP Oxygen density = 0.00000141 for volume = 1 is the same as Oxygen density = 1.4290 (kg/m3) STP if I change from kg/m3 to kg/ml i.e. x 1.0E-6 I get 0.00000141.

Link to comment
Share on other sites

4 minutes ago, Apaseall said:

From \GameData\Squad\Resources\ResourcesGeneric.cfg I find XenonGas density = 0.0001. So that is a third value for XenonGas.

Re: \GameData\CommunityResourcePack\CommonResources.cfg, well I now feel right stupid. You see this is the same file [data value wise] as \GameData\WarpPlugin\Patches\CommonResources.cfg which is where I got this lot from:

  Reveal hidden contents

//1    Minerals                density = 0.00270000000
//1    MetallicOre                density = 0.00550000000
//1    Organics                density = 0.001
//1    Oxygen                    density = 0.00000141
//+    Oxygen                    density = 1.4290                (kg/m3)            STP - Standard Temperature and Pressure - is defined as  0oC (273.15 K, 32oF) and 1 atm (101.325 kN/m2, 101.325 kPa, 14.7 psia, 0 psig, 30 in Hg, 760 torr)
//+    Oxygen                    ^^^^^^^                                           https://www.engineeringtoolbox.com/gas-density-d_158.html
//+    Oxygen                    density = 315.79                (kg/m3)            200 atm 0oC
//+    Oxygen       https://webbook.nist.gov/cgi/fluid.cgi?T=0&PLow=190&PHigh=210&PInc=5&Applet=on&Digits=5&ID=C7782447&Action=Load&Type=IsoTherm&TUnit=C&PUnit=atm&DUnit=kg%2Fm3&HUnit=kJ%2Fmol&WUnit=m%2Fs&VisUnit=uPa*s&STUnit=N%2Fm&RefState=DEF
//1    Polymers                density = 0.00104000000
//1    RareMetals                  density = 0.0078

I took the file contents and stripped away all the stuff that I thought I did not need, so I went from this:

  Reveal hidden contents

RESOURCE_DEFINITION
{
    name = Minerals
    displayName = #LOC_CRP_Minerals_DisplayName
    density = 0.00270000000
    flowMode = ALL_VESSEL
    transfer = PUMP
    isTweakable = true
       isVisible = true
    unitCost = 0.80
    volume = 1
    color = .75,0,1
}

To this:

  Reveal hidden contents

//    Minerals                density = 0.00270000000

See how I cunningly stripped away the volume?

It appears then that all resources listed as having volume = 1. Which is nice. If you look closely above you will see I have added data from different sources/pressure denoted with +

So now I know that CRP has densities listed per volume I can see for example CRP Oxygen density = 0.00000141 for volume = 1 is the same as Oxygen density = 1.4290 (kg/m3) STP if I change from kg/m3 to kg/ml i.e. x 1.0E-6 I get 0.00000141.

I'm afraid you're wrong: I don't know where, if anywhere, the "volume" from CPR resource definitions is used. I never saw a piece of code that dit use it (including KSP own code). So the density is still defined per unit. Even though the "volume" is there.

Edited by allista
Link to comment
Share on other sites

7 minutes ago, allista said:

I'm afraid you're wrong: I don't know where, if anywhere, the "volume" from CPR resource definitions is used. I never saw a piece of code that dit use it (including KSP own code). So the density is still defined per unit. Even though the "volume" is there.

Oh, see my mind is clearly not working well. But at least I now know how to go from kg/m3 to unit/l. Yay?

Link to comment
Share on other sites

Version 2.4.2 for Kerbal Space Program 1.4.1

Released on 2018-03-27

  • Compatible with KSP-1.4.1
  • Twealscaled tanks retain volume on load.
  • Removed support for ProceduralParts =(
  • Added SpareParts to Components TankType for DangIt.
  • Updated Squad patch
  • Supporting KWRocketryRebalanced. Can't support multiple KWR flavors and this one is the first to support KSP-1.4.1.
    • Well, it's possible with multiple .ckans, but I don't have the time =(
  • Updated patches for Mk2/Mk3Exp, FTPlus, Mk2PlaneParts

 Download 

Edited by allista
Link to comment
Share on other sites

Hi @allista, Ok back again. So from \GameData\ConfigurableContainers\TankTypes.cfg I see:

@TANKTYPE[Cryogenic]:NEEDS[WarpPlugin]
{ @PossibleResources ^= :$: LqdMethane 1; LqdCO 1; LqdCO2 1; LqdDeuterium 1; LqdHe3 1; LqdHelium 1; LqdNitrogen 1; LqdOxygen 1; LqdTritium 1;: } //cfd

//cfd = calculated from density

Yet from \GameData\CommunityResourcePack\CommonResources.cfg we have:

LqdMethane density = 0.00042561, LqdCO density = 0.000790, LqdCO2 density = 0.00117325, LqdDeuterium density = 0.0001624, LqdHe3 density = 0.000059, LqdHelium density = 0.0001786, LqdNitrogen density = 0.000824907, LqdOxygen density = 0.001141, LqdTritium density = 0.000320.

By cryogenic I presume we mean gas stored in liquid state. This seems to be the case as all the resources are listed as LqdResourceName.

However the values in \GameData\ConfigurableContainers\TankTypes.cfg are clearly not calculated from density as stated. If they were and we are generous to round up to 1 then we still have a problem. Take LqdMethane,   density = 0.00042561, to get that to be 1 we would multiply by 1000 giving us 0.4 round up to 1. But LqdCO2 has density = 0.00117325, multiply to 1000 gives us 1.1. Then LqdHe3 with density = 0.000059, multiply to 1000 gives us 0.05.

Since we are storing by volume, which gives us a certain number of units of resource to play with in game, I am at a loss to understand what is really going on here.

Is there something else that I am missing, something that means we can totally ignore the density? remember that for \GameData\CommunityResourcePack\CommonResources.cfg we stated the density in CommonResources.cfg is for 1u/L.

Edited by Apaseall
Link to comment
Share on other sites

Is it still like that I should not use this together with IFS?

If so, I can't use Hangars.
If I would remove IFS other mods won't work anymore.

I need clarification, I remember issues a year ago or so because I had CC and IFS installed together.

Link to comment
Share on other sites

37 minutes ago, Gordon Dry said:

Is it still like that I should not use this together with IFS?

If so, I can't use Hangars.
If I would remove IFS other mods won't work anymore.

I need clarification, I remember issues a year ago or so because I had CC and IFS installed together.

It's still like this because there's no reasonable way to use both CC-full and IFS-full: they do the same thing with the same parts.

You can, nevertheless, use Hangar because it requires only CC-core that does not conflict with anything. Likewise with IFS-core and the mods that depend on it.

3 hours ago, Apaseall said:

Hi @allista, Ok back again. So from \GameData\ConfigurableContainers\TankTypes.cfg I see:

@TANKTYPE[Cryogenic]:NEEDS[WarpPlugin]
{ @PossibleResources ^= :$: LqdMethane 1; LqdCO 1; LqdCO2 1; LqdDeuterium 1; LqdHe3 1; LqdHelium 1; LqdNitrogen 1; LqdOxygen 1; LqdTritium 1;: } //cfd

//cfd = calculated from density

Yet from \GameData\CommunityResourcePack\CommonResources.cfg we have:

LqdMethane density = 0.00042561, LqdCO density = 0.000790, LqdCO2 density = 0.00117325, LqdDeuterium density = 0.0001624, LqdHe3 density = 0.000059, LqdHelium density = 0.0001786, LqdNitrogen density = 0.000824907, LqdOxygen density = 0.001141, LqdTritium density = 0.000320.

By cryogenic I presume we mean gas stored in liquid state. This seems to be the case as all the resources are listed as LqdResourceName.

However the values in \GameData\ConfigurableContainers\TankTypes.cfg are clearly not calculated from density as stated. If they were and we are generous to round up to 1 then we still have a problem. Take LqdMethane,   density = 0.00042561, to get that to be 1 we would multiply by 1000 giving us 0.4 round up to 1. But LqdCO2 has density = 0.00117325, multiply to 1000 gives us 1.1. Then LqdHe3 with density = 0.000059, multiply to 1000 gives us 0.05.

Since we are storing by volume, which gives us a certain number of units of resource to play with in game, I am at a loss to understand what is really going on here.

Is there something else that I am missing, something that means we can totally ignore the density? remember that for \GameData\CommunityResourcePack\CommonResources.cfg we stated the density in CommonResources.cfg is for 1u/L.

In TankTypes.cfg the "calculated from density" means that the units/L were calculated based on the density in the resource definition in tons/unit AND the density of the real substance at some meaningful conditions.

E.g. for all LqdGases from CRP, if you search for the actual densities of the liquids, you'll see that the tons/unit density is defined so that 1u === 1L.

Link to comment
Share on other sites

18 minutes ago, allista said:

It's still like this because there's no reasonable way to use both CC-full and IFS-full: they do the same thing with the same parts.

So I guess because I don't use KSP-IE it's safe to just remove IFS and the PatchManager config of IFS ...

But Firespitter and B9PartSwitch are still on the scene ... :cool:

btw I start a new career whatsoever (test careers all the time)...

Edited by Gordon Dry
Link to comment
Share on other sites

32 minutes ago, allista said:

It's still like this because there's no reasonable way to use both CC-full and IFS-full: they do the same thing with the same parts.

You can, nevertheless, use Hangar because it requires only CC-core that does not conflict with anything. Likewise with IFS-core and the mods that depend on it.

In TankTypes.cfg the "calculated from density" means that the units/L were calculated based on the density in the resource definition in tons/unit AND the density of the real substance at some meaningful conditions.

E.g. for all LqdGases from CRP, if you search for the actual densities of the liquids, you'll see that the tons/unit density is defined so that 1u === 1L.

My understanding of what you just wrote is that there are two definitions that are used in conjunction with each other.

1 A resource definition in tons per unit.

2 The density of the real substance.

Source for 2 can be found online. It come in kg/m3. Lovely. Easy peasy.

Source for 1. I believe you said:

Quote

Squad resources: GameData/Squad/Resources/ResourcesGeneric.cfg

CRP resources: GameData/CommunityResourcePack/CommonResources.cfg

From /GameData/CommunityResourcePack/CommonResources.cfg

Quote

RESOURCE_DEFINITION
{
    name = LqdHydrogen
    displayName = #LOC_CRP_LqdHydrogen_DisplayName // General propellant
    abbreviation = #LOC_CRP_LqdHydrogen_Abbreviation // General propellant
    density = 0.00007085000
    unitCost = 0.0367500
    hsp = 9690 // specific heat capacity (kJ/tonne-K as units) at Crygenic Storage temperature
    vsp = 448500 // heat of vapourization (KJ/tonne as units)  or 8.97 * 10^5 or 8.97E5?
    flowMode = STACK_PRIORITY_SEARCH
    transfer = PUMP
    isTweakable = true
    isVisible = true
    volume = 1
    ksparpicon = TriggerTech/KSPAlternateResourcePanel/Icons/LiquidHydrogen
}

And:

Quote

RESOURCE_DEFINITION
{
    name = LqdHelium
    abbreviation = #LOC_CRP_LqdHelium_Abbreviation
    displayName = #LOC_CRP_LqdHelium_DisplayName
    density = 0.0001786
    flowMode = STAGE_PRIORITY_FLOW
    transfer = PUMP
    isTweakable = true
        isVisible = true
    unitCost = 0.0133
    hsp = 4560
    volume = 1
        ksparpicon = TriggerTech/KSPAlternateResourcePanel/Icons/LqdHelium
}

A string search of \GameData\CommunityResourcePack\CommonResources.cfg for "1u" fails to find any results. No where in that file is any definition given for density. NO definition of what density is in terms of.

From \GameData\ConfigurableContainers\TankTypes.cfg we have:

Quote

TANKTYPE:NEEDS[WarpPlugin|KolonyTools|Karbonite|NearFuturePropulsion|CryoEngines|zzz_CryoTanks|FFT]
{
    name = Cryogenic
    UsefulVolumeRatio = 0.99
    TankCostPerSurface = 20 //no active cooling
    AddMassPerVolume = 0.01 //only insulation
    Boiloff = true
    PossibleResources =
}
@TANKTYPE[Cryogenic]:NEEDS[WarpPlugin|KolonyTools|Karbonite|NearFuturePropulsion|CryoEngines|zzz_CryoTanks|FFT]
{ @PossibleResources ^= :$: LqdHydrogen 2;: } //USI uses ~4, CryoTanks ~2, KSPIE and IFS use ~1.2; but the density in CommonResources.cfg is for 1u/L
@TANKTYPE[Cryogenic]:NEEDS[WarpPlugin]
{ @PossibleResources ^= :$: LqdMethane 1; LqdCO 1; LqdCO2 1; LqdDeuterium 1; LqdHe3 1; LqdHelium 1; LqdNitrogen 1; LqdOxygen 1; LqdTritium 1;: } //cfd


TANKTYPE:NEEDS[WarpPlugin|KolonyTools|Karbonite|NearFuturePropulsion|CryoEngines|zzz_CryoTanks|FFT]
{
    name = CryoCooling
    UsefulVolumeRatio = 0.95
    TankCostPerSurface = 200 //active cooling
    AddMassPerVolume = 0.1
    Cooling = true
    PossibleResources =
}
@TANKTYPE[CryoCooling]:NEEDS[WarpPlugin|KolonyTools|Karbonite|NearFuturePropulsion|CryoEngines|zzz_CryoTanks|FFT]
{ @PossibleResources ^= :$: LqdHydrogen 2;: } //USI uses ~4, CryoTanks ~2, KSPIE and IFS use ~1.2; but the density in CommonResources.cfg is for 1u/L
@TANKTYPE[CryoCooling]:NEEDS[WarpPlugin]
{ @PossibleResources ^= :$: LqdMethane 1; LqdCO 1; LqdCO2 1; LqdDeuterium 1; LqdHe3 1; LqdHelium 0.7; LqdNitrogen 1; LqdOxygen 1; LqdTritium 1;: } //cfd

There we see LqdGasName values of 1, 2 and 0.7.

LqdHydrogen density = 0.00007085000 and 2. LqdHelium density = 0.0001786 and 0.7. Neither of which is = 1.

LqdHydrogen density = 70.849 kg/m3 Pressure 1.013 bar (temp not specified) [https://encyclopedia.airliquide.com/hydrogen]. As I mentioned earlier, 0.00007085000 looks a lot like someone took the decimal point in 70.849 for a walk six places to the left. Which is kg/m3 to kg/ml or 1t/l.

So I have to ask, where is:

Quote

E.g. for all LqdGases from CRP, if you search for the actual densities of the liquids, you'll see that the tons/unit density is defined so that 1u === 1L.

Can you see my problem?

I cannot go from real world density, kg/m3 to a suitable value for PossibleResource if the conversion is not consistent. Or explained. Or defined. Where can I read what the definitions are? I know where to find the definition of what density is, in the real world. A dictionary would even work.

Where is this definition that 1u === 1L ? Not in any of the files that we have been discussing so far.

Can you see why I keep asking the same question?

I want to use CC. I think its great. I ALSO want to understand how to add additional resources to it so that I can store resources used in other mods. I want to do this work. I am NOT asking you to do it.

I guess that if a took a tank, used CC to store 1m3 of a gas in liquid form I would find that the mass of the tank would increase by an amount in kg. I trust that mass will be accurate. I am sure that part of the CC works fine. I expect it to, I have no doubt it will.

I believe that 1m3 of one gas in liquid form is actually a given number of units of that gas for me to play with in game.

I also believe that 1m3 of a different gas in liquid form would contain a different number of units than that of the first gas. That is because I believe one unit of one gas takes up a different volume than that of another gas, be they stored as solid, liquid or gas.

What I do not want to do is this, guess a value. Either the value will give me magically the correct number of units for the volume I use, or it will not. If not then the patch will make the container store more units than it should, big cheaty no no for me. Or it will store too few units and no one will want to use my patch. I mean who would it they could store more units in one of the other beautifully created pieces of art easily available?

What I do want to do is get it right.

Link to comment
Share on other sites

Today I thought I would go in game and see what I could learn by taking a tank and adding different gases in liquid form to them. Will I thought I would take a LargeTank, split it into 1m3 segments. Then I took a number of CT2500 tanks. What I found is interesting.

Using values like @PossibleResources ^= :$: LqdArgon 0.0013954; LqdKrypton 0.002413; LqdNeon 0.001207; LqdAmmonia 0.0007021; LqdNitrogen15 0.0008838; LqdOxygen18 0.001284; LqdXenon 0.002953; LqdFluorine 0.001505;: I got varying number of units of said resource in the same 1m3 space.

Turning to the IFS tanks, every tank contained the same number of units despite containing different resources. Since each tank is identical in volume, it looks like the values used to determine the number of units per volume are also identical. The only time density is used then is to find the mass of the resource given a certain number of units of it.

This is certainly a puzzle for me. I keep thinking, different kg/m3 densities must produce different number of units for the same space. The only way the same number of units can be contained in the same volume, given differing kg/m3 densities, is if the temperature and or pressure are not constant.

I guess I have with units = moles stuck in my head.

Next up, gases in gaseous phase. Not sure where I saw it, not the one in here, another one, reference to storing gases at 200 atm. At least that seems to be some form of consensus between mods.

https://www.dropbox.com/s/t47kxw0ge62eaim/LqdGasName_Test.craft?dl=0

Edited by Apaseall
add craft file
Link to comment
Share on other sites

Well gases stored as gases seems to work like I expected, you get different number of units of gas in the same volume. Oh and even if volume is not use, it is present, you can see it in these test files.

Using values like     @PossibleResources ^= :$: ArgonGas 391.09; KryptonGas 1154.8; NeonGas 162.94; Ammonia 651.46; Nitrogen 241.30; Oxygen 315.79; XenonGas 2322.9; Fluorine 1706.7;:

https://www.dropbox.com/s/dqay1scges8iqz0/GasName_Test.craft?dl=0

This time I used squad and NFP tanks, as I don't believe IFS does plain old gas storage as gas. Gas <> LqdGas yes but not plain old gas on its own.

Where does this leave me? well with a cat meowing for his food lol.

Edited by Apaseall
added values used
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...