Jump to content

[0.21.1] StretchyTanks v0.2.2 (updated 8-26-13)


AncientGammoner

Recommended Posts

AncientGammoner, I have said many times in this thread--and will repeat now--that I love the mod, and offer you many thanks for it. Further, as Jahulath says, you're certainly under no obligation to make the mod, let alone make it compatible with other mods--I really appreciate the work you've done.

But since you're trying to make it compatible with MFT, that implies (to me) that you want it compatible with what MFT really does, which is _allow different tank configurations_. That the ability to specify, in CFG, the base mass of a tank and the mass added to a tank for each unit of volume it stores _modified by the fuel type to be stored_.

As it stands, your mod does not do this. It will links dry mass and volume, which _breaks_ MFT's ability to change that ratio. Which is necessary for the self-included mod RealFuels--if you look at the CFG (RealTankTypes) you will see that LH2 tanks, for instance, have a much lower dry mass (that's what mass = 0.00005 implies, vs LF's 0.0005--that's not mass of fuel, that's tank mass there).

No modified config--the RealFuels config right from the MFT archive.

Now, it's true that it's inconvenient that MFT doesn't store that multiplier. However, it looks like Starwaster has found a way to do the lookup (tank type->basemass, fuel type->mass), so it's certainly possible to pull from confignodes what the tank should mass. And again, as to "no indication when it's using RealFuels"--there's no difference in terms of MFT works. It's just that basemass and fueltype structural mass work out, when MFT does the math for LF and Oxidizer, to be the same as in the stock game. In MFT that ratio is simply NEVER hardcoded. It's read from CFG (using those two attributes) for LF and Oxidizer as well as any other fuel type.

Again, it's not like "Regular MFT" and "Real Fuels" and "Other people's versions" operate off any different codebase. MFT is the same plugin. The only thing that changes is the CFG values you feed it. If you feed it values that happen to equate to a 1:1600 mass:volume ratio, that's what you'll get (and that's the case for "stock" MFT). If you feed it values that don't...then StretchyTanks, as it stands, reverts to a 1:1600 mass:volume ratio. Which breaks anything with different values for basemass or fueltype structural mass, since (for instance) RealFuels's LH2 depends on low density (and thus large tank size required to store it) but lower tank dry mass (so you don't get overly penalized by needing volume-larger fuel tanks for it).

Edited by NathanKell
Link to comment
Share on other sites

MFT is poorly written tbh. Nowhere does it store the multiplier its using to calculate basemass, nor does it give any indication to even know when it's using RealFuels instead of normal. Starwaster's "fix" is to store that information in my plugin... which I'm not exactly enthused about.

It's easy enough to derive from the mass that's already been stored on the part when your code gets its turn at it. Storing that original value before operating on it is a valid and appropriate method. Using that value in place of initialDryMass after the tank is scaled results in the correct basemass being used when final mass is determined after scaling.

First of all, it has to be overwritten since MF does not update basemass after the initial load, so it would have no way of knowing if the tank was stretched.

There's a reason I said overridden rather than overwritten. Of course basemass has to be overwritten, why would I say otherwise? The important is the final mass value and how it was arrived at.

I'm sorry but are you the author of MFT?

Irrelevant.

Are the cfg files in your sig official releases?

Also not relevant, but the cfg files allow Real Fuels to be experienced the way the author intended them to be, and NO, I don't have to be that person to know what was intended. The code makes it clear. All the cfg in my signature does is correct a mistake in the Real Fuels cfg.

The Real Fuels cfg attempts to splice rather than insert mass value for LiquidFuel and Oxidizer. Original TANK declaration had no such value therefore ModuleManager ignores the attempt at splicing. You may recall getting 'ridiculous' values when you tried to test earlier. Well now you know why. See for yourself.


// ModularFuelTanks/Resources/TankTypes.cfg
// No mass declaration
TANK_DEFINITION
{
name = Default
basemass = 0.000625 * volume
TANK
{
name = LiquidFuel
amount = full
maxAmount = 45%
}
TANK
{
name = Oxidizer
amount = full
maxAmount = 55%
}
// remaining tanks omitted for clarity
}


