Jump to content

[1.8+] Real Fuels


NathanKell

Recommended Posts

So, under 23.0 with real fuels, in the VAB, I could select a tank to configure it and set it to have a capacity of whatever fuel, but then make it empty. When you clicked a fuel type it would give two text boxes in a format like XXXX of XXXX. By default it was full. But now under 23.5 I'm finding that it just gives one text box, which is the capacity, and how much fuel is in it. So there doesn't seem to be a way of making an empty tank. Empty tanks are useful, for example, when you are building a kethane processing unit. Is there some way to get back the functionality of being able to make empty tanks, other than by doing savefile editing?

Edit: Ah, never mind. I see the question was answered a few pages ago. Thanks!

Edited by gleedadswell
Link to comment
Share on other sites

See answer in FAQ.

HoneyFox, you'll want to change configMaxThrust (and configMinThrust proportionally). If you want the change to persist, you also need to change it in the confignodes.

Alright, I did some tests yesterday night and i found something interesting:

it seems like ModuleEngineConfigs' initialization has been called more than once when starting a flight. And since my TweakableParam's tweaking the configMaxThrust happens in OnStart() only for once, the value it changed was then reverted. I then tried adding some delay before applying the tweak and it finally worked.

I remember that you once told me that for some unknown reason, KSP would call OnLoad() or Load() or something similar twice when beginning a flight. I wonder if that is the cause.

Link to comment
Share on other sites

I do SetConfiguration both OnLoad and OnStart, to be sure to catch cases where only one and not the other is called. The tweaking is supposed to be non-persistent, is it? Otherwise you should just change the confignode.

Link to comment
Share on other sites

Hi Nathan.

If my craft has any SRBs in it, the following lines are being spammed to the log non-stop:

[ERR 01:53:21.525] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.526] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.528] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.529] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.531] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.532] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.697] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.698] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.700] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.701] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.703] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.704] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.860] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.864] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.865] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.866] Cannot find module 'ModuleHybridEngine' (-2131079158)
[ERR 01:53:21.868] Cannot find module 'ModuleEngineConfigs' (-1249380957)
[ERR 01:53:21.869] Cannot find module 'ModuleHybridEngine' (-2131079158)

And if the craft has a lot of SRBs (i.e. separtrons), the game can take a noticeable performance hit.

The minimum configuration to replicate it:

KSP 0.23.5

Real Fuels 5.3 (with MM 2.1.0 or 2.0.7 - same thing)

Kerbal Engineering Redux or VOID for TWR/delta-v calculations.

I have asked in the KER thread and got this reply:

I will need more information to diagnose the problem here but if I had to guess, I would say that you have the RealFuels mod incorrectly installed. That message isn't output by the KER simulation code but it does use a standard KSP function in the PartModuleList class to try to find the RealFuels engine modules by name. The code in question is only called if you have RealFuels installed and I assumed that the call would just return NULL if the module wasn't present in the part and wouldn't spam the log with useless error messages. In fact, the function in question looks for two different modules and I believe only one should ever be present on an engine so I would expect to see one or the other of these message for many more engines.

I use Realism Overhaul with SFJBRealEngines pack and all available engines and tons of other stuff, but the messages appear even without it (just with "naked" RF).

As for the craft: MK1 pod and Sepratron-I (or RT-5) are enough to produce the errors.

Aside from error spamming, everything works fine.

How can I get rid of these errors without breaking anything?

Link to comment
Share on other sites

I do SetConfiguration both OnLoad and OnStart, to be sure to catch cases where only one and not the other is called. The tweaking is supposed to be non-persistent, is it? Otherwise you should just change the confignode.

Ah... and one problem is I cannot ensure that TP's OnStart() is executed after MEC's OnStart()... guess I need to use StartCoroutine() with an IEnumerator with yield return null to let it execute after one frame delay.

Same with OnLoad() of course.

Link to comment
Share on other sites

Thanks!

...huh. That's weird. It appears to be from native code, as Padishar says. Try disabling VERBOSE_DEBUG_LOG and see if it goes away. It may be that Contains() will print to debug if it fails to find the module.

With VERBOSE_DEBUG_LOG, does it disappear? If not, does it disappear when you remove KER?

Link to comment
Share on other sites

Thanks!

...huh. That's weird. It appears to be from native code, as Padishar says. Try disabling VERBOSE_DEBUG_LOG and see if it goes away. It may be that Contains() will print to debug if it fails to find the module.

With VERBOSE_DEBUG_LOG, does it disappear? If not, does it disappear when you remove KER?

I meant to post in here last night about this issue but forgot. The previous code wasn't using Contains() it was just doing part.Modules["ModuleEngineConfigs"] and testing if it didn't return null. The fix is now using Contains() first to see if it is there before getting it. I was going to write a new function (a PartModuleList extension) that behaves how I want it to efficiently (just does a single index-based scan to find the named module or returns null if not found) but with the usual size of the module list this felt like a rather premature (if not almost completely pointless) optimisation...

