X: Rebirth

File information

Last updated

Original upload

Created by

Euclid

Uploaded by

Euclid

Virus scan

Safe to use

6 comments

  1. slater124
    slater124
    • member
    • 0 kudos
    Euclid, I am trying to modify your script for auto repair of all player owned ships at a certain interval. It does indeed repair ALL ships to 100% hull every 5 seconds, and does a check to see what ships are damaged. However.. It does not ONLY repair player ships, it repairs <ALL> ships in the X rebirth universe. Would you be willing to tell me what is wrong, that it is doing this? I cannot private message you, seeing how the hull repair is part of this mod. I seen fit to post it here. This is a cheat as well, but i dont want to baby sit all my ships because they pick fights..

    I am new to coding for X rebirth, so i reworked yours a bit after learning up some coding. I left most of the original with the hull repair there, as i do not want to bust it. Ive tried "player.ship" Ive tried removing all the ands and only leave owner=player or even faction=player. It still repairs ALL ships. I just want it to repair ONLY ALL PLAYER ships.
    1. slater124
      slater124
      • member
      • 0 kudos
      Attached is MODIFIED CODE--------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <mdscript name="Repairshipfull" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
      <cues>
      <cue name="Repairsh0" instantiate="true" checkinterval="5s">
      <actions>
      <!--check for ships with hull min 1 but < 100 -->
      <find_ship name="$Ships" owner="player"multiple="true" />
      <set_value name="$NumShips"
      exact="0"/>
      <do_all exact="$Ships.count" counter="$Counter">
      <do_if owner="player" value="($Ships.{$Counter}.hullpercentage ge 1) and ($Ships.{$Counter}.hullpercentage lt 100) ">
      <set_object_hull owner="player" object="$Ships.{$Counter}" exact="100" />
      <set_value name="$NumShips" operation="add"
      exact="1" />
      </do_if>
      </do_all>
      </actions>
      </cue>
      </cues>
      </mdscript>
      END OF MODIFIED CODE----------------------------------------------
      ALL CREDIT TO Euclid FOR SCRIPT <RepairShipFull.xml>
      ------------------------------------------------------------------------------------------------------------------------
      ORIGINAL SCRIPT-------------------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <mdscript name="Repairshipfull" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="md.xsd">
      <cues>
      <cue name="Repairsh0" instantiate="true" >
      <conditions>
      <check_all>
      <event_object_changed_zone object="player.primaryship"/>
      <check_object object="event.param"
      macro="macro.tzoneCluster_D_Sector17_Zone35_macro"/><!-- Flickering Flame -->
      </check_all>
      </conditions>
      <actions>
      <!--check for ships with hull min 75 but < 100 -->
      <find_ship name="$Ships" class="class.ship_xl" space="player.galaxy" owner="player"multiple="true" />
      <set_value name="$NumShips"
      exact="0"/>
      <do_all exact="$Ships.count" counter="$Counter">
      <do_if value="($Ships.{$Counter}.hullpercentage ge 75) and ($Ships.{$Counter}.hullpercentage lt 100) ">
      <set_object_hull object="$Ships.{$Counter}" exact="100" />
      <set_value name="$NumShips" operation="add"
      exact="1" />
      </do_if>
      </do_all>
      <show_notification caption="{1010,11}"
      details="['Hello, ' , $NumShips ,' ships have maximum hull now.' ]"
      queued="true"
      sound="notification_generic"/>
      </actions>
      </cue>
      </cues>
      </mdscript>
      END OF ORIGINAL SCRIPT--------------------------------------------
  2. Euclid
    Euclid
    • premium
    • 7 kudos
    Hi all

    There was still a specific station (Energy Array) select for test purposes. So the line

    <set_value name="$StationMacro" list="$Stations.{18}" />

    should read

    <set_value name="$StationMacro" list="$Stations.random" />

    which lead to spawn of only Energy Arrays.I have uploaded a corrected version and removed the old one.

    @dirtysio I'm sorry to learn that this mod is not working for you. Are you running any other mods that could interfere? Please feel free to contact me via PM over at the Egosoft forum. To solve your problem I might need your saved game. Please zip it and email it to me.


    Cheers Euclid
    1. dirtysio
      dirtysio
      • member
      • 0 kudos
      Thank you Euclid!

      I already fix this problem,it show me other stations now.
      I do change the "$Stations.{18}" to "$Stations.random".

      And I have another question is can I add a Shipyard macro in that station list?Show it work?
    2. Euclid
      Euclid
      • premium
      • 7 kudos
      Capital shipyards are just meshes & textures, i.e. they have no production modules. All the trade (sell/buy ships) is done by the ship trader and to add that NPC to your own CSY is a pain. I do not recommend it but if you are into scripting (MD) then please try and let us know if it works ;-)

      There are civ shipyards, the dockyard (Albion) and the boatyard (Omicron Lyrae), but the small version is bugged atm. (i.e. it lacks the production modules) and this is why I have excluded it (the Albion version) from the list. The complex version is in the list and it works just fine. However, you cannot use these little ships and I think this is not what you has in mind.

      Cheers Euclid
  3. dirtysio
    dirtysio
    • member
    • 0 kudos
    When I fly to Presistent Darkening there is no "random station" be created,I mean it shows me only cell_refinery(the first macro in the station list).Is that only happened to me or the mod's bug?Can you figure this problem out?

    By the way,I'd really like this mod,especially the station created function..I wish it could work..

    Thanks a lot!