[Tutorial] Copy/Paste ships from a mod to another

The place to discuss scripting and game modifications for X²: The Threat.

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

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

[Tutorial] Copy/Paste ships from a mod to another

Post by Serial Kicked » Tue, 20. Sep 05, 23:01

Here's a small tutorial to teach you how to copy and paste ships from a mod to another. Beware, it's a rather complex task. You'll need to know how to use tools from DoubleShadow. For any issue concerning those software, contact the author or ask in the related thread, not here.

:arrow: Software Needed

- X2 Editor v0.0.37
- X2 Archiver or X2 ModManager
- Patch10


:arrow: Used Mods in this example

- DeadlyDa's SSG mod [called here "source mod"] (with the ships you want to add)
- Terradine mod [called "target mod"] (where you want to add ships)


:arrow: Mod installation

As you do not want to break you nice X² installation folder, the first thing to do is to create an independant folder (ie. "c:\mymods"). Install both the target and the source mods there. The important files are the files with a .cat and a .dat extension. They are located in the mods folder.


:arrow: Extracting files from .cat/.dat archives

If you use X² Archiver. Go in the Mods folder. Right click on each .cat file and select "Extract Here" in the menu that appeared. It will make two sub folders with a buch of files inside.

It seems that X² Archiver has some issues when decompressing some archives. If you have this problem, use X² ModManager from Doubleshadow to extract the files.


:arrow: Hacking x2story.obj to add new ship slots to the target mod

You will have to use Patch10 here. The first thing to do is to open l\x2story.obj from the target mod. A window like this should appear :

[ external image ]

The first thing to change is the total number of ships (in the small box). Increase the number by one to add a new ship slot. A new line will be added in the last line of the list. You'll have to choose the class (M2,M1,M5,TL,...) for your new ship here. You can also see that Patch10 has assigned an "Ident" string to your new ship (like SS_SH_X_M5. Write down this string, you will need it later.

When you are done adding ship slots, save your l\x2story.obj file in the same folder (target mod).


:arrow: Copying ship spec. from a mod to another

Here you'll have to use X² Editor. Launch TXT Editor and open the file types\TShips.txt from the source mod. You will have a windows like this one :

[ external image ]

In the left column, select the ship you want to copy. Do a right click on it and select "Copy". This done, open the same filetypes\TShips.txt from the target mod this time. Scroll down the left column, do a right click and select "Paste". A window will appear :

[ external image ]

Choose "No" to add the new ship at the end. A new entry called "NEW_OBJECT_1" will appear. Select it. The first thing to do is to change its ID with the string you've wrote down when you were using Patch10. Be sure the class ship is the same you have chosen. You can also modify ship specs here. And you'll probably have to do so as mods have very different ship specs from a mod to another. Check also "Turrets" and "Guns" tabs to be sure your ships have guns. If one of the two mods use new weapons, you'll probably have to modify the datas in the "Front Lasers" tab.

This done, click on "More Info" tab. write down the number in front of "Description". If the number is already used by another ship, you'll have to change it. We'll need it to give a name and a description to the ship in the new mod.

Finally, save your types\TShips.txt file.


:arrow: Copying ship models

Here you will have to copy files from v and cut folders (depending of the mod maybe there is also a tex folder to copy). Two ways to do it :

- Check in the ship datas the .bob and .bod files need for your ship and copy them from the source mod to the target mod.

- Brute Force method (easier for noobs or to copy a bunch of ships). Simply copy all .bod and .bob from the 'source mod' to the 'target mod' folder.

:arrow: Giving a name and a desc. to you ships

Launch "Text Resource Editor" from X² Editor. Click on "Open", go to the t folder from the target mod. Open the file .xml file related to your language (44xxxx is english).

[ external image ]

Check for a part called "Boardcomp. objects" in the left column. Click it. It the list that appear, right click and choose "Add Text...". A window opens :

[ external image ]

Type in "ID" the number you've written down when using TXT editor. Type in "Text" your new ship's name.
Repeat the operation. But this time, increase the ID number by one. And put the description of your ship in the textfield.

