The files I've been working on are found in "aiscripts":
order.mining.routine.advanced.xml
order.mining.routine.expert.xml
order.mining.routine.xml
Here's an example of the DIFF that I created for the "advanced" one. The default formula is:
maxbuy = [([@this.ship.commander.tradenpc.skill.management, @this.ship.pilot.skill.piloting].max / 3) - 1, 0].max
mxasell = [@this.ship.commander.tradenpc.skill.management, @this.ship.pilot.skill.piloting].max / 3
so this is the patch file I created:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<replace sel="//aiscript/order[@id='MiningRoutine_Advanced']/params[@param='minbuy']">
<param name="minbuy" default="[4, ((@this.ship.pilot.skill.piloting * 2) + 1)].max" type="number" text="{1041, 10056}" comment="Min gate distance to gather resources. Gathering range supported if $minsell and $maxsell are provided">
<input_param name="startvalue" value="0"/>
<input_param name="min" value="0"/>
<input_param name="max" value="[4, ((@this.ship.pilot.skill.piloting * 2) + 1)].max" />
<input_param name="step" value="1"/>
</param>
</replace>
<replace sel="//aiscript/order[@id='MiningRoutine_Advanced']/params[@param='maxbuy']">
<param name="maxbuy" default="[4, @this.ship.pilot.skill.piloting * 2].max" type="number" text="{1041, 10056}" comment="Max gate distance to gather resources. Gathering range supported if $minsell and $maxsell are provided">
<input_param name="startvalue" value="0"/>
<input_param name="min" value="0"/>
<input_param name="max" value="[4, ((@this.ship.pilot.skill.piloting * 2) + 1)].max" />
<input_param name="step" value="1"/>
</param>
</replace>
<replace sel="//aiscript/order[@id='MiningRoutine_Advanced']/params[@param='minsell']">
<param name="minsell" default="[4, ((@this.ship.pilot.skill.piloting * 2) + 1)].max" type="number" text="{1041, 10058}" comment="Min gate distance to sell resources. Sell range supported if $minsell and $maxsell are provided">
<input_param name="startvalue" value="0"/>
<input_param name="min" value="0"/>
<input_param name="max" value="[4, ((@this.ship.pilot.skill.piloting * 2) + 1)].max" />
<input_param name="step" value="1"/>
</param>
</replace>
<replace sel="//aiscript/order[@id='MiningRoutine_Advanced']/params[@param='maxsell']">
<param name="maxsell" default="[4, @this.ship.pilot.skill.piloting * 2].max" type="number" text="{1041, 10058}" comment="Max gate distance to sell resources. Sell range supported if $minsell and $maxsell are provided">
<input_param name="startvalue" value="0"/>
<input_param name="min" value="0"/>
<input_param name="max" value="[4, ((@this.ship.pilot.skill.piloting * 2) + 1)].max" />
<input_param name="step" value="1"/>
</param>
</replace>
</diff>
Edit:
When I added a patch file for the EXPERT version I get this:
No matching node for path '//aiscript/order[@id='MiningRoutine_Expert']/params[@param='minbuy']' in patch file
but there is, it's almost identical to the Advanced file which doesn't produce any errors.