[Guide] Useful Save Game Edits (many cool tricks & workarounds!)

The place to discuss scripting and game modifications for X Rebirth.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

[Guide] Useful Save Game Edits (many cool tricks & workarounds!)

Post by Simoom » Sun, 22. Feb 15, 20:19

I love X3, and I really, really wanted to love X Rebirth. And in a way, I do love it - the "spirit" of the X series is still there in X Rebirth; I love the romanticism by which Egosoft approaches their presentation of outer space.

But as a game, X Rebirth does have many issues. While we are now in version 3.xx and most major bugs have been ironed out, and the UI has been vastly-improved, there are still many frustrating things left in the game.

Ever since I started playing back in the version 1.xx days, I have been editing my save game heavily (particularly because many of the issues could not be resolved through modding, or the mods I wanted weren't made yet). This is a collection of little save game editing tricks I have learned, which I hope will be of help to some of you out there.

Some Basic Tricks
  • Switching Property Ownership: This is one of the most useful tricks in the bag, and not just for obvious reasons (see practical, game-fixing usage in "Advanced Tricks" section).
    1. Locate the object in your save game file. One easy way to do this (for ships and stations) is to open the Info window about the object in-game and make a note of the names of the crew. Open up your savegame file in Notepad++ and search for the name of the crew, then scroll up a few pages to find something like this:

      Code: Select all

      <connection connection="ships">
      <component class="ship_l" macro="units_size_l_single_attack_ship_macro" connection="space" attackmethod="lowattentionattack" attacktime="467274.288" owner="heartofalbion" id="[0x12751]">
      This is the beginning of the code segment for a Balor in my game, belonging to Heart of Albion. Note that the object's "macro" denotes its identity (so if you search for "units_size_l_single_attack_ship_macro", you can easily find all the Balors in your save game).
    2. To change the ownership of the object, simply change the owner to some other faction. Using the example above, simply change owner="heartofalbion" to owner="player". Likewise, you can give the ship to Plutarch by typing owner="plutarch".
    3. You are not done yet! For ships and stations, you must also change the ownership of all of its crew member to match, otherwise the game will be a bit confused. So scroll down and locate the code for the ship or station's crew. This is an example code for a in-game NPC serving as the crew aboard the Balor:

      Code: Select all

      <component class="npc" macro="character_ar_male_engineer_macro" connection="commandroomslot" name="Kriss Keswen" owner="heartofalbion" page="10108" id="[0x3fb3]">
      <listeners>
      <listener listener="[0x3faa]" event="killed"/>
      </listeners>
      <skills>
      <skill type="boarding" value="3"/>
      <skill type="combat" value="3"/>
      <skill type="engineering" value="4"/>
      <skill type="leadership" value="1"/>
      <skill type="management" value="1"/>
      <skill type="morale" value="2"/>
      <skill type="navigation" value="3"/>
      <skill type="science" value="2"/>
      </skills>
      <entity type="engineer" control="1"/>
      <npcseed bodyparts="486748545" bonescales="3118047701" morphtargetweights="308306312"/>
      Like before, change the owner to something else.
  • Changing NPC appearance: So the character models in XR aren't exactly the best. There is a mod that gets rid of "space granny", but if you really want precise control over the appearance of the crew you hire for your ships and stations, there's a way to do that.
    1. Refer again to the code for the Balor engineer I posted above. Take a note of the following two lines:

      Code: Select all

      macro="character_ar_male_engineer_macro"

      Code: Select all

      <npcseed bodyparts="486748545" bonescales="3118047701" morphtargetweights="308306312"/>
      The first line denotes what basic character model to use (determines the basic costume), while the second line denotes which specific props to put on the character (facial detail, hairstyle, head gear or eye piece, etc.).
    2. Now let's say you find a NPC whose model you really like - take a note of the character's name and faction (in case there are duplicate names, and it does happen a lot). Open up your save game file and locate the character. Copy those two lines above and paste it over to a character whose appearance you want to alter. Load the game up and you should see the change immediately. You can use this to, for example, make your capital ship captains wear the outfit of a station manager, or even give them exotic looks like those of Karen Stringer or Neyl Colbern.
    3. For your convenience, here are some character models I have already collected:

      Code: Select all

      Female Manager (young):
      character_ar_female_manager_macro
      <npcseed bodyparts="1003404946" bonescales="2576516157" morphtargetweights="4042303241" />
      
      Female Commander (young):
      character_ar_female_commander_macro
      <npcseed bodyparts="1624445479" bonescales="3535015010" morphtargetweights="1085522985"/>
      
      Default female model for DeVries captains and engineers.
      character_ar_female_dv_a_macro
      <npcseed bodyparts="26929845" bonescales="4179750139" morphtargetweights="4231862317"/>
      
      Default female model for DeVries defense officers.
      character_ar_female_dv_b_macro
      <npcseed bodyparts="179435091" bonescales="254638961" morphtargetweights="2084068844" />
      
      Female Architect (young, no hat)
      character_ar_female_architekt_macro
      <npcseed bodyparts="3571871263" bonescales="3387243027" morphtargetweights="4037868578" />
      
      Female Pilot (young, no helmet)
      character_ar_female_pilot_macro
      <npcseed bodyparts="867836723" bonescales="502066632" morphtargetweights="1829683577"/>
      
      Female Trader (comes in two versions)
      character_ar_female_trader_macro
      <npcseed bodyparts="250972829" bonescales="380680941" morphtargetweights="3201310223" /> (no collar)
      <npcseed bodyparts="2136583424" bonescales="2025760725" morphtargetweights="2925621650"/> (collar)
      
      Model for Karen Stringer
      plotcharacter_karen_stringer_macro
      <npcseed bodyparts="2452160509" bonescales="2188508271" morphtargetweights="4261796679" />
      
      Model for Debora Gimbal
      plotcharacter_debora_gimbal_macro
      <npcseed bodyparts="1992451867" bonescales="3816658443" morphtargetweights="3890017621"/>
      
      Model for Mariya Rybak
      plotcharacter_mariya_rybak_macro
      <npcseed bodyparts="24857519" bonescales="176531425" morphtargetweights="1066980906" />
      
      ----------------------------------------------
      
      Male Manager
      character_ar_male_manager_macro
      <npcseed bodyparts="3021179102" bonescales="3041595206" morphtargetweights="1004252757" />
      
      Male Commander (comes in three versions)
      character_ar_male_commander_macro
      <npcseed bodyparts="3142204972" bonescales="1194773643" morphtargetweights="1893552787"/> (sunglasses)
      <npcseed bodyparts="3360752022" bonescales="2549853607" morphtargetweights="2645844332"/> (young)
      <npcseed bodyparts="137339577" bonescales="3649637249" morphtargetweights="3721921829"/> (old)
      
      Default model for male DeVries engineer.
      character_ar_male_dv_b_macro
      <npcseed bodyparts="3501816101" bonescales="2961252727" morphtargetweights="550884836" />
      
      Default model for male DeVries captain and defense officer.
      character_ar_male_dv_a_macro
      <npcseed bodyparts="4063816559" bonescales="1141139952" morphtargetweights="3911161499"/> (sunglasses)
      
      Male defense officer
      character_ar_male_defense_macro
      <npcseed bodyparts="3282028987" bonescales="1740444255" morphtargetweights="2019902275" />
      
      Various models for male black marketeer
      character_argon_male_generic
      <npcseed bodyparts="399753809" bonescales="788109066" morphtargetweights="902013575" /> (white uniform)
      <npcseed bodyparts="1680392520" bonescales="3893288726" morphtargetweights="385578610" /> (brown uniform)
      <npcseed bodyparts="853367674" bonescales="1763960338" morphtargetweights="2626859357"/> (blue uniform)
      <npcseed bodyparts="2109554454" bonescales="3606732455" morphtargetweights="2545176150" /> (brown vest)
      <npcseed bodyparts="2601597665" bonescales="765031291" morphtargetweights="2772299903" /> (purple vest)
      <npcseed bodyparts="388905717" bonescales="530656869" morphtargetweights="419508207" /> (grey vest)
      <npcseed bodyparts="4062589817" bonescales="2366213989" morphtargetweights="4076891092" /> (red vest)
      <npcseed bodyparts="3114213554" bonescales="282231769" morphtargetweights="919187378"/> (black vest)
      
      Male trader
      character_ar_male_trader_macro
      <npcseed bodyparts="3269539048" bonescales="642649910" morphtargetweights="2050722166" />
      
      Male farmer
      character_ar_male_farmer_macro
      <npcseed bodyparts="2466536718" bonescales="2183859762" morphtargetweights="802342481"/>
      
      Model for Neyl Colbern
      plotcharacter_neyl_colbern_macro
      <npcseed bodyparts="834725855" bonescales="660900041" morphtargetweights="4146679125" />
      
      Model for Falk Borman
      plotcharacter_falk_borman_macro
      <npcseed bodyparts="1908692288" bonescales="2403279165" morphtargetweights="3807498669"/>
  • Prevent NPC Patrol Ships from Turning Hostile to Friendly Factions: One of the biggest issues in XR is the way NPC ships can turn hostile due to friendly fire (not just toward the player, but toward each other). Sometimes a station and a NPC destroyer on patrol duty will accidentally hit each other while firing at pirates, causing them to become hostile toward one another. You leave the sector for a while and come back to a half-wrecked station and a NPC patrol that's turned hostile to all ships and stations belonging to a faction it's supposed to protect. There is a way to prevent this.
    1. Locate the code in your save file for the patrol ship you want to prevent from turning hostile toward friendly faction (again, using the names of its crew is an easy way to do this). You can also search for the macro of a particular ship type to locate all the patrol ships present in your game (for example, all NPC Taranis are set to patrol duty). Scroll down a few pages - right above where the section for shields and turrets begin, you will find a few lines of code similar to this:

      Code: Select all

      <drop ref="ship_large_military"/>
      <source job="hoa_chapter2_medium_frigate_sector18" class="job"/>
      Note that the exact content of the "source job" line varies depending on the ship type and its job description.
    2. Insert the following line after the above code:

      Code: Select all

      <relations change="0"/>
      This will prevent the ship's commander from turning hostile due to friendly fire (don't worry, he will still attack ships belonging to enemy factions).
    3. If the ship or station in question has already turned hostile toward a friendly faction and you are trying to stop it from firing, you will have to locate and delete two things:
      • Look for the tag <turrettargets>, which tells the ship what its current combat targets are. If the ship is currently in combat, it will have this code. Delete it and everything in between.

        Code: Select all

        <turrettargets>
        <combat>
        <object id="[0x10f57]"/>
        </combat>
        </turrettargets>
      • Next, look under the code for the ship's pilot or commander. You will likely see something like this (note that for stations, this code goes under the Defense Officer instead of the Manager):

        Code: Select all

        <relations>
        <booster faction="heartofalbion" relation="-1" time="486768.74" delay="540" decayrate="0.02"/>
        </relations>
        <tolerance>
        <booster faction="heartofalbion" value="-1" time="486754.51" delay="10" decayrate="0.05"/>
        </tolerance>
        These codes tell the commander who his "temporary" enemies are (there is a decay rate, meaning if he doesn't get fired upon by that faction for a while, he eventually turns back to neutral. Problem is if he's in combat with a station, he probably won't ever turn back neutral)

        The <relations> tag won't always be present, but if the ship has turned hostile toward a friendly faction, then the <tolerance> tag will definitely be there. Remove any of these if you see them.
Advanced Tricks
  • Neutralizing Reiver Outposts: The Reiver stations in DeVries are a problem if you wish to build your own stations inside zones that have them. Not only do they attack your stations and CV, they also pose an issue for your patrol ships (since your patrol ships will never be able to fully destroy the Reiver stations, they will be stuck attacking them forever - meanwhile ignoring all Reiver ships that may spawn in the sector). There was a discussion thread a while back about how to permanently remove them, but apparently deleting the codes for them didn't do the trick at all. There is a much simpler solution - switch their ownership to Canteran.
    1. Search for "struct_bt_dv_reiver" in your save game file. You will find a total of 5 stations. The codes will look something like this (there are three different station models, so they will be labeled "reivers_outpost_01" to "_03" accordingly:

      Code: Select all

      <component class="station" macro="struct_bt_dv_reivers_outpost_03_macro" connection="space" attacker="[0x1c29]" attackmethod="lowattentionattack" attacktime="429051.92" owner="reivers" knownto="player" nameindex="1" id="[0x1eb1]">
    2. Change the owner to "canteran"; remember to do the same for the crew of each station as well (there should be three crews per station: Manager, Defense Officer, and Engineer). Also remember to check for any <relations> or <tolerance> tag under the Defense Officer; if you see any, delete them.
    3. Load up the game and you should see the stations listed as "RoC Way Station" instead of "REI Way Station". It is now safe to build next to them.
  • Stopping the Marauder Phoenix rampage in Fields of Opportunity: Currently the game spawns an insane number of Marauder Phoenix belonging to UA and CAR. They rampage the sector and destroy tons of trade ships, and the Teladi stations and patrol ships just stand idly and watch. This is unfortunately due to a limitation in the way the game handles faction relations - the Teladi Union considers UA and CAR neutral to them, so they won't attack their ships. The only Teladi ships that turn hostile would be the ones that come under fire - in this case the helpless trade ships who can't do anything against them anyway. Until Egosoft does something about the issue, here's a temporary fix.
    1. Open up your save and look for <faction id="teladi">. Now change their relations to "teladipirate", "teladidrugrunner" and "teladigunrunner" to the negative (see example below)

      Code: Select all

      <faction id="teladi">
      <relations>
      <relation faction="reivers" relation="-0.32"/>
      <relation faction="xenon" relation="-0.5"/>
      <relation faction="enemy" relation="-0.5"/>
      <relation faction="smuggler" relation="-0.06"/>
      <relation faction="criminal" relation="-0.5"/>
      <relation faction="sovereignsyndicate" relation="-0.5"/>
      <relation faction="hereticvanguards" relation="-0.5"/>
      <relation faction="teladipirate" relation="-0.5"/>
      <relation faction="teladidrugrunner" relation="-0.5"/>
      <relation faction="teladigunrunner" relation="-0.5"/>
      <booster faction="player" relation="0.526526" time="480634.624"/>
      </relations>
      This will cause Teladi Union stations and patrol ships to attack Marauder Phoenixes. Unfortunately, the Teladi Union only operates Condors as patrols, which are less powerful than the Phoenix (and in smaller numbers, too). So further actions are required.
    2. Next we are going to "commandeer" some Phoenixes away from the UA and CAR factions. Look in your save game for "units_size_xl_te_kit_none_03_macro", which is the macro for Phoenix. Change any that belongs to "teladidrugrunner" or "teladigunrunner" to be owned by you.

      Special note concerning <source job> tags: Like all patrol ships, the Phoenixes will carry a <source job> tag. Specifically, they look like these (depending on their faction)

      Code: Select all

      <source job="pirate_plunder_gunrunner" class="job"/>
      or
      <source job="pirate_plunder_drugrunner" class="job"/>
      The game uses these <source job> tags to keep track of how many NPC patrol ships there are. If it detects a loss of NPC patrol ship, it will spawn a replacement.

      The game does not however take into account the ownership of the ships who have these tags. This means you could effectively "block" the game from spawning more Marauder Phoenixes belonging to UA or CAR by switching their ownership to someone else, but keeping the <source job> tags there. Same applies to, say, if you want to prevent the game from spawning more Plutarch patrols to harass HOA sectors.

      For my guide, though, I will assume you have removed these tags to allow further NPC patrols to spawn.
    3. Now load up your game. You should now see a bunch of Phoenixes under your property menu. Assign them to your squad and tell them to patrol sectors that contain Teladi Union assets (you can even organize them into sub-squadrons so they will stay in formation and be more effective)
    4. Once all patrol orders have been given, remove the Phoenixes from your squadron (important!), save the game, then quit. Now open up the save game in Notepad++ again and change the ownership of the Phoenixes to "teladi".
    5. Load up your game. You should now see a bunch of Phoenixes belonging to Teladi Union on patrol! They will attack any UA/CAR Marauder Phoenix they encounter.
    • "Re-Purpose" Idle Plot Ships: There are several capital ships that were spawned as a part of the plot, who just sits around idly with no command issued. This bothers me, since they could be doing something more productive (like taking care of the Marauder Titurel that just spawned in their zone!). Just off the top of my head:
      • An idle Arawn sitting in Auspicious Excavation, by the gate to DeVries.
      • An idle Scaldis in Lava Flow.
      • Two idle Olmekron in Vapour Stream, next to gate to Olmecron Lyrae.
      • An Arawn and a Sucellus idle in Cryptic Heart.
      1. Find the idle ship in question by searching for the crew's name. Switch owner of ship and crew to you.
      2. Load up the game, add ship to squad, issue patrol command, remove from squad and save.
      3. Open up save file again and switch ownership back to original faction.

        Special note: In two instances, you will find idle capital ships without a Captain. You will have to hire and assign one before you can issue commands to those ships. Furthermore, some of the plot captains carry a special tag that prevents you from issuing them squad commands.

        Code: Select all

        <entity type="commander" control="1" missionactor="1" customconversation="1"/>
        Remove the "missionactor" and "customconversation" entries to gain control of the captain. You can add them back after you have issued the patrol command and saved the game.
  • Making NPC Patrols Invulnerable: In some cases, such as if you decide to repurpose a bunch of UA/CAR Phoenixes to the TU faction for anti-piracy duty, you may want to make these ships invulnerable so you don't have to keep replacing them if they get destroyed (in my game, there can sometimes be up to five UA/CAR Marauder Phoenixes in Sanctuary, TU casualty is very likely)
    1. Find the section in the NPC patrol's code that states:

      Code: Select all

      <drop ref="ship_large_military"/>
    2. Insert the following code above the aforementioned line:

      Code: Select all

      <hull min="6000000"/>
      This code will prevent the specified NPC ship from dropping below 90% hull value.
Last edited by Simoom on Tue, 15. Mar 16, 21:55, edited 6 times in total.

Snafu_X3
Posts: 4472
Joined: Wed, 28. Jan 09, 15:14
x3tc

Post by Snafu_X3 » Sun, 22. Feb 15, 22:33

/Very/ interesting, Tks for that Simoom!

Presumably if someone hasn't already done it, some modder's already beavering away with an addon to make all your employees wear the same uniform; be single, female & available etc :)
Wiki X:R 1st Tit capping
Wiki X3:TC vanilla: Guide to generic missions, Guide to finding & capping Aran
Never played AP; all X3 advice is based on vanilla+bonus pack TC or before: AP has not changed much WRT general advice.

I know how to spell teladiuminumiumium, I just don't know when to stop!

Dom (Wiki Moderator) 8-) DxDiag