Save.


:arrow: Packing the new mod

The last thing you have to do before playing. Go in target mod's main folder with explorer (with a bunch of subfolders v,cut,types,..). Right click / New File / X² Archive.

Two files will be added : 01.cat and 01.dat.

Select all files (and subfolders) except those two. And move and drop them over 01.cat. X² Archiver will show you a progress box when packing the files.

This done, rename .cat and .dat files the same way they are called in the target mod. Replace old dat/cat files.

Install your new mod into X² and play.


:arrow: Misc.

- Ship specs. can dramatically change from a mod to another. Keep that in mind. You'll probably HAVE to change ship spec. (speed, turning rate, shields, hull, weapons) to have fully playable ships.

- You'll need to script in your new ship except if you also edit the map with a galaxy editor.

- You have to ask ship/mod authors for a permission before posting your modified mod on the web.

Good luck !

---
To modders : Feel free to correct me if i'm wrong somewhere. I'll correct the tutorial.
---
Last edited by Serial Kicked on Sat, 24. Sep 05, 15:33, edited 1 time in total.
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

keitherwild6
Posts: 44
Joined: Sun, 12. Dec 04, 17:39
x2

Post by keitherwild6 » Tue, 20. Sep 05, 23:13

Great Turtorial!

Er, now i need a tutorial that is as smooth as yours about modifying the ship properties is there a good one about?

User avatar
TSM
Not a Moderator
Posts: 2947
Joined: Thu, 1. Jul 04, 12:31
x4

Post by TSM » Tue, 20. Sep 05, 23:31

This is worth of being put in the script and modding sticky, nice job Serial Kicked :roll:
FAQ's Egosoft Interactive FAQ
Egosoft Wiki

User avatar
Burianek
Posts: 2981
Joined: Mon, 29. Dec 03, 03:29
x3tc

Post by Burianek » Wed, 21. Sep 05, 05:49

Linked. :)
Thanks.
"Nature's first green is gold" . . . stay golden.

Elwood J Blues
Posts: 192
Joined: Sat, 14. Aug 04, 13:08
x3tc

Post by Elwood J Blues » Wed, 21. Sep 05, 06:25

This is the one you replied about in my thread isn't it? Understood well. It's in ENGLISH!

Elwood.

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Wed, 21. Sep 05, 06:31

thanks guys :)

@Elwood J Blues : Right, this is the one.
(yup and i'm not english :p)
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

Elwood J Blues
Posts: 192
Joined: Sat, 14. Aug 04, 13:08
x3tc

Post by Elwood J Blues » Wed, 21. Sep 05, 06:33

I mean it's not tech talk.

Elwood.

User avatar
Mik71
Posts: 14
Joined: Fri, 10. Jun 05, 18:29
x3

Post by Mik71 » Wed, 21. Sep 05, 18:11

Great work Serial Kicked, im having a slight problem though buddy. im trying it with the same mods in your tutorial but when i try to extract the .cat file from Deadly's mod i get an error message "SSG-PE-V0.3.7e.dat is not a valid integer value". Note that it refers to the file as a .dat even though it's showing as an x2 archive(still shows the .cat extension in Winrar). The terradine .cat file extracted no problem and created it's subfolder.

Hopefully im not missing something simple. Any advice would be greatly appreciated as im desperate to get the Osprey Mk2 into terradine.

Thanx

User avatar
Mik71
Posts: 14
Joined: Fri, 10. Jun 05, 18:29
x3

Post by Mik71 » Wed, 21. Sep 05, 18:17

My apologies :oops: just read your first paragraph again. I'll contact Deadly for advice.

Sorry

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Sat, 24. Sep 05, 15:36

@Mik71 : In fact it seems that X² Archiver contains a bug. I've updated the tutorial and included a link to X² ModManager from Doubleshadow. :)
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

Galaxy613
Posts: 3285
Joined: Tue, 28. Dec 04, 02:19
x4

Post by Galaxy613 » Sat, 24. Sep 05, 17:37

Great job Serial! This will help many a new X2 Modder! :D
10,000 Lightyears of awesomeness

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Sat, 24. Sep 05, 17:51

thanks :)
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

