Jump to content

MajiirKerbalLib 0.2.1 - Engine toggles, high-Isp prioritization, stock part fixes


Majiir

Recommended Posts

MajiirKerbalLib 0.2.1

(This plugin is a work in progress, and will likely change names and/or split as development continues.)

MajiirKerbalLib overrides stock part classes, extending and modifying their behavior without modifying any part config files. Just install the plugin, and any parts (including mod parts) that use the stock classes will be fixed.

Features:

  • Liquid engines can be individually disabled from the right-click menu, just like atmospheric engines.
  • Engines (both liquid and atmospheric) will automatically coordinate with each other, prioritizing engines with the highest specific impulse at that moment. (This can be toggled in the engine right-click menu.)
  • Atmospheric engines and legacy liquid engines show specific impulse in the right-click menu.
  • RCS fuel flow can be toggled for each fuel tank.
  • RCS fuel tanks show remaining fuel in right-click menu.
  • Fuel tanks (including RCS fuel tanks) will properly reactivate when a plugin refills them from empty. RCS thrusters no longer get stuck in a deactivated state.
  • Control surfaces won't flap in vacuum.
  • Thrust-vectoring engines won't gimbal when the engine is idle.

Please let me know what other features you're interested in. I'm currently looking into roll control for thrust-vectoring engines, throttle-based engine turning, and automatic compensation for offset center-of-mass.

I strongly encourage you to post bug reports and feature requests to the Github issue tracker for the project. Thanks!

Download MajiirKerbalLib 0.2.1

(Source available at GitHub)

Edited by Majiir
Link to comment
Share on other sites

does this work with the Kethane mod in regards to filling up empty tanks?

No, which is one of the reasons I've modified the Kethane mod. :wink: The laser mod should work just fine. I'll release my tweaks to the Kethane mod this weekend.

Link to comment
Share on other sites

No, which is one of the reasons I've modified the Kethane mod. :wink: The laser mod should work just fine. I'll release my tweaks to the Kethane mod this weekend.

new kethane release this weekend? Im going to clear out my schedule.

Link to comment
Share on other sites

Any chance of this being extended to allow multiple fuel types depending on engine and tank?

It could happen in theory, but it would be really messy to implement that on top of the existing FuelTank class. A better idea would be to write a completely new class (like r4m0n has done in MuMechLib).

Link to comment
Share on other sites

The description sounds very promising :-)

One question though, how exactly does the engine prioritizing work? Let's take a combination of a NERVA plus some LFEs at 50% throttle for instance. I figure this means that the NERVA is running at max, whereas the others are throttled down (while still providing a total thrust equal to 50% non-prioritized thrust)

Link to comment
Share on other sites

Looks like the functionality to disable fuel tanks doesnt work anymore with your plugin - which was usefull too. Any change to re-enable it?

That's weird. Looks like a bug in the KSPEvent code. I've released a hotfix (version 0.1.1) that adds the toggle back in. I had to mimic the old functionality, so let me know if it doesn't seem to work as intended. The download link in the first post has been updated.

Link to comment
Share on other sites

One question though, how exactly does the engine prioritizing work? Let's take a combination of a NERVA plus some LFEs at 50% throttle for instance. I figure this means that the NERVA is running at max, whereas the others are throttled down (while still providing a total thrust equal to 50% non-prioritized thrust)

Yes... sometimes. At very low altitudes (like when launching) the LFEs will be on at slightly higher than 50% thrust, and the LV-N will be off. At a certain altitude, the LV-N will become more efficient than the others, so it will kick into full throttle and the rest will be throttled slightly below 50%. The controller works by grouping engines together with the same specific impulse and then throttling up each group (starting with the highest) until the desired thrust is met. At full throttle, there's no difference, but this can help during ascent when you lower the throttle to balance drag and gravity losses. It could also help for landings, where you want to take advantage of high-efficiency engines for as long as possibleâ€â€and when you get to lower altitude, the high-efficiency slot will change.

Link to comment
Share on other sites

