Love the script, but i have my fleets for the second time literally start a war with the Argon i'm affiliated with, i have +29 standing with them. The first time i just killed a few and voila, but a few hours later they literally pull almost the entire Argon main sector. This started to happen after i installed this script, never before.
Any idea how i can prevent that? Ps yes they were set to only attack hostile/red
I have a suggestion,can you make an option to not set roaming destination,but to set max jumps from home sector?so the fleet and auto protect or eliminate all enemy ships and bases whthin set jumps range from home sector,it will be very usefull in late game when player have a strong fleet
As much as I would love for ships to go repair themselves they don't seem to do it. I don't know what the issue might be but the roaming fleet just refuses to repair from nearby stations. Do they have to be owned by me?
Hey Chillmatica, just want to let you know that this diff (i.e. the do_if[9]) in your Roaming Fleet order.fight.attack.object is too generic.
It will break games when the player has mods that also change order.fight.attack.object - and also when Egosoft updates that script. When other mods add their changes to that script (or when Egosoft updates that script) the do_if at position 9 will not be the do_if you intend to actually change.
Cooool. I'll let Mycu know. He found the incompatibility in his game with the disable/re-enable mods. And I dug deeper and found the exact line in the code.
Problem: Deleted/reset fleet subordinate commands - like defend, support, intercept,...
When you are using a fleet with several subordinates eg. S classes with intercept and/or defend, or a support vessel with command fleet support. In this case these commands will be deletet and reset back to attack (all ships!) after the camp (ing) is done. You can see it also in 'roamingfleet.xml': <!-- Clear any position defense assignments and recall subordinates --> <do_if value="this.assignedcontrolled.type == shiptype.carrier and this.assignedcontrolled.activesubordinategroupids"> <set_value name="$_subordinategroups" exact="this.assignedcontrolled.activesubordinategroupids" /> <do_for_each name="$_locgroup" in="$_subordinategroups" counter="$_i" reverse="true">
In this code snipped I commended it out (the set_subordinate_group_assigment parts). With this it seems that my fleet is now roaming and my subs are doing as they are set to it. It has a side effect that you should now not select the camp options, while these order several ships to do a gate patrol (see description). The problem here is/are the command(s) for subordinates. They differ and normally you need to 'save' it somehow before giving a new one, so that you can reassign it later after the camping. But with a carrier full compliment and some XL/L ships asigned - so roughly 50-100 ships - it may be too much to do... An option to let the commands as they where when starting the roaming-fleet would be nice.
Another problem is the use of travel="true". This leeds in lager sectors to a splitting of your fleet all across the sector. I changed it in the move_to object commands to false, except the parts for attack and retreat. With this the fleet stays together, but the fleet is now sigificant slower (while it travels with normal speed). This leeds in larger sectors (eg. XRSGE mod) to fleets with roughly one real-time hour of moving from one gate to another. So this may not be suited for everyone.
I set up fleet to patrol from home sector A to B sector and i am totaly in var with Rhak's as well but the patrol fleet doesn't attack the station wich Rhak's trying to build in my sector. How can i set this up...
Roaming fleets won't see stations as a target until they are "functional". I did this because in my experience, Xenon have a habit of magically throwing down plots over and over even though they have been erradicated from a sector. This annoyingly distracted the roaming fleets constantly to have to go over and one-shot them constantly.
In your scenario, the unbuilt stations won't actually do anything. Roaming fleets would intercept any builder or trader ships trying to build it up. It can be annoying still to have the plot on the map so in that case you would want to manually tell a fleet to over and pop it.
I see, Thank you for reply, so my fleet will attack after the building is finish and in my game xenon never bothers me with plot i take every single sector except one next to the matrix #9 i guess no build what so ever, but Rhak is another story. Anyway Thank you again.
Correct, assuming that your settings are set to "allow" it. Meaning the option to allow fighting near stations is set in the Extension Options and then the Fight Win Odds is set such that the fleet sees itself as strong enough to engage the station.
36 comments
Any idea how i can prevent that?
Ps yes they were set to only attack hostile/red
<!--disable-->
<add sel="/aiscript/attention/actions/set_value[@name='$defaultorder']" pos="before">
<do_if value="@$speak and not this.assignedcontrolled.nextorder and (@$defaultorder.id != 'RoamingFleet') and (@$defaultorder.id != 'Escort') and (not this.assignedcontrolled.commander or (this.assignedcontrolled.commander == player.occupiedship)) and notification.npc_await_orders.active">
<set_value name="$speak" exact="false" comment="Boolean Speak NPC voice. Default is true"/>
</do_if>
</add>
<!--re-enable after-->
<add sel="/aiscript/attention/actions/do_if[@value='$abort? and @this.assignedcontrolled.order.exists']" pos="before">
<set_value name="$speak" exact="true" comment="Boolean Speak NPC voice. Default is true"/>
</add>
<?xml version='1.0' encoding='utf-8'?>
<diff>
<add sel="/aiscript/interrupts/handler[5]" pos="before">
<handler ref="RoamingFleetHandler"/>
</add>
<!--disable-->
<add sel="/aiscript/attention/actions/set_value[@name='$defaultorder']" pos="before">
<do_if value="@$speak and not this.assignedcontrolled.nextorder and (@$defaultorder.id != 'RoamingFleet') and (@$defaultorder.id != 'Escort') and (not this.assignedcontrolled.commander or (this.assignedcontrolled.commander == player.occupiedship)) and notification.npc_await_orders.active">
<set_value name="$speak" exact="false" comment="Boolean Speak NPC voice. Default is true"/>
</do_if>
</add>
<!--re-enable after-->
<add sel="/aiscript/attention/actions/do_if[@value='$abort? and @this.assignedcontrolled.order.exists']" pos="before">
<set_value name="$speak" exact="true" comment="Boolean Speak NPC voice. Default is true"/>
</add>
<replace sel="/aiscript/attention/actions/do_if[@value='this.defensible.exists']/do_if[@value='$Defensible.isclass.ship']/do_if[@value='this.assignedcontrolled.bboxdistanceto.{$target} gt $pursuedistance']/do_if/do_if/do_elseif/do_if/@value">@this.assignedcontrolled.order.isrunning and ((@this.assignedcontrolled.defaultorder.id != 'RoamingFleet') and (@this.assignedcontrolled.toplevelcommander.defaultorder.id != 'RoamingFleet') and (@this.assignedcontrolled.commander.defaultorder.id != 'RoamingFleet'))</replace>
</diff>
I'm using headhunter and don't see this toggle anywhere.
It will break games when the player has mods that also change order.fight.attack.object - and also when Egosoft updates that script.
When other mods add their changes to that script (or when Egosoft updates that script) the do_if at position 9 will not be the do_if you intend to actually change.
When you are using a fleet with several subordinates eg. S classes with intercept and/or defend, or a support vessel with command fleet support. In this case these commands will be deletet and reset back to attack (all ships!) after the camp (ing) is done. You can see it also in 'roamingfleet.xml':
<!-- Clear any position defense assignments and recall subordinates -->
<do_if
value="this.assignedcontrolled.type == shiptype.carrier and this.assignedcontrolled.activesubordinategroupids">
<set_value name="$_subordinategroups"
exact="this.assignedcontrolled.activesubordinategroupids" />
<do_for_each name="$_locgroup" in="$_subordinategroups" counter="$_i"
reverse="true">
<!-- FALLBACK To ATTACK COMMAND -->
<!-- <set_subordinate_group_assignment -->
<!-- object="this.assignedcontrolled.subordinatesingroup.{$_locgroup}.{1}" -->
<!-- commander="this.assignedcontrolled" subordinategroupid="$_locgroup" -->
<!-- assignment="assignment.attack" /> -->
</do_for_each>
<create_order object="this.assignedcontrolled" id="'RecallSubordinates'">
<param name="timeout" value="60s" />
</create_order>
</do_if>
In this code snipped I commended it out (the set_subordinate_group_assigment parts). With this it seems that my fleet is now roaming and my subs are doing as they are set to it. It has a side effect that you should now not select the camp options, while these order several ships to do a gate patrol (see description).
The problem here is/are the command(s) for subordinates. They differ and normally you need to 'save' it somehow before giving a new one, so that you can reassign it later after the camping. But with a carrier full compliment and some XL/L ships asigned - so roughly 50-100 ships - it may be too much to do... An option to let the commands as they where when starting the roaming-fleet would be nice.
Another problem is the use of travel="true". This leeds in lager sectors to a splitting of your fleet all across the sector. I changed it in the move_to object commands to false, except the parts for attack and retreat. With this the fleet stays together, but the fleet is now sigificant slower (while it travels with normal speed). This leeds in larger sectors (eg. XRSGE mod) to fleets with roughly one real-time hour of moving from one gate to another. So this may not be suited for everyone.
In your scenario, the unbuilt stations won't actually do anything. Roaming fleets would intercept any builder or trader ships trying to build it up. It can be annoying still to have the plot on the map so in that case you would want to manually tell a fleet to over and pop it.