BDelacroix
Posts: 212
Joined: Sun, 26. Feb 06, 04:30
x3tc

Post by BDelacroix » Mon, 23. Feb 15, 01:56

Interesting.

I see you have a way to change ownership of a station. Were you able to find a way to remove (I am guessing not entirely) or just move a station? I have two in exactly the same spot in my game. Usually not a problem, but it bothers me.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Mon, 23. Feb 15, 09:20

Awesome stuff :)

Regarding the repurposed plot ships and phoenix hulls, will they be respawned after death? If not, I guess the loss of the phoenix hulls to hostile patrols offers most of the change in FoO being looked for.

nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 » Mon, 23. Feb 15, 11:46

Nice, mind if I apply them in my save game editor?

Most are easy to integrate and give it some extra functionality.

PS do you know how to add weaponslots to the skunk. Can't get that working properly. Also do you know how and where to change the faction relations. I've tried editing the factions portion of the save game but no dice.
Save game editor XR and CAT/DAT Extractor
Keep in mind that it's still a work in progress although it's taking shape nicely.

If anyone is interested in a new save game editor for X4 and would like to contribute to the creation of one let me know. I do not have sufficient time to create it alone, but if there are enough people who want it and want to contribute we might be able to set something up.

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Mon, 23. Feb 15, 11:56

