Where are my custom Construction Plans stored?

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

Scoob
Posts: 11204
Joined: Thu, 27. Feb 03, 22:28
x4

Where are my custom Construction Plans stored?

Post by Scoob »

Hi,

As per title. However, to avoid confusion, they ARE NOT in /Documents/Egosoft/X4/constructionplan for my GoG version of the game. I cannot find them. I have DOZENS perfectly visible and useable in-game, but I don't know where the game has put the actual .xml file - I want to share one to report a bug.

Note: In my constructionplan folder I have just ONE, which I created FOUR YEARS ago. That's it. This plan is still listed in the game, but none of the others are. Where are they? I've googled and every response says the folder I mention above (or close, if Steam version)

Edit: Ok, something is broken here. I thought I'd try EXPORTING it again and, as it already exists it warned me about overwriting it - even though there's no file in "../X4/constructionplan" for it. I let it do this anyway and NOW it appears. So, I have to "overwrite" a non-existent file (even though it appears in-game) in order to actually create the file. So, game thought the file was there (overwrite warning) but it wasn't actually written? Where are they BEFORE I do this overwrite that's not an overwrite??

Edit 2: to be 100% clear here, here's what I did:

- I created a new Build Plan and SAVED it - it's now listed in-game.
- I went to copy it to Google Drive, so looked in .../X4/constructionplan and it wasn't there.
- I checked back in-game and there it is.
- I EXPORT it and it says it already exists, yet it does not.
- I "Allow" it to overwrite and only now is it actually there.

For some reason, I have to export again and "overwrite" the file for it to appear now? The game though the file was already there, hence the "overwrite?" dialogue, yet it seems I have to Export it and overwrite it before it appears? Where are these plans kept when the game can see them but they're not in that folder? Perhaps I used to copy them directly from there before, or something changed.
User avatar
Casishur
Posts: 2166
Joined: Fri, 1. Jul 05, 10:04
x4

Re: Where are my custom Construction Plans stored?

Post by Casishur »

there are 2 directories that are used by X4
one for the Nosteam / GoG
and one for Steam

maybe you are looking in the wrong directory?

Steam
/Documents/Egosoft/X4/1234567890*

Nosteam and GoG uses

/Documents/Egosoft/X4/

look for the file name constructionplans.xml

this was in the directory
/Documents/Egosoft/X4/1234567890*
or
/Documents/Egosoft/X4/


*random number


as I understand it, the constructionplans folder is used for importing and exporting constructionplans
CPU Typ Ryzen 9 3900x
Grafikkarte Radeon RX 7600 XT 16GB
Arbeitsspeicher: Corsair Vengeance LPX 64GB (4 x 16 GB) DDR4 3200MHz
Motherboard Name/Typ MSI B550 Gaming Plus
Win 10 64 bit

Betty : Autopilot.... hat.... total Versagt.

Twitch https://www.twitch.tv/Casishur
Scoob
Posts: 11204
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Where are my custom Construction Plans stored?

Post by Scoob »

Thanks for the reply. For whatever reason, my game doesn't appear to conform to the usual norms here.

Being the GoG version, I of course do not have the number, just ../Documents/Egosoft/X4/constructionplan.

It seems that I have to EXPORT the construction plan TWICE for it to show in the folder. The second time it prompts me to overwrite it.

If there's another location these plans are stored in, I don't know where it is. It does strike me as odd that plans are not automatically placed in this folder, the moment they are saved in-game, but have to be exported (twice) to be available for sharing or backing up.
CBJ
EGOSOFT
EGOSOFT
Posts: 54323
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Where are my custom Construction Plans stored?

Post by CBJ »

The files are only saved in that folder and there is no reason they would have to be exported twice. The fact that the second time you save it asks if you want to overwrite the file clearly indicates that it was indeed written there correctly the first time. I suspect the problem is that whatever you're using to view the folder simply isn't refreshing its cached data after the file is written, and happens to do so the second time. You might have to refresh the view of the folder (e.g. with F5) in order to see it the first time.
Good Wizard
Posts: 583
Joined: Wed, 9. Jun 21, 16:51
x4

