XRWS           ‡Ì  Þ  …îext_01.cat ext_01.dat aiscripts/order.mining.routine.xml 1397 1774339790 07304eeb883889633721a913116a9ae8
aiscripts/order.salvage.routine.xml 1415 1774339794 246494565e8fce148def2798ae946d69
aiscripts/order.trade.routine.xml 1727 1771563656 21149d57e5f7dbd36bdaf202aeb4999c
aiscripts/trade.find.commander.xml 1288 1788444362 28bf9c675fcfcd95512db44110057aed
md/v1024_logistics_guidance.xml 24863 1788683260 e2d64af13813ff6422f66bbda5678fdc
t/0001.xml 3596 1788440600 f10bf65ac4e053a237cd2608215316b6
<?xml version="1.0" encoding="utf-8" ?>

<diff>
    <add sel="/aiscript[@name='order.mining.routine']/init/do_if[@value='this.isplayerowned']/set_value[@name='$maxrange']" pos="after">
        <!-- Add code to limit operational range -->
        <remove_value name="$limitToSector" comment="Remove flag from previous run" />
        <do_if value="@this.assignedcontrolled.commander.isclass.station and this.assignedcontrolled.commander.isplayerowned">
            <set_value name="$target" exact="this.assignedcontrolled.commander" />
            <do_if value="global.$v1024_logGuideMineRangeTable.{$target}?">
                <!-- Value exists; right now assume is 0 range (i.e. cluster) -->
                <set_value name="$maxrange" exact="0" />
                <do_if value="global.$v1024_logGuideMineRangeTable.{$target} == 'sector'">
                    <!-- We want the sector -->
                    <set_value name="$limitToSector" exact="true" />
                </do_if>
            </do_if>
        </do_if>
    </add>

    <add sel="/aiscript[@name='order.mining.routine']/attention/actions/run_script[@result='$gatheringspaces']">
        <!-- Restrict to sector if we specified it -->
        <!-- This is actually a lib.find.sectors.inrange -->
        <param name="usesectordistance" value="if $limitToSector? then true else false" />
    </add>
</diff>
<?xml version="1.0" encoding="utf-8" ?>

<diff>
    <add sel="/aiscript[@name='order.salvage.routine']/init/do_if[@value='this.isplayerowned']/set_value[@name='$maxrange']" pos="after">
        <!-- Add code to limit operational range -->
        <remove_value name="$limitToSector" comment="Remove flag from previous run" />
        <do_if value="@this.assignedcontrolled.commander.isclass.station and this.assignedcontrolled.commander.isplayerowned">
            <set_value name="$target" exact="this.assignedcontrolled.commander" />
            <do_if value="global.$v1024_logGuideSalvageRangeTable.{$target}?">
                <!-- Value exists; right now assume is 0 range (i.e. cluster) -->
                <set_value name="$maxrange" exact="0" />
                <do_if value="global.$v1024_logGuideSalvageRangeTable.{$target} == 'sector'">
                    <!-- We want the sector -->
                    <set_value name="$limitToSector" exact="true" />
                </do_if>
            </do_if>
        </do_if>
    </add>

    <add sel="/aiscript[@name='order.salvage.routine']/attention/actions/do_if/run_script[@result='$table_gatedistances']">
        <!-- Restrict to sector if we specified it -->
        <!-- This is actually a lib.find.sectors.inrange -->
        <param name="usesectordistance" value="if $limitToSector? then true else false" />
    </add>
</diff>
<?xml version="1.0" encoding="utf-8" ?>

