Jump to content

Modular Fuel System Continued v3.3 (OBSOLETE)


NathanKell

Recommended Posts

First: Sorry, folks. Did my best to get this stuff finalized before Christmas and my trip, but apparently there are still some bugs. I make no promises as to if I'll have any dev time until Friday or Saturday at the earliest: sorry, family holiday times comes first. :]

(I am on my laptop and/or just phone, until then)

HoneyFox: Yeah, manual serialization is sometimes necessary. That's also an issue with parts cloned when switching symmetry modes, as only some (semi-randomly!?) fields get copied. I suggest we take this to Dev though.

jrandom: I certainly *plan* to support aerospace stuff, yes, and originally that was going to be one of the big parts of the v4 update (hence velocityCurve support in techlevels) but, well, .23 broke so much that I've been scrambling. :(

So until this is done I really can't help you much I'm sorry to say.

Heh, engine cutoffs. Over on the EI thread, people were complaining that setting 0% throttle *did* cut off engines. Can't win. :]

I can probably add an option that if throttle goes to 0 (or you press x?), deactivate all active engines, but it'll be a pain to reactivate them, since I won't know which to activate when you throttle up again. Also, given that a number of engines will be non-restartable, are you sure that's what you want?

(That said, it's a bit more an issue for Realism Overhaul than RealFuels; RF just supports >0 minThrust, it doesn't mandate it.)

Re: Engine FX. As mentioned on the RO thread, that's a stock bug that I tried to fix in MFS but evidently didn't (it was 5am). It'll be fixed when I get a chance; HoneyFox has working code and I'll compare it to mine.

evilphish: WEIRD. Ok, does anyone else get this? Can I have output_log.txt?

Are you sure it's MFS's fault?

walkinator: You're clearly using Realism Overhaul. The guidance units (and many other parts) are rescaled to fit the .5m/1m/2m/3m/etc sizes of RO. For instance the Octo2 is really tiny, the HECS is about 1m in diameter, the two manned pods are 1m/2m and 2m/4m respectively, etc.

Engines do clearly specify their min throttle setting when they show you the rest of their techlevel info (action editor->click on engine. Set desired Techlevel, read stats). RealFuels implements a techlevel system for engines, where one part can have many different collections of stats (techlevels).

I will check out the symmetry bug when I can. Can anyone else confirm?

jrandom: I will see about zeroing thrust when engine is deactivated.

Link to comment
Share on other sites

jrandom: I will see about zeroing thrust when engine is deactivated.

What I think would work is instead of actually deactivating the engine, dynamically set its minimum thrust to 0 but only when the throttle is 0. This prevents the engines from deactivating, no staging confusion, and no tying up custom actions. I don't see this being a problem when working with low throttle settings since you'd be able to simply throttle up a bit again.

Although I can see why the EI people might not like it if they're working with engines that have a limited number of restarts. That... could be an issue.

Drat. We need more custom action keys! 10 just isn't enough!

Link to comment
Share on other sites

Heh, engine cutoffs. Over on the EI thread, people were complaining that setting 0% throttle *did* cut off engines. Can't win. :]

I can probably add an option that if throttle goes to 0 (or you press x?), deactivate all active engines, but it'll be a pain to reactivate them, since I won't know which to activate when you throttle up again. Also, given that a number of engines will be non-restartable, are you sure that's what you want?

(That said, it's a bit more an issue for Realism Overhaul than RealFuels; RF just supports >0 minThrust, it doesn't mandate it.)

jrandom: I will see about zeroing thrust when engine is deactivated.

I would rather you zeroing thrust only if "X" (or any key that are bound to this function) is pressed. That should be good. Normally pressing "X" always mean "Get all the engines shutdown RIGHT NOW!", while pressing "Shift/Ctrl" doesn't always (actually for me it seldom) represent such desire.

But remember that the craft should be in controllable state... this might also bring some integration need with RT2... because the kill-throttle action may get delayed with RT2 while your "X" keypress detection doesn't have any delay. :P

