Jump to content

[1.8-1.9] Modular Fuel Tanks v5.13.1


taniwha

Recommended Posts

Hi I'm getting this problem "This fuel tank cannot hold resources" :(

Right clicking on parts for 'more info' reveals that my volume = x units Modular fuel tank can hold:

Which suggests to me that the TANK_DEFINITION s in Resources/TankTypes aren't working.

I tried adding TANK s directly to the MFT MODULE in a part file... like in Tals spherical tanks part files.... no joy

I tried removing the resources already in the tanks to make way for modular fuel... no joy

Please help

Link to comment
Share on other sites

I have following problem with MFT and USI Kolonization Systems: all kolonization modules have life support by default, even the Power Distribution Units (which are supposed to contain Enriched Uranium and ElectricCharge). I can't change it in UI and my understandment of .cfg files isn't great... I didn't modify any file before I noticed this problem. I would appreciate any help :)

Link to comment
Share on other sites

I have pushed a fix for the life support related problems. I'll do a release tomorrow night unless NathanKell has complaints about what I've done.

Basically, I have made MFT record what resources it manages for a part, and then delete only those resources that it manages and are not in the new tank type. It seemed to work well in my brief testing.

Link to comment
Share on other sites

chrisl: I would much rather Near Futre Propulsion itself included MFT files. MFT's config format does not change often, but NFP's fuel and tank lineup can, so it would make much more sense for the configs to be there.

Link to comment
Share on other sites

Hmm not coming up for me. I've tried on both my modded install and my stock backup and neither one gives me the option. I'll try again with a complete re-download from steam to make sure that my backup isn't messed up someway. Otherwise the mod works flawlessly, The UI comes up and everything can be hand edited just fine.

I'm having the same problem. Everything else about this (excellent) mod works perfectly, but that auto-configure button doesn't show for me, modded or stock. (The button in RealFuels shows up just fine in my RP-0 install, though, if that's at all relevant.)

Do you have to do things in a particular order? I've tried every combo I can think of, but that doesn't entirely rule out the possibility of my being a total numpty. :rolleyes:

Logs are available below if they're any use. I didn't notice anything particular in there, but I'm a total amateur. KSP 0.90 Win 32-bit, MM 2.5.9, MFT 5.4.2, no other mods.

https://www.dropbox.com/sh/iftx4t2lmt932wb/AAADVbPKJxeqGu0JG8gh7dcra?dl=0

Link to comment
Share on other sites

HunterForce: This mod has exactly zero parts: it is purely code + configuration tweaks via ModuleManager. That is, it modifies existing tank parts. Just right-click on any stock (and many a mod) tank: you will see a "Show UI" button.

Link to comment
Share on other sites

I have made a MM config thats very useful to convert all tanks for Modular Fuel Tanks. Basically it is adding up fuel recurses present in a PART config.


// Give every PART with a resource a modul ModuleFuelTanks (except PARTS with IntakeAir or a Command Module)
@PART[*]:HAS[!MODULE[ModuleFuelTanks],!MODULE[ModuleCommand],!RESOURCE[IntakeAir],@RESOURCE[*]]:NEEDS[modularFuelTanks]:FIRST
{
MODULE
{
name = ModuleFuelTanks
volume = 0
type = Default
}
}
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[LiquidFuel]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[LiquidFuel]/amount$
}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[Oxidizer]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[Oxidizer]/amount$
}
}
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[MonoPropellant]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[MonoPropellant]/amount$
}
}
//Divide XenonGas tanks by 56
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[XenonGas]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[XenonGas]/amount$
@volume /= 56
}
}
//Divide LiquidHydrogen tanks by 56
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[LiquidHydrogen]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[LiquidHydrogen]/amount$
@volume /= 56
}
}
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[Karborundum]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[Karborundum]/amount$
}
}
// If tank volume is still zero than non of the above resources where present and we delete ModuleFuelTanks
@PART[*]:HAS[@MODULE[ModuleFuelTanks]:HAS[#volume[0]]]:FINAL
{
!MODULE[ModuleFuelTanks] {}
}

Edited by Kolago
Link to comment
Share on other sites

Hmm might be useful if player has many different part packs that do not (yet) have MFT included. Nice of you taking care not to affect non-tanks (ie not adding MFT to structural girders :) ).

Ops spoke too soon : How does this affect EC resources ? I hope batteries don't get fuel now. :) Not that i'm trying to complain on individual playstyles, but that would not make much sense. :)

Silly me, they are defined in regexes, no batteries with fuel. :)

It is a pitty that you had to define per-resource definitions. There aren't that many, but still, a more unified approach ("non-physical" like EC vs "physical" fuels like LF,OX,XE etc) would be nice - and that should really be Squad's job, not yours.

Edited by fatcargo
Link to comment
Share on other sites

Hey guys, getting a weird duplicate menu option problem here:

screenshot496.jpg

It's on a clean install of the latest MFT with B9 and tweakscale installed.

I suppose the options work fine, but I don't think it's normal to have duplicate options.

Link to comment
Share on other sites

Insanitic; due to a mistake on my part, many Mk2 parts wound up with two MFT modules. Fortuantely, the duplicate configs are in separate files, so just delete one file (SPP.cfg is probably: the other duplicates are in Squad_modularFuelTanks.cfg so that would require editing).