<diff>
    <add sel="/aiscript[@name='order.trade.routine']/init/do_if[@value='this.isplayerowned']/set_value[@name='$maxrange']" pos="after">
        <!-- Add code to limit operational range -->
        <remove_value name="$limitToSector" comment="Remove flag from previous run" />
        <do_if value="@this.assignedcontrolled.commander.isclass.station and this.assignedcontrolled.commander.isplayerowned">
            <set_value name="$target" exact="this.assignedcontrolled.commander" />
            <do_if value="global.$v1024_logGuideTradeRangeTable.{$target}?">
                <!-- Value exists; right now assume is 0 range (i.e. cluster) -->
                <set_value name="$maxrange" exact="0" />
                <do_if value="global.$v1024_logGuideTradeRangeTable.{$target} == 'sector'">
                    <!-- We want the sector -->
                    <set_value name="$limitToSector" exact="true" />
                </do_if>
            </do_if>
        </do_if>
    </add>

    <add sel="/aiscript[@name='order.trade.routine']/attention/actions/run_script[@result='$buyspaces']">
        <!-- Restrict to sector if we specified it -->
        <!-- This is actually a lib.find.sectors.inrange -->
        <param name="usesectordistance" value="if $limitToSector? then true else false" />
    </add>
    <add sel="/aiscript[@name='order.trade.routine']/attention/actions/do_if/run_script[@result='$sellspaces']">
        <!-- Restrict to sector if we specified it -->
        <!-- This is actually a lib.find.sectors.inrange -->
        <param name="usesectordistance" value="if $limitToSector? then true else false" />
    </add>
</diff>
<?xml version="1.0" encoding="utf-8" ?>

<diff>
    <!-- If we have specified the trade direction, then tell the trade script to ignore certain trade directions. -->
    <!-- Ideally this does not interact too badly with the other mod Logistics Optimization. -->

    <add sel="/aiscript[@name='trade.find.commander']/attention/actions/label[@name='sell']" pos="before">
        <do_if value="@global.$v1024_logGuideTradeRangeTable.{$target} == 'import'">
            <!-- We are about to sell, but we are supposed to be importing only. -->
            <resume label="buy" />
        </do_if>
    </add>

    <add sel="/aiscript[@name='trade.find.commander']/attention/actions/include_interrupt_actions[@ref='FindCommanderStation'][2]" pos="after">
        <!-- Add label to allow us to jump to "after all trade calculations have completed". -->
        <label name="v1024_lg_closingup" />
    </add>

    <add sel="/aiscript[@name='trade.find.commander']/attention/actions/label[@name='buy']" pos="before">
        <do_if value="@global.$v1024_logGuideTradeRangeTable.{$target} == 'export'">
            <!-- We are about to buy, but we are supposed to be exporting only. -->
            <resume label="v1024_lg_closingup" />
        </do_if>
    </add>
