LordFjord

[1.0.4]Intake Build Aid (obsolete for 1.0.5)

Recommended Posts

I pulled the code from Github and patched it - ModuleResourceIntake.area is now a double, not a float. Small tweak to IBA's bookkeeping, and it's all working again.

I suspect that "Field .ModuleResourceIntake.area not found" message was somewhat misleading; it's really searching for field by type and name, not just name.

Sent a PR on Github https://github.com/LordFjord/KSP/pull/2 and uploaded an unofficial release to my branch: https://github.com/shepheb/KSP/releases/tag/v105.

Thanks for a great mod!

Share this post


Link to post
Share on other sites
Cheers shepheb for the fix, I have merged it and the mod seems to run (more or less) again.
Oh, and welcome to the forum :)

[b]Now to the bad news[/b]

However, I have taken a look at the new engine configs and I fear that the mod becomes useless unless I (or someone else) does a major overhaul of the intake to engine distribution algorythm.
The reason is, that before, each airbreather engine used the same amount of intake air as a resource. Now, they have different values. The mod (so far) only took intake area of the intakes into account.

Example (RAPIER in jet mode)
[code]
PROPELLANT
{
name = IntakeAir
ignoreForIsp = True
ratio = 6
}
[/code]

The Panther is also a special case, the ratio goes up from 12 to 40 when you go afterburner.

=> the mod might work as long as you use only the same engine type, but I wouldn't rely on the mod with mixed engine setups.



edit: I have built a basic SSTO (my 1st in 1.0.5 ;) ) that should have entered the spin of death on flameout.

Here's a pic of it with the intakes and engine info displayed. As you can see, all intakes feed the rightmost engine.
What happened, was that both turbojets flamed out at the SAME time, while the RAPIERS were still going in jet mode. They flamed out independantly of the turbojets a bit later, where I switched mode and got into orbit comfortably.

[img]http://i.imgur.com/57G0Egq.jpg[/img]

Sooooo, the question now is, is the mod obsolete or not? Engines and their flameout behaviour is more complex as it was before and I did not run into the asymetric flameout issue.

Can anyone, who can reproduce it, post it with a craft or some pics & info? Edited by LordFjord

Share this post


Link to post
Share on other sites
So what is the correct algorithm for allocating them now? I don't think it changes that much. Just total up the engines' ratios, instead of simply counting them. Then divide up the intakes between them weighted by ratio, instead of equally as before.

On a related subject, it might be handy for the tool to provide an estimate of whether the engines are sufficiently supplied in the first place. I've definitely had to do some trial and error, even with the rule of thumb that each engine needs 0.02 or whatever. Now that engines require different amounts each, it would be great to indicate (colouring the lines in the IBA window?) whether that's enough intake area or not.

I might write a patch for that, in my Copious Free Time, but it's a busy time at work so I don't know if that's going to happen.

Share this post


Link to post
Share on other sites
Sorry, missed your post when I updated mine. I made a test vessel for engine asymetric flameout and I might think that the mod is indeed obsolete for KSP 1.0.5.
I mean, looking back at previous KSP versions, this setup would have been a candidate for a garanteed spin of death.

Share this post


Link to post
Share on other sites
[quote name='LordFjord']Sooooo, the question now is, is the mod obsolete or not? Engines and their flameout behaviour is more complex as it was before and I did not run into the asymetric flameout issue.

Can anyone, who can reproduce it, post it with a craft or some pics & info?[/QUOTE]

According to NathanKell (paraphrased), you will not asymmetrically flameout on ascent under normal conditions where you exceed the altitude of capabilities of the engines. However, you WILL asymmetrically flame out if your engines do not have enough air flow to both engines. This only occurs if you don't use enough intakes. So yes, in a sense it is obsolete because if you aren't using enough intakes, that's a construction problem and all other cases will work fine.

[url]http://forum.kerbalspaceprogram.com/threads/139019-1-05-Intakes-Lets-figure-them-out?p=2289863&viewfull=1#post2289863[/url] Edited by Alshain