nemesis1982 wrote: PS do you know how to add weaponslots to the skunk.
Bit of a long shot, but maybe the code in the following old mod could be useful if you're not familiar with it already.

SkunkTurrets v0.01 Early Alpha:
http://forum.egosoft.com/viewtopic.php?t=372229

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Mon, 23. Feb 15, 22:24

BDelacroix wrote:Interesting.

I see you have a way to change ownership of a station. Were you able to find a way to remove (I am guessing not entirely) or just move a station? I have two in exactly the same spot in my game. Usually not a problem, but it bothers me.
As I said in the OP, there was a discussion thread last year asking about whether or not it's possible to completely remove a NPC station (at the time, Plutarch Overwatch was indestructable and could not be removed. That has been mitigated in the game somewhat, but the Reiver station issues remain), and several modders actually looked at the issue and could not figure out a proper way to do so. Removing the stations' codes simply broke the game.

Ideally I would prefer for the game to have a way for the player to permanently blow up NPC stations, but currently that's just not possible (also as I mentioned, there is a Russian mod on Steam that allows for this - but it did not work when I tried it. At least not for Reiver stations. The mod did successfully remove the wreckage of the Plutarch Overwatch from the game, though)

It may be possible that the Reiver stations have some special code in them that prevents their full removal. If it's some other NPC station you are trying to get rid of, I would say give the Russian mod a try (it's called "Destructable Stations and Sector Take-Over" or something like that)
Sparky Sparkycorp wrote:Awesome stuff :)

Regarding the repurposed plot ships and phoenix hulls, will they be respawned after death? If not, I guess the loss of the phoenix hulls to hostile patrols offers most of the change in FoO being looked for.
Well, most plot ships are indestructable (they have a tag, <hull min="______">), so they will be able to patrol forever and you won't have to worry about them. :P

The Phoenixes unfortunately won't be replaced - at least not for the faction you assigned it to. Like I said the game respawns NPC patrols by counting the number of <source job=> tags. For the Teladi Union faction, there are only two or three patrol ships (all Condors) - these will get replaced if destroyed.

All NPC patrol Phoenixes unfortunately belong to either UA or CAR. If you repurposed the Phoenixes to TU, and didn't delete the <source job=> tag, then the game won't spawn more Marauder Phoenixes belonging to the UA or CAR unless one of the repurposed Phoenixes are destroyed (very unlikely, unless they manage to have a bad run-in with multiple Xenon K's). In case of loss, the game WILL respawn a replacement - but they will belong to UA or CAR, not TU.

If on the other hand, you did delete the <source job=> tag for the repurposed Phoenixes, then the game will spawn a bunch of new Marauder Phoenixes belonging to UA or CAR. The repurposed TU Phoenixes will fight these, but some of them may be destroyed after some time.

If you want a sense of "war" between Teladi Union and the pirate factions, but don't want to have to keep replacing the repurposed TU Phoenixes, what you could do is splice the <hull min="_____"> tag into the code for the Phoenixes belonging to TU. This will make them invulnerable like the plot ships.
nemesis1982 wrote:Nice, mind if I apply them in my save game editor?

Most are easy to integrate and give it some extra functionality.

PS do you know how to add weaponslots to the skunk. Can't get that working properly. Also do you know how and where to change the faction relations. I've tried editing the factions portion of the save game but no dice.
Sure - didn't know you are making a save game editor. :) Would be cool to have these functionalities integrated into a GUI form.

As for additional weapon slots for the Skunk... no, I've never tinkered with that unfortunately. I did manually upgrade my Skunk's equipment to MK5 back when these weren't available, but that was the limit to what I knew how to do. xD

Sparky Sparkycorp
Moderator (English)
Moderator (English)
Posts: 8074
Joined: Tue, 30. Mar 04, 12:28
x4

Post by Sparky Sparkycorp » Mon, 23. Feb 15, 22:28

Hi Simoon,

Thanks very much for your detailed reply and support :thumb_up:

Regards,
Sparks

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Mon, 23. Feb 15, 22:35

You are welcome Sparky. :) Glad to be of help.

