Increasing the number of ship slots available for modding of X2-The Threat
Version 00.10b

How to do

1. Backup the files \x2\l\x2story.obj and \x2\l\x2galedit.obj

2. Copy the program to folder \x2\l where the obj-files are located.

3. Run the program. Open the file x2story.obj.

4. Each line of the table corresponds to the line of TShips.txt.
   You can select any ship you like and alter its type field using the mouse or
   keyboard. The type you select defines the actual class of the ship. You can
   also increase the number of available ships up to 314 using the topmost
   field  and edit additional ships that will immediately appear in the table. 

5. When you finish with editing, don't forget to save the obj-file

6. Rename saved file to x2story.obj, if you've altered the name.

7. Edit TShips.txt, add new ships there if necessary, etc. Don't forget to
   change ship classes there too. Don't forget to set the very first line
   of TShips.txt to total amount of ships. If you've altered the shields
   for LaserTower/Satellite/Station, please check and adjust the size and
   type of its cargobay.

8. Correct 440001.xml or xml-file of your mod to have there in page 17
   the names of added ships .

9. It's good idea to create an ini-file, that will store absolutely all the
   changes you've made to x2story.obj and can be used later to apply same
   changes to number of other obj-files. Run ptch10.exe and open x2story.obj
   you've just edited. Press the button "Generate ini-file". It will create
   file ptch10.ini. It is strongly recommended not to alter the content of
   this ini-file since it may lead to bugs that will be hard to locate.

10.Same changes you've made to x2story.obj you'll need to repeat to
   x2galedit.obj. After this is done, all new ships will appear in galaxy
   editor. You can either edit x2galedit.obj same way you've done x2story.obj
   or just automatically patch it using the file ptch10.ini you've created
   during the previous step by executing the command:

   ptch10.exe x2galedit.obj x2ge.obj

   This will create the file x2ge.obj with exact changes you've already made
   to x2story.obj. Then rename x2ge.obj to x2galedit.obj.

That's all :) You can try to start the game or load your save and test changed
or new ships :)
There is however a suspicion that other obj-files also needs to be patched
same way. But it seams so far it is not necessary. Try to play the game ;)
Most important, try to play through all the missions, we haven't tested
compatibility with all of them yet.



REALISING YOUR MOD for other people 

There are two options:

1. You can include x2story.obj and x2galedit.obj with your mod and ask end user
to overwrite original obj-files with your files. However, it would be much
better to pack obj-files to cat/dat together with all other files of your mod.
Just don't forget to put them to folder "l" first. This method is checked and
works very well. No need to ask users to unpack their game if you've packed
obj-files to dat.

2. Create a bat-file that you can include together with files ptch10.ini and
ptch10.exe into your mod and ask end user to execute it to patch his obj-files.
Also his game should be unpacked first to allow obj-files to be patched.
An example of a bat-file is attached, see xptch_en.bat. This command file will
run ptch10.exe in quiet mode, no windows will popup. A number of error-codes
can be returned and handled if necessary (see xptch_en.bat for example).


   
REMARKS

1. The size of obj-file is slightly increases after its editing no matter
you've added new ships or not.

2. The program can open already edited obj-files and will show all the changes
that are already done to them. You may continue your work :)

3. You can set the amount and type of shields for Laser Towers and Sattelites
that game will automatically install upon creation of these objects.
For stations you can also specify the default amount of shields.
This amount will be used by game if there is no amount of shields specified
in galaxy map file (i.e. x2_universe.xml).



LIMITATIONS:

Only 200 additional ships can be added to TShips. However, it is possible
to use in mod a number of ships not used in original game. Those ships are
for instance:
SS_SH_X_TS_P, SS_SH_S_TS_P, SS_SH_P_TS_P, SS_SH_B_TS_P, SS_SH_T_TS_P
SS_SH_E_TS, SS_SH_E_M1, SS_SH_E_DRONE, SS_SH_E_SPACESHUTTLE, SS_SH_E_CARRIER

It is already verified the above 10 ships work with no problems or conflicts
with storyline.



Many thanks to pilots DF, Blueboar and Shaddie from elite-games.ru forum
who have done a titanic work for digging up the structure of obj-files
of X-Tension.



Version History

00.06b:
+ The number of additional ship slots is increased to 200
+ It's possible now to enable the docking of TS and TP ships to M2
+ It's possible now to enable the docking of any ships of SMALL_SHIP class (M3,M4,M5) to M6
+ You can set the amount and type of shields for Laser Towers, Sattelites and Stations.

00.07b
+ No need to start a new game to have the changes of ship classes to take effect!
No need to start a new game to have new ships active in old game!

00.08b
+ Add M0 class ship

00.09b
+ Up to 30 missiles
- bug removed

00.10b
+ Up to 31 missiles
+ Add 7 lasers
- bug removed

Best regards,
CheckerTwo.

May 2005
