Jump to content

[1.3.0] Kerbal Engineer Redux 1.1.3.0 (2017-05-28)


cybutek

Recommended Posts

Just updated to version 0.6.2.4, and also updated to the Module Manager 2.1.0.

They're saying over in the MM thread that 2.1.0 has some issues. Although, I used this same code under 2.1.0 and it worked for the AIES 1.25m probe core. I've since reverted back to MM 2.0.7 as recommended by the MM crew until they fix 2.1.0

I've getting a couple of new UI elements in the VAB which appear to be related to Engineer.

What are these and what do they do?

I noticed and am wondering too, in fact I had no idea they were related to Engineer and was going to post elsewhere asking about that so thx now I know to look here for an answer

Oh and for Padishar:

engAllStage.jpg

Edited by Gaiiden
Link to comment
Share on other sites

I've getting a couple of new UI elements in the VAB which appear to be related to Engineer.

There are two tweakable bars which appear on any command pod.

Sim time limit

Pressure %

What are these and what do they do?

Sim time limit

The Build Engineer adds this in the VAB/SPH and the Flight Engineer adds it during flight. It controls the amount of time in milliseconds between one run of the deltaV simulation and the next one, so setting it to 200 should give approx. 5 updates of the build engineer or the vessel tab of the flight engineer per second. Setting it to 1000 should give 1 update per second. This allows the user to find a decent compromise between speed of update and impact on game performance.

Pressure %