Added a section to the guide on how to make NPC ships invulnerable.

Specifically, the code for providing invulnerability (found on plot ships) is:

Code: Select all

<hull min="6000000"/>
This prevents the ship's hull value from dropping below 90%.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Mon, 23. Feb 15, 22:49

Simoom wrote:
BDelacroix wrote:Interesting.

I see you have a way to change ownership of a station. Were you able to find a way to remove (I am guessing not entirely) or just move a station? I have two in exactly the same spot in my game. Usually not a problem, but it bothers me.
As I said in the OP, there was a discussion thread last year asking about whether or not it's possible to completely remove a NPC station (at the time, Plutarch Overwatch was indestructable and could not be removed. That has been mitigated in the game somewhat, but the Reiver station issues remain), and several modders actually looked at the issue and could not figure out a proper way to do so. Removing the stations' codes simply broke the game.

Ideally I would prefer for the game to have a way for the player to permanently blow up NPC stations, but currently that's just not possible (also as I mentioned, there is a Russian mod on Steam that allows for this - but it did not work when I tried it. At least not for Reiver stations. The mod did successfully remove the wreckage of the Plutarch Overwatch from the game, though)

It may be possible that the Reiver stations have some special code in them that prevents their full removal. If it's some other NPC station you are trying to get rid of, I would say give the Russian mod a try (it's called "Destructable Stations and Sector Take-Over" or something like that)
the problem here is simply that the Stations are defined in the map and the Map is used as Template for things on game loading - it is fine to change some Values on an Object, as long as it still exists, but when you remove it its simply replaced by the original on loading. You can avoid that by replacing all Stations with NPC Buildspots and spawning the related NPC Stations there on Galaxy Init (thats what makes the Overwatch removeable - its not defined in the map, just its buildspot and its spawned on top of that buildspot)
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Mon, 23. Feb 15, 23:07

UniTrader wrote:
Simoom wrote:
BDelacroix wrote:Interesting.

