XRWS              V  ext_01.cat ext_01.dat aiscripts/sanity.sector_automine.xml 4495 1714783838 de095a66f936fffedbb11b9c5f17d7a4
﻿<?xml version="1.0" encoding="UTF-8" ?>
<aiscript name="sanity.sector_automine"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="x4_ai.xsd">
  <order id="Sanity_SectorAutoMine"
         name="Sanity - Sector AutoMine" description="Slightly improves upon the Sector AutoMine functionality."
         category="mining" infinite="true">
    <params>
      <!-- Providing the ability to select multiple wares to be mined and traded. -->
      <param name="warebasket"
             required="true"
             default="this.ship.warebasket.list"
             type="list"
             text="{1041, 10144}"
             comment="Ware. Resource that we will supply.">
        <input_param name="type" value="'ware'" />
        <input_param name="cancarry" value="this.ship" />
      </param>
      <param name="range"
             default="if @this.ship.commanderentity.$config_subordinate_range then @this.ship.commanderentity.$config_subordinate_range
             else (if @this.ship.commander.isclass.[class.station, class.buildstorage] then this.ship.commander.sector else (if this.ship.jobmainzone then this.ship.jobmainzone.sector else this.sector))"
             type="object"
             text="{1041, 10005}"
             comment="Anchor space">
        <input_param name="class" value="[class.cluster, class.sector]" />
      </param>
      <param name="minbuy"
             default="0"
             type="internal"
             text="{1041, 10067}"
             comment="Min gate distance to gather resources. Gathering range supported if $minsell and $maxsell are provided" />
      <param name="maxbuy"
             default="0"
             type="internal"
             text="{1041, 10056}"
             comment="Max gate distance to gather resources. Gathering range supported if $minsell and $maxsell are provided" />
      <param name="minsell"
             default="0"
             type="internal"
             text="{1041, 10069}"
             comment="Min gate distance to sell resources. Sell range supported if $minsell and $maxsell are provided" />
      <!-- Setting up selling multiple sectors away to avoid miners getting stuck. -->
      <param name="maxsell"
             default="[@this.ship.commander.tradenpc.skill.management, @this.ship.pilot.skill.piloting].max / 3"
             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="[@this.ship.commander.tradenpc.skill.management, @this.ship.pilot.skill.piloting].max / 3" />
        <input_param name="step" value="1" />
      </param>
      <param name="duration"
             default="0s"
             type="time"
             infinitevalue="0s"
             advanced="true"
             text="{1041, 10034}"
             comment="Duration">
        <input_param name="startvalue" value="0s" />
        <input_param name="min" value="0s" />
        <input_param name="max" value="24h" />
        <input_param name="step" value="1min" />
      </param>
      <param name="debugchance"
             type="bool"
             default="0"
             advanced="true"
             text="{1041, 10086}"
             comment="Print debug output">
        <input_param name="truevalue" value="100" />
      </param>
      <param name="debugchance2"
             type="bool"
             default="0"
             advanced="true"
             text="{1041, 10142}"
             comment="Verbose debug output">
        <input_param name="truevalue" value="100" />
      </param>
    </params>
    <skill min="0" />
  </order>
  <attention min="unknown">
    <actions>
      <run_script name="'order.mining.routine'">
        <param name="warebasket" value="$warebasket" />
        <param name="range" value="$range" />
        <param name="minbuy" value="$minbuy" />
        <param name="maxbuy" value="$maxbuy" />
        <param name="minsell" value="$minsell" />
        <param name="maxsell" value="$maxsell" />
        <param name="effectiveskill" value="0" />
        <param name="duration" value="$duration" />
        <param name="debugchance" value="$debugchance" />
        <param name="debugchance2" value="$debugchance2" />
      </run_script>
    </actions>
  </attention>
</aiscript><?xml version="1.0" encoding="UTF-8"?>
<content id="" author="DeuxAlpha" name="" description="" version="092" save="0" date="2024-05-03" lastupdate="">
</content>
