-
Notifications
You must be signed in to change notification settings - Fork 6
[=ERROR=] 9750.91 aiscripts\move.seekenemies.xml(15): Found non-event condition 'check_value', event condition required! AI fixed code in the post #10
Copy link
Copy link
Open
Description
I ask claude to fix it and here is the code she wrote:
`
<do_if value="@$shibimprovedpatrol">
<do_if value="not @$shiblastscan">
<set_value name="$shiblastscan" exact="player.age"/>
</do_if>
<!-- Check if 10 seconds have passed -->
<do_if value="(player.age - @$shiblastscan) ge 10s">
<set_value name="$shiblastscan" exact="player.age"/>
<set_value name="$sectorships" exact="[]"/>
<find_ship name="$sectorships" space="this.ship.sector" class="[class.ship_s, class.ship_m, class.ship_l, class.ship_xl]" recursive="true" multiple="true">
<match_content owner="faction.player" negate="true"/>
</find_ship>
<do_if value="$sectorships.count gt 0">
<set_value name="$SHIBpotentialtargets" exact="[]"/>
<do_all exact="$sectorships.count" counter="$i">
<set_value name="$ship" exact="$sectorships.{$i}"/>
<do_if value="$ship.iswreck == false and $ship.isoperational and $ship.isinliveview and $ship.dock == null
and this.ship.ishostileto.{$ship} and ($ship.travel.active == false or $ship.order.id == 'Flee' or this.ship.distanceto.{$ship} lt this.ship.maxradarrange)">
<append_to_list name="$SHIBpotentialtargets" exact="$ship"/>
</do_if>
</do_all>
<do_if value="$SHIBpotentialtargets.count gt 0">
<resume label="shibimprovedpatrol" />
</do_if>
</do_if>
</do_if>
</do_if>
</add>
<!--
- Final target determination and attack/move
-->
<add sel="//attention/actions">
<label name="shibimprovedpatrol"/>
<do_if value="@$shibimprovedpatrol and @$SHIBpotentialtargets and $SHIBpotentialtargets.count gt 0">
<run_script name="'lib.target.selection'">
<param name="primarytarget" value="null" />
<param name="secondarytargets" value="$SHIBpotentialtargets" />
<param name="escort" value="false" />
<param name="pursuedistance" value="null" />
<param name="pursuetargets" value="false" />
<param name="allowothertargets" value="true" />
<param name="checkrelation" value="true"/>
<save_retval name="target" variable="$target" />
</run_script>
<do_if value="$target">
<create_order id="'Attack'" object="this.ship" immediate="true">
<param name="primarytarget" value="$target"/>
<param name="allowothertargets" value="true"/>
<param name="pursuetargets" value="false"/>
<param name="internalorder" value="true"/>
</create_order>
<do_if value="not this.ship.cansee.{$target}">
<create_order id="'MoveGeneric'" object="this.ship" immediate="true">
<param name="destination" value="$target"/>
<param name="pursuetargets" value="false"/>
</create_order>
</do_if>
</do_if>
</do_if>
<do_else>
<set_value name="$shibimprovedpatrol" value="false"/>
</do_else>
</add>
`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels