I was on day 2 of building a mega-PHQ in a new game for terraforming purposes, since my old game PHQ was a dog's breakfast not worth salvaging, and I suddenly had one of those thoughts that usually lead to hours of frustration.
What if the game could build your PHQ design at the start?
It did take hours, and a lot of help from Unitrader on the X4 Modding Discord chat server, but the serious OMFG! moment when I started a new game and there it was, was truly worth the experimentation and frustration that went with it.
Now, before anyone says this is a cheat, well of course it is. But I've played the game building my own closed loop shipyard and hull parts and claytronics complex, and I've done all the building and all the gathering, and I'm done with it.
Terraforming is a whole new endgame. And what I had wasn't what was needed. After a week and 2 attempts to build what I needed, and only getting half way on the second attempt, I had this epiphany.
So this is for those like me who have been there, done that, got the t-shirt, and are only now interested in playing the new endgame that came with v4. Or anyone who just wants to start with a functioning PHQ for whatever reason and self-justification you have.
So, how do you do it?
Step 1. Build your dream PHQ inside the game. Save the construction plan. Export the construction plan.
Step 2. In Documents-Egosoft-X4-*Your game number*-constructionplan, you'll find your construction plan. Open it in Notepad++ or some other xml editor.
Step 3. Open a new xml document. Copy the code below to create a diff file, so we can replace the PHQ's plan with another one.
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<diff>
<replace sel="/plans/plan[@id='x4ep1_playerheadquarters']">
<plan id="x4ep1_playerheadquarters" name="{20102,2011}">
####
</plan>
</replace>
</diff>
Step 5. [If you have a mod already, ignore this.] Create a folder in X4 Foundations-extensions called something like Custom PHQ. In there create a folder called libraries. Save constructionplans.xml to this folder.
Step 6. [If you have a mod already, ignore this.] Create a new xml file and put this code in it:
Code: Select all
<?xml version="1.0" encoding="iso-8859-1"?>
<content id="CustomPHQ" name="CustomPHQ" description="CustomPHQ" author="apricotslice" version="001" date="2021-05-10" save="0">
<text language="7" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
<text language="33" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
<text language="34" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
<text language="39" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
<text language="44" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
<text language="49" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
<text language="86" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
<text language="88" name="CustomPHQ" description="CustomPHQ" author="apricotslice" />
</content>
Step 6. Start X4, check to see your new mod is listed and ON in the extensions section of settings , and start a new game. When the PHQ is created for the first time, it will use your plan, and contain every module you specified.
If the game start you used gives you the PHQ immediately, you should see it from your ship. Otherwise you need to do the PHQ plot to find out if it works. Once you have it, you need to give it a Manager, and if it contains a shipyard, a Ship Dealer. Then you need to talk to the Boron about research.
If you went like I did for the closed loop Shipyard with an insane amount of firepower protecting it, all you need do now is feed it resources and wait for the production cycles to build enough of everything to finally build a ship. This will still take a while, but at least you didn't have to build the station first.
Warning : This does Mod your game, and removes some of the online options.
Someone tell me if I missed anything.
Go to it, good luck.
ETA: Don't forget when building mega complexes, you can highlight a section of what you've already done, copy it, and place that copy wherever you want. For example, if you build storage all in a single level, you can copy the entire level, and place it on an up post above where the first level is. Or below. The only downside is graphics power once you start moving hundreds of modules at once. But it is worth trying to do.