Closed Vectorial1024 closed 4 years ago
We have a problem here; the mod will endlessly print "Syncing fleet name from Galactic Signal with leader" even though supposedly, no one signaled the cue.
Unexpectedly, I found that the values of the Characteristic Symbols were somehow set to 1, which renders the event filtering ineffective.
Currently, whenever the Galaxy is signaled to sync fleet orders, the Galaxy is somehow also signaled to update fleet name, which is unintended and unexpected.
Unfortunately, I am unable to detect when a new fleet is created at MD level. Even when I insert code at the very top of order.assign.commander
, the expression $commander.subordinates.count
still returns 1.
We could go deeper into Lua territory, or we could drop this. Seeing that this long investigation yielded something interesting, I'd rather extract the more interesting part, and then drop this.
All useful information from here are extracted. Closing this.
As we investigate whether this feature is feasible, we learned more about <event_object_signaled/>
.
If param
is not specified, then whenever object
is signaled, the cue is fired. Apparently by supplying param
, the game is able to filter signals such that only when the object is signaled with matching param
will the cue be triggered.
Still, it doesn't hurt to even check it more carefully with <check_value value="event.param == ..." />
, to make sure param
really is the parameter we are looking for.
Rename the fleet afterwards if you wish to. Ignores the "no-rename" configurable option.
Slow and steady as we enhance this mod.