Modifying .pck files using X3 Editor

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

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

Post Reply
User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

Modifying .pck files using X3 Editor

Post by Hairless-Ape » Tue, 20. Apr 21, 01:41

I'm trying to modify one of the XML entries in a .pck file embedded in 04.cat. I have a lot of entries to change and I don't really like the text editor built into the X3 Editor,
so I'm using "Extract files" to get the .pck out of the .cat, then winrar to get the .xml out of the .pck. Then I can use an xml editor of my choice.
However, I don't seem to have any utility that will recreate the .pck from the modified xml.

What do you guys use to create the .pck file from xml ?

Thanks.
Out of my mind. Back in 5 minutes.

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Modifying .pck files using X3 Editor

Post by alexalsp » Tue, 20. Apr 21, 09:16


User avatar
Hairless-Ape
Posts: 313
Joined: Wed, 6. Nov 02, 20:31
xr

Re: Modifying .pck files using X3 Editor

Post by Hairless-Ape » Tue, 20. Apr 21, 13:46

I'm using X3 Editor 2. It's just not clear how to create a .pcx from xml using this?
Out of my mind. Back in 5 minutes.

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Re: Modifying .pck files using X3 Editor

Post by Cycrow » Tue, 20. Apr 21, 13:54

You can use the ModManager thats built into the X3 Editor 2 and create a new mod package file, and add your file into it. It'll be packed when it gets added.

then to use it in game, you need to either rename the packages files to use as a fake patch, or add it to the mods directory and select it from the launcher

while you can add the file back into the original package file, this can cause problems, especially with steam that will think the file is corrupt and redownload it again

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Modifying .pck files using X3 Editor

Post by alexalsp » Tue, 20. Apr 21, 14:24

Hairless-Ape wrote:
Tue, 20. Apr 21, 13:46
I'm using X3 Editor 2. It's just not clear how to create a .pcx from xml using this?
https://yapx.ru/v/L9N4u
Spoiler
Show
Image

Image

Image

Image

Image

Image

Image

Image

Image

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Modifying .pck files using X3 Editor

Post by alexalsp » Wed, 21. Apr 21, 17:22

There is no need to pack the file into PCK. XML takes precedence. Just put the XML in the SCRIPTS folder.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Re: Modifying .pck files using X3 Editor

Post by X2-Illuminatus » Wed, 21. Apr 21, 20:02

alexalsp wrote:
Wed, 21. Apr 21, 17:22
There is no need to pack the file into PCK. XML takes precedence. Just put the XML in the SCRIPTS folder.
That's not true for script files. In the scripts folder if there are two identically named files, one xml and one pck, the pck file will be loaded first. So either removing or renaming the .pck file is required.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Modifying .pck files using X3 Editor

Post by alexalsp » Wed, 21. Apr 21, 20:15

X2-Illuminatus wrote:
Wed, 21. Apr 21, 20:02
alexalsp wrote:
Wed, 21. Apr 21, 17:22
There is no need to pack the file into PCK. XML takes precedence. Just put the XML in the SCRIPTS folder.
That's not true for script files. In the scripts folder if there are to identically named files, one xml and one pck, the pck file will be loaded first. So either removing or renaming the .pck file is required.
I assumed that if I change the code and put the xml in the scripts folder, then the xml will be used and not the PCK.
It turns out that you need to delete the PCK file otherwise the xml will not be used ? Does this also apply to the SCRIPTS folder? :?
Last edited by alexalsp on Wed, 21. Apr 21, 20:18, edited 1 time in total.

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Re: Modifying .pck files using X3 Editor

Post by X2-Illuminatus » Wed, 21. Apr 21, 20:16

alexalsp wrote:
Wed, 21. Apr 21, 20:15
It turns out that you need to delete the PCK file otherwise the xml will not be used?
Correct.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Modifying .pck files using X3 Editor

Post by alexalsp » Wed, 21. Apr 21, 20:18

X2-Illuminatus wrote:
Wed, 21. Apr 21, 20:16
alexalsp wrote:
Wed, 21. Apr 21, 20:15
It turns out that you need to delete the PCK file otherwise the xml will not be used?
Correct.
Does this also apply to the SCRIPTS folder?

User avatar
X2-Illuminatus
Moderator (Deutsch)
Moderator (Deutsch)
Posts: 24949
Joined: Sun, 2. Apr 06, 16:38
x4

Re: Modifying .pck files using X3 Editor

Post by X2-Illuminatus » Wed, 21. Apr 21, 20:35

What do you mean with "also"? ;) I was specifically talking about the "scripts" folder.
Nun verfügbar! X3: Farnham's Legacy - Ein neues Kapitel für einen alten Favoriten

Die komplette X-Roman-Reihe jetzt als Kindle E-Books! (Farnhams Legende, Nopileos, X3: Yoshiko, X3: Hüter der Tore, X3: Wächter der Erde)

Neuauflage der fünf X-Romane als Taschenbuch

The official X-novels Farnham's Legend, Nopileos, X3: Yoshiko as Kindle e-books!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Re: Modifying .pck files using X3 Editor

Post by Cycrow » Wed, 21. Apr 21, 20:58

pck files always take precedence over xml/txt file

User avatar
alexalsp
Posts: 1820
Joined: Fri, 18. Jul 14, 05:28
x4

Re: Modifying .pck files using X3 Editor

Post by alexalsp » Wed, 21. Apr 21, 22:10

Cycrow wrote:
Wed, 21. Apr 21, 20:58
pck files always take precedence over xml/txt file
X2-Illuminatus wrote:
Wed, 21. Apr 21, 20:35
What do you mean with "also"? ;) I was specifically talking about the "scripts" folder.
Thank you. Oh my God. It is necessary to reinstall all mods and delete similar PCK files, leaving only XML. :o :lol:

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22197
Joined: Sun, 14. Nov 04, 23:26
x4

Re: Modifying .pck files using X3 Editor

Post by Cycrow » Wed, 21. Apr 21, 22:47

it depends on the mod, but most scripts add files rather than replace them, so there wont be a matching pck file

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”