Jump to content

[1.8-1.9] Modular Fuel Tanks v5.13.1


taniwha

Recommended Posts

@laggerd: Thats because the cfgs for Modular fuel tanks links them to the default Tank Definition which is only configured to handle those default 4 resources.

You would need to add a new TankDefinition with the resorces you want (just create a cfg, copy the default defenition, rename it, and add more types of resources to it). After that add another entry to run a Module Manager check to update all the tanks to your new tank, an example is below.

TANK_DEFINITION
{
name = NameofNewDefaultTankType
basemass = 0.000625 * volume
TANK
{
name = NewResource1
mass = 0.000825
amount = 0.0
maxAmount = 0.0
note = I am a note
}
}
@PART
[*]:HAS[@MODULE[ModuleFuelTanks]:HAS[#type[Default]],!MODULE[ModuleCommand]]:FINAL
{
@MODULE[ModuleFuelTanks]
{
@type = NameofNewDefaultTankType
}
}

Just make sure you include the default resources in your new tank definition if you still want them to be an option. Especially since the above will essentially update ALL default tanks to the new one which would make them all incapable of holding normal fuels if you don't :P

EDIT: The ":FINAL" on the Module Manager listing forces it to run after all the other processing has been complete. So this will update ALL of the other tanks that Modular Fuel Tanks already provides cfgs for... So your KW Rocketry tanks will get the correct module before you update it with a new tank type :)

Edited by ExavierMacbeth
Link to comment
Share on other sites

So I've got a bit of a unusual use case.

I have an unmanned ATV part, which would be used to resupply space stations with crew provisions and propellant for stationkeeping, with the following mass budget:

Dry Mass: 1.7t

Life Support supplies: ~1.125t

Propellants: 0.8t

~3.625t TOTAL

The last part, propellants, is where I would like some help with. I'd like to set it so that of the 800 kg limit allocated for propellants, users can fill *any* combination of LiquidFuel, Oxidizer, Monoprop and/or Xenon:

ex. 1 - (88 Oxidizer * 5 kg/L) + (72 LiquidFuel * 5 kg/L) =< 800kg

ex. 2 - (55 Oxidizer * 5 kg/L) + (45 LiquidFuel * 5 kg/L) + (75 Monoprop* 4 kg/L) =< 800kg

ex. 3 - (4000 Xenon * 0.1 kg/L) + (100 Monoprop* 4 kg/L) =< 800kg

ex. 2 - (55 Oxidizer * 5 kg/L) + (45 LiquidFuel * 5 kg/L) + (50 Monoprop* 4 kg/L) + (1000 Xenon * 0.1 kg/L) =< 800kg

How would I compose such a tank definition?

Link to comment
Share on other sites

sumghai: Hrm, well, for LF and O, it's pretty easy: at 5kg/u, 800kg would be 160u (note that unless using RealFuels, resource volumes are not liters, but rather 5 liters (for most resources). If you really want a normal unit, use British gallons (close enough at 4.545l/gal)).

I guess you would set the available volume to 160u, and utilization at 1 for LF and O.

At 4kg/u for monoprop, you want a utilization of 1.25 to get 800kg of monoprop into the specified 160u space. For xenon, 50.

All that said, it does not make sense to specify capacities via mass, as the size of the part is fixed, and thus your budget is limited by volume rather than mass. Leaving all utilizations at 1, this gives 800kg max for each of LF and 0, 640kg for monoprop and 16kg for xenon (assuming its utilization actually should be 1).

Link to comment
Share on other sites

Like this?


TANK_DEFINITION
{
name = FusTekResupply_RearSection
basemass = -1
TANK
{
name = LiquidFuel
amount = 0.0
maxAmount = 45%
utilization = 1
}
TANK
{
name = Oxidizer
amount = 0.0
maxAmount = 55%
utilization = 1
}
TANK
{
name = MonoPropellant
mass = 0.000625
amount = 0.0
maxAmount = 100%
utilization = 1.25
}
TANK
{
name = XenonGas
mass = 0.000625
amount = 0.0
maxAmount = 100%
utilization = 50
note = (pressurized)
}
}


MODULE
{
name = ModuleFuelTanks
volume = 160
type = FusTekResupply_RearSection
}

Link to comment
Share on other sites

That should work. But you can also set overrides in the module definition; that way you don't have to create a new tank definition.

	MODULE
{
name = ModuleFuelTanks
volume = 160
type = Default
TANK
{
name = MonoPropellant
utilization = 1.25
}
TANK
{
name = XenonGas
utilization = 50
}
}

Link to comment
Share on other sites

So for MFT users, I've developed a support package that improves your MFT experience in multiple ways.

A lot of this is about integration with Procedural Parts, however there's other improvements to the GUI - better use of tweaking ect.

If you would like to give this a try, install my updated MFT package over the top of an existing MFT 4.3 install.

Link to comment
Share on other sites

I think having it on the wiki would be good.

IIRC the only notable new feature is dedicated=true, which can be applied to parts that have both a fuel tank and an engine (SRBs, liquid boosters) and make the fuel tank unconfigurable and "locked" to the engine's fuel mixture, whatever that is.

Link to comment
Share on other sites

I have seen tanks that have the ability to create tanks with the default 40/60 split after the tanks have been deleted. I don't know how this was done, or how I could setup one to do other splits like this automatically. Is there anyway to configure this in the CFG? if so is it on the tank.cfg side, or the mft definitions side? thanks for the help

Link to comment
Share on other sites

If you have an engine attached to your vessel, tanks with a connection to that engine will have the option to be autoconfigured for that engine's mixture. These button(s) [1 per mixture, with a tooltip showing which engines use that mixture] will appear at the bottom of hte list of resources when there is available volume in the tank.

Link to comment
Share on other sites

If you have an engine attached to your vessel, tanks with a connection to that engine will have the option to be autoconfigured for that engine's mixture. These button(s) [1 per mixture, with a tooltip showing which engines use that mixture] will appear at the bottom of hte list of resources when there is available volume in the tank.

thanks, I apreciate that I was wondering why it wasn't working. Now I just got to see if I can get people to agree on how much the ratio from fuel to water should be in stock tanks when it comes to TACLS and KSPI... I have CFG's that add there resources to MFT, and I am going to add another for Extraplanetary Launchpads tomorrow, all in my bid to get rid of extra tanks to lower models being loaded to lower my memory usage.

Link to comment
Share on other sites

First off, love the new GUI change, makes it way easier to work with.

I did find a minor bug, which may be indicative of a larger issue but can't be sure. Using KSPI's DT Vista engine, if you add stock or spherical fuel tanks ahead of it, remove all included tanks and add a pure liquid fuel tank, on transfer to the launchpad from the VAB those tanks also get an extra oxidizer tank added that exceeds limits, and it breaks the clickability of the tank. Should be noted that I have the 3.75 stock decoupler after the DT Vista and then a LF/OX booster to get the thing to orbit.

Link to comment
Share on other sites

Ok, prior to this update I had two cfg's to add TACLS and KSPI resources to modular fuels. I did, and it worked. I installed this update and it borked the whole thing, originally I had an issue with a duplicate water entry. Now all of it works if i switch out the dll's for the older one. I originally had the temporary patch installed and it worked and I am not sure exactly what happened to cause it all to not work. But simply switching out the dll solves the problem. Is there a chance that things are being loaded wierd because of the changes to modulemanager? Do I need to add in some :has tags or something to make sure the cfgs are loaded into the tanktypes correctly? I don't know why one dll would work and the other wouldn't... any ideas?

kspi_mft.cfg

TACLifesupport_MFT.cfg

I tried different versions of modulemanager, and I don't know if its from that.. I don't know programming and the cfgs are the extent of my programming knowledge. So I don't know if it could be the problem, I only mentioned it because I know they changed some things and that there was some warnings about different versions. I don't know if that is even an issue here, I just toss it out because it was in my debugging path as I was trying to find the issue. I went over both cfgs double then tripple checking brackets, but I may have missed one, but I doubt it because the cfgs work with the older version of the mod. I am sorry to make extra work Taniwha and if there is anything I can do, send you a beer or something I am game if you can help me figure this out...

Link to comment
Share on other sites

Ok, prior to this update I had two cfg's to add TACLS and KSPI resources to modular fuels.

So it was working fine with my patched version of RF, but not anymore? That's odd. There wasn't a huge amount of change between.

Any exceptions in your log?

You aren't ending up with duplicate resources?

Edit: The below reply might apply to you too. The only big change between my latest patch, and the released RF, is that only resources managed by RF are cleared from the tank, rather than everything.

Edited by swamp_ig
Link to comment
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.

×
×
  • Create New...