// ModularFuelTanks/RealFuels/Resources/RealTankTypes.cfg
@TANK[LiquidFuel]
{
@utilization = 1.0
@mass = 0.0005 // Note the splice operator. This line FAILS because the original LiquidFuel entry had no mass. But it's easy to see what the intent was here.
@amount = full
@maxAmount = 40%
}
@TANK[Oxidizer]
{
@utilization = 1.0
@mass = 0.0005 // Same. Line fails because trying to splice a non existent property will fail.
@amount = full
@maxAmount = 60%
}
// remaining tanks omitted for clarity
}


@TANK_DEFINITION[Default]
{
@TANK[LiquidFuel]
{
mass = 0.0005 // See what I did here? All I did was remove the splice operator. That's all.
}
@TANK[Oxidizer]
{
mass = 0.0005 // See what I did here? All I did was remove the splice operator. That's all.
}
}

Not using that fix is what results in 'ridiculous' mass values for LiquidFuels & Oxidizer tanks in the Default tank when using Real Fuels. So in the absence of both Ialdaboath and Chestburster (who is the actual maintainer for Real Fuels) so why should I not distribute a solution? ialdaboath's wish was for the configuration issues to be crowd-sourced anyway and I bet he wouldn't have a problem with it.

Edited by Starwaster
Link to comment
Share on other sites

Someone upthread was asking about Saturn-style tank textures. I went ahead and did that, and also a checkered one.

AncientGammoner, you have PM. :)

a9o7UJxl.jpg

That looks great!

I was actually wondering last night how that kind of texture would scale. I guess as long as there's no fine detail to get noticeably stretched then it'll come out ok.

Link to comment
Share on other sites

It is not just MF compatibility that am wondering about... Why is it that when we use the LF+Oxidizer fuel type we have more LF than when we use only an LF fuel type?

Example, this is the same size tank, I have only changed the fuel type:

XyPKW2K.png

qe4Uh6t.png

With a little math we can safely assume that the storage units (in game) equate to roughly 5L per unit then we can simply calculate the density of a given fuel at a given pressure (LF as RP1 for example has a density of .81–1.02g/ml at 1bar) and work out the weight/volume/units thusly. I really love the mod in general and am grateful for it but I do humbly request you correct the math you are using. It would also be great if you could add a cfg file for the plugin so that we could define our own resources, xeon, kethane, H2, whatever else someone would like a big or small tank for... This would add incredible value and flexibility to your already valuable creation. By creating the cfg file for fuels you would solve a number of use problems mentioned in this thread and spare yourself the headache of having to hardcode resources.

Edited by Conti
Link to comment
Share on other sites

It is not just MF compatibility that am wondering about... Why is it that when we use the LF+Oxidizer fuel type we have more LF than when we use only an LF fuel type?

With a little math we can safely assume that the storage units (in game) equate to roughly 5L per unit then we can simply calculate the density of a given fuel at a given pressure (LF as RP1 for example has a density of .81–1.02g/ml at 1bar) and work out the weight/volume/units thusly. I really love the mod in general and am grateful for it but I do humbly request you correct the math you are using. It would also be great if you could add a cfg file for the plugin so that we could define our own resources, xeon, kethane, H2, whatever else someone would like a big or small tank for... This would add incredible value and flexibility to your already valuable creation. By creating the cfg file for fuels you would solve a number of use problems mentioned in this thread and spare yourself the headache of having to hardcode resources.

Because it calculates fuel capacity based on tank mass and the base tank mass varies according to fuel type. He's using different ratios for oxidizer compared with liquid fuel.

Link to comment
Share on other sites

mwlue, Starwaster, thanks!

Dragon01, I asked about that upthread. AncientGammoner said it can't be done with the way the code's written (tanks are scaled using model transforms, not bones like pWings).

Conti, AncientGammoner talked about that upthread, it's by design, to be like airplane tanks (which hold less LF than their equivalent-volume rocket fuel tanks).

Link to comment
Share on other sites

I understand he based the ratios and mass off of the stock game parts. What I am suggesting is that since these are procedural fuel tanks and NOT stock tanks we can adjust them accordingly. Using on an air breathing jet aircraft? Use a smaller tank... Using to fuel a nuclear or thermal engine? Want to carry oxidizer separately from LF? You want the mass to equate to volume. My repetitious suggestion in this thread basically amounts to, lets enhance stock (using the 'bess guess' to determine real world analogue ratios for fuel units/mass for a given volume) rather than simply nerf an otherwise brilliantly adaptable fuel storage mod.