I see you have a way to change ownership of a station. Were you able to find a way to remove (I am guessing not entirely) or just move a station? I have two in exactly the same spot in my game. Usually not a problem, but it bothers me.
As I said in the OP, there was a discussion thread last year asking about whether or not it's possible to completely remove a NPC station (at the time, Plutarch Overwatch was indestructable and could not be removed. That has been mitigated in the game somewhat, but the Reiver station issues remain), and several modders actually looked at the issue and could not figure out a proper way to do so. Removing the stations' codes simply broke the game.

Ideally I would prefer for the game to have a way for the player to permanently blow up NPC stations, but currently that's just not possible (also as I mentioned, there is a Russian mod on Steam that allows for this - but it did not work when I tried it. At least not for Reiver stations. The mod did successfully remove the wreckage of the Plutarch Overwatch from the game, though)

It may be possible that the Reiver stations have some special code in them that prevents their full removal. If it's some other NPC station you are trying to get rid of, I would say give the Russian mod a try (it's called "Destructable Stations and Sector Take-Over" or something like that)
the problem here is simply that the Stations are defined in the map and the Map is used as Template for things on game loading - it is fine to change some Values on an Object, as long as it still exists, but when you remove it its simply replaced by the original on loading. You can avoid that by replacing all Stations with NPC Buildspots and spawning the related NPC Stations there on Galaxy Init (thats what makes the Overwatch removeable - its not defined in the map, just its buildspot and its spawned on top of that buildspot)
That explained a lot - the Russian mod, when I tried it, temporarily removed two of the Reiver stations I destroyed. But after some time, when I returned to the zone, the stations simply respanwed.

I think at this time switching station ownership to a friendly faction is just the simplest and safest way to go if one wants to build in a hostile sector.

Thanks UniTrader!

BDelacroix
Posts: 212
Joined: Sun, 26. Feb 06, 04:30
x3tc

Post by BDelacroix » Mon, 23. Feb 15, 23:12

I understand all that. I am even willing to settle with just moving the duplicate of the station to another spot so I asked on the off chance it was found to be possible. I find the HOA/ROC station convenient for hiring ship crew as the rest of the stations in the area are all mine.

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Tue, 24. Feb 15, 08:16

BDelacroix wrote:I understand all that. I am even willing to settle with just moving the duplicate of the station to another spot so I asked on the off chance it was found to be possible. I find the HOA/ROC station convenient for hiring ship crew as the rest of the stations in the area are all mine.
Hmm, I am not quite sure (how to move a station I mean). I am assuming it would be possible, though - you just have to copy the station's codes over to another NPC build spot, basically.

Have a feeling UniTrader would know more about how to do this.

John McG
Posts: 553
Joined: Wed, 29. Dec 04, 19:08
x4

Post by John McG » Sat, 28. Feb 15, 08:42

Is there an easy way of adding wares to a factory in a saved game file?
Thanks

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Wed, 4. Mar 15, 10:43

John McG wrote:Is there an easy way of adding wares to a factory in a saved game file?
Thanks
Looks like you got a reply in your thread about this:
http://forum.egosoft.com/viewtopic.php? ... 49#4500949

Lemme know if you have any questions regarding what Yorrick posted :)

nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 » Wed, 4. Mar 15, 11:01

@John: I expect it to be possible to use the save game editor for that in a week or so.
Save game editor XR and CAT/DAT Extractor
Keep in mind that it's still a work in progress although it's taking shape nicely.

If anyone is interested in a new save game editor for X4 and would like to contribute to the creation of one let me know. I do not have sufficient time to create it alone, but if there are enough people who want it and want to contribute we might be able to set something up.

harokyang
Posts: 106
Joined: Tue, 31. Mar 15, 11:27
x4

Post by harokyang » Tue, 31. Mar 15, 11:33

In my game, the new DV Shipyard in Extinct Torch is not finished, and the CV was missing
Is there any way I can modify the savefile to help finishing the station?

User avatar
Simoom
Posts: 1110
Joined: Sat, 30. Oct 10, 14:14
x4

Post by Simoom » Sat, 7. Nov 15, 20:32

harokyang wrote:In my game, the new DV Shipyard in Extinct Torch is not finished, and the CV was missing
Is there any way I can modify the savefile to help finishing the station?
If the CV weren't missing, you can locate the particular CV (search for its crew members' names) in the save game file and manually add wares to the CV, so it can proceed with construction.

If the CV were missing though... I am not sure. One thing you could try is locate the unfinished station in the save game file, change its ownership to you, and load up the save game then try assigning a CV to it (I believe it is now possible for players to replace a lost CV for a station, but whether or not this will work on an NPC station that had an ownership changed, I am not sure).

If the game allows you to assign a new CV to the station though, you can then change the CV and station ownership back to the original faction, and construction should continue.

MustafaAli
Posts: 39
Joined: Sat, 7. Jan 12, 23:04
x3tc

Post by MustafaAli » Sun, 27. Mar 16, 20:41

How to edit coordinates of ship in your fleet to different?
Spoiler
Show