Share this post


Link to post
Share on other sites
Thanks a lot Alshain (and NathanKell), that clarifies it. Soooo, I just might want to stick a "put on enough intakes to not have asymetric flame-outs" on the top and the mod becomes obsolete.

Share this post


Link to post
Share on other sites
[quote name='LordFjord'][COLOR=#FF0000][B]!!! Important !!![/B]

With KSP 1.0.5, the air flow rules have changed, making the mod [B]obsolete[/B].[/COLOR]
[URL="http://forum.kerbalspaceprogram.com/threads/139019-1-05-Intakes-Lets-figure-them-out"]Here[/URL] is a great thread about 1.0.5 and intakes.



[COLOR=#FF0000]So, simply worded: slap one or two intakes per engine on your vessel and you won't get asymetric flame-outs.[/COLOR]

I am happy that Squad finally took care of this.
Thanks a lot for the help and support so I could create this mod.

[spoiler=Old post]
[B]Intake Build Aid 0.6 for KSP 1.0.4[/B]

[B]What is this all about? What does it do?[/B]
It changes no parts and no game behaviour. What it does is rearranging the parts of your airbreather engine powered rocket, plane or SSTO. So it basically just reorders the parts of your vessel.
But why? Because of [URL="http://forum.kerbalspaceprogram.com/threads/64362-Fuel-Flow-Rules-%280-24-2%29"]Kasuha's wonderful work on resource flows[/URL], specifically the intakes and jet engines part of it.

When you usually build a jet powered vessel, you are more focussed on the design and funcionality and not on the order of placing the parts.
When flying on the edge to space, where the air gets thin, this often ends in an asymmetric flameout of your airbreather engines, resulting in the dreaded "spin of death". When placing intakes and engines in a specific order, this can be prevented almost completely, resulting in less crashes, more dV in orbit and whatnot.
So a typical example of:
- engine
- engine
- intake
- intake
becomes:
- intake
- engine
- intake
- engine

[B]I still do not understand what this mod does[/B]
You build your airbreather engine powered vessel like usual, then you hit the magic key (see below) and your vessel will be able to fly at higher altitudes before a flameout of the engine happens. If you also match intake and engine numbers, chances are good that when a flameout happens at high altitude, then on all engines and at the same time.
This is not cheating, just applying some building tricks that people smarter than me found out.

[B]Usage[/B]
The mod can do these things:
- point at a intake or airbreather engine and hit F6 -> the respecitvely assigned intakes and engines will be highlighted ( intakes blue, engines red ). Hit F6 when pointing somewhere else to remove the highlighting.
- hit F7 -> the mod rebuilds the engine/intakes in an optimized order, it will attempt to distribute the intake area equally to all engines. This will give a short text feedback on how it reorganized stuff.
- manual assignment of intakes to engines. To do this, point at an intake and hit F8, then the next intake and F8, and so on. The next engine that you point at and hit F8 will get all the previously marked intakes assigned to.
- "IBA" toolbar button toggles that shows the current airbreather engines and their intakes, also the sum of intake area for each engine.
[B]important: un-highlight before launching or colors will "stick" and you'll need to restart KSP to get rid of it.[/B]

[B]No pics no clicks[/B]
[B]0.5 pics[/B]
[URL]http://imgur.com/a/FY6zW[/URL]


[B]0.4 pics[/B]
[URL]http://imgur.com/a/XLCZy[/URL]

[B]Settings[/B]
Settings.cfg in the mod folder. You can reassign the 3 Keys and choose between the custom highlight shader seen in the pics or the default KSP highlight mechanics with different colors.

[B]Version History[/B]
0.6 (2015.05.14)
----------------
TheDog made a compatbility patch for KSP 1.0.2. This is now integrated into the mod. Thanks a lot!
edit: also works for KSP 1.0.4

0.5 (2015.02.12)
----------------
Added toolbar button to toggle the GUI
GUI with a button that does the same as pressing F7 -> autobalance engines and intakes
GUI lists all engines with their total assigned intake area and the specific intakes which feed them
Modded engines that are engines and intakes in one are now supported - as long as they use the stock IntakeAir resource - for example KAX D-25 Radial Engines or Karbonite KLF-150R Radial Jet Engines
Lots of code cleanup

0.4 (2014.12.19) 1st public release for xmas :)
----------------
Updated for KSP version 0.90
- Renamed mod from SyncedJetFlameouts to IntakeBuildAid
- 3 modes: intake/engine highlighting, intake/engine balancing, manual assignment of intakes to engines
- Changed default key settings to F6, F7 and F8
- Key settings can be changed via editing the settings.cfg file.
- Alternative (default KSP) part highlighting method I found randomly. The useCustomShader setting can change if the highlighting is done via default KSP methods or a custom, more visible shader.
- Fixes in logic to find intakes of engines

0.3 (2014.11.26)
----------------
New algorithm based on distributing intakes based on their intake area. Biggest intakes are distributed first, smaller ones after this. The engine with the least amount of assigned intake area will get the next intake assigned.
A message will be displayed after hitting alt-F showing what the mod did. Either nothing (no intakes or airbreather engine) or a list of assigned intakes to engines with the total intake area assigned to the engine.
I find that this algorithm works very well. I would like to have more feedback on this from YOU :)

