Vectorial1024 / v1024_civilian_fleets

Create civilian fleets to help manage your traders and miners.
https://www.nexusmods.com/x4foundations/mods/335
MIT License
18 stars 10 forks source link

Auto-Renaiming Issue/feature? #23

Closed FormBurden closed 4 years ago

FormBurden commented 4 years ago

Greetings again, so I've noticed when using the auto-naming scheme, especially through SirNukes API, that when renaming, the auto-renamed fleet, after about a minute or so it'll rename to the default scheme that is set when the SirNuke's option is selected.

Was wondering if possibly you could add a feature (maybe another button) where the fleets will get named when formed, but after that the fleets will not get re-pushed to get renamed. Meaning I could rename the fleet afterwards and it'll stay that way. Something like that would be great.

Vectorial1024 commented 4 years ago

I think I can insert a "update name" instruction when I detect a fleet forming at the order.assign.commander script. That is, when I detect "two independent ships" become "one same fleet".

The only event that we want to listen to will be when the commander-to-be receives its first subordinate, i.e., before really putting the subordinate-to-be under the commander-to-be's control, the subordinate count is 0.

Whether anyone wants us to auto-rename the fleets, they're gonna need to rename the generic "Fleet XX" to something else, so I guess the "regardless of fleet rename choice, when a civilian fleet is formed, fleet names will always be generated" rule is acceptable.

Vectorial1024 commented 4 years ago

Have been working on https://github.com/Vectorial1024/v1024_civilian_fleets/pull/25 recently, but have found a difficult bug and progress has stalled.

FormBurden commented 4 years ago

All is well, keep doing your thing! :D

Vectorial1024 commented 4 years ago

Unfortunately, as a short answer, trying to rename fleets at formation is impossible at MD/XML level, and I prefer not to go too deep into Lua, or I get myself too much trouble.

However I found out more about the MD, and perhaps that would be useful in other aspects of the mod.

FormBurden commented 4 years ago

Ah I see. Well, all is well, glad you found out more info on what you could do with the mod.

Vectorial1024 commented 4 years ago

I've extracted all which is useful from the dropped branch. Closing this for now.