Seeing that this mod has gone inactive, as a somewhat experienced programmer and modder myself, I have updated this mod to be compatible with vanilla game v2.50. It is available here:
viewtopic.php?f=181&t=418144
The <run_script/> XML tag has been heavily [s]abused[/s] utilized to simulate function calls inside aiscripts. This allows the internal code to be more modular and tidied.
The update also responded to the original mod's problems:
pesoda wrote: ↑Sat, 22. Dec 18, 01:19
- Partially solved. Real-time updating of wares and distances. detail
Still adopts the dock-sync approach, but also allowed subordinates to sync with their commanders when they subordinates dock.
pesoda wrote: ↑Sat, 22. Dec 18, 01:19
- In progress. Subordinates frequently take a coffee break (“Fly and Wait”) between tasks (eventually they return to work, so may not a problem). detail
- According to the report, “Fly and Wait” may directs the commander’s position.
Subordinates are excluded from the commander's Recall Subordinates if they are part of the "civilian fleet".
pesoda wrote: ↑Sat, 22. Dec 18, 01:19
- Subordinates can only have same default order as the commander. E.g. They cannot protect ships in the same wing.
- For now, you can request unassigned ships or different wings to escort them.
- I think one of the solutions is that adding assignment commands to the right click menu of ships. (Alternative idea is also welcome.)
The updated version utilizes the Right Click API. Subordinates intended to perform trading or mining activities should be assigned to their commanders using the new "form/join [...] fleet" buttons. UI scripts are used to force normally impossible "trade" and "mining" assignments onto such ships. This allows the game to signal fighters to protect the commander as usual, while allowing civilian ships to work in the same fleet doing something else.
pesoda wrote: ↑Sat, 22. Dec 18, 01:19
- Compatibility with many order mods.
- In order to solve it fundamentally, the basal framework of this mod should be changed over from aiscripts to UI because the function for enumerating order-params is only provided to UI.
Partially responded; used Right Click API and UI scripts to handle assignments, but still used aiscripts to actually give assignments. I think it is impossible to avoid using aiscripts, as they are the only way for us to intercept certain events without needing to know the event target before hand, compared to MD scripts (and aiscripts work).