Just checked.
does indeed make welder drones move relative to this.defensible rather than $Defensible.
@Uni, launch_war_drones has the same problem, but it's kind of worse because, as you said, there's no command to retrieve the resulting network ID. Stands to reason since, as far as I know, this isn't used anywhere in vanilla and is associated with the presently-defunct Assault URVs.
...
In case anyone's interested, here's the work-in-progress (kept lots of commented-out code in the posted sample):
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<!--<add sel="//launch_repair_drones" pos="after">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 launched. \n Network ID: %3'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $networkid]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 launched. \n Network ID: %3'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $networkid]"/>
</do_if>
</add>-->
<!-- MICT: accelerated repair rates for testing. -->
<!--<replace sel="//set_value[@exact='5']/@exact">this.combinedskill</replace>-->
<!--<replace sel="//set_value[@name='$FindChance'][@exact='5']/@exact">this.combinedskill</replace>-->
<!--<add sel="//set_object_hull[@object='$Defensible']" pos="after">
<do_if value="$Defensible != this.defensible and (this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count) gt 0">
<set_object_hull object="$Defensible" exact="$Defensible.hullpercentage + ($addedhullpercentage * 2)"/>
</do_if>
</add>-->
<replace sel="//set_object_hull[@object='$CurrentElement']/@exact">100</replace>
<!--<add sel="//set_object_hull[@object='$CurrentElement']" pos="after">
<do_if value="$Defensible != this.defensible and (this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count) gt 0">
<set_object_hull object="$CurrentElement" exact="100"/>
</do_if>
</add>-->
<!-- MICT: If this ship doesn't need to be repaired, look for something to repair.
Valid targets for repair are l-class and xl-class ships and stations.
Repair most damaged ships/stations first.
First priority is still the ship/station where the engineer is stationed.
Problem: At the moment, prioritization is only by hull damage.
If something has a hull damaged below threshold, but damaged components, that thing won't be repaired by other ships/stations.
That ship's/station's own engineer should still handle repairs in that case, however.
Not really a problem, but not very efficient: this.defensible is set as the repair target if:
this.defensible is not a MICT ship,
this.defensible has hull damage above threshold or this.defensible is a combat ship,
there are no valid repair targets within radar range,
none of the detected potential repair targets are owned by the same faction that owns this.defensible,
none of the detected potential repair targets actually needs repair.
Try to figure out a way to simplify?
Then again, each do_if/do_else block will only be run once, so might be fine.
Thanks to Marvin Martian for some help with refining this. -->
<remove sel="//set_value[@name='$Defensible']"/>
<add sel="//do_if[@value='player.age le @this.$hacked']" pos="before">
<!--<add sel="//do_if[@value='this.defensible.isclass.station']" pos="before">-->
<do_if value="@$CurrentElement.exists" negate="true">
<!--<do_if value="@$MassTrafficTargets.count ge 1" negate="true">-->
<do_if value="this.defensible.isclass.[class.ship_l, class.ship_xl] and this.combinedskill ge 80 and this.defensible.pilot.combinedskill ge 80 and this.defensible.defencenpc.combinedskill ge 80 and this.defensible.units.{unitcategory.welder}.count gt 0">
<do_if value="this.defensible.primarypurpose != objectpurpose.fight and this.defensible.hullpercentage ge $hulldamagelimit">
<find_gravidar_contact name="$MICT_RepairTargets" object="this.defensible" functional="true" multiple="true" checkoperational="true" repairable="true" invulnerable="false" indestructible="false">
<match_distance object="this.defensible" max="this.defensible.maxradarrange"/>
<match class="[class.ship_l, class.ship_xl, class.station, class.ship_s, class.ship_m]"/>
<match_relation faction="this.defensible.trueowner" relation="self" comparison="ge"/>
<!--<match_relation faction="this.defensible.trueowner" relation="friend" comparison="ge"/>-->
<match_hull min="$hulldamagelimit" negate="true"/>
<!--<match repairable="true" invulnerable="false">
<match_hull min="2"/>
<match_hull max="$hulldamagelimit - 1"/>
</match>-->
</find_gravidar_contact>
<do_if value="$MICT_RepairTargets.count ge 1">
<do_all exact="$MICT_RepairTargets.count" counter="$i">
<!--<do_if value="$MICT_RepairTargets.{$i}.owner == this.defensible.owner">-->
<do_if value="$MICT_RepairTargets.{$i}.hullpercentage lt @$Defensible.hullpercentage">
<do_if value="$networkid? and @$Defensible != $MICT_RepairTargets.{$i}">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.1'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.1'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
<!--<end_repair_mass_traffic object="[this.defensible, $Defensible]"/>-->
<!--<end_repair_mass_traffic object="this.defensible"/>
<end_repair_mass_traffic object="$Defensible"/>-->
<end_mass_traffic network="$networkid"/>
<remove_value name="$networkid"/>
</do_if>
<set_value name="$Defensible" exact="$MICT_RepairTargets.{$i}"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.1'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count ,this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.1'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count ,this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_if>
<do_elseif value="not $Defensible? and $MICT_RepairTargets.{$i}.hullpercentage lt $hulldamagelimit">
<do_if value="$networkid? and @$Defensible != $MICT_RepairTargets.{$i}">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.2'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.2'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
<!--<end_repair_mass_traffic object="[this.defensible, $Defensible]"/>-->
<!--<end_repair_mass_traffic object="this.defensible"/>
<end_repair_mass_traffic object="$Defensible"/>-->
<end_mass_traffic network="$networkid"/>
<remove_value name="$networkid"/>
</do_if>
<set_value name="$Defensible" exact="$MICT_RepairTargets.{$i}"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.2'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.2'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_elseif>
<do_elseif value="not $Defensible?">
<do_if value="$networkid? and @$Defensible != this.defensible">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.3'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.3'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
<!--<end_repair_mass_traffic object="[this.defensible, $Defensible]"/>-->
<!--<end_repair_mass_traffic object="this.defensible"/>
<end_repair_mass_traffic object="$Defensible"/>-->
<end_mass_traffic network="$networkid"/>
<remove_value name="$networkid"/>
</do_if>
<set_value name="$Defensible" exact="this.defensible"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<!--<do_if value="false">-->
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.3'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.3'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_elseif>
<do_elseif value="$Defensible? and (@$Defensible != this.defensible) and @$Defensible.hullpercentage ge $hulldamagelimit">
<do_if value="$networkid? and @$Defensible != this.defensible">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.4'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 1.4'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
<!--<end_repair_mass_traffic object="[this.defensible, $Defensible]"/>-->
<!--<end_repair_mass_traffic object="this.defensible"/>
<end_repair_mass_traffic object="$Defensible"/>-->
<end_mass_traffic network="$networkid"/>
<remove_value name="$networkid"/>
</do_if>
<set_value name="$Defensible" exact="this.defensible"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<!--<do_if value="false">-->
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.4'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 1.4'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_elseif>
<!--</do_if>-->
<!--<do_else>
<set_value name="$Defensible" exact="this.defensible"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 2'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 2'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_else>-->
</do_all>
<remove_value name="$MICT_RepairTargets"/>
</do_if>
<do_else>
<do_if value="$networkid? and @$Defensible != this.defensible">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 3'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 3'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
<!--<end_repair_mass_traffic object="[this.defensible, $Defensible]"/>-->
<!--<end_repair_mass_traffic object="this.defensible"/>
<end_repair_mass_traffic object="$Defensible"/>-->
<end_mass_traffic network="$networkid"/>
<remove_value name="$networkid"/>
</do_if>
<set_value name="$Defensible" exact="this.defensible"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<!--<do_if value="false">-->
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 3'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n Num Repair Targets: %3 \n\n NODE 3'.[this.defensible.knownname, $Defensible.knownname, $MICT_RepairTargets.count, this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_else>
</do_if>
<do_else>
<do_if value="$networkid? and @$Defensible != this.defensible">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 4'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 4'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
<!--<end_repair_mass_traffic object="[this.defensible, $Defensible]"/>-->
<!--<end_repair_mass_traffic object="this.defensible"/>
<end_repair_mass_traffic object="$Defensible"/>-->
<end_mass_traffic network="$networkid"/>
<remove_value name="$networkid"/>
</do_if>
<set_value name="$Defensible" exact="this.defensible"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n\n NODE 4'.[this.defensible.knownname, $Defensible.knownname, this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n\n NODE 4'.[this.defensible.knownname, $Defensible.knownname, this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_else>
</do_if>
<do_else>
<do_if value="$networkid? and @$Defensible != this.defensible">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 5'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 5'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
<!--<end_repair_mass_traffic object="[this.defensible, $Defensible]"/>-->
<!--<end_repair_mass_traffic object="this.defensible"/>
<end_repair_mass_traffic object="$Defensible"/>-->
<end_mass_traffic network="$networkid"/>
<remove_value name="$networkid"/>
</do_if>
<set_value name="$Defensible" exact="this.defensible"/>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Repairing %2 \n\n NODE 5'.[this.defensible.knownname, $Defensible.knownname, this.defensible.distanceto.{$Defensible}]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Repairing %2 \n\n NODE 5'.[this.defensible.knownname, $Defensible.knownname, this.defensible.distanceto.{$Defensible}]" queued="false"/>
</do_if>
</do_else>
</do_if>
<do_else>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and (this.defensible.primarypurpose != objectpurpose.fight)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 \n Still repairing %2 \n Components to repair: %3 \n Repairing: %4 \n\n NODE 0'.[this.defensible.knownname, $Defensible.knownname, $MassTrafficTargets.count, $CurrentElement.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 \n Still repairing %2 \n Components to repair: %3 \n Repairing: %4 \n\n NODE 0'.[this.defensible.knownname, $Defensible.knownname, $MassTrafficTargets.count, $CurrentElement.knownname]"/>
</do_if>
</do_else>
<set_command command="command.support" param="$Defensible" chance="if $Defensible == this.defensible then 0 else 100"/>
<set_command command="command.repair" chance="if $Defensible == this.defensible then 100 else 0"/>
</add>
<!--<replace sel="//do_if[@value='this.defensible.isclass.station']/@value">$Defensible.isclass.station</replace>-->
<replace sel="//do_if[@value='not $CurrentElement.exists and this.defensible.hullpercentage ge $hulldamagelimit']/@value">not $CurrentElement.exists and $Defensible.hullpercentage ge $hulldamagelimit</replace>
<!-- MICT: check to make sure that the repair target doesn't break between target acquisition and start of repair.
Marvin's again, but didn't go with the wreck resurrection routine. -->
<add sel="//do_if[@value='$CurrentElement.exists']" pos="before">
<do_if value="$Defensible? and $Defensible.isoperational" negate="true">
<resume label="checkforrepair"/>
</do_if>
</add>
<!-- MICT: repair ships launch welder drones to repair damaged ships and stations. -->
<replace sel="//launch_repair_drones/@object">this.defensible</replace>
<!--<replace sel="//launch_repair_drones/@target">this.defensible</replace>-->
<!-- MICT: Looks like Marvin's right. Since the drones are launched with object="this.defensible" the resulting mass traffic also has object="this.defensible"
so both find_active_repair_mass_traffic and end_repair_mass_traffic have to refer to object="this.defensible" rather than object="$Defensible"
which is really weird, but ok.
Nope?
Not sure. end_repair_mass_traffic object="this.defensible" doesn't cause welders to dock, but neither does end_repair_mass_traffic="$Defensible"
And do_all exact="this.defensible.units.{unitcategory.welder}.count" counter="$i" doesn't appear to work.
-->
<!--<replace sel="//attention[@min='unknown']/actions/do_if[@value='@$networkid']/find_active_repair_mass_traffic/@object">this.defensible</replace>-->
<remove sel="//attention[@min='unknown']/actions/do_if[@value='@$networkid']/find_active_repair_mass_traffic"/>
<add sel="//attention[@min='unknown']/actions/do_if[@value='@$networkid']/get_units_in_mass_traffic" pos="after">
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and ($Defensible != this.defensible)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 \n set to repair %3 \n Components to repair: %4 \n Now Repairing: %5'.[$unitamounts.{1}, this.defensible.knownname, $Defensible.knownname, $MassTrafficTargets.count, $CurrentElement.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 \n set to repair %3 \n Components to repair: %4 \n Now Repairing: %5'.[$unitamounts.{1}, this.defensible.knownname, $Defensible.knownname, $MassTrafficTargets.count, $CurrentElement.knownname]"/>
<!--<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 \n set to repair %3 \n Components to repair: %4 \n Damaged Components: %5 \n Now Repairing: %6'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname, $MassTrafficTargets.count, $PossibleElements.count, $CurrentElement.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 \n set to repair %3 \n Components to repair: %4 \n Damaged Components: %5 \n Now Repairing: %6'.[this.defensible.units.{unitcategory.welder}.count - this.defensible.availableunits.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname, $MassTrafficTargets.count, $PossibleElements.count, $CurrentElement.knownname]"/>-->
</do_if>
</add>
<!-- MICT: after repairs are done, dock welder drones. -->
<!--<replace sel="//do_if[@value='not $CurrentElement.exists']/do_if[@value='$Defensible.hullpercentage ge $hulldamagelimit']/end_repair_mass_traffic/@object">[this.defensible, $Defensible]</replace>-->
<!--<replace sel="//do_if[@value='not $CurrentElement.exists']/do_if[@value='$Defensible.hullpercentage ge $hulldamagelimit']/end_repair_mass_traffic/@object">this.defensible</replace>-->
<add sel="//do_if[@value='not $CurrentElement.exists']/do_if[@value='$Defensible.hullpercentage ge $hulldamagelimit']/end_repair_mass_traffic" pos="after">
<!--<end_repair_mass_traffic object="this.defensible"/>-->
<end_mass_traffic network="$networkid"/>
<do_if value="$Defensible != this.defensible">
<set_value name="$Defensible" exact="this.defensible"/>
</do_if>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and ($Defensible != this.defensible)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 6'.[this.defensible.units.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 6'.[this.defensible.units.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
</add>
<!--<replace sel="//do_if[@value='$repairratefactor == 0']/do_if[@value='@$networkid']/end_repair_mass_traffic/@object">[this.defensible, $Defensible]</replace>-->
<!--<replace sel="//do_if[@value='$repairratefactor == 0']/do_if[@value='@$networkid']/end_repair_mass_traffic/@object">this.defensible</replace>-->
<add sel="//do_if[@value='$repairratefactor == 0']/do_if[@value='@$networkid']/end_repair_mass_traffic" pos="after">
<!--<end_repair_mass_traffic object="this.defensible"/>-->
<end_mass_traffic network="$networkid"/>
<do_if value="$Defensible != this.defensible">
<set_value name="$Defensible" exact="this.defensible"/>
</do_if>
<do_if value="(this.defensible.zone == player.zone) and (this.defensible.owner == faction.player) and ($Defensible != this.defensible)">
<show_notification caption="'=== MICT Engineer ==='" details="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 7'.[this.defensible.units.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]" queued="false" priority="1"/>
<write_to_logbook category="tips" text="'%1 drones of \n %2 heading home \n from %3 \n\n NODE 7'.[this.defensible.units.{unitcategory.welder}.count, this.defensible.knownname, $Defensible.knownname]"/>
</do_if>
</add>
</diff>
Note that it IS possible to force drones to dock. However, this keeps the unused mass traffic networks intact and inaccessible leading to save game bloat and problems later on.