0.2 (2014.11.22)
----------------
Improved intake detection via resources, improved engine detection via propellant (intakeair + liquidfuel required).
Intakes are now assigned by type. Algorithm works best with matching intakes per type to engines, for example 4 shock cores, 2 radial intakes for 2 RAPIERS.

0.1 (2014.11.21)
----------------
Proof of concept, only shock cone intakes and turbojet engines are handled, don't try with RAPIER or basic jets (will come soon, don't worry)

[B]Limitations / known issues[/B]
- make sure to un-highlight engines/intakes before launching the vessel. It will make the highlighting "stuck" on the parts - a KSP restart fixes this. I couldn't track down the bug yet.
- Staging and turning engines/intakes on / off manually can change the airflow significantly. The mod won't recognize these.
- Engines that are both intakes and engines are not supported (for example KAX radial engines).
- Modded intake resources are not recognized (for example Karbonite intakeair).

[B]Download[/B]
[URL="https://kerbalstuff.com/mod/444/Intake%20Build%20Aid"]KerbalStuff[/URL]
[URL="https://www.dropbox.com/s/to02h9qtyqoqvr6/IntakeBuildAid.zip?dl=0"]Dropbox[/URL]

[B]Source[/B]
[URL="https://github.com/LordFjord/KSP/tree/master/IntakeBuildAid"]GitHub[/URL]

[B]License[/B]
[URL="https://en.wikipedia.org/wiki/Beerware"]Beerware[/URL], just cause :cool:

[/spoiler][/QUOTE]

LordFjord, I just came here to say thanks a lot for this awesome mod. I'm happy that it's no longer needed but sad at the same time since I'll miss using it. You're a great asset to this community!

Share this post


Link to post
Share on other sites
But, if we are flying below the altitude limit where the engines flame out by the Atmcurve,
and if we sudddenly pitch too much > less air come in the intakes and we can still flame-out asymmetrically (it's as said Nathankell: if we don't have enought air intake).
So it's not yet a totally useless mod :)

Share this post


Link to post
Share on other sites
[quote name='LordFjord']
I am happy that Squad finally took care of this.
Thanks a lot for the help and support so I could create this mod.
[/QUOTE]

Thank you for showing them how it should work :)

Share this post


Link to post
Share on other sites
Yep, and that change dates to 1.0 anyway. :]
I did fix some intake bugs in 1.0.5 making velocity-based require-too-much-air-flameouts less likely, but that's about it.

Share this post


Link to post
Share on other sites

The air usage is still not fixed in 1.1, still asymetrical flameout that can be corrected by a good order of placement intake air for engine 1>engine1; intake air for engine 2 > engine2;...

and so this mod could still be uselefull. :P

Share this post


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.