Link to comment
Share on other sites

Ooooh, good point! If mods can key off of just the 'X' button, that solves the problem! Throttling all the way down will put the engine at minimum thrust, and 'X' would dynamically change the minimum thrust to 0 while zeroing the throttle. The next throttle-up event would then restore the minimum thrust setting! Everyone wins!

Link to comment
Share on other sites

Drat. We need more custom action keys! 10 just isn't enough!

To be honest I would hope that Squad can provide a simple GUI similar to the recent "Toolbar" plugin, with AS MANY buttons AS players want, with each button triggering an action group... (so no limitation on the number of action groups) And to make it more user-friendly Squad can provide some functions to allow you to pick an icon & write some text as tooltip during editor phase.

Finally when flying rockets, you can simply click these buttons to trigger customized action groups.

Alright, day dream mode off. :(

EDIT: took a look at the EditorActionGroups class... there's a function named "AddActionToGroup(EditorActionPartItem ...)" which i guess is called when users try to add a part's action to an action-group and that EditorActionPartItem might be added into EditorActionGroups.groupActionsList which is a UIScrollList.

If we can intercept these EditorActionPartItem (which contains the baseAction object), or acquire them from that list, it is possible to implement a 3rd-party action group manager which can support more action groups via toolbar styled buttons.

Though persistence of these action groups into .craft file might be harder than i think right now...

Edited by HoneyFox
Link to comment
Share on other sites

First: Sorry, folks. Did my best to get this stuff finalized before Christmas and my trip, but apparently there are still some bugs. I make no promises as to if I'll have any dev time until Friday or Saturday at the earliest: sorry, family holiday times comes first. :]

(I am on my laptop and/or just phone, until then)

Fortunately, I'll be around (though I can't promise how much time either) and Nathan and I have agreed to maintain MFT as a joint effort (he's given me direct access to the repository). I'll be taking over MFT and Nathan will be able to concentrate on Real*. The reason behind it being a joint effort is so that MFT and Real Fuels can share the code (saves efforts for both of us as neither of us will have to worry about pull requests and merging with the other's tree).

Link to comment
Share on other sites

evilphish: WEIRD. Ok, does anyone else get this? Can I have output_log.txt?

Are you sure it's MFS's fault?

If I remove Modular Fuels, the bug does not appear. If I re-add it after that, the bug immediately comes back.

KSP Log as follows: (Interesting stuff, at least from my point of view, starts at 13:51:44.212)

http://phishtank.de/~evilphish/KSP.log

(Forum would not let me post it as it is too large apparently ^^)

Edit: I am using the basic version of modular fuels, as in without RealFuels.

Link to comment
Share on other sites

"X" (or any key that are bound to this function)

This is important. There are quite a few mods out there that hardcode keybindings (I'm looking at you, stretchytanks). This is annoying for people using custom keybindings / another keyboard layout (I use dvorak, so only A and M are bound to the same actions). While I can recompile the dll with the modified keybindings, this makes the installation rather tedious.

EDIT: now that I think of it, this would still be a problem for those of us who use joysticks for the throttle; You never want the in-game throttle and the physical one to be in different states (otherwise moving the throttle starts the engine up again). I might want to try implementing custom action groups next year...

Drat. We need more custom action keys! 10 just isn't enough!

We do. And they should be fully rebindable, as are the existing 10, to both keyboard input and joystick buttons... (looks at these USB adaptors for 30-switch panels they sell for desktop flight simulators)

Alright, day dream mode off. :(

:(

Though persistence of these action groups into .craft file might be harder than i think right now...

They could be persisted in the command pod, and the active action groups could then be those of the controlling command pod... Controlling from a docking port may lead to trouble though...

Edited by eggrobin
Link to comment
Share on other sites

@Nathan

Take your time, happy holidays, enjoy and rest!

Regarding throttle, I think throttle in KSP is overrated. For rockets at least. For planes of course its valuable and realistic, but I was surprised by how so few real-world engines have throttling capability. Of the 48 engines I have researched, more than half doesn't, and that includes orbital engines like the shuttle OMS, Apollo SPS and LEM ascent engine, and orbital insertion engines like the RL10, Aestus and AJ10-118K.

The other side of the list, of the 22 engines that have any throttling range (from 85% to 12%), 13 are first stage engines! Meaning they are not intended to be restarted. The only engines that stand out on this list are those designed to work as part of a lander, that needs to be gradually throttled, like the LEM descent engine, and the SpaceX Merlins.

Now one thing I am planning to do with the RealEngines is to separate the throttling cfgs and bundle it together with the EngineIgnitor cfgs, as they mostly make sense only together, so whoever does not want to be limited by the throttling range just have to delete one file.

Link to comment
Share on other sites

It's funny how I'm only now understanding that scene in Apollo 13 where they have to do their correction burn so they'll hit the atmosphere at the right angle and the engine goes from off to full throttle with no in-between. :)

Link to comment
Share on other sites

It's funny how I'm only now understanding that scene in Apollo 13 where they have to do their correction burn so they'll hit the atmosphere at the right angle and the engine goes from off to full throttle with no in-between. :)

Ironically enough, that was one of the few engines out there that is throttleable.

Link to comment
Share on other sites

@Nathan

Take your time, happy holidays, enjoy and rest!

Regarding throttle, I think throttle in KSP is overrated. For rockets at least. For planes of course its valuable and realistic, but I was surprised by how so few real-world engines have throttling capability. Of the 48 engines I have researched, more than half doesn't, and that includes orbital engines like the shuttle OMS, Apollo SPS and LEM ascent engine, and orbital insertion engines like the RL10, Aestus and AJ10-118K.

The other side of the list, of the 22 engines that have any throttling range (from 85% to 12%), 13 are first stage engines! Meaning they are not intended to be restarted. The only engines that stand out on this list are those designed to work as part of a lander, that needs to be gradually throttled, like the LEM descent engine, and the SpaceX Merlins.

Now one thing I am planning to do with the RealEngines is to separate the throttling cfgs and bundle it together with the EngineIgnitor cfgs, as they mostly make sense only together, so whoever does not want to be limited by the throttling range just have to delete one file.

Can the throttle be set before activating those engines? If so then the thrust limiter on the engines will become valuable for this kind of thing in KSP.

Link to comment
Share on other sites

Regarding my previously experienced bug. I noticed that the warning messages stay when I delete ModularFuels and start the game without it, so that obviously can't point into the right direction. However upon deletion again, the bug is gone, so it has to have something to do with MF.

I comprised the ksp logs with and without MF if you want to check for differences:

With MF:

http://phishtank.de/~evilphish/KSP.log

Without MF:

http://phishtank.de/~evilphish/KSP_withoutMF.log

Edited by evilphish
Link to comment
Share on other sites

evilphish: I asked for output_log.txt. It's in ksp/KSP_Data. ksp.log doesn't really tell us anything. Also, please zip before you upload. :)

eggrobin:

Stretchy doesn't hardcode its keys...

[KSPField]
public string stretchKey = "r";

[KSPField]
public string radialKey = "f";

[KSPField]
public string tankTypeKey = "g";

[KSPField]
public string textureKey = "t";
// and conic tanks:
[KSPField] public string topRadKey="y";
[KSPField] public string shapeKey="b";

That means you can add stretchKey = q (or whatever key), and same for the others, to your MODULE {name = StretchyTanks or name = StretchyConicTank} in each stretchy tank part.cfg, and have stretchy use that key.

You can even do it with a MM patch

@PART[*]:HAS[@MODULE[StretchyTanks]]
{
@MODULE[StretchyTanks]
{
%keyWhatever = desiredKey
// and the others
}
}
@PART[*]:HAS[@MODULE[StretchyConicTank]]
{
@MODULE[StretchyConicTank]
{
%keyWhatever = desiredKey
// and the others
}
}

SFJackBauer: Thanks! :)

Actually, RL-10 was designed as deeply throttable (it was designed for USAF Project Lunex moon landing as the descent/ascent engine), and modern Centaurs can get them down to 10% IIRC. But yeah, it's very surprising how few are throttleable. Presumably because there can be precision cutoffs.

That's the reason (and because upper stages presumably have RCS for fine changes) why they don't and lower stage engines do I guess--you really can't use RCS to correct for overGing on ascent. :]

Makes sense what you're doing with RE! I've been bundling RftS Engines with RO pre so far because (as I said here or there or somewhere) it's what I had on hand to show off the new RealFuels features.

DasBananenbrot: It should work. I made sure that I'm properly reading global multipliers now, and ferram's setting them in KIDS now.

jrandom: Speaking of LMDE correction burns, you can try doing your own here:

http://apollo.spaceborn.dk/dsky-sim.html

Spartan125: As yet I don't lock tweakables, so yes, you can use the new throttle limiter tweakable (even in flight, IIRC).

Link to comment
Share on other sites

some input on EvilPhish's issue:

When switching from the latest test version that you had emailed to me to one of the first pre-releases that you posted publicly I had existing craft tear themselves to pieces trying to switch to them. I had the same issue trying to load that same craft from its craft file. I had to recreate the craft in the VAB. I didnt report it because I really dont consider it to be exclusive to MFT.

I've had the same issue or worse when no mods in my install changed, only my personal tweaks in MM. KSP has always under certain edge conditions reacted badly to either module changing order or stored resources on parts changing. MFT has changed both IIRC. Sometimes that affects existing craft and sometimes it doesn't. Maybe you or Taniwha can fix that but I wouldn't waste a lot of time on it because it (if I'm right) is a KSP issue.

(and, no, output_log.txt had nothing useful any time I've experienced this issue. and this isnt the first time)

Link to comment
Share on other sites

Ah, ok. There is/was an issue that I encountered where stretchy tanks would reset their shape (with no message as to why), depending on the module order (MFS/ST) in the craft file. The order changed a few times in development; that's one reason for the bloodcurdling "your save will DIE" warnings (the other being the switch from 5l to 1l per KSP unit).

All it took to get them to work was swapping the module order (MFS above ST to MFS below ST, or vice versa) for the former, though the latter takes actual editing.

evilphish, are you using stretchies?

Link to comment
Share on other sites

eggrobin:

Stretchy doesn't hardcode its keys...

Talking about the StretchySRB v8 (that's the latest version right?), i cannot use the conic fuel tanks and the SRBs right now, only the stretchable tank & super-stretchable tank work normally.

Conic tank doesn't work and when i mouse hover on it, there's no text displayed to indicate its diameters & volume information either. SRB doesn't work and when i pick it to install onto my rocket in VAB, it's already playing its exhaust FX as if it's been ignited, it also doesn't have text about thrust & size displayed when mouse-over.

Link to comment
Share on other sites

HoneyFox: Weird. Delete your MFT and ST folders and (re)grab the latest pre (should be v4p10 and v8p1 respectively), http://forum.kerbalspaceprogram.com/threads/52780-Modular-Fuel-System-Continued-v3-3?p=865815&viewfull=1#post865815

Sounds like dual modules on the tanks, from an older prerelease of Stretchy (like, the original v8p0 I posted).

Link to comment
Share on other sites

Ah, ok. There is/was an issue that I encountered where stretchy tanks would reset their shape (with no message as to why), depending on the module order (MFS/ST) in the craft file. The order changed a few times in development; that's one reason for the bloodcurdling "your save will DIE" warnings (the other being the switch from 5l to 1l per KSP unit).

All it took to get them to work was swapping the module order (MFS above ST to MFS below ST, or vice versa) for the former, though the latter takes actual editing.

evilphish, are you using stretchies?

Why am I having flashbacks to that video with the indian guy screaming, "You die, I die, everybody DIE!!! Understand???"

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