Re: Where are my custom Construction Plans stored?

Post by Good Wizard »

Just looked it up - I also use GOG (without GOG Galaxy. so no cloud storage). I must admit, I have only two plans stored - I do not use this feature.

In my <Documents>\Egosoft\X4 folder, there is one file named 'constructionplans.xml'.

Also there is a folder <Documents>\Egosoft\X4\contructionplan\ which contains two files named like my two measly construction plans, for example 'atiyas misfortune station.xml' (don't ask).

Both files are fairly old (2021) from a very old play through. But the date on both files are very similar, so they obviously were created at the same time. It seems the 'constructionplans.xml' file in the main folder has the station data, and the files in the subfolder are the saves you create, which too seem to have the data.

It is a bit strange, since data are duplicated, I would need to experiment a bit to find out what it really does.
Scoob
Posts: 11204
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Where are my custom Construction Plans stored?

Post by Scoob »

CBJ wrote: Wed, 3. Jul 24, 23:31 The files are only saved in that folder and there is no reason they would have to be exported twice. The fact that the second time you save it asks if you want to overwrite the file clearly indicates that it was indeed written there correctly the first time. I suspect the problem is that whatever you're using to view the folder simply isn't refreshing its cached data after the file is written, and happens to do so the second time. You might have to refresh the view of the folder (e.g. with F5) in order to see it the first time.
Currently, I have over 20 Construction Plans listed in the game. The folder however, only shows two - that original one and the "overwritten" one from today. This is the case after multiple reboots. The files exist in-game, but not in that folder. Only when I do an export and click "Yes" when asked if I want to overwrite do they appear. The Game thinks there's something already there to overwrite, yet there clearly is not.

I just have regular Windows 10 Pro, activated and up to date, I'm not using any third-party file managers, just regular Windows Explorer. I've certainly seen issues with file lists not being refreshed before, but that was exclusively on Network - not local - drives.

When I get time again, I'm going to go through Exporting more of the Constructions plans and see if they too only appear after an "overwrite". Look, I know how to get them to reliably appear now, export them again and say yes to overwrite, so I'm good. I just find it a little weird that the game thinks a file is there and Windows - after multiple reboots remember - does not. I even checked for hidden files etc. just in case, but they ain't there until "overwritten". Will have another tinker tomorrow perhaps if I get time. I'm not totally ruling out some weird Windows issues, but my testing thus far seems to confirm that the files are not there initially, only when Exporting and "overwriting" do they actually appear.

Btw: I'm assuming here that ../Documents/Egosoft/X4/Constructionplans.xml is ALL my construction plans in one large (well, 668KB lol) file, while exporting creates individual files for easy sharing. It's the whole being asked to "Overwrite" when there was no original copy of that Construction Plan in the constructionplans folder that sorta threw me here. I'd assumed it was perhaps just a UI error, where I'm being asked to overwrite, even if it's the first export of that file? I will test with more plans, and see if I can confirm that.
CBJ
EGOSOFT
EGOSOFT
Posts: 54323
Joined: Tue, 29. Apr 03, 00:56
x4

Re: Where are my custom Construction Plans stored?

Post by CBJ »

Scoob wrote: Thu, 4. Jul 24, 00:16 Currently, I have over 20 Construction Plans listed in the game. The folder however, only shows two - that original one and the "overwritten" one from today. This is the case after multiple reboots. The files exist in-game, but not in that folder. Only when I do an export and click "Yes" when asked if I want to overwrite do they appear. The Game thinks there's something already there to overwrite, yet there clearly is not.
The game asks the file system, so it's the file system that thinks the file is there. And if the file system thinks it's there, then clearly it is there.
adeine
Posts: 1458
Joined: Thu, 31. Aug 17, 17:34
x4

Re: Where are my custom Construction Plans stored?

Post by adeine »

It sounds like the confusion here is this.

The game keeps all the construction plans in constructionplans.xml in Documents\Egosoft\X4, this is the only file the game interacts with. Only plans you explicitly export (or want to import) go in the constructionplan folder (the game is otherwise completely unaware of files in there). The additional confusion here is that when you export a plan, it also saves the plan. So if you retype the same name, it will ask you to overwrite the plan saved in constructionplans.xml. If you give it a different name, it will still save to the constructionplan folder, but also save it as a new entry in constructionplans.xml. You will end up with a duplicated build plan in game.

As I said in the linked thread, it's a little convoluted/clunky.
Scoob
Posts: 11204
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Where are my custom Construction Plans stored?

Post by Scoob »

CBJ wrote: Thu, 4. Jul 24, 00:37 The game asks the file system, so it's the file system that thinks the file is there. And if the file system thinks it's there, then clearly it is there.
That sounds perfectly fair, but it's not what's happening. You can have a Plan that's NEVER been exported, yet you go to export it for the first time and you will be prompted to overwrite it. I think what adeine says is spot on, assuming I've understood correctly.

Basically, create a Construction Plan and save it as normal - it's added to constructionplans.xml, the timestamp of the file will be updated accordingly. No separate file is created in ../Egosoft/X4/constructionplans at this time, as expected. Now if you Export that Plan, you will be prompted to Overwrite. Plan hasn't been changed, constructionplans.xml has no need to be updated, there's definitely not already a file in ../Egosoft/X4/constructionplans, you're just exporting it for the first time, yet you get prompted to "Overwrite".

Conversely, if you go to a station at random - I picked my HQ in its current state - where you've not saved a plan for it and then Export, you get no overwrite prompt.

I'm pretty sure this Overwrite prompt is NOT referring to the Windows file. I can categorically say that there was NO file to overwrite in my original example.

Hope I'm being clear here, the FIRST time I export a NEW Plan that's already been saved in the Build menu, I will get an Overwrite Prompt yet there is 100% no Windows file to overwrite.
Nanook
Moderator (English)
Moderator (English)
Posts: 28252
Joined: Thu, 15. May 03, 20:57
x4

Re: Where are my custom Construction Plans stored?

Post by Nanook »

Scoob wrote: Thu, 4. Jul 24, 17:32...

Hope I'm being clear here, the FIRST time I export a NEW Plan that's already been saved in the Build menu, I will get an Overwrite Prompt yet there is 100% no Windows file to overwrite.
You're not 'listening' to what adeine said. As the plan has already been saved in the constructionplans.xml file itself, it's asking if you want to overwrite that file, not the actual construction plan in the constructionplans folder. Just to reiterate, saving it in the build menu saves as an entry in the constructionplans.xml file. Exporting the plan saves it as a separate file in the construction plans folder as well as an entry in the .xml file. The prompt you get to overwrite is for overwriting the .xml file. And yeah, it is a bit "clunky".

So in answer to your first question in the OP, look in the constructionplans.xml file for your 'missing' plans. :wink:
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.

X4 is a journey, not a destination. Have fun on your travels.
adeine
Posts: 1458
Joined: Thu, 31. Aug 17, 17:34
x4

Re: Where are my custom Construction Plans stored?

Post by adeine »

Nanook wrote: Thu, 4. Jul 24, 19:22
Scoob wrote: Thu, 4. Jul 24, 17:32...

Hope I'm being clear here, the FIRST time I export a NEW Plan that's already been saved in the Build menu, I will get an Overwrite Prompt yet there is 100% no Windows file to overwrite.
You're not 'listening' to what adeine said.
I believe that was in response to CBJ's comment, not missing what I said. :)
Nanook
Moderator (English)
Moderator (English)
Posts: 28252
Joined: Thu, 15. May 03, 20:57
x4

Re: Where are my custom Construction Plans stored?

Post by Nanook »

adeine wrote: Thu, 4. Jul 24, 19:31...
I believe that was in response to CBJ's comment, not missing what I said. :)
Considering that CBJ's and Scoob's posts were made more than four hours apart, I believe Scoob 'missed/didn't listen to' what you said. So I just reiterated it. :wink:
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.

X4 is a journey, not a destination. Have fun on your travels.
Scoob
Posts: 11204
Joined: Thu, 27. Feb 03, 22:28
x4

Re: Where are my custom Construction Plans stored?

Post by Scoob »

Nanook wrote: Thu, 4. Jul 24, 19:22 You're not 'listening' to what adeine said. As the plan has already been saved in the constructionplans.xml file itself, it's asking if you want to overwrite that file, not the actual construction plan in the constructionplans folder. Just to reiterate, saving it in the build menu saves as an entry in the constructionplans.xml file. Exporting the plan saves it as a separate file in the construction plans folder as well as an entry in the .xml file. The prompt you get to overwrite is for overwriting the .xml file. And yeah, it is a bit "clunky".

So in answer to your first question in the OP, look in the constructionplans.xml file for your 'missing' plans. :wink:
Erm, isn't that what I said? CBJ said that the game would not ask to overwrite on export if the file wasn't there, I'm saying the individual export file indeed WASN'T there, yet the game asked to overwrite so I speculated it was talking about overwriting the entry in constructionplans.xml. I was agreeing with adeine :) Sorry if that wasn't clear.