Link to comment
Share on other sites

Insanitic; due to a mistake on my part, many Mk2 parts wound up with two MFT modules. Fortuantely, the duplicate configs are in separate files, so just delete one file (SPP.cfg is probably: the other duplicates are in Squad_modularFuelTanks.cfg so that would require editing).

I see, but it shouldnt cause any serious in game bugs should it?

Link to comment
Share on other sites

SmarterThanMe: yeah, just add that to the appropriate TANK_DEFINITION (or create a new one, and then add the tank def to the part via typeAvailable.

Here's an example from my experimental version of Spherical Tanks:

first the TANK_DEFINITION


TANK_DEFINITION {
name = TalUtility
basemass = 0.0003125 * volume
TANK {
name = Kethane
utilization = 2.5
amount = 0.0
maxAmount = 0.0
note = (Kethane Mod Required)
fillable = false
}
TANK {
name = RocketParts
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
fillable = false
}
TANK {
name = Metal
fillable = false
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
}
TANK {
name = ScrapMetal
fillable = false
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
}
TANK {
name = Ore
fillable = false
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
}
TANK {
name = Food
utilization = 0.78207
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = Water
utilization = 0.78207
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = Oxygen
utilization = 0.78207
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = CarbonDioxide
fillable = false
utilization = 0.00010214628
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = Waste
fillable = false
utilization = .0000112361
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = WasteWater
fillable = false
utilization = 0.00039530614
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
}

Then setting up a tank for multiple tank types (Default is your usual fuel tank def).


MODULE {
name = ModuleFuelTanks
volume = 43200
type = Default
basemass = 0.0003125 * volume
baseCostPV = 0
typeAvailable = Default
typeAvailable = TalUtility
}

- - - Updated - - -

Insanitic: I can't guarantee anything, but it shouldn't so long as you don't change tank types (not available for SPP parts anyway).

Link to comment
Share on other sites

SmarterThanMe: yeah, just add that to the appropriate TANK_DEFINITION (or create a new one, and then add the tank def to the part via typeAvailable.

Here's an example from my experimental version of Spherical Tanks:

first the TANK_DEFINITION


TANK_DEFINITION {
name = TalUtility
basemass = 0.0003125 * volume
TANK {
name = Kethane
utilization = 2.5
amount = 0.0
maxAmount = 0.0
note = (Kethane Mod Required)
fillable = false
}
TANK {
name = RocketParts
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
fillable = false
}
TANK {
name = Metal
fillable = false
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
}
TANK {
name = ScrapMetal
fillable = false
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
}
TANK {
name = Ore
fillable = false
utilization = 1
amount = 0.0
maxAmount = 0.0
note = (EL Mod Required)
}
TANK {
name = Food
utilization = 0.78207
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = Water
utilization = 0.78207
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = Oxygen
utilization = 0.78207
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = CarbonDioxide
fillable = false
utilization = 0.00010214628
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = Waste
fillable = false
utilization = .0000112361
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
TANK {
name = WasteWater
fillable = false
utilization = 0.00039530614
amount = 0.0
maxAmount = 0.0
note = (TAC Life Support Mod Required)
}
}

Then setting up a tank for multiple tank types (Default is your usual fuel tank def).


MODULE {
name = ModuleFuelTanks
volume = 43200
type = Default
basemass = 0.0003125 * volume
baseCostPV = 0
typeAvailable = Default
typeAvailable = TalUtility
}

- - - Updated - - -

Insanitic: I can't guarantee anything, but it shouldn't so long as you don't change tank types (not available for SPP parts anyway).

Right, I'll keep that in mind. Thanks for the clarification.

Link to comment
Share on other sites

I have made a MM config thats very useful to convert all tanks for Modular Fuel Tanks. Basically it is adding up fuel recurses present in a PART config.


// Give every PART with a resource a modul ModuleFuelTanks (except PARTS with IntakeAir or a Command Module)
@PART[*]:HAS[!MODULE[ModuleFuelTanks],!MODULE[ModuleCommand],!RESOURCE[IntakeAir],@RESOURCE[*]]:NEEDS[modularFuelTanks]:FIRST
{
MODULE
{
name = ModuleFuelTanks
volume = 0
type = Default
}
}
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[LiquidFuel]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[LiquidFuel]/amount$
}
}

@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[Oxidizer]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[Oxidizer]/amount$
}
}
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[MonoPropellant]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[MonoPropellant]/amount$
}
}
//Divide XenonGas tanks by 56
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[XenonGas]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[XenonGas]/amount$
@volume /= 56
}
}
//Divide LiquidHydrogen tanks by 56
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[LiquidHydrogen]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[LiquidHydrogen]/amount$
@volume /= 56
}
}
@PART[*]:HAS[@MODULE[ModuleFuelTanks],@RESOURCE[Karborundum]]:NEEDS[modularFuelTanks]
{
@MODULE[ModuleFuelTanks]
{
@volume += #$../RESOURCE[Karborundum]/amount$
}
}
// If tank volume is still zero than non of the above resources where present and we delete ModuleFuelTanks
@PART[*]:HAS[@MODULE[ModuleFuelTanks]:HAS[#volume[0]]]:FINAL
{
!MODULE[ModuleFuelTanks] {}
}

This is impressive!

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