<connection connection="ships">
<component class="ship_s" macro="units_size_s_ship_pirate_03_macro" connection="space" attacker="[0x1807f75]" attackmethod="lowattentionattack" attacktime="48877.123" name="Qwerty" owner="player" id="[0x1812f46]">
<listeners>
<listener listener="[0x1812f4d]" event="killed"/>
<listener listener="[0x28288f4]" event="killed tempcomponentremoved"/>
<listener listener="[0x180ffd7]" event="boostdisabled"/>
<listener listener="[0x180f113]" event="killed"/>
<listener listener="[0x20730be]" event="killed"/>
<listener listener="[0x182bcd4]" event="killed"/>
<listener listener="[0x28293f6]" event="killed"/>
<listener listener="[0x283eaf9]" event="boostdisabled"/>
<listener listener="[0x283eae1]" event="boostdisabled"/>
</listeners>
<events>
<event event="updateengineparameters" time="50034.439"/>
</events>
<movement forceposition="0" class="navigation">
<position>
<read numpathpoints="18" avoidcollisions="1">
<offset>
<position x="505.193" y="2244.971" z="19385.746"/>
<rotation yaw="174.94849" pitch="-7.42617"/>
</offset>
<velocity>
<linear x="26.6304" y="-39.4208" z="-301.267"/>
</velocity>
<acceleration/>
</read>
<write numpathpoints="18" avoidcollisions="1">
<offset>
<position x="504.139" y="2246.531" z="19397.664"/>
<rotation yaw="174.94849" pitch="-7.42617"/>
</offset>
<velocity>
<linear x="26.6304" y="-39.4208" z="-301.267"/>
</velocity>
<acceleration/>
</write>
</position>
<targetpoints>
<targetpoint refobject="[0x282f822]" behavior="default" direction="forward" avoidcollisions="1" resetroll="1" contextchangepoint="1">
<offset>
<position x="3951.052" y="-2855.918" z="-19596.969"/>
<rotation yaw="174.94849"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x2058afd]" behavior="default" direction="forward" avoidcollisions="1" resetroll="1" contextchangepoint="1">
<offset>
<position x="241.707" y="-141.874" z="-483.646"/>
<rotation yaw="-157.43239"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x181a42e]" behavior="default" direction="forward" avoidcollisions="1" resetroll="1" contextchangepoint="1">
<offset>
<position x="49783.254" y="9199.034" z="48403.07"/>
<rotation yaw="-153.3432"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x181a42e]" behavior="default" direction="forward" avoidcollisions="1" resetroll="1" contextchangepoint="1">
<offset>
<position x="23921.941" y="1935.254" z="16981.424"/>
<rotation yaw="-140.5442"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x207fc8f]" behavior="default" direction="forward" avoidcollisions="1" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.567"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x207fc8f]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.6904"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x207fc8f]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.8738"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x207fc8f]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="1"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x1809256]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x1809256]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="1"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x2069585]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x2069585]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.07508"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x2069585]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.2926"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x2069585]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.4836"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x2069585]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.6742"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x2069585]" behavior="default" direction="forward" resetroll="1" contextchangepoint="1">
<offset>
<position x="48.847" y="18.879" z="0.8108"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x205657b]" behavior="default" direction="forward" avoidcollisions="1" resetroll="1" contextchangepoint="1">
<offset>
<rotation yaw="-133.78009"/>
</offset>
</targetpoint>
<targetpoint refobject="[0x20730be]" behavior="default" direction="forward" avoidcollisions="1" resetroll="1">
<offset>
<rotation yaw="-89.75672"/>
</offset>
</targetpoint>
</targetpoints>
<flightcontrolmodel type="linear"/>
<transition/>
</movement>
<offset>
<position x="-5436.128" y="1893.588" z="8932.981"/>
<rotation yaw="-20.0443" pitch="9.20128"/>
</offset>
<drop ref="ship_small_pirate"/>
<source class="script"/>
<commander type="commander"/>
<shields>
<summary state="collapsed" parent="[0x1812f46]" connection="connection_shieldgen01"/>
</shields>
<lastglobalanimation trigger="battlestate_jumpprep" time="14999.596"/>
<gravidar range="16411.348"/>
<connections>
<connection connection="connection_cockpit01" macro="connection_cockpit01">
<component class="cockpit" macro="unit_combat_ar_cockpit_macro" connection="connection01" id="[0x1812f4b]">
<offset default="1"/>
<connections>
<connection connection="connection05">
<component class="npc" macro="character_ar_male_pilot_macro" connection="commandroomslot" name="Gil Brano" owner="player" page="10107" id="[0x1812f4d]">
<listeners>
<listener listener="[0x1812f46]" event="killed"/>
</listeners>
<offset>
<position x="-1368161152" y="1858993536" z="-4345224192"/>
<rotation yaw="-165.18744" pitch="-17.34042" roll="4.85824"/>
</offset>
<skills visible="1">
<skill type="boarding" value="1"/>
<skill type="combat" value="5"/>
<skill type="engineering" value="3"/>
<skill type="leadership" value="3"/>
<skill type="morale" value="3"/>
<skill type="navigation" value="2"/>
<skill type="science" value="1"/>
</skills>
<entity type="pilot" control="1" customconversation="1"/>
<account id="[0xed]" amount="865630091"/>
<blackboard>
<value name="$goattack" type="integer"/>
</blackboard>
<npcseed bodyparts="3643256619" bonescales="4112276705" morphtargetweights="2711100340"/>
<connections/>
</component>
</connection>
</connections>
</component>
</connection>
<connection connection="commander" id="[0x285937b]">
<connected connection="[0x2859375]"/>
</connection>
<connection connection="connection_radar01" macro="connection_radar01">
<component class="radar" macro="radar_ship_s_fighter_01_macro" connection="ship" id="[0x181208a]">
<connections/>
</component>
</connection>
<connection connection="connection_weapon_sec02" macro="connection_weapon_sec02">
<component class="missilelauncher" macro="missilelauncher_invisible_guided_mk1_macro" connection="connection_component01" lastshottime="14941.29" ammunition="1" id="[0x181207f]">
<offset default="1"/>
<render>
<parameter flags="32" value="1" owner="[0x181207f]" name="light" subname="scale4" type="glow">
<persistent start="14941.29" duration="-1" value="1" target="1"/>
</parameter>
</render>
<connections/>
</component>
</connection>
<connection connection="connection_weapon_sec01" macro="connection_weapon_sec01">
<component class="missilelauncher" macro="missilelauncher_invisible_guided_mk1_macro" connection="connection_component01" lastshottime="14941.29" ammunition="1" id="[0x181207e]">
<offset default="1"/>
<render>
<parameter flags="32" value="1" owner="[0x181207e]" name="light" subname="scale4" type="glow">
<persistent start="14941.29" duration="-1" value="1" target="1"/>
</parameter>
</render>
<connections/>
</component>
</connection>
<connection connection="connection_weapon_prim02" macro="connection_weapon_prim02">
<component class="weapon" macro="weapon_invisible_plasma_mk1_macro" connection="connection_component01" lastshottime="14994.129" ammunition="-1" id="[0x1812076]">
<offset default="1"/>
<render>
<parameter flags="32" value="1" owner="[0x1812076]" name="light" subname="scale4" type="glow">
<persistent start="14941.29" duration="-1" value="1" target="1"/>
</parameter>
</render>
<connections/>
</component>
</connection>
<connection connection="connection_weapon_prim01" macro="connection_weapon_prim01">
<component class="weapon" macro="weapon_invisible_plasma_mk1_macro" connection="connection_component01" lastshottime="14994.129" ammunition="-1" id="[0x1812067]">
<offset default="1"/>
<render>
<parameter flags="32" value="1" owner="[0x1812067]" name="light" subname="scale4" type="glow">
<persistent start="14941.29" duration="-1" value="1" target="1"/>
</parameter>
</render>
<connections/>
</component>
</connection>
<connection connection="connection_engine_main01" macro="connection_engine_main01">
<component class="engine" macro="engine_ship_s_pirate_02_main_macro" connection="conn_engine01" id="[0x283eaeb]">
<offset default="1"/>
<render>
<parameter flags="32" value="5" owner="[0x283eaeb]" name="light" subname="scale4" type="glow">
<persistent start="14941.29" duration="-1" value="1" target="1"/>
</parameter>
</render>
<connections>
<connection connection="conn_booster01" macro="conn_booster01">
<component class="enginebooster" macro="enginebooster_size_s_01_macro" connection="engine" id="[0x180ffd7]">
<offset default="1"/>
<boost recharge="49081.475"/>
<connections/>
</component>
</connection>
</connections>
</component>
</connection>
<connection connection="connection_engine_side01" macro="connection_engine_side01">
<component class="engine" macro="engine_ship_s_pirate_02_side_macro" connection="connection_engine_main01" id="[0x1812069]">
<offset default="1"/>
<render>
<parameter flags="32" value="5" owner="[0x1812069]" name="light" subname="scale4" type="glow">
<persistent start="14941.29" duration="-1" value="1" target="1"/>
</parameter>
</render>
<connections>
<connection connection="conn_booster01" macro="conn_booster01">
<component class="enginebooster" macro="enginebooster_size_s_01_macro" connection="engine" id="[0x283eae1]">
<offset default="1"/>
<boost recharge="49081.475"/>
<connections/>
</component>
</connection>
</connections>
</component>
</connection>
<connection connection="connection_engine_side02" macro="connection_engine_side02">
<component class="engine" macro="engine_ship_s_pirate_02_side_macro" connection="connection_engine_main01" id="[0x283eafb]">
<offset default="1"/>
<render>
<parameter flags="32" value="5" owner="[0x283eafb]" name="light" subname="scale4" type="glow">
<persistent start="14941.29" duration="-1" value="1" target="1"/>
</parameter>
</render>
<connections>
<connection connection="conn_booster01" macro="conn_booster01">
<component class="enginebooster" macro="enginebooster_size_s_01_macro" connection="engine" id="[0x283eaf9]">
<offset default="1"/>
<boost recharge="49081.475"/>
<connections/>
</component>
</connection>
</connections>
</component>
</connection>
</connections>
</component>
</connection>

User avatar
J. Spartan
Posts: 409
Joined: Fri, 18. Nov 05, 12:22

Post by J. Spartan » Mon, 28. Mar 16, 23:35

Is there any way to advance a savegame to a new plot mission? I'm stuck at the "Wait" part of the mission where you have to go to Last Stand and fight some Xenon. Apparently, four major versions and god knows how many minor versions are not enough to fix all the bugs with this oh-so-compicated campaign /s.
"Give a man a bullet, and he'll want a gun. Give a man a gun, and he'll be giving away the bullets."

Post Reply

Return to “X Rebirth - Scripts and Modding”