X4: Foundations
0 of 0

File information

Last updated

Original upload

Created by

TheAssailer

Uploaded by

TheAssailer

Virus scan

Safe to use

37 comments

  1. user2046
    user2046
    • member
    • 3 kudos
    Can anyone list the changes from 1.24 to 1.37? Someone updated the mod but didn't indicate what changed.

    Thanks.
  2. muaythaisoldier
    muaythaisoldier
    • premium
    • 1 kudos
    Has anyone figure out how to change the price for repairs?  I opened up the file mobilerepairservice.xml and it is a whole lot of code I can't even begin to unpack.  There are so many values repeated I don't know how to lower the price given what I'm seeing.  any thoughts?
  3. GreyWanderer43
    GreyWanderer43
    • member
    • 0 kudos
    I thank You for your very useful mod. I suggest the following improvements in menu if possible:
    - docking with the specified ship upon completion of work
    Thanks for your work.
    1. jmate737
      jmate737
      • member
      • 0 kudos
      ... or, possibly, dock on specified station (owned or allied) or just fly somewhere and stay ...
      Anyway, thank you for your mod, useful as is.
  4. crysty
    crysty
    • member
    • 0 kudos
    Someone posted this on steam, didn't try it yet. 
    Adds Boron, Terran, Pirate DLCs to Mobile Repair Service · GitHub

    [table]<?xml version="1.0" encoding="iso-8859-1" ?><aiscript name="mobilerepairservice" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="aiscripts.xsd" version="1"><order id="MobileRepairService" name="Mobile Repair Service" description="Mobile Repair Service" category="trade" infinite="true"><params><param name="mrs_space" default="null" type="sector" required="true" text="Home sector"/><param name="mrs_follow" default="null" type="object" required="false" text="Follow Ship"><input_param name="class" value="[class.ship_m,class.ship_l,class.ship_xl]"/></param><param name="mrs_player_only" default="false" type="bool" text="Player only repairs"/><param name="mrs_ignore_shield" default="true" type="bool" text="Ignore shield level checks"/><param name="fs_argon" type="bool" default="false" text="Ignore {20203,201}"/><param name="fs_antigone" type="bool" default="false" text="Ignore {20203,301}"/><param name="fs_teladi" type="bool" default="false" text="Ignore {20203,601}"/><param name="fs_ministry" type="bool" default="false" text="Ignore {20203,701}"/><param name="fs_paranid" type="bool" default="false" text="Ignore {20203,401}"/><param name="fs_holyorder" type="bool" default="false" text="Ignore {20203,501}"/><param name="fs_alliance" type="bool" default="false" text="Ignore {20203,801}"/><param name="fs_trinity" type="bool" default="false" text="Ignore {20203,2301}"/><param name="fs_split" type="bool" default="false" text="Ignore {20203,2001}"/><param name="fs_freesplit" type="bool" default="false" text="Ignore {20203,1601}"/><param name="fs_court" type="bool" default="false" text="Ignore {20203,1801}"/><param name="fs_terran" type="bool" default="false" text="Ignore {20203,3001}"/><param name="fs_pioneers" type="bool" default="false" text="Ignore {20203,2901}"/><param name="fs_yaki" type="bool" default="false" text="Ignore {20203,2801}"/><param name="fs_loanshark" type="bool" default="false" text="Ignore {20203,3301}"/><param name="fs_scavenger" type="bool" default="false" text="Ignore {20203,3201}"/><param name="fs_boron" type="bool" default="false" text="Ignore {20203,1301}"/><param name="fs_buccaneers" type="bool" default="false" text="Ignore {20203,2401}"/><param name="fs_fallensplit" type="bool" default="false" text="Ignore {20203,1701}"/><param name="fs_hatikvah" type="bool" default="false" text="Ignore {20203,901}"/><param name="fs_scaleplate" type="bool" default="false" text="Ignore {20203,1001}"/></params><requires><match shiptype="shiptype.lasertower" negate="true"/></requires><location object="$mrs_space" condition="$mrs_space.zone.exists" /></order><interrupts><handler ref="SectorChangeHandler"/><handler ref="AttackHandler" /><handler ref="MissileLockHandler" /><handler ref="ScannedHandler" /><handler ref="InspectedHandler"/><handler ref="FoundAbandonedHandler"/><handler ref="FoundLockboxHandler"/><handler ref="ResupplyHandler" /><handler ref="TargetInvalidHandler"/></interrupts><init><set_order_syncpoint_reached order="this.ship.order"/><set_command_action commandaction="commandaction.standingby"/><do_if value="$mrs_space == null"><set_value name="$mrs_space" exact="this.ship.zone"/><edit_order_param order="this.assignedcontrolled.defaultorder" param="'mrs_space'" value="$mrs_space.sector"/></do_if><do_if value="$mrs_space.isclass.sector"><find_zone name="$mrs_space" space="$mrs_space" normalzone="true"/></do_if><set_value name="$fs_factions" exact="[]"/><do_if value="$fs_argon"><append_to_list name="$fs_factions" exact="faction.argon"/></do_if><do_if value="$fs_antigone"><append_to_list name="$fs_factions" exact="faction.antigone"/></do_if><do_if value="$fs_paranid"><append_to_list name="$fs_factions" exact="faction.paranid"/></do_if><do_if value="$fs_holyorder"><append_to_list name="$fs_factions" exact="faction.holyorder"/></do_if><do_if value="$fs_alliance"><append_to_list name="$fs_factions" exact="faction.alliance"/></do_if><do_if value="$fs_trinity"><append_to_list name="$fs_factions" exact="faction.trinity"/></do_if><do_if value="$fs_teladi"><append_to_list name="$fs_factions" exact="faction.teladi"/></do_if><do_if value="$fs_ministry"><append_to_list name="$fs_factions" exact="faction.ministry"/></do_if><do_if value="$fs_split"><append_to_list name="$fs_factions" exact="faction.split"/></do_if><do_if value="$fs_freesplit"><append_to_list name="$fs_factions" exact="faction.freesplit"/></do_if><do_if value="$fs_court"><append_to_list name="$fs_factions" exact="faction.court"/></do_if><do_if value="$fs_hatikvah"><append_to_list name="$fs_factions" exact="faction.hatikvah"/></do_if><do_if value="$fs_scaleplate"><append_to_list name="$fs_factions" exact="faction.scaleplate"/></do_if><do_if value="$fs_buccaneers"><append_to_list name="$fs_factions" exact="faction.buccaneers"/></do_if><do_if value="$fs_fallensplit"><append_to_list name="$fs_factions" exact="faction.fallensplit"/></do_if><do_if value="$fs_boron"><append_to_list name="$fs_factions" exact="faction.boron"/></do_if><do_if value="$fs_terran"><append_to_list name="$fs_factions" exact="faction.terran"/></do_if><do_if value="$fs_pioneers"><append_to_list name="$fs_factions" exact="faction.pioneers"/></do_if><do_if value="$fs_loanshark"><append_to_list name="$fs_factions" exact="faction.loanshark"/></do_if><do_if value="$fs_scavenger"><append_to_list name="$fs_factions" exact="faction.scavenger"/></do_if><do_if value="$fs_yaki"><append_to_list name="$fs_factions" exact="faction.yaki"/></do_if><set_value name="$mrs_home" exact="$mrs_space"/></init><attention min="unknown"><actions><!-- START ******************************************************************************* --><label name="start"/><do_if value="not $mrs_home? or not $mrs_home.isclass.zone"><set_value name="$mrs_home" exact="this.ship.zone"/><write_to_logbook category="general" title="{314152, 1}" text="{314152, 7}.[this.ship.name, $mrs_home.sector.knownname]"/><wait min="1s" max="2s"/></do_if><!-- SEARCH ******************************************************************************* --><label name="search"/><do_if value="not $mrs_home? or not $mrs_home.isclass.zone"><resume label="start"/></do_if><set_value name="$mrs_time" exact="player.age"/><set_value name="$mrs_target" exact="null"/><set_value name="$mrs_findsafety" exact="true"/><do_if value="$mrs_home? and $mrs_home.sector != this.ship.sector"><resume label="home"/></do_if><!-- SEARCH_LOOP ************************************************************************** --><label name="search_loop"/><do_if value="not $mrs_home? or not $mrs_home.isclass.zone"><resume label="start"/></do_if><do_if value="$mrs_follow != null"><do_if value="$mrs_follow.isoperational"><do_if value="$mrs_home.sector != $mrs_follow.sector"><set_value name="$mrs_home" exact="$mrs_follow.zone"/><resume label="start"/></do_if></do_if><do_else><set_value name="$mrs_follow" exact="null"/><do_if value="$mrs_space == null"><set_value name="$mrs_home" exact="this.ship.zone"/><resume label="start"/></do_if><do_if value="$mrs_space.sector != $mrs_home.sector"><find_zone name="$mrs_home" space="$mrs_space" normalzone="true"/><resume label="start"/></do_if></do_else></do_if><set_command command="command.patrol"/><set_command_action commandaction="commandaction.standingby"/><set_value name="$mrs_time" exact="player.age"/><wait min="5s" max="10s"/><set_value name="$target" exact="null"/><set_value name="$distance" exact="-1"/><set_value name="$npc_target" exact="null"/><set_value name="$npc_distance" exact="-1"/><create_list name="$ships"/><find_ship name="$ships" space="this.ship.sector" recursive="true" multiple="true"/><do_all exact="$ships.count" counter="$si"><set_value name="$ship" exact="$ships.{$si}"/><do_if value="(not $ship.iswreck) and ($ship.isoperational) and ($ship.pilot.exists) and ($ship.hullpercentage lt 100) and (($ship.shieldpercentage gt 20) or $mrs_ignore_shield)"><do_if value="$ship == this.ship"><set_value name="$target" exact="$ship"/><resume label="maintenance"/></do_if><do_else><do_if value="$ship.pilot.$mrs_skip?"><do_if value="player.age gt $ship.pilot.$mrs_skip"><remove_value name="$ship.pilot.$mrs_skip"/></do_if></do_if><do_elseif value="this.ship.owner == $ship.owner"><set_value name="$dist" exact="this.ship.distanceto.{$ship}"/><do_if value="($distance lt 0) or ($dist lt $distance)"><set_value name="$target" exact="$ship"/><set_value name="$distance" exact="$dist"/></do_if></do_elseif><do_elseif value="($ship.relationto.{faction.player} ge 0) and not $mrs_player_only"><set_value name="$allowed" exact="true"/><do_if value="$fs_factions.count gt 0"><do_all exact="$fs_factions.count" counter="$fi"><do_if value="$ship.owner == $fs_factions.{$fi}"><set_value name="$allowed" exact="false"/><break/></do_if></do_all></do_if><do_if value="$allowed"><set_value name="$dist" exact="this.ship.distanceto.{$ship}"/><do_if value="($npc_distance lt 0) or ($dist lt $npc_distance)"><set_value name="$npc_target" exact="$ship"/><set_value name="$npc_distance" exact="$dist"/></do_if></do_if></do_elseif></do_else></do_if></do_all><do_if value="$distance ge 0"><set_value name="$mrs_distance" exact="$distance"/><set_value name="$mrs_target" exact="$target"/><set_value name="$mrs_time" exact="player.age"/><resume label="approach_loop"/></do_if><do_if value="$npc_distance ge 0"><set_value name="$mrs_distance" exact="$npc_distance"/><set_value name="$mrs_target" exact="$npc_target"/><set_value name="$mrs_time" exact="player.age"/><resume label="approach_loop"/></do_if><do_if value="not $mrs_findsafety? or $mrs_findsafety"><set_value name="$mrs_findsafety" exact="false"/><find_object name="$fs_targets" space="this.ship.sector" class="[class.station]" multiple="true"><match_relation_to object="this.ship" relation="friend" comparison="ge"/></find_object><set_value name="$fs_closest" exact="-1"/><do_all exact="$fs_targets.count" counter="$ti"><set_value name="$fs_distance" exact="$fs_targets.{$ti}.distanceto.{this.ship}"/><do_if value="$fs_closest lt 0 or $fs_distance lt $fs_closest"><set_value name="$fs_closest" exact="$fs_distance"/><set_value name="$fs_target" exact="$fs_targets.{$ti}"/></do_if></do_all><do_if value="$fs_closest gt 0"><set_command_action commandaction="commandaction.flyingto" param="$fs_target"/><get_safe_pos result="$finalpos" object="$fs_target" zone="$fs_target.zone" radius="this.size/2.0" ignored="this.ship"/><move_to object="this.ship" destination="$fs_target.zone" abortpath="true" forcerotation="true" forceposition="true" uselocalhighways="false" boost="false" travel="true"><position value="$finalpos"/><interrupt_after_time time="600s"/></move_to></do_if></do_if><resume label="search_loop"/><!-- APPROACH_LOOP ************************************************************************ --><label name="approach_loop"/><do_if value="not $mrs_home? or not $mrs_home.isclass.zone"><resume label="start"/></do_if><set_value name="$target" exact="$mrs_target"/><do_if value="(not $target.exists) or ($target.zone.isclass.highway) or ($target.sector != this.ship.sector)"> <resume label="search"/> </do_if><set_value name="$distance" exact="this.ship.distanceto.{$target}"/><do_if value="player.age gt ($mrs_time + 120)"><set_value name="$mrs_time" exact="player.age"/><set_value name="$mrs_distance" exact="$mrs_distance * 0.75"/><do_if value="$distance gt $mrs_distance"><set_value name="$target.pilot.$mrs_skip" exact="player.age + 120"/><resume label="search"/></do_if></do_if><set_value name="$limit" exact="750 + this.ship.size + $target.size"/><do_if value="$distance gt $limit"><set_command_action commandaction="commandaction.flyingto" param="$target"/><get_safe_pos object="$target" zone="$target.zone" radius="this.ship.size / 2.0" allowyaxis="true" result="$pos" ignored="this.ship"/><set_value name="$destination" exact="$pos"/><move_to object="this.ship" destination="$target.zone" boost="true" travel="true" forceposition="false" finishonapproach="true" commandaction="false"><position value="$destination" max="this.ship.size + $target.size"/><interrupt_after_time time="5s"/></move_to><resume label="approach_loop"/></do_if><!-- MAINTENANCE ************************************************************************ --><label name="maintenance"/><stop_moving object="this.ship"/><set_command command="command.repair"/><set_command_action commandaction="commandaction.flying"/><set_value name="$cph_v" exact="[(this.ship.pilot.skill.management + this.ship.pilot.skill.engineering) / 2f, 15f].min"/><set_value name="$cph_pc" exact="6f - $cph_v / 3f"/><set_value name="$cph_npc" exact="6f + $cph_v"/><set_value name="$hp" exact="$target.maxhull - $target.hull"/><do_if value="$hp gt 0"><set_value name="$experience" exact="0"/><set_value name="$hulldamage" exact="0"/><set_value name="$hullcosts" exact="0"/><set_value name="$partdamage" exact="0"/><set_value name="$partcosts" exact="0"/><set_value name="$partlist" exact="''"/><do_if value="this.ship.owner == $target.owner"><set_value name="$credits" exact="($hp * $cph_pc)i * 1Cr"/><do_if value="player.money ge $credits"><reward_player money="-$credits"/></do_if><do_else><set_value name="$hp" exact="0"/></do_else></do_if><do_else><set_value name="$credits" exact="($hp * $cph_npc)i * 1Cr"/><reward_player money="$credits"/></do_else><do_if value="$hp gt 0"><set_value name="$hulldamage" exact="$hp"/><set_value name="$hullcosts" exact="$credits"/><set_value name="$experience" exact="$experience + 1"/><set_object_hull object="$target" exact="100"/></do_if><find_object_component name="$damagedcomponents" object="$target" class="[class.engine, class.weapon, class.shieldgenerator, class.turret]" checkoperational="false" multiple="true"/><do_if value="$damagedcomponents.count gt 0"><do_all exact="$damagedcomponents.count" counter="$i"><set_value name="$damagedcomponent" exact="$damagedcomponents.{$i}"/><set_value name="$hp" exact="$damagedcomponent.maxhull - $damagedcomponent.hull"/><do_if value="$hp gt 0"><do_if value="this.ship.owner == $target.owner"><set_value name="$credits" exact="($hp * $cph_pc * 3f)i * 1Cr"/><do_if value="player.money ge $credits"><reward_player money="-$credits"/></do_if><do_else><set_value name="$hp" exact="0"/></do_else></do_if><do_else><set_value name="$credits" exact="($hp * $cph_npc * 3f)i * 1Cr"/><reward_player money="$credits"/></do_else><do_if value="$hp gt 0"><set_value name="$partlist" exact="$partlist + {314152, 5}.[$damagedcomponent.knownname, ($hp)i, $credits/100]"/><set_value name="$partdamage" exact="$partdamage + $hp"/><set_value name="$partcosts" exact="$partcosts + $credits"/><set_value name="$experience" exact="$experience + 1"/><set_object_hull object="$damagedcomponent" exact="100"/></do_if></do_if></do_all></do_if><set_value name="$credits" exact="$partcosts + $hullcosts"/><set_value name="$message" exact="{314152, 2}.[$target.name, this.ship.name, $credits/100, ($hulldamage)i, $hullcosts/100, $partlist]"/><do_if value="this.ship.owner == $target.owner"><write_to_logbook category="general" title="{314152, 1}" text="$message"/></do_if><do_else><write_to_logbook category="general" title="{314152, 1}" money="$credits" text="$message"/></do_else><apply_experience entity="this.ship.pilot" experience="'mrs'" factor="1.0"/><wait min="(35 - [this.ship.pilot.skill.engineering * 2f, 30f].min)s" max="(37 - [this.ship.pilot.skill.engineering * 2f, 30f].min)s"/></do_if><wait min="(16 - [this.ship.pilot.skill.piloting, 15f].min)s" max="(18 - [this.ship.pilot.skill.piloting, 15f].min)s"/><do_if value="$target.exists and $target.pilot.exists"> <set_value name="$target.pilot.$mrs_skip" exact="player.age + 120"/></do_if><resume label="search"/><!-- HOME ********************************************************************************* --><label name="home" /><do_if value="not $mrs_home? or not $mrs_home.isclass.zone"><resume label="start"/></do_if><set_command command="command.movetozone" param="$mrs_home"/><set_command_action commandaction="commandaction.flying"/><write_to_logbook category="general" title="{314152, 1}" text="{314152, 6}.[this.ship.name, $mrs_home.sector.knownname]"/><get_safe_pos result="$pos" zone="$mrs_home" radius="this.ship.size" min="1km" max="35km"/><set_value name="$destination" exact="$pos"/><move_to object="this.ship" destination="$mrs_home" travel="true" forceposition="false" finishonapproach="true" commandaction="false"><position value="$destination" min="5km" max="6km"/></move_to><wait min="4s" max="5s"/><resume label="search"/></actions></attention></aiscript>[/table]
  5. muaythaisoldier
    muaythaisoldier
    • premium
    • 1 kudos
    As of 04/26/2022 This DOES WORK for me.  And I have lots of mods running.  And I have all dlc.  I am running mods both from nexus mods and the steam workshop.
    What you do is
    1) you take away a units orders and assignments.  Once he has no orders you can give him a job as a repairman
    2) Talk to your repair man through the coms.  you select repair or repair man or whatever it was.  
    3) He will then have an assigment like "advanced trader" where you can change the sector he is assigned to work in.  I don't know if you can tell them to follow you .  I have had a guy in a fleet with the repair job still assigned I'm just not sure if he will do it when the fleet is idle.  I had a fleet with a carrier as its leader and it seemed to jack up everyones orders.  They all wanted to dock on him for resupply.  Possibly due to the player_restock_subordinates mod

    If you dont see the option  to give this order to subordinates you most likely need the mod that lets you add mod communications to the communication wheel.   
    TRY
    Mod Support APIs
    Extended Conversation Menu https://www.nexusmods.com/x4foundations/mods/382
    1. user2046
      user2046
      • member
      • 3 kudos
      Seems to work well in 5.10 HF3 as a default order. But DLC factions are missing like Terran and Yaki. Also, factions added by other mods don't appear in the list. So if for example you're using DeadAir's faction mods and are at war with one of them, your ship will happily repair them because they can't be ignored.

      Personally I think it would be better if the repair cost hull parts instead of Cr. You could use a small trading ship as repair service and have some fighters escort it.
    2. user2046
      user2046
      • member
      • 3 kudos
      Update:

      For whatever reason the mod author decided to not allow you to select class.ship_s as the ship to "follow". But the mod still works fairly well with 5.10 HF3 if you download the steam version...

      The main issue I have is the repair ship is given a default order of "patrol" which often means it is on the other side of the sector when you get attacked. It can take a long time to get to you if there is an asteroid field in the way because the AI likes to slow down for any obstacle that gets in its path.

      I tried changing it to a follow command and while it does stay closer to my ships, it seems to have the same problem as other ships that are "following" in that they don't move until you get too far away.
  6. Paddyy86
    Paddyy86
    • member
    • 12 kudos
    yeah this no longer works. I am currently playing 5.10
  7. MFranco
    MFranco
    • member
    • 0 kudos
    The mod is not working. I don't know if is missing a file, mrsat.xml doesn't exist. Basically the job doesn't appear (my pilots don't have that option) in my game. I tested just with this mod instaled.
  8. ScarabParamit
    ScarabParamit
    • member
    • 0 kudos
    Download version from steam, and fallow GOG modding community ways to make them work for x4 and any other game (f***ing workshop)... This
    version is outdated!
  9. giampaolo
    giampaolo
    • member
    • 0 kudos
    I thank You for your very useful mod. I have the last X4 Split 3.30. Unfortunally there is something wrong, because the repair ships scattered in various sectors sometime work fine (mainly when I start the game), sometime stuck where they are. In particular in most cases my damaged ships are not repaired in no way after a lot of time even if I place the damaged ship under the nose of the repair one . Sometime the repair ship prefers NPC ships instead of the player's one, that are ignored completely forever. I tried to change pilot, remove all orders and start again etc. without any result. I suggest the following improvements in menu if possible:
    1) "reset repair function"
    2) "prefer player ships" (option)
    3) "select the ship to repair"
    Thanks for your work.
    1. giampaolo
      giampaolo
      • member
      • 0 kudos
      Self reply: after some tests I found that the captured ships (mainly S and M) with destroyed shield (i.e. at zero) will not be never repaired because they cannot self-repair the shield. So they never will fulfil to the (strange) requirement of minimum 20% shield.
    2. ScarabParamit
      ScarabParamit
      • member
      • 0 kudos
      mobilerepairservice.xml
      Find:
      <do_if value="(not $ship.iswreck) and ($ship.isoperational) and ($ship.pilot.exists) and ($ship.hullpercentage lt 100) and ($ship.shieldpercentage gt 20)">
      Change To:
      <do_if value="(not $ship.iswreck) and ($ship.isoperational) and ($ship.pilot.exists) and ($ship.hullpercentage lt 100)">
      There is another line mentioning shields...but try this first, if it won't work check:
      <find_object_component name="$damagedcomponents" object="$target" class="[class.engine, class.weapon, class.shieldgenerator]" checkoperational="false" multiple="true"/>
      And change To:
      <find_object_component name="$damagedcomponents" object="$target" class="[class.engine, class.weapon]" checkoperational="false" multiple="true"/>
      Although i advice to do it last after test, didn't wrote this script, but this part might actually ignore those modules. Test needed.


      Download version from steam, and fallow GOG modding community ways to make them work for x4 and any other game (f***ing workshop)... This version is outdated!
  10. urieldetamroth
    urieldetamroth
    • member
    • 0 kudos
    I don't know if anyone is aware but... the mobile repair vessels also repair allied ships!!!