About this mod
Allow you to enable or disable repair drones.
- Requirements
- Permissions and credits
- Mirrors
- Changelogs
- Donations
With that being said, I have tested this as best as I can, and I see no issues. Not saying there isn't any, but that is why I am releasing it.
Please report any issues here or any suggestions.
This was supposed to be a simple thing to do, it turned out very different than what I thought it would. With being new to the coding scene, even more so.
How this works:
It cancels the repair drone mass traffic when you turn it off, this removes all the VARs. (This is the default mechanic, not something I do.)
The only way I found to restart the mass traffic was to check the ship when the drones are activated and relaunch them based on the damage.
I only ADD code, I do not change anything in the base file, which means it should be compatible with all mods. The only exception to this will be when you restart the drones, it will use the base code, it will ignore (when it restarts) any changes to the part of the code where
it checks for damage. It should then fall into the original code as the restart code is only used to restart the drones (this code is actually the original code that checks for damage).
I tried to use labels when restarting to just make the ship restart all over and I couldn't get it to work, so I resorted to this. It only runs on the player ship and only when you reactivate the drones, so minimal impact.
Some things to be aware of.
I can not control when the drones return, they have orders and they will follow them.
Sometimes they will wander a short distance from the ship before returning.
Mod is only in English, it's all I speak, feel free to translate and I'll add them.
If the AI started the drones they might act weird for a bit, but once you take control they return and launch rather quickly.
I would like to thank kuertee and DeadAir for answering my questions, it helped me with this mod. I used parts of their code here and there to learn the API/MD stuff.
Now with that out of the way...
This mod REQUIRES, SirNukes Mod Support APIs. Either the Steam or NEXUS version will work.
To access the controls (for those who do not know how) esc->extension options, in there you'll find a menu for drone control.
For now, I am releasing this on dropbox, I will be putting it up on NEXUS and STEAM once I am satisfied everything is in working order. It will be loose files so people can see the code and if they have a better way to do it they can suggest it. I am all about learning.
Some things I found out:
If you just set an arg to stop the drones in the base code, they will not restart when you turn them back on. This is because the code clears everything and then to restart the ship has to take damage to trigger the repair code.
I tried saving the VARs, while this worked to some extent, it didn't work right all the time.
So, something are beyond my control with my current skills. I did the best I could here and made it as light weight as I could. Is there easier ways, probably. Some of the Guru coders (kuertee, DeadAir and a few others) could have probably did this in a whole different way.
Anyway, sorry about the wall of text but I wanted to try to hit on everything I could and couldn't do to minimize questions and such.
Couple last things:
If you are in control of a ship and have the drones off, I would suggest turning them back on for the AI pilot. If you don't they will have to wait until they get hit again before launching, it's just how the base code works.
The control shows up on any ship, I do not know (well I have an idea) how to make it only show up on ships with repair drones. I am not concerned with this at this moment.
If you have repair drones disabled and take control of a ship that has drones out, it will not recognize they're disabled; you must toggle it. -- this one I have no idea how to fix with out changing code somewhere else, I would love for it to recognize your setting when you take control and Enable drones when you leave. Again though this is a minor point for me.
I suggest hitting ESC, pause the game, change the setting if you are in the middle of a battle or something dangerous.
Thanks to everyone who read this far and thanks to EGOSOFT (for the game and support) and those mentioned above for their help and support.
05/21/2022 -- initial release (beta)