</diff>
<?xml version="1.0" encoding="utf-8"?>
<mdscript name="V1024_LogisticsGuidance" description="Logistics guidance and trader efficiency tools">
    <cues>
        <cue name="LG_SettingUp" instantiate="true">
            <conditions>
                <event_cue_signalled cue="md.Setup.Start" />
            </conditions>
            <actions>
                <!-- Stations all have a persistent IDCode ($station.idcode), so we can use that to lookup their "additional settings". -->
                <!-- This IDCode is highly unlikely to be reused, so we should be good. -->
                <!-- String idcode -> number -->
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: starting up.'" chance="0"/>
                <do_if value="not (global.$v1024_logGuideTradeRangeTable?)">
                    <set_value name="global.$v1024_logGuideTradeRangeTable" exact="table[]" />
                </do_if>
                <do_if value="not (global.$v1024_logGuideMineRangeTable?)">
                    <set_value name="global.$v1024_logGuideMineRangeTable" exact="table[]" />
                </do_if>
                <do_if value="not (global.$v1024_logGuideSalvageRangeTable?)">
                    <set_value name="global.$v1024_logGuideSalvageRangeTable" exact="table[]" />
                </do_if>
                <do_if value="not (global.$v1024_logGuideTradeDirectionTable?)">
                    <set_value name="global.$v1024_logGuideTradeDirectionTable" exact="table[]" />
                </do_if>
            </actions>
        </cue>
        <cue name="OnLuaInited" instantiate="true">
            <conditions>
                <event_ui_triggered screen="'Interact_Menu_API'" control="'reloaded'" />
            </conditions>
            <actions>
                <!-- Set up a custom actions group for improved organization -->
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: setting custom actions group.'" chance="0"/>
                <raise_lua_event name="'Interact_Menu_API.Add_Custom_Actions_Group_Id'" param="'trade_range_group'"/>
                <raise_lua_event name="'Interact_Menu_API.Add_Custom_Actions_Group_Text'" param="{251024, 101}"/>
                <raise_lua_event name="'Interact_Menu_API.Add_Custom_Actions_Group_Id'" param="'trade_direction_group'"/>
                <raise_lua_event name="'Interact_Menu_API.Add_Custom_Actions_Group_Text'" param="{251024, 102}"/>
            </actions>
        </cue>
        <cue name="LG_AddInteractActions" instantiate="true">
            <conditions>
                <event_cue_signalled cue="md.Interact_Menu_API.Get_Actions" />
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object"/>
                <do_if value="$target.isplayerowned and $target.isclass.station">
                    <!-- Check whether we have settings for this station -->
                    <!-- Instead of using the idcode as the key (this is problematic regardless), we now use the object instance itself as the key. -->
                    <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: the trade table is ' + global.$v1024_logGuideTradeRangeTable" chance="0"/>

                    <!-- We split by 3 categories to allow for flexible configuration -->
                    <!-- All categories will have: 
                      - Limit to sector
                      - Limit to cluster (available if cluster has multiple sectors)
                      - Reset to vanilla 
                    -->
                    <set_value name="$menuSection" exact="'trade_range_group'"/>
                    <!-- Check whether the cluster has only 1 sector; hide some redundant options if so. -->
                    <find_sector name="$tempSectors" space="$target.cluster" multiple="true"/>
                    <set_value name="$hasMultipleSectors" exact="$tempSectors.count gt 1" />

                    <!-- Trading range -->
                    <set_value name="$allowTradeSectorRange" exact="@global.$v1024_logGuideTradeRangeTable.{$target} != 'sector'" />
                    <set_value name="$allowTradeClusterRange" exact="@global.$v1024_logGuideTradeRangeTable.{$target} != 'cluster' and $hasMultipleSectors" />
                    <set_value name="$allowTradeDefaultRange" exact="global.$v1024_logGuideTradeRangeTable.{$target}?" />
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_traderange_sector',
                        $section    = $menuSection,
                        $text       = {251024, 2001},
                        $mouseover  = {251024, 2002}.[$target.name, $target.sector.knownname],
                        $callback   = LogGuide_TradeRange_Sector,
                        $active     = $allowTradeSectorRange,
                        ]"/>
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_traderange_cluster',
                        $section    = $menuSection,
                        $text       = {251024, 2011},
                        $mouseover  = {251024, 2012}.[$target.name, $target.cluster.knownname],
                        $callback   = LogGuide_TradeRange_Cluster,
                        $active     = $allowTradeClusterRange,
                        ]"
                        chance="if $hasMultipleSectors then 100 else 0"
                        comment="Hide button if sector == cluster to reduce general confusion" />
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_traderange_reset',
                        $section    = $menuSection,
                        $text       = {251024, 2021},
                        $mouseover  = {251024, 2022}.[$target.name],
                        $callback   = LogGuide_TradeRange_Reset,
                        $active     = $allowTradeDefaultRange,
                        ]"/>
                    
                    <!-- Mining range -->
                    <set_value name="$allowMineSectorRange" exact="@global.$v1024_logGuideMineRangeTable.{$target} != 'sector'" />
                    <set_value name="$allowMineClusterRange" exact="@global.$v1024_logGuideMineRangeTable.{$target} != 'cluster' and $hasMultipleSectors" />
                    <set_value name="$allowMineDefaultRange" exact="global.$v1024_logGuideMineRangeTable.{$target}?" />
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_minerange_sector',
                        $section    = $menuSection,
                        $text       = {251024, 2101},
                        $mouseover  = {251024, 2102}.[$target.name, $target.sector.knownname],
                        $callback   = LogGuide_MineRange_Sector,
                        $active     = $allowMineSectorRange,
                        ]"/>
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_minerange_cluster',
                        $section    = $menuSection,
                        $text       = {251024, 2111},
                        $mouseover  = {251024, 2112}.[$target.name, $target.cluster.knownname],
                        $callback   = LogGuide_MineRange_Cluster,
                        $active     = $allowMineClusterRange,
                        ]"
                        chance="if $hasMultipleSectors then 100 else 0"
                        comment="Hide button if sector == cluster to reduce general confusion" />
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_minerange_reset',
                        $section    = $menuSection,
                        $text       = {251024, 2121},
                        $mouseover  = {251024, 2122}.[$target.name],
                        $callback   = LogGuide_MineRange_Reset,
                        $active     = $allowMineDefaultRange,
                        ]"/>

                    <!-- Salvaging range -->
                    <set_value name="$allowSalvageSectorRange" exact="@global.$v1024_logGuideSalvageRangeTable.{$target} != 'sector'" />
                    <set_value name="$allowSalvageClusterRange" exact="@global.$v1024_logGuideSalvageRangeTable.{$target} != 'cluster' and $hasMultipleSectors" />
                    <set_value name="$allowSalvageDefaultRange" exact="global.$v1024_logGuideSalvageRangeTable.{$target}?" />
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_salvagerange_sector',
                        $section    = $menuSection,
                        $text       = {251024, 2201},
                        $mouseover  = {251024, 2202}.[$target.name, $target.sector.knownname],
                        $callback   = LogGuide_SalvageRange_Sector,
                        $active     = $allowSalvageSectorRange,
                        ]"/>
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_salvagerange_cluster',
                        $section    = $menuSection,
                        $text       = {251024, 2211},
                        $mouseover  = {251024, 2212}.[$target.name, $target.cluster.knownname],
                        $callback   = LogGuide_SalvageRange_Cluster,
                        $active     = $allowSalvageClusterRange,
                        ]"
                        chance="if $hasMultipleSectors then 100 else 0"
                        comment="Hide button if sector == cluster to reduce general confusion" />
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_salvagerange_reset',
                        $section    = $menuSection,
                        $text       = {251024, 2221},
                        $mouseover  = {251024, 2222}.[$target.name],
                        $callback   = LogGuide_SalvageRange_Reset,
                        $active     = $allowSalvageDefaultRange,
                        ]"/>

                    <!-- Trading direction -->
                    <set_value name="$menuSectionTradeDir" exact="'trade_direction_group'"/>
                    <set_value name="$allowTradeImportOnly" exact="@global.$v1024_logGuideTradeDirectionTable.{$target} != 'import'" />
                    <set_value name="$allowTradeExportOnly" exact="@global.$v1024_logGuideTradeDirectionTable.{$target} != 'export'" />
                    <set_value name="$allowTradeDefaultDirection" exact="global.$v1024_logGuideTradeDirectionTable.{$target}?" />
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_tradedir_import',
                        $section    = $menuSectionTradeDir,
                        $text       = {251024, 3001},
                        $mouseover  = {251024, 3002}.[$target.name, $target.sector.knownname],
                        $callback   = LogGuide_TradeDirection_Import,
                        $active     = $allowTradeImportOnly,
                        ]"/>
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_tradedir_export',
                        $section    = $menuSectionTradeDir,
                        $text       = {251024, 3011},
                        $mouseover  = {251024, 3012}.[$target.name, $target.cluster.knownname],
                        $callback   = LogGuide_TradeDirection_Export,
                        $active     = $allowTradeExportOnly,
                        ]"/>
                    <signal_cue_instantly
                        cue="md.Interact_Menu_API.Add_Action"
                        param = "table[
                        $id         = 'logguide_tradedir_reset',
                        $section    = $menuSectionTradeDir,
                        $text       = {251024, 3021},
                        $mouseover  = {251024, 3022}.[$target.name],
                        $callback   = LogGuide_TradeDirection_Reset,
                        $active     = $allowTradeDefaultDirection,
                        ]"/>
                </do_if>
            </actions>
        </cue>

        <!-- Event handlers -->

        <!-- Trade range -->
        <cue name="LogGuide_TradeRange_Sector" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideTradeRangeTable.{$target}" exact="'sector'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Trade range becomes sector.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!--
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_TradeRange_Cluster" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideTradeRangeTable.{$target}" exact="'cluster'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Trade range becomes cluster.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!--
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_TradeRange_Reset" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <remove_value name="global.$v1024_logGuideTradeRangeTable.{$target}" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Trade range becomes vanilla.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!--
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="135" comment="Cancelled." />
                </speak>
            </actions>
        </cue>
        
        <!-- Mine range -->
        <cue name="LogGuide_MineRange_Sector" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideMineRangeTable.{$target}" exact="'sector'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Mine range becomes sector.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!--
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_MineRange_Cluster" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideMineRangeTable.{$target}" exact="'cluster'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Mine range becomes cluster.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!--
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_MineRange_Reset" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <remove_value name="global.$v1024_logGuideMineRangeTable.{$target}" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Mine range becomes vanilla.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!--
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="135" comment="Cancelled." />
                </speak>
            </actions>
        </cue>
        
        <!-- Salvage range -->
        <cue name="LogGuide_SalvageRange_Sector" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideSalvageRangeTable.{$target}" exact="'sector'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Salvage range becomes sector.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!-- 
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_SalvageRange_Cluster" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideSalvageRangeTable.{$target}" exact="'cluster'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Salvage range becomes cluster.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!-- 
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_SalvageRange_Reset" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <remove_value name="global.$v1024_logGuideSalvageRangeTable.{$target}" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Salvage range becomes vanilla.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!-- 
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="135" comment="Cancelled." />
                </speak>
            </actions>
        </cue>
        
        <!-- Trade direction -->
        <cue name="LogGuide_TradeDirection_Import" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideTradeDirectionTable.{$target}" exact="'import'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Trade direction becomes import.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!-- 
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_TradeDirection_Export" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <set_value name="global.$v1024_logGuideTradeDirectionTable.{$target}" exact="'export'" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Trade direction becomes export.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!-- 
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="134" comment="New command set." />
                    <text line="145" comment="Control established." />
                </speak>
            </actions>
        </cue>
        <cue name="LogGuide_TradeDirection_Reset" instantiate="true" namespace="this">
            <conditions>
                <event_cue_signalled/>
            </conditions>
            <actions>
                <set_value name="$target" exact="event.param.$object" />
                <remove_value name="global.$v1024_logGuideTradeDirectionTable.{$target}" />
                <show_help position="1" duration="6s" custom="'V1024 Logistics Guidance: Trade direction becomes vanilla.'" chance="0"/>
                <speak actor="player.computer" priority="-30">
                    <!-- 
                        In case for Betty, you can tell her to speak other supported lines by specifying the page number.
                    -->
                    <text line="135" comment="Cancelled." />
                </speak>
            </actions>
        </cue>
    </cues>
