Jump to content

[1.8-1.9] Modular Fuel Tanks v5.13.1


Recommended Posts

I made a config that adds MFT to any fuel tank!

It uses advanced mathematics (addition) to calculate the volume of the fuel tank, and set it to the appropriate type (Liquid Fuel, Oxidizer, Liquid Fuel and Oxidizer, RCS, or Xenon)

EDIT: I forgot to actually publish the mod. :confused:

So here it is:

http://spacedock.info/mod/877/The Modular Module Manager Modular Fuel Tanks Mod

Edited by Osmium
I forgot to actually publish the mod
Link to post
Share on other sites
On 11/08/2016 at 1:29 AM, Commissar said:

soo... this mod messes with the parts of procedural parts? as in, converts them to a new part... seeing as it removed all my .crafts....

Uh, no. Something else went very wrong. You will need to do some sleuthing on your end to discover the actual cause. A good place to start is looking for ERR or Exception in your KSP.log.

Link to post
Share on other sites
20 hours ago, taniwha said:

Uh, no. Something else went very wrong. You will need to do some sleuthing on your end to discover the actual cause. A good place to start is looking for ERR or Exception in your KSP.log.

no, i was wrong. PP uses a different part for RF. was not expecting it, but is fine.

Link to post
Share on other sites

Suggestion:

Make clone of this mod for RSS, that has SMURFF level of liquid fuel/oxidizer/lfo/monopropellant/solidfuel mass ratios.

Or a MM patch that detects, if there is SMURFF and RSS and changes mass ratios  accordingly.

Edited by raxo2222
Link to post
Share on other sites

Something goes pretty haywire when you have multiple TankTypes available on a given part via different typeAvailable within a ModuleFuelTanks module.

What happens is this:

1. Add a second tank type (or whatever) to a part that is given the Default tank type already. In my hypothetical example, the part has 100 units to begin with, and the second switchable tank type is Fuselage, or 100% LF.

2. In the editor, when the part is placed, it will have 45 LF and 55 OX - as it should. The readout when you right click will tell you that it has 100 units total capacity (Volume avail. 0u/100u)

3. If you switch to the Fuselage tank type using the type chooser arrows, it should be 100 LF - but the original LF amount is retained. There will be 45 LF in the tank, but the readout will still say 0u / Tot: 100u.

4. Something like this happens when you switch from any tank type to another tank type containing at least one of the same resources.

5. So when you switch from LF/OX to LF, the LF will remain whatever it was to begin with. If you then switch to a third tank type that contains only MonoPropellant, and therefore has no resources in common with the last tank type, the amount of MonoProp that ought to be in the tank is calculated correctly.

6. Switching from LF/OX (45/55) to a tank type with LF, OX, and MonoProp will make the tank hold more than it should - Begin with 45/55, then switch: 45/55 are retained, and whatever monoprop that ought to have been added (let's say the tankType defines it as taking 20% of volume, so 20u) is added on top. Since the values for LF/OX are retained upon switching, you end up with 45LF, 55OX, and 20 MP. 

7. The entire time, the tank's volume will read as <X units avail., probably 0> / Tot: 100u.

8. Switching to tank type that had nothing in common with the previously loaded tank type seems to bring values for stuff back to where they should be.

 

Hope that describes the problem. You can replicate it simply by adding multiple tankTypes to any tank, making sure the tankTypes have a similar resource between them, and switching them in the editor.

Edited by AccidentalDisassembly
Link to post
Share on other sites

There is bug with levitating precoler (stock) part - if you downscale it to 0.625m and remove all fuel from it, it will levitate (negative mass bug):

http://imgur.com/a/haHwO

Down-scaling precoler part below 1 meter sets its mass below 0.

This is critical bug - I have to exit game, or if I try launch unrelated craft game crashes.

 

Edited by raxo2222
Link to post
Share on other sites
  • 2 weeks later...
21 minutes ago, Blackline said:

Will this mod add a hydrolox tank setup to the structural b9 parts?

Modular Fuel Tanks doesn't add new fuel types to anything.  If you have LH2 on any tanks, it's from a different mod.

Link to post
Share on other sites

Is it possible to change the utilization multiplier upon learning a tech? If so, how?  For sake of clarity: As a part of researching a  tech, the utilization multiplier of specific fuels/resources would increase or decrease.

Apologies if this one has already been asked, couldn't find it when I went searching.

Link to post
Share on other sites
  • 1 month later...

I've got a null-reference exception that stops KSP 1.2 from loading using MFT 5.8.0, in combination with at least two other mods: Kerbal Planetary Base Systems and Procedural Parts. I reported it here in the KPBS thread. I was unable to resolve the issue by trying to separate the MM references for "type = ElectricPropulsion" in :NEEDS[RealFuels] and "type = Xenon" in :NEEDS[ModularFuelTanks] but when I removed KPBS's MM patch for RF/MFT, the exception occurred instead when applying MFT to Procedural Parts.

Spoiler

[LOG 09:35:20.326] PartLoader: Compiling Part 'PlanetaryBaseInc/ContainerSystem/tank_RCS/KKAOSS_RCS_Tank'
[LOG 09:35:20.334] PartLoader: Part 'PlanetaryBaseInc/ContainerSystem/tank_RCS/KKAOSS_RCS_Tank' has no database record. Creating.
[LOG 09:35:20.335] DragCubeSystem: Creating drag cubes for part 'KKAOSS.RCS.Tank'
[EXC 09:35:20.486] NullReferenceException: Object reference not set to an instance of an object
    RealFuels.Tanks.ModuleFuelTanks.MarkWindowDirty ()
    RealFuels.Tanks.ModuleFuelTanks.RaiseResourceListChanged ()
    RealFuels.Tanks.FuelTank.AddTank (Double value)
    RealFuels.Tanks.FuelTank.set_maxAmount (Double value)
    RealFuels.Tanks.FuelTank.InitializeAmounts ()
    RealFuels.Tanks.FuelTank.CreateCopy (RealFuels.Tanks.ModuleFuelTanks toModule, .ConfigNode overNode, Boolean initializeAmounts)
    RealFuels.Tanks.ModuleFuelTanks.UpdateTankType (Boolean initializeAmounts)
    RealFuels.Tanks.ModuleFuelTanks.GetInfo ()
    PartLoader.CompilePartInfo (.AvailablePart newPartInfo, .Part part)
    PartLoader+<CompileParts>c__Iterator62.MoveNext ()
    UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress)

I thought the issue was with tank definitions (and the difference between RF and MFT tank types), as KPBS has :NEEDS[RealFuels|ModularFuelTanks] with "type = ElectricPropulsion" instead of "type = Xenon" for its xenon tank. However, changing it to "type = Xenon" didn't resolve the issue. Moreover, the problem doesn't occur in my KSP 1.1.3 install which has MFT, Procedural Parts, and KPBS, with identical tank definitions and config files. With Procedural Parts, the displayed stuck part was proceduralConeLiquid.

So... from there, I'm not sure. Best guess I've got is the reintroduction of MarkWindowDirty (), but, like I said in KBPS thread, I'm just guessing now.

Otherwise, removing MFT allows KSP to load.

Link to post
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...