Harlock776
Posts: 2261
Joined: Wed, 9. Mar 05, 21:53
x2

bugs

Post by Harlock776 » Sat, 24. Sep 05, 23:48

What bug is there in X2archiver? I used it atleast a thousand times between the first time I used it with v1.0 of my mod and the last time I used it with v2.0 of my mod and never had any trouble except when trying to unpack the 1.2 patch cat&dat files from the game.

rustybucket
Posts: 314
Joined: Mon, 2. Aug 04, 08:25
x3

Post by rustybucket » Mon, 26. Sep 05, 03:18

How do you manage the bod and cut image files, when you run into a conflict? Ideally i would like to rename the files to prevent problems, but I am not sure how to edit the ship models.

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Mon, 26. Sep 05, 05:48

Here's a PM doubleshadow sent me :
doubleshadow wrote:There can be potential problem with x2Archiver: The format of .cat file is

Code: Select all

name_of_dat_file
file_entry1 size
file_entry2 size
file_entry3 size
...
but all three standard catalogs supplied by egosoft have name_of_dat_file == "01.dat" even in 02.cat or 03.cat (not sure about 04.cat). X2MM is always storing the correct name of the dat file (althought it's not used). Maybe X2Archiver want to have 01.dat written at the 1st line all the time. But that's not truth as I can extract all catalogs created with my X2MM.
So as you see it's still unsure. But as some people had issues when decompressing Deadly's mods with X² Archiver i've put a link to X²MM here.

@rustybucket: Dunno sorry. You probably have to change the ship' stats with TXT Editor and rename the .bod/.bob with the new name you've given to it. Probably one of the modders can answer.
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

JonusITA
Posts: 3443
Joined: Mon, 21. Jun 04, 15:13
x3

Post by JonusITA » Mon, 26. Sep 05, 19:48

great job :D

StormSinger
Posts: 89
Joined: Tue, 15. Mar 05, 18:04
x4

Post by StormSinger » Tue, 27. Sep 05, 10:30

rustybucket wrote:How do you manage the bod and cut image files, when you run into a conflict? Ideally i would like to rename the files to prevent problems, but I am not sure how to edit the ship models.
I'm not exactly sure what you mean by "edit" in this case. But if you're just looking to add models from one mod to another (without overwriting the originals), then all you have to do is re-number the .bob files. I have a "messing around" mod that has 166 ships in it. All I did was change the numbers of the .bob files in the cut folder, and follow the other directions at the beginning of this thread.

PHOENIX_X
Posts: 354
Joined: Sat, 23. Jul 05, 01:20
x3

Post by PHOENIX_X » Fri, 30. Sep 05, 02:54

good job,

but I have a problem, I already copyed some ships from Deadlys mod and then I wanted to copy the enterprise model from the Top Gun Mod 2 from Harlock776. I did like you said but after I did the noobway of copying the V and cut files all the ohter ships were effected to so a disco is now a M1 from a noter mod. Can anyone tell me how to copy the right v and cut files just for this model? I dont know what to look for and where I can make out the name.

ALBE2910

User avatar
Serial Kicked
Posts: 3823
Joined: Fri, 12. Aug 05, 20:46
x3tc

Post by Serial Kicked » Fri, 30. Sep 05, 11:24

Thanks

Ok, i can't do this right now but i'll modify the tutorial to explain the other way a bit better :)
X3:TC/AP Pirate Guild 3 - Yaki Armada 2 - Anarkis Defense System

Anarkis Gaming HQ
Independent Game Development
X3 Scripting and Modding Station

jwt22
Posts: 37
Joined: Thu, 12. Jan 06, 09:46
x4

Post by jwt22 » Thu, 20. Apr 06, 09:02

X2Patch09b help
I never feared death or dying
I only fear never trying

Post Reply

Return to “X²: The Threat - Scripts and Modding”