Anyway, the upshot is that my latest development version of KER fixes this log spam for all non-RF engines when RF is installed.

Link to comment
Share on other sites

2. It does support configuration (if not easy configuration) of engines and fuel types. It has existing support for tanks that would be easy to turn into a new sheet where you specified various fields and it created the MM patch, like engines.

&

#3 Because mixture is per engine. There is no "mixture ratio" for a given fuel mix; that's determined by your engine.

See for instance US or Russian engines. Heck, the J-2 was rated for (and used during flight!) two different mixture ratios of LH2 and LOX!

2. Well hopefully I can make it easier for newer modders. I've streamlined the setup and exporting of the .cfg files. Now I'm setting about attempting to make a rough balancing guide/toolset. With that in mind, I'm trying to setup guides/formulaic approaches to guide in determining just what things like the mix ratio should be -- Similar to how you've done with setting up the TWRG

Q2: So in you're resources table I see you have hand calculated an additional tank mass for Default, Cryo, &ServiceModule. How did you determine what their values ought to be?

#3: I hadn't realized that interesting!

Link to comment
Share on other sites

Padishar: ah, gotcha! Thanks for clearing that up.

Rabble:

1. Ah, ok. Mixture ratio will *probably* follow a trend of increasingly lean (i.e. oxidizer-heavy) ratios as TL increases (i.e. switching to staged combustion). Also, the higher the Isp for a given type and TL, *probably* the higher the mixture ratio. However, that is not always true; increases in specific impulse can also come from other factors, and low-Isp / high TWR engines in a given TL may not even be using staged combustion (normally TL4/5+ engines have Isps appropriate to staged combustion cycles). Besides astronautix's engine list, you can look here for tables of liquid engine stats, usually including mixture ratio, and try to derive a correlation between Isp, TWR, year of introduction, and mixture ratio.

(Note of course that this is all per bipropellant pairing...)

You might want to read http://alternatewars.com/BBOW/Space/Propellants.htm which talks about mixture ratio (and how chamber pressure and expansion ratio influences what the optimum mixture ratio is). Also this (and other) pages from Bob Braeunig: http://www.braeunig.us/space/propel.htm

2: RF assigns masses to tank parts as follows: the total volume of the part * basemass (those top mass values in the page), and (sum) total volume of each resourcetank * that tank's tankmass (for each resource). You can see to the right of those mass listings where I compute what the dry:wet ratio would be for the tank part alone, and the tank part with some extra mass (interstage, ullage rockets, guidance, whatever). I then match those figures against real life examples (you can see a few calculated at the top of the page, like S-IC, Titan II-1, Atlas sustainer, etc). So it's a lot of guesswork to try to get about the right basemass and right mass for each resourcetank (which varies depending on tank type, Default/Cryo/SM).

Link to comment
Share on other sites

I seem to be unable to fill my RCS fuel containers (such as Stratus-V monoprop tank, AIES MS-1 RCS Fuel Tank, SA-1 etc) with any kind of fuel in the VAB. When I right click, there is no option for selecting a fuel, and when I try to launch, no appropriate fuel type shows up in the upper right hand corner list of resources. This occurs whereever I place the RCS thrusters (AIES SN-1 micro RCS thrusters), whatever RCS fuel I set them to, and whereever I place the RCS fuel containers on my rocket.

I am using the Realism Overhaul mods, including the newest versions of Real Fuels, Engine Ignitor, ModuleRCSFx, and CrossFeedEnabler, and the RftS engine pack.

Any tips on how to get this working?

Link to comment
Share on other sites

I seem to be unable to fill my RCS fuel containers (such as Stratus-V monoprop tank, AIES MS-1 RCS Fuel Tank, SA-1 etc) with any kind of fuel in the VAB. When I right click, there is no option for selecting a fuel, and when I try to launch, no appropriate fuel type shows up in the upper right hand corner list of resources. This occurs whereever I place the RCS thrusters (AIES SN-1 micro RCS thrusters), whatever RCS fuel I set them to, and whereever I place the RCS fuel containers on my rocket.

I am using the Realism Overhaul mods, including the newest versions of Real Fuels, Engine Ignitor, ModuleRCSFx, and CrossFeedEnabler, and the RftS engine pack.

Any tips on how to get this working?

action group editor. then left click the tank.

Link to comment
Share on other sites

swamp_ig has done some extensive work on Real Fuels, fixing things, adding things, and allowing excellent integration with Procedural Parts. If you'd like to test it (and I would like you to test it!): please make sure you have RF v5.3 and the latest (just released) Procedural Parts v9.10, then download this and extract to your KSP folder, overwriting files when prompted.

Some of the great new features:

*You can switch tank types! No more having to remove your Cryo Tank and add a ServiceModule instead. No more needing multiple procedural tank parts: one tank to rule them all!

