taniwha

[1.8] Modular Fuel Tanks v5.13.0

Recommended Posts

I don't fully understand your syntax yet in TankTypes.cfg (e.g. "basemass = 0.000625 * volume" seems to be a general definition which is sometimes overwritten by "mass = 0.000625", sometimes not?), what I did so far was creating some config files for other non-stock LfOx / Lf tanks. If you could give me a bit background know how, I could also do other tank types like structural.

Also: how do you measure the dimensions of parts? There's no tape measure in the VAB.

 

Share this post


Link to post
Share on other sites

Hmm, something you might want to look at is my mftgen.py script in cfgnode github repo. TBH, I too always forget how much of that stuff works.

Share this post


Link to post
Share on other sites

Python... been a while, some 30 years actually... so if I understand your script correctly, you're enumerating and parsing all GameDate\..\.cfg files through that script which then creates its own MFT .cfg files according to the content of the parts .cfg files it finds?

Share this post


Link to post
Share on other sites

It parses all of GameData cfg files for resource definitions (to get density and thus resource mass, but tnat's not actually used, probably why I never noticed the hard-coded KSP version), after that, it goes through all the part cfg files in the trees specified on the command line. But yeah, it then generates MM patches sent to stdout.

Share this post


Link to post
Share on other sites

The few MFT cfg files I did, I just opened the respective tank cfg in a text editor, copied a similar MFT cfg, and changed the values accordingly.

What I don't understand atm:

For any given tank, regardless of content, we do have the volume and dry mass. With MFT, it can be filled with any content, and we know the volume as well as density of the different propellants. Why are lines like

        basemass = volume * 0.000625

needed at all?

Then we have of course the second category, parts like nose cones, that do not contain any fuel per se, for those we have the mass but no volume, that has to be calculated manually and then added to a MFT cfg file.

What do I miss here?

Edited by VoidSquid

Share this post


Link to post
Share on other sites

Because MFT sets the tank mass, potentially per-resource (Real Fuels is just MFT with some extra stuff like ulage and boiloff). I'd have to go through the code again. If you do the math, you'll find that the basemass is the part's dry mass.

TBH, I don't particularly like the system, but ialdabaoth and maybe NathanKell did it up before I got involved so we're stuck with it, though there might be a way to tell MFT to just leave the tank mass alone (if not, maybe I should add one).

Share this post


Link to post
Share on other sites

I see, things like ReafFuel or RSS do change my simplistic approach, naturally. Never used those mods, the few MFT cfgs I made, I made just for my own needs, stock game plus part mods like MRS or RLA.

Edited by VoidSquid

Share this post


Link to post
Share on other sites

It's more that the code is heavily shared: RF uses MFT's tank code plus some extra bits. And then a whole pile of complex configs (all in the same repo, but built and released separately).

Share this post


Link to post
Share on other sites

Ok then, how can I help? Making config files the way I described is a no-brainer. Adding lines according to the RF requirements should be easy too if I know what's required. My personal biggest obstacle are parts not having any fuel in them per se, nose cones etc., as I said: how do I get the exact dimensions to calculate the available volume?

Share this post


Link to post
Share on other sites

Don't worry about RF unless you want to support RF. It looks like you can use -1 for the basemass to tell MF to leave the part's mass alone.

Share this post


Link to post
Share on other sites

Which lines are required then? Example of a cfg I made for a LfOx mod tank:

Spoiler

@PART[tanknamehere] {
    MODULE {
        name = ModuleFuelTanks
        volume = 12345
        type = Default
    }
}

That's a simple copy and paste from one of the MFT cfg files which comes with MFT.

For tanks in Squad_modularFuelTanks.cfg, some do have lines for basemass= volume * <factor>, some don't, e.g.

Spoiler

@PART[rcsTankMini] {
    MODULE {
        name = ModuleFuelTanks
        volume = 20
        type = RCS
        basemass = volume * 0.001
    }

}

@PART[RCSFuelTank] {
    MODULE {
        name = ModuleFuelTanks
        volume = 120
        type = RCS
    }

}
 

Why is that?

Even for the same fuel type, if present, <factor> in lines

basemass = volume * <factor> 

varies greatly.

I find that confusing, tbh, this is the reason I only made a a few cfg files for some LfOx tanks from various part mods, for my own needs.

Edited by VoidSquid

Share this post


Link to post
Share on other sites

@VoidSquid

basemass is already defined in the TANK_DEFINITION so it's not necessary to define it on a per part basis UNLESS you want to override the default definition.

For the part you inquired about, it was probably done to match the stock behavior for that part. (the default configuration matches typical stock behavior for the tank of that type)

Share this post


Link to post
Share on other sites

Is there a rough ETA on the update for modular fueltanks?

Please do not take this as me being pushy, if you think it's gonna be a year or never, or you just can't say or don't feel like answering, that's cool :)

I just have the itch to play some KSP again and I don't wanna drop the mod and then it updates tomorrow or something like that :D

Share this post


Link to post
Share on other sites

I've loved Modular Fuel Tanks, but are there viable alternatives? I'm looking to keep the number of mods as low as possible, and am really only looking for something to change stock tank contents in stock, KW and SXT tanks. 

Share this post


Link to post
Share on other sites

I have a local patched copy of this that works fine. The maintainer is working on it and will release a new version, presumably as soon as he can find the time. It was already close. This mod needed almost no changes.

(If you really want to and have the skill you could build my modified version: https://github.com/NathanKell/ModularFuelSystem/pull/236 )

 

Edited by ArthurP

Share this post


Link to post
Share on other sites

Sorry, guys, but I've been very busy and will continue to be very busy for the next little while. I hope to get some time to update my mods soon.

Share this post


Link to post
Share on other sites

I've released version 5.13.0 of MFT, many thanks to Arthur Peters (@ArthurP, I think).

Note: my testing was pretty minimal, but things seem to work.

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.