The squad LF tanks were most likely nerfed intentionally because they are/were used as fuselage and not as strictly fuel tanks, had they been full it would have made most aircraft (using stock parts) too heavy. This is a role stretchy tanks need not fill.

Link to comment
Share on other sites

I understand he based the ratios and mass off of the stock game parts. What I am suggesting is that since these are procedural fuel tanks and NOT stock tanks we can adjust them accordingly. Using on an air breathing jet aircraft? Use a smaller tank... Using to fuel a nuclear or thermal engine? Want to carry oxidizer separately from LF? You want the mass to equate to volume. My repetitious suggestion in this thread basically amounts to, lets enhance stock (using the 'bess guess' to determine real world analogue ratios for fuel units/mass for a given volume) rather than simply nerf an otherwise brilliantly adaptable fuel storage mod.

The squad LF tanks were most likely nerfed intentionally because they are/were used as fuselage and not as strictly fuel tanks, had they been full it would have made most aircraft (using stock parts) too heavy. This is a role stretchy tanks need not fill.

I understand.

Link to comment
Share on other sites

This is the result of my experimenting with creating a Stretchy SRB using configuration files entirely.

https://www.dropbox.com/sh/b0rp1frpxg3l1m3/XtqgNy6Oxm

It's a proof-of-concept for people to play with. Do whatever you want with it. It requires Modular Fuels and of course, Stretchy Fuel Tanks.

How it works:

Adds a new tank definition: SRB

Adds a new resource: SolidFuel2

Configures the LV909 to be configurable to an SRB nozzle

Instructions:

Copy the folder StretchySRB to your GameData folder (optional: find the craft file in the StretchySRB folder and copy it to your VAB folder)

Launch the game

Put the Stretchy SRB onto your craft.

Stretch it to desired size.

Configure the Stretchy SRB with SolidFuel2 (the only one it accepts anyway)

Put an LV909 on the bottom.

Configure the LV909 for SRB_Standard

Launch when ready.

Known problems:

Mass isn't likely to match up with a standard SRB of whatever size you configure this to,

Center of mass could drift down a bit towards the engine as you start to run out of propellent but it shouldn't be a problem.... I hope.

Rocket thrust is higher than it should be to compensate for lower mass ratio

Because this isn't intended as any sort of release, the contents of the dropbox folder could change throughout the day as I adjust this.

Edited by Starwaster
Link to comment
Share on other sites

these tanks dont overheat

(i tried to lazor sunbeam it, the sunbeam canon exploded due to overheating before the tanks do)

I just suddenly had a thought about this. It's probably a natural side effect of scaling them. Was the tank you tried to laser scaled very large? If so, KSP is probably scaling back the heat input to simulate the heat having to spread out over a larger mass.

What made me think of this was when I was putting together the stretchy SRB files earlier. I pasted a portion of one of Squad's SRBs into an LV909 (to simulate a nozzle) and it exploded fairly quickly even though it was using the same heat production value as the SRB. The only difference was that the LV909 is a lot smaller. Not sure if mass has anything to do with it, just size.

Link to comment
Share on other sites

I was wondering if it's common for the tanks to not display delta v and such using engineering mod or is it my install?

it's probably another mod possibly combined with something about your specific rocket build that's causing delta-V to calculate incorrectly.

for instance non-stock decouplers, the interstage adapter of procedural fairings and possibly certain modular fuels engine configurations.

Any one of the above might be enough to cause it or in conjunction with other mods.

also for example, I can build a craft with 3 MF tanks and engines and deltaV calculates just fine. But then I put two of those tanks on decouplers with fuel feeds into the center tank and it either miscalculates that stage or shows No delta at all for that stage.

but stretchy tanks shouldn't be a factor in that. not that I've noticed

Edited by Starwaster
Link to comment
Share on other sites

Would it be possible to make an stretchable procedural engine?

Just one model would be enough seeing as it would probably only be first stage giant booster?

I think the russian N1 engine would make it nice for stretching and has already been implemented as the matriarch on Novapunch.

Link to comment
Share on other sites

I'd really like to try this mod, but i'm having the same issues as reported some days ago (in Linux). Sometimes my game crashes when it goes into the editor (with StretchyTanks installed), and it crashes all times i try to select a stretchytank from the part list. Is there anything we can provide to the mod creator in order to try to troubleshoot this? I'm using Fedora 19 with the 64-bit build of the game.

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...