Yes... sometimes. At very low altitudes (like when launching) the LFEs will be on at slightly higher than 50% thrust, and the LV-N will be off. At a certain altitude, the LV-N will become more efficient than the others, so it will kick into full throttle and the rest will be throttled slightly below 50%. The controller works by grouping engines together with the same specific impulse and then throttling up each group (starting with the highest) until the desired thrust is met. At full throttle, there's no difference, but this can help during ascent when you lower the throttle to balance drag and gravity losses. It could also help for landings, where you want to take advantage of high-efficiency engines for as long as possibleâ€â€and when you get to lower altitude, the high-efficiency slot will change.

Kind of what I thought. Thanks for the clarification. In my example, I assumed vacuum but forgot to mention it in my post.

Looking forward to further neat little tweaks! :-)

Link to comment
Share on other sites

Good job. Quickly implement a automatic compensation for offset center-of-mass, please.

Yes, master. :rolleyes: (In all seriousness, it's probably coming in 0.2 or 0.3. It depends on how hard it is to reconcile with the other features on the table.)

I would be extremely happy if you could figure out a way to make the RCS tank usage order less insane.

It's certainly possible, since I already override part of the RCS fuel system. I don't use RCS on my rocket designs, so I'm not familiar with the fuel feeding behavior. What could be improved?

Edited by Majiir
Link to comment
Share on other sites

I don't use RCS on my rocket designs, so I'm not familiar with the fuel feeding behavior. What could be improved?

When you enable ASAS it tries to correct every tiny 0.0000001 degree course deviation with RCS burning fuel very very fast.

Link to comment
Share on other sites

When you enable ASAS it tries to correct every tiny 0.0000001 degree course deviation with RCS burning fuel very very fast.

Yes, but that's an issue with the ship control scheme in general, not the feeding order. Revising the entire control system is on my list, but that'll come a bit later.

Link to comment
Share on other sites

MajiirKerbalLib 0.1.1

  • Liquid engines can be individually disabled from the right-click menu, just like atmospheric engines.

I've been wanting this for ages, thank you.

The issue with the RCS feeding order is that it will quite often drain the stack from the top (ie, your lander etc) first and then work down the stack. It's difficult to reproduce, but the simplest fix in any case would be to make it drain via the order the tanks are staged.

Link to comment
Share on other sites

Awesome plugin. Watching the control surfaces move outside of atmospheres always looked really weird.

Encountered a strange bug with this plugin after disabling my main engine, the nuclear engines on the next stage turned blue:

screenshot0dm.png

screenshot1ylk.png

The craft I was then rendezvousing with then turned invisible (:0.0: ) (except for the pod/cockpit) when I switched to it, and 10 seconds later KSP froze completely.

Plugins in use: Tosh's Cart, Kethane, MechJeb, and of course this one.

Link to comment
Share on other sites

Awesome plugin.

Why, thank you! I think I'll stop reading right here... :wink:

Encountered a strange bug with this plugin after disabling my main engine, the nuclear engines on the next stage turned blue:

Yep, I've encountered this myself: http://imgur.com/nK9hm

Don't worry, it's not your GPU overheating or anything. I think the game gets confused when the throttle quickly changes values, and the temperature reading gets into an invalid state. That's my hunch, anyway. If you come up with good reproduction steps, stick them on the issue tracker on Github.

The craft I was then rendezvousing with then turned invisible (:0.0: ) (except for the pod/cockpit) when I switched to it, and 10 seconds later KSP froze completely.

Plugins in use: Tosh's Cart, Kethane, MechJeb, and of course this one.

That sounds like it's related to an issue I found with flight restarts/resumes. Did it go invisible at around 500 meters range? That would be consistent with what I've already found. (If it happened at 2500m, that would also be consistent. Any other range and I'm not so sure...)

I'm most interested in fixing the second issue since it can really ruin the game. If you find that a ship becomes corrupted like that, just quit KSP without saving or going back to VAB/Space Center, and when you start the game up without the plugin everything should be fine. I'll hotfix this as soon as I figure out a solution.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...