X: Rebirth
0 of 0

File information

Last updated

Original upload

Created by

Vincent

Uploaded by

lqvinh

Virus scan

Safe to use

About this mod

A small fix to engineer AI so engineers can work flawlessly

Permissions and credits
Changelogs
UPDATE: This mod is now also available at Steam Workshop

Short version:
  • Fixes the bug that leaves station hull at 99%
  • Recalculated ship hull repair speed (component repair speed remains the same)
  • Fixes ship repair speed being too slow due to Construction drones being "in use" all the time bug
  • Engineers with level 0 in engineering skill will not be able to use Construction drones
  • Uses engineer's engineering skill to calculate repair speed instead of combined skills
  • Uses engineer's engineering skill to reduce wait time between repairs
  • Fixes a bug with vanilla AI which allow engineers to slack off when ship hull is repaired to its repair limit (since v1.2)
  • Changed the logic of repairing out of view ships and stations, which makes restoring components to be too quickly (since v1.2)


Long version:

Since the day this game came out, there are always problem with engineer AI, even until today. So I decided to review the code, try to debug it and finally came up with a version that can work pretty well.

If you ever used Station Engineer mod, you will eventually notice that the engineers on your stations sometime don't repair it to 100%. It's not the mod's fault, because all it does is giving you a slot to put an engineer into your station. It's actually a bug in the vanilla AI, and this mod fixes it (that doesn't mean you need Station Engineer mod to use this mod).

The vanilla AI calculation when repairing ship hull is also not really correct, and the result is that it doesn't matter if you have 1 or 100 Construction URVs (cURV), the hull repair speed is always 1% per 10 seconds. It doesn't matter if your ship has 4 million HP or 10 million HP, the repair speed is always the same (unless your ship has only around 2 million HP, and you actually have 100 cURVs on it, then the speed is around 1.45% per 10s), and it's really bugging me. So I changed the formular, and now when you have too few cURVs, your repair speed will be really slow. But it will pump up nicely when you have 50 or more cURVs.

And one thing about URVs in this game since the beginning is sometime they lost contact with your ship, and disappeared into thin air. But your ships still think these drones are being used, so it won't launch cURVs anymore, leaving your ships repair speed critically slow. And this mod fixes it also, not by recalling these missing drones, but by simply uses the total number of cURVs your ship has. However it only works when ALL of your ship's cURVs are in "In Use" state. I may fix this in the future but not sure though.

Other things that this mod does, are taking engineering skill into account when calculating repair speed and engineer's idle time. The higher the skill level, the faster the engineer works. And it just makes sense when engineers with level 0 in engineering can not use drones.


Note:
Eventually you will notice that your engineers on your cap ships sometimes will show that they are repairing something weird, like "Reparing nil", or "Reparing some_weird_macro", or just "Reparing". It's not a bug, and they are in fact repairing those components. It's just that those components are not designed to be shown up so they don't actually have a name to display (what a messy development), but they are also part of the ships, and they are destructible, so I think it just makes sense for the engineers to repair them too.


Compatibility:
  • X Rebirth version 4.1 and later
  • Probably not compatible with other mods that modify engineer.ai.xml (if your other mods have this file)