Basically, I create a new Construction Plan called "TEST" and save it normally (to all-plans constructionplans.xml of course). I then decide I'll like to SHARE it, so I EXPORT it for the first time. When I click "Export" it asks if I want to overwrite. It cannot be asking about the Windows file - the one about to be created in ../Egosoft/X4/constructionplans as no file named "TEST" exists yet. I.e. this isn't some "windows no refreshing file list" issue.

My original issue was basically that I wanted to Share a Plan - to aid in a bug report - and when I went to export it for the first time it asked about overwriting it. This suggested to me that it was already exported - else why ask about overwriting - yet it was not. This go me a little confused as I then got concerned about overwriting something I perhaps didn't want to. Now I understand how it works and that "overwrite" message does not apply to the Exported file necessarily, certainly not on that initial export, I'm all good with this. It is a slightly miss-leading message, and it did make me worry about overwriting stuff inadvertently as I'd not done a backup lately.

I did get a little confused initially as I thought I'd exported more Plans than were present, so when the folder had just ONE plan in it, that threw me too. Of course, it specifically didn't have the plan it was asking me to overwrite on Export.

It's all good now. I guess I need to proof-read more to ensure I'm as clear as possible. Dipping in and out of the forum every few hours, as time permits, is what I'll blame it on lol.
Nanook
Moderator (English)
Moderator (English)
Posts: 28252
Joined: Thu, 15. May 03, 20:57
x4

Re: Where are my custom Construction Plans stored?

Post by Nanook »

So, for anyone else reading this thread and perhaps being a bit confused, here's how it works:

1. When you create a construction plan and save it, it goes as an entry into the constructionplans.xml file along with all the others you've created.

2. When you export a construction plan, it also is entered into the same file, as well as creating an individual file in the construction plans folder that can be shared with other players.

3. If you've already saved a plan, and then decide to export it, it will save it as an individual file per 2, and try to save it as an entry in 1. If the game detects it as a current entry in 1, it will prompt you to overwrite it.

4. If you've already exported it, 3 still applies, but it will also overwrite the individual file if you say "yes".

Hope that helps clear things up. :)
Have a great idea for the current or a future game? You can post it in the [L3+] Ideas forum.

X4 is a journey, not a destination. Have fun on your travels.

Return to “X4: Foundations”