X4: Foundations

X4: Foundations

Not enough ratings
How to break X4
By PyroChiliarch
How to make the game do funky stuff
   
Award
Favorite
Favorited
Unfavorite
What i'll teach you
Give yourself a billion credits!

Make every gas cloud full of methane!

Modify Rep with the major races! (Including Xenon!?)

If you have difficulty with any part of the Guide, please mention exactly which part so i can update it and make changes.
Getting Setup
You will need:

A Text Editor
Recommended is Notepad++
You can use a different one, but the instructions are for notepad++

Turn off compressed saves
X4 will try to make saves smaller but this will also make it so that we cannot edit them
Press ESC
Goto Settings > Game Settings > Savegame Compression (Experts)
Turn it off

Make a backup of your save
This is important, even if you know what you are doing.
If you make a mistake you want to be able to restore this backup.
Go to your save folder, mine was located here
C:\Users\PyroChiliarch\Documents\Egosoft\X4\87735275\save
make a copy of the save you are going to edit and either save it some where safe or rename it.
I prefer to rename my backups and keep them in the same folder for ease of use.

To restore this backup. move it back and make sure its named correctly.
if the original file was named save_001, make sure its name is save_001 !







Money
You want cash?
Money is will answer all your problems?
This is how you do it.

Near the top of your save you will see a line similar to this.

Its pretty self explanatory, i have 20,000 credits but yours will be different.
Change the money= to what ever you want.
examples.

300 Million credits
<player name="Val Selton" location="{20004,310011}" money="20000"/>
to
<player name="Val Selton" location="{20004,310011}" money="300000000"/>

or

10 Billion credits and a name change
<player name="Val Selton" location="{20004,310011}" money="20000"/>
to
<player name="Val Selton" location="{20004,310011}" money="10000000000"/>

You will also need to change another location but this will be a bit harder to find.
The structure of the save file goes like this:
1 Save information
2 General Player Information
3 Mods Installed
4 Blacklists
5 Faction relations
6 Everything else...

Inside of faction relations there will be an area similar to this.

This is where the game stores your relations with other races, why are we here? Because your player account is stored here.
<account id="[0x80]" amount="20000"/>
So same as before, change the amount= to the same as the previous one.

example
<account id="[0x80]" amount="20000"/>
to
<account id="[0x80]" amount="300000000"/>

or

<account id="[0x80]" amount="20000"/>
to
<account id="[0x80]" amount="10000000000"/>

Now your filthy rich!, you can buy whatever you want!
Only, it doesn't actually work like that. Sure you can go and buy a nice fully fitted destroyer or 2, but the shipyards can only build so fast, and they only have so many supplies to build ships.
If your in a fresh game where the economy hasn't started you will probably be in struggle street building your 500 strong carrier fleet of doom!
Minerals and lots of Gas
So you decided to leave your game running for 48 in game hours to get the economy rolling.
Only problem is HOP is running out of methane and cant keep pushing into Argon space.
Who knew what made their destroyers so strong was the flatulence powered travel engines?!?!?

To increase the resource fields yield so that the Paranid don't have to rely on natural gas, follow these 3 easy steps!

1 Open the find and replace menu using Control+H
and change the search mode to "Regular expression"

2 Copy paste this into the "Find What" field
<ware ware="methane">\n<recharge max=".*" time=".*"/>
type this in the "Replace with" field
<ware ware="methane">\n<recharge max="40000" time="500" amount="40000"/>
and hit replace all


3 Copy paste this into the "Find what" field
<ware ware="methane">\n<recharge max=".*" time=".*" amount=".*"/>
Leave the "Replace with" field the same as before

Why do we do it twice?
when resource hasn't been used yet it will appear like this
<ware ware="ore">\n<recharge max="206520" time="3600"/>\n</ware>
when it has been used, it will appear like this.
<ware ware="ore">\n<recharge max="206520" time="3600" amount="10462"/>\n</ware
We want to change all of them.

If you also want to change the yield you can do it with this
"Find what" =
<ware ware="methane">\n<yield name=".*"/>

"Replace with" =
<ware ware="methane">\n<yield name="veryhigh"/>\n</ware>


New Allies
So now youve got a booming economy with all the resources you could ever need!
But you have a slight pest problem, the machines are here, invading your economy with robot like efficiency. Squashing them is easy but wheres the fun in that?

This is what you need to do to become one with the singularity!

We need to change their faction relations to the player from -1 to 1

1 is the highest and -1 is the lowest. 0 is neutral.

Faction relations are near the top of the save file and should be easy to scroll through the different races until you find the "player" race.
If this is too hard you can also use the Find menu with this
<faction id="player">
Be careful not to go too far, your looking for the first line that has this, it is repeated many times.

You need to change two lines
The first is the players relations to the xenon.

Change it to "1" to become their friend

The second is the xenon relations to the player.

Friendship has to go both ways to work.


This is a screenshot while i was docked at a Xenon Wharf.
Although the xenon will trade at your stations and you can dock at theirs i have not figured out a way to make their ships purchasable.


If you are doing this for another race in a very new game, they may not have an entry, and you may not have an entry for them.
I this case you just need to add it as if it was there all along.
You do need to be careful though to make sure it follows the same pattern.
Eg.

Changes to


Dont forget the friendship rule still applies, make sure you change both races to match each other
Eg


Now there is a bit of an issue because you completely skipped past rank 10 and 20 for whichever race you became friends with.

You wont be able to get licences, and you cant talk to a faction rep to get all the benefits.
To unlock military and capital ship equipment, add these lines to your player faction.

<licence type="capitalequipment" factions="paranid teladi argon antigone ministry holyorder scaleplate hatikvah alliance trinity buccaneers freesplit court split"/> <licence type="capitalship" factions="paranid teladi argon antigone ministry holyorder scaleplate hatikvah alliance trinity buccaneers freesplit court split"/> <licence type="militaryequipment" factions="paranid teladi argon antigone ministry holyorder scaleplate hatikvah alliance trinity buccaneers freesplit court split"/> <licence type="militaryship" factions="paranid teladi argon antigone ministry holyorder scaleplate hatikvah alliance trinity buccaneers freesplit court split"/>
see the image below for how it should look



1 Comments
Quokka 16 Aug, 2023 @ 2:56pm 
A couple of issues with this guide:
- it's out of date as of update 6.1 or earlier, since you cannot choose whether saves are compressed any more. Instead, you have to use a program such as 7zip to unpack and re-pack the save file
- your savegame will get flagged as **modified**, something that should probably be emphasized up front.
Otherwise, very helpful!