</mdscript>
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Specific language file: applies to English only -->
<language id="44">
    <page id="251024" title="LogGuideUI" descr="Text needed by this mod for GUI" voice="no">
        <!-- UI group names -->
        <!-- Trading operational range -->
        <t id="101">Logistics: {1001, 4212}</t>
        <t id="102">Logistics: Trading direction</t>

        <!--
        Note: we reviewed the nomenclature, and the "big hex" is called "cluster".
        -->

        <!-- Self-note: {1041, 10094} has text for "range" -->

        <t id="1001">Logistics: Limit to cluster range</t>
        <!-- Limit range to cluster -->
        <t id="1002">Limit trading operational range of %s to only %s.</t>
        <t id="1101">Logistics: Restore galactic range</t>
        <!-- Restores range to galaxy -->
        <t id="1102">Restores trading operational range of %s to {20002, 1}.</t>

        <!-- Trading -->
        <!-- Range (Trading): Limit to Sector -->
        <t id="2001">{1041, 10094} \({1038, 50}\): Limit to {20001, 201}</t>
        <!-- Limit range to sector -->
        <t id="2002">Limit trading range of %s to only the sector %s.</t>
        <t id="2011">{1041, 10094} \({1038, 50}\): Limit to Cluster</t>
        <!-- Limit range to cluster -->
        <t id="2012">Limit trading range of %s to only the cluster %s.</t>
        <t id="2021">{1041, 10094} \({1038, 50}\): Restore galactic range</t>
        <!-- Restores range to galaxy -->
        <t id="2022">Restore trading range of %s to {20002, 1} \(uses vanilla settings\).</t>

        <!-- Mining -->
        <!-- Range (Mining): Limit to Sector -->
        <t id="2101">{1041, 10094} \({1038, 60}\): Limit to {20001, 201}</t>
        <!-- Limit range to sector -->
        <t id="2102">Limit mining range of %s to only the sector %s.</t>
        <t id="2111">{1041, 10094} \({1038, 60}\): Limit to Cluster</t>
        <!-- Limit range to cluster -->
        <t id="2112">Limit mining range of %s to only the cluster %s.</t>
        <t id="2121">{1041, 10094} \({1038, 60}\): Restore galactic range</t>
        <!-- Restores range to galaxy -->
        <t id="2122">Restore mining range of %s to {20002, 1} \(uses vanilla settings\).</t>

        <!-- Salvaging -->
        <!-- Range (Salvaging): Limit to Sector -->
        <t id="2201">{1041, 10094} \({1038, 80}\): Limit to {20001, 201}</t>
        <!-- Limit range to sector -->
        <t id="2202">Limit salvaging range of %s to only the sector %s.</t>
        <t id="2211">{1041, 10094} \({1038, 80}\): Limit to Cluster</t>
        <!-- Limit range to cluster -->
        <t id="2212">Limit mining range of %s to only the cluster %s.</t>
        <t id="2221">{1041, 10094} \({1038, 80}\): Restore galactic range</t>
        <!-- Restores range to galaxy -->
        <t id="2222">Restore salvaging range of %s to {20002, 1} \(uses vanilla settings\).</t>

        <!-- Trade direction control -->
        <!-- The wording is too custom, no prebuilt text is usable. -->
        <t id="3001">Trading direction: Limit to import</t>
        <t id="3002">Limit trading surordinates of %s to only buy from others.</t>
        <t id="3011">Trading direction: Limit to export</t>
        <t id="3012">Limit trading subordinates of %s to only sell to others.</t>
        <t id="3021">Trading direction: Restore bidirectionality</t>
        <t id="3022">Permit trading subordinates of %s to freely choose to buy or sell \(uses vanilla settings\).</t>
    </page>
</language>
<?xml version="1.0" encoding="utf-8"?>
<content id="" name="" author="Vectorial1024" version="104" save="0" description="" date="2026-09-06" lastupdate="">
  <!-- Dependent on SirNukes API; any version should do. -->
  <dependency id="ws_2042901274" name="SirNukes Mod Support APIs"/>
  <!-- "Extra" language entries as implicitly required by X4. This is quite different from what I've seen in XR. -->
  <text language="7" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="33" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="34" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="39" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="42" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="44" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="48" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="49" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="55" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="81" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="82" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="86" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
  <text language="88" name="V1024 - Logistics Guidance" description="QOL tools to configure trader efficiency." author="Vectorial1024"/>
</content>