The Build Engineer adds this in the VAB/SPH. It is not present (or shouldn't be) during flight. It sets the percentage of sea level atmospheric pressure that the "Atmospheric Stats" button uses to calculate the deltaV so you can see figures for different altitudes. This value may be changed at some point to be the actual altitude, 0 to "top of atmosphere, of whichever body is selected" if I can figure out how to dynamically change the range of a tweakable slider while running. This may also require the tweakable slider to use a logarithmic scale to give enough control which they don't support by default (if I can work out enough dynamic control of the slider then I should be able to implement the logarithmic part myself).

Both of these settings are saved in the craft/persistence file so this allows you to set a larger delay for larger vessels and it will remember the setting.

Thanks for that. Can you either provide the craft file (you can PM me a link if you don't want it public) or answer the following questions:

Which is the root part of the vessel (the part that lets you move the whole thing in the VAB)?

Which part does the decoupler remain attached to when you trigger it?

It looks to me as if the decoupler is simply removing the test payload from the rocket, and KER is assuming that since no engines or fuel are removed then it is ok to fire that stage. This is an area that is very tricky to simulate without user input. Really the user needs to be able to specify how long the first stage should burn for and then fire the decoupler and go on to simulate both resulting vessels (assuming they both have workable engines and a way of controlling them). I have a plan for how this could be implemented in the simulation code (it would require some substantial reorganisation of the code) but working out how to present the controls and information to the user in a nice way is quite awkward especially for someone with my level of experience with doing UI things in KSP/Unity.

This would basically become the bones of a mission planner. The idea is to allow the user to specify that any particular stage should only burn for a certain time (or possibly a percentage of the available fuel because setting an accurate time would require backtracking in the simulation which would be inefficient). E.g. for a simple vessel consisting of a pod with fuel and an engine on top of a "lifter" that also has a pod this might initially look like:

Stage 0: 3000 kg, 1600 m/s

Stage 1: 50000 kg, 5000 m/s

The user could set the burn of stage 1 to give it enough deltaV to reach LKO and the display would change to show something like:

Stage 0: 3000 kg, 1600 m/s

Stage 1b: 8000 kg, 1000 m/s (values for the remaining burn of the first stage after separation)

Stage 1 (90%): 50000 kg, 4600 m/s (values for the initial part of the burn of the first stage)

However, it starts to get more difficult to lay out the data for more complex designs where the vessel may have to split into more than 2 independent pieces. It should also be possible to allow docking ports to be undocked at particular points (e.g. to create a "dummy" stage that decouples a port) and re-docked again. It would also be nice to be able to specify that detached sub-vessels be re-docked either back where they were or to a different port or even a different sub-vessel. It should even be possible to create "dummy" stages that activate or deactivate engines out of the normal staging sequence.

As I said, working out a decent UI for this will be tricky and it will also require various other, quite complicated bits of code in the simulation. It will need to be able to accurately simulate what happens when a vessel splits into two getting the part trees of the two vessels correct. Rather than simply being discarded, all the decoupled parts need to be put into a new vessel tree using the correct part as the new root. It would also need to correctly handle some odd cases, e.g. if you build a rocket with the root part being the first decoupler to fire then the current simulation code stops generating stats for all the later stages, or if you put a decoupler on "upside down" so the side that remains attached is connected to the parent part (and hence, ultimately, the root of the vessel). None of this is impossible by any means but it would require quite a lot of careful thought and it isn't really worth me starting to do that until I can come up with some ideas for the UI so, it is unlikely to happen in the near future...

Link to comment
Share on other sites

Sim time limit

The Build Engineer adds this in the VAB/SPH and the Flight Engineer adds it during flight. It controls the amount of time in milliseconds between one run of the deltaV simulation and the next one, so setting it to 200 should give approx. 5 updates of the build engineer or the vessel tab of the flight engineer per second. Setting it to 1000 should give 1 update per second. This allows the user to find a decent compromise between speed of update and impact on game performance.

That's a great addition, Padishar, very useful for those of us with older PCs. Just for a baseline in adjusting this, how often did the simulation run by default before it was tweakable?

Link to comment
Share on other sites

Well, originally the simulation was timed and then it would wait for ten times that long before running it again. For simple craft on decent CPUs this results in it running far more often than necessary and on very complex craft, especially on slow CPUs, it could update very slowly, e.g. if one run took 500 ms then it wouldn't do another run for 5 seconds (this is especially annoying during development when the output of lots of log messages makes the simulation run very much slower, my 370 odd part ARM tug launcher can take over 5 seconds with maximum debug trace meaning it wouldn't run again for nearly a minute) . The newer simulation code uses a different strategy, it times the simulation and then subtracts that time from 100 ms and waits for that long (if the simulation took more than 100 ms it doesn't wait at all) so it basically tries to maintain a rate of 10 updates per second. The tweakable slider simply lets you adjust that 100 ms anywhere from 0 ms to 1000 ms in 10 ms steps (except that the KSP sliders snap near the ends so it goes: 0 ms, 50 ms, 60 ms, 70 ms etc. and the same at the high end, e.g. if you are within 5 times the step of the end then it snaps to the end).

Edited by Padishar
Link to comment
Share on other sites

Which is the root part of the vessel (the part that lets you move the whole thing in the VAB)?

Which part does the decoupler remain attached to when you trigger it?

It looks to me as if the decoupler is simply removing the test payload from the rocket, and KER is assuming that since no engines or fuel are removed then it is ok to fire that stage. This is an area that is very tricky to simulate without user input.

Root part is the test weight on top.

Decoupler stays attached to the transfer stage beneath the test weight.

Ironically the whole point of the test weight is so I can get the dV of this rocket stage without having to make KER do any fancy planning calculations :P I built the payload, noted its dV and weight, then built the transfer stage with the payload as a test weight so KER (and VOID) would only have to deal with a single engine calculating dV. Then I built the lift stage with the test weight set to the weight of the transfer vehicle and payload. I don't really mind doing things this way, it really helps me break down construction into a manageable process for larger craft

Link to comment
Share on other sites

Root part is the test weight on top.

Decoupler stays attached to the transfer stage beneath the test weight.

Ironically the whole point of the test weight is so I can get the dV of this rocket stage without having to make KER do any fancy planning calculations :P I built the payload, noted its dV and weight, then built the transfer stage with the payload as a test weight so KER (and VOID) would only have to deal with a single engine calculating dV. Then I built the lift stage with the test weight set to the weight of the transfer vehicle and payload. I don't really mind doing things this way, it really helps me break down construction into a manageable process for larger craft

This doesn't make sense. Are you actually running KSP 0.23.5? Does it behave the same if you replace the test weight with a standard command pod? After the decoupler fires when stage 0 is activated there should be no engines (or fuel) attached to the craft so there should be no way that S0 can have any thrust or deltaV.

Do the stage labels (S0, S1 etc) always not line up with the data in the window? I have never seen this happen in any version of KER that I have run or in any other users' screenshots or videos.

Is there any particular reason that you haven't provided the craft file (and a list of the mods it uses) for me to look at? It really would help diagnose the issue if I could run a debugging build of KER with your craft to see what the simulation code is doing.

Link to comment
Share on other sites

I messed up the root part. It's the AIES probe body underneath the decoupler, not the test weight, sorry.

Is there any particular reason that you haven't provided the craft file (and a list of the mods it uses) for me to look at? It really would help diagnose the issue if I could run a debugging build of KER with your craft to see what the simulation code is doing.

Yea, I'm lazy. Here.

Mods are AIES, Alchemy Technologies, DMagic, KWRocketry, 6S service tubes, NovaPunch2, surface lights and some stock Squad stuff. Those are just the parts on the rocket. The rest of mods I use (and these) are linked in my sig

Link to comment
Share on other sites

I messed up the root part. It's the AIES probe body underneath the decoupler, not the test weight, sorry.

Yea, I'm lazy. Here.

Mods are AIES, Alchemy Technologies, DMagic, KWRocketry, 6S service tubes, NovaPunch2, surface lights and some stock Squad stuff. Those are just the parts on the rocket. The rest of mods I use (and these) are linked in my sig

Right, well, basically the structure of your craft is one that is known to give KER problems. The method used to determine which stage each part is decoupled in has a serious flaw causing the staging to not simulate correctly if the root part of the rocket gets decoupled. Basically, the simulation does what I described in #902. Even though the engine is initially active, the flaw causes KER to think the payload is what is being decoupled and, since it doesn't have any active engines or fuel, it does this immediately. The engine and fuel tank are still attached to the root of the vessel (and the decoupler is as well but this doesn't cause an issue) so the deltaV shows up in S0 (and is higher than it should be because the test weight has gone).

I think I can fix this in the simulation code without needing the full vessel splitting algorithm I described above but I am currently in the middle of fixing it to correctly take into account which engines are currently active when in flight, so it gives more sensible numbers when you manually activate and/or deactivate engines, so it may take a little while before I get on to it.

It would make more sense if you rearranged the vessel so the test weight was the root part (I assume this is possible with the test weights) as this would allow you to detach the transfer stage and make it a subassembly so it can easily be attached to the real payload and would also allow KER to simulate it correctly.

These two craft files are simplified, stock only versions of yours. The bug one is the same arrangement as yours and the fixed one is rearranged to work properly.

Bug Gaiiden.craft

Fixed Gaiiden.craft

Edited by Padishar
Link to comment
Share on other sites

It would make more sense if you rearranged the vessel so the test weight was the root part (I assume this is possible with the test weights) as this would allow you to detach the transfer stage and make it a subassembly so it can easily be attached to the real payload and would also allow KER to simulate it correctly.

Also Gaiiden, I notice you don't have SelectRoot installed. I wholeheartedly recommend it for just this purpose. It allows you to just jump around from part to part setting them root.

Link to comment
Share on other sites

yes, the test weight can be made a root part - I thought it was, don't know why it was added afterwards in this case as I usually design top down from payload to transfer to lift stage. Anyways, thanks for looking into the issue

Link to comment
Share on other sites

Little Bug Report...

The new version don't matches with the previous, (vessels not loading because missing part engineer 7500)

also the textures are missing the 7500 is just blank white

Link to comment
Share on other sites

Little Bug Report...

The new version don't matches with the previous, (vessels not loading because missing part engineer 7500)

also the textures are missing the 7500 is just blank white

As this is the first such report after quite a few days I have to suspect there is a problem with your install rather than a general problem with the release. Try looking in output_log.txt (or do a quick test run of KSP to generate a nice small log and post it up somewhere for us) for any error messages that might explain the problem.

I suggest you completely remove KER from your game and then reinstall it by simply copying the entire Engineer folder from the zip into your GameData folder. There should be three folders inside the Engineer folder, one for each of the parts, and each one should contain either one or two folders (all three have a textures folder and the two chips have a mesh folder), a part.cfg and either a .dae file or a .mu file.

Link to comment
Share on other sites

I have a weird problem right now. KER was working fine until I got RSS and Real Fuels (with RftS) working. Now it (KER, I mean) usually works, but often there is a bug where a stage's dV is only shown for a split second when I attach the engine. If I then remove that engine and add it again, it won't show dV even for that split second. If I remove the engine and select a new one (even if it's the same type of engine) and attach it, it will show dV for that split sec again.

Link to comment
Share on other sites

Does the thrust behave the same way, initially showing a value and then going to ---?

I've hardly run with RealFuels (and I've never run with the RftS engine pack, just the other recommended one) since I implemented the thrust correction so it is quite possible there are bugs. I think you are the first person to mention it since it was done. I've also changed machines since then so I'll need to set up a new install, I've been meaning to just haven't got around to it yet...

Link to comment
Share on other sites

Everything behaves that way, except for mass and cost (also, the burn time goes to 0.0s, not ---).

First of all, can you confirm which version of KER you are using? If you aren't using 0.6.2.4 (or my latest dev version based on 0.6.2.4) then please update and try it again.

I've given it a try with just RealFuels and RftS engines and it seems to work ok. When you say "but often there is a bug" how often do you mean? Can you see any pattern to when it does and doesn't work, e.g. any particular engines or fuel tanks (or complete craft) it goes wrong with etc.? I may have missed a type of RF engine module when I was implementing the thrust correction though I don't see why that would make it behave in the way you describe.

Can you post an output_log.txt file somewhere? Run KSP, edit ships until you get the problem a couple of times and then quit (to avoid the log getting too big). If you find an easy way to reproduce it, e.g. load a particular saved craft and add/replace an engine and it always goes wrong, then please also upload a craft file and the steps necessary to reproduce.

Link to comment
Share on other sites

- - - Updated - - -

As this is the first such report after quite a few days I have to suspect there is a problem with your install rather than a general problem with the release. Try looking in output_log.txt (or do a quick test run of KSP to generate a nice small log and post it up somewhere for us) for any error messages that might explain the problem.

I suggest you completely remove KER from your game and then reinstall it by simply copying the entire Engineer folder from the zip into your GameData folder. There should be three folders inside the Engineer folder, one for each of the parts, and each one should contain either one or two folders (all three have a textures folder and the two chips have a mesh folder), a part.cfg and either a .dae file or a .mu file.

I already have reinstalled it ... it is functional but it count as a new aditional part not as the old one. I will look for the log files later today ... also switching to the old backuped istallation was working for me.

Link to comment
Share on other sites

I recently installed Kerbal Engineer, and when I tried to use it in my Career mode game I saw that I must buy it in the tech tree. No problem, I went and did that. I went back into the VAB and found that I still couldn't use the parts. Back in the tech tree I saw that the parts were still bought, but a new, unbought set had appeared. [image](http://i.imgur.com/UP6i4k5.png)

Anybody know what's causing this, and what I can do to fix it?

Link to comment
Share on other sites

I recently installed Kerbal Engineer, and when I tried to use it in my Career mode game I saw that I must buy it in the tech tree. No problem, I went and did that. I went back into the VAB and found that I still couldn't use the parts. Back in the tech tree I saw that the parts were still bought, but a new, unbought set had appeared. [image](http://i.imgur.com/UP6i4k5.png)

Anybody know what's causing this, and what I can do to fix it?

I believe this is usually caused by an installation problem, e.g. having files from an older version also present in GameData (or the much older folders). Search through the whole of your KSP installation for all files that look like part of KER and delete them and then install a fresh copy of 0.6.2.4 (place the whole Engineer folder from the zip into your GameData folder).

If this doesn't sort it then please upload your output_log.txt somewhere so we can take a look (or look through it yourself to see if you can spot any likely looking errors)...

I'll take a look tomorrow to see if Cybutec has accidentally changed the part name...

I've compared the parts from 0.6.2.3 and 0.6.2.4 and I can't see anything wrong.

Edited by Padishar
Link to comment
Share on other sites

First of all, can you confirm which version of KER you are using? If you aren't using 0.6.2.4 (or my latest dev version based on 0.6.2.4) then please update and try it again.

At the time of report I was using an outdated experimental version, however the problem persists with 0.6.2.4.

I've given it a try with just RealFuels and RftS engines and it seems to work ok. When you say "but often there is a bug" how often do you mean? Can you see any pattern to when it does and doesn't work, e.g. any particular engines or fuel tanks (or complete craft) it goes wrong with etc.? I may have missed a type of RF engine module when I was implementing the thrust correction though I don't see why that would make it behave in the way you describe.

The bug happened to me 3-4 times in 2 days that I've had RealFuels for. It always, without exceptions, occurred in the stage before the one that circularized the orbit, that is the one before the last. It did occur with different engines and I think also with different fuel tanks. Also, when later loading the crafts this happened with, everything was fine.

Can you post an output_log.txt file somewhere? Run KSP, edit ships until you get the problem a couple of times and then quit (to avoid the log getting too big). If you find an easy way to reproduce it, e.g. load a particular saved craft and add/replace an engine and it always goes wrong, then please also upload a craft file and the steps necessary to reproduce.

I'll try to remember that.

Link to comment
Share on other sites

This is sounding like some numeric value in the craft is reading as NaN (not a number) or possibly of zero causing either a divide by zero or generating a NaN value. If a NaN value is used in any type of calculation the result of the whole calculation is also NaN. There was a problem with certain mod engines where they had a tweakable electric charge but a capacity of zero which triggers a bug in KSP when you open the engine's tweakable that results in NaN units of electric charge. KER was including this when calculating the mass of the part which resulted in NaNs in the mass (and hence the TWR, deltaV and burn time) which get displayed as blank. As your thrust is blank but the mass isn't I suspect the thrust correction is causing the NaN and this is affecting the TWR, deltaV and burn time. I'll take a look at the code and check it isn't doing anything silly. I may add some debugging code to detect and log the issue into my latest development version, I'll let you know how it goes...

Edit: I have posted an update to my development version that includes detection and logging of a couple of potential causes of NaN in the thrust correction code.

Edited by Padishar
Link to comment
Share on other sites

Hmm. I can't seem to get this to work. I have no other mods installed, fresh install of the game. I copied the Engineer folder into the Kerbal Space Program folder, and checked R&D to ensure the parts were unlocked. They are.

I can place the chip, but no menus pop up in the VAB. All three versions of the chip do not work. I love the mod so much that I don't really feel like playing without it haha. Has anyone had this happen before? I looked back through the few most recent pages of this thread and couldn't find too much. I'd be happy to provide any additional information. Thank you!

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