Supply Mule conflicts with Civilian Fleets
Vectorial1024 opened this issue · 7 comments
Hi there, this is Civilian Fleets speaking.
We have found on our side (Vectorial1024/v1024_civilian_fleets#14) that our Supply Mule Fleets do not function as intended. By comparing the code, we found out that the Supply Mule aiscript, when it initializes, will remove ship assignments.
Specifically, we are looking at this segment of code, at around line 130:
<remove_object_commander object="$subordinate" />
<create_order object="$subordinate" default="true" id="'SupplyMule'">
<param name="sourceStation" value="$sourceStation" />
<param name="assignSrc" value="$assignSrc" />
<param name="dedicatedServe" value="$dedicatedServe" />
<param name="tradeWithOwn" value="$tradeWithOwn" />
<param name="maxtrades" value="$maxtrades" />
<param name="maxDist" value="[$subordinate.pilot.skill.piloting * 2, $maxDist].min" />
<param name="builder" value="$builder" />
<param name="producer" value="$producer" />
<param name="specialWareBasket" value="$specialWareBasket" />
<param name="playerBuyMod" value="$playerBuyMod" />
</create_order>
This segment of code, along with nearby code, will:
- give all subordinates of the Supply Mule each a copy of the current Supply Mule order
- kick all subordinates away from the fleet, make them become "unassigned"
We Civilian Fleets can work around this by using edit_order_params
command to update orders for Supply Mule Fleets, but, seeing that both sides seem to try to do the same thing differently, we would like some clarification on the behavior of Supply Mules.
Is there a way that we can allow mules to transfer their orders to subordinates if a user does not use civilian fleets?
We could introduce a check for the extension civilian fleets. Or just remove the copy feature by default and say it works best with civilian fleets?
On the original supply mule the feature was never actually advertised by the original author anyway.... the only reason I left it in there on my re-write is that I knew a couple of people who really wanted it.
If there's a really simple way to leave it in the script without messing up civ fleets, then I'd prefer that. Only if there's no way to have both options, then I would want to remove it from mules.
I'll try to resolve this asap so I can forget about modding for a while, because real life is suddenly calling once again.
It will involve me adding a global variable to indicate that Civilian Fleets is loaded, and some extra code to prevent the assignment removal on this side.
The fix is prepared.
Please refer to Vectorial1024/v1024_civilian_fleets#16 for the added global variable.
Proposed adjustment on this side at #59
Hopefully fixed as of 66d72c7
Closing, for now, can reopen if further attention required.