*You can (optionally) tweak the volume utilization of a tank part (like you can with Stretchy, but from within RF). Allows you to specify how much of the physical space of the part is taken up by tankage.

Let me know if you run into any problems; if not, expect v6 soon!

Link to comment
Share on other sites

I am having a problem with the update posted above.

Starting with a clean install of KSP, I added RealFuels 5.3 and Procedural Parts v9.10. Loading just those two mods resulted in the game working as expected. However, if I then add the update, then almost all part fail to load. the only three parts that successfully load are the SRB-Kd25K, the advanced grabbing unit, and the Launch escape system.

The section of Player.log with errors is:


Resource RESOURCE_DEFINITION added to database

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

GameDatabase: Assets loaded in 27.309s

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

PartLoader: Compiling Part 'NASAmission/Parts/GrapplingDevice/part/GrapplingDevice'

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

EffectList: Created 11 effect types

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

PartLoader: Compiling Part 'NASAmission/Parts/LaunchEscapeSystem/part/LaunchEscapeSystem'

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

PartLoader: Compiling Part 'NASAmission/Parts/MassiveSRB/part/MassiveBooster'

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

PartLoader: Compiling Part 'NASAmission/Parts/PotatoRoid/part/PotatoRoid'

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

PartLoader: Compiling Part 'NASAmission/Parts/Size2LFB/part/Size2LFB'

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

ArgumentException: Message is not a delegate type
at KSPAPIExtensions.PartMessage.PartMessageListener..ctor (System.Type delegateType, PartRelationship relations, GameSceneFilter scenes) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.MonoCustomAttrs:GetCustomAttributesInternal (System.Reflection.ICustomAttributeProvider,System.Type,bool)
at System.MonoCustomAttrs.GetCustomAttributesBase (ICustomAttributeProvider obj, System.Type attributeType) [0x00000] in <filename unknown>:0
at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, System.Type attributeType, Boolean inherit) [0x00000] in <filename unknown>:0
at System.MonoCustomAttrs.GetCustomAttributes (ICustomAttributeProvider obj, Boolean inherit) [0x00000] in <filename unknown>:0
at System.Reflection.MonoMethod.GetCustomAttributes (Boolean inherit) [0x00000] in <filename unknown>:0
at KSPAPIExtensions.PartMessage.ServiceImpl.Register[ModuleFuelTanks] (RealFuels.ModuleFuelTanks obj) [0x00000] in <filename unknown>:0
at KSPAPIExtensions.PartMessage.PartMessageService.Register[ModuleFuelTanks] (RealFuels.ModuleFuelTanks obj) [0x00000] in <filename unknown>:0
at RealFuels.ModuleFuelTanks.OnAwake () [0x00000] in <filename unknown>:0
at PartModule.Awake () [0x00000] in <filename unknown>:0
UnityEngine.GameObject:Internal_AddComponentWithType(Type)
UnityEngine.GameObject:AddComponent(Type)
Part:AddModule(String)
Part:AddModule(ConfigNode)
PartLoader:ParsePart(UrlConfig, ConfigNode)
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PartLoader:StartLoad()
:MoveNext()

(Filename: Line: 4294967295)

NullReferenceException: Object reference not set to an instance of an object
at RealFuels.ModuleFuelTanks.RaiseResourceListChanged () [0x00000] in <filename unknown>:0
at RealFuels.ModuleFuelTanks.UpdateTankType () [0x00000] in <filename unknown>:0
at RealFuels.ModuleFuelTanks.GetInfo () [0x00000] in <filename unknown>:0
at PartLoader.ParsePart (.UrlConfig urlConfig, .ConfigNode node) [0x00000] in <filename unknown>:0
at PartLoader+.MoveNext () [0x00000] in <filename unknown>:0
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
:MoveNext()
UnityEngine.MonoBehaviour:StartCoroutine_Auto(IEnumerator)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
PartLoader:StartLoad()
:MoveNext()

(Filename: Line: 4294967295)

*MFS* Loading global settings

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

NullReferenceException: Object reference not set to an instance of an object
at RealFuels.ModuleFuelTanks.CalculateMass () [0x00000] in <filename unknown>:0
at RealFuels.ModuleFuelTanks.OnStart (StartState state) [0x00000] in <filename unknown>:0
at Part.ModulesOnStart () [0x00000] in <filename unknown>:0
at Part+.MoveNext () [0x00000] in <filename unknown>:0

(Filename: Line: 4294967295)

PartLoader: Compiling Internal Space 'Squad/Props/AltimeterThreeHands/prop/AltimeterThreeHands'

(Filename: /BuildAgent/work/d3d49558e4d408f4/artifacts/LinuxStandalonePlayerGenerated/UnityEngineDebug.cpp Line: 53)

PartLoader: Compiling Internal Space 'Squad/Props/AtmosphereDepth/prop/AtmosphereDepth'

This is with the 64-bit Linux version

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