How to add completely new stuff to the T files

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

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

marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

How to add completely new stuff to the T files

Post by marklaverty » Fri, 18. Jun 04, 18:56

As a by prodct of the mod I'm doing I' managed to add completely NEW stuff by adding new lines to Tfactories, Twares and T docks and messing with teh 440001 and 440002 xml files....

It works, nothing goes wierd, and they appear in the game as brand new items.

Should work for any T file.. enjoy :D



First unpack the highest numbered dat file and get the 440001.xml, 440002.xml and the Tfile your interested in.

1) Go into the 440002.xml file and find a free text refrence number. About half way through the file there is a ruddy great list of numbers, just pick a free one.

note down the number, and then create a new line for it in order with the other numbers.(It'll make sense when you see it...)

2) choose something similar to what you want to create to use as a template ( a ship, station, weapon etc.)

2) Go into the 440001.xml file. Find the description for the item you want to use as a template and note its text 'refrence number'

Also set up a title and description in the same format as the other things in there for the new item you are creating. Use your new number that you chose in step 1 as the text refrence. Make sure you create it in numerical order and in the same format as the other stuff in there.

Names of Ship/stations end in 1, their descriptions end in 2, Names of wares end in 3, thier descriptions end in 4.

eg.

3551 'chocolate factory'
3552 'this factory makes chocolate'
3553 'chocolate'
3554 'a very nice fatty snack normally made into bars'

Have a look at the titles and descriptions of a few stations/wares/ships etc to see what needs doing.

3) Go into the relevent 'T' file and identify the line for the item you want to use a as a template by the using its text refrence number.

4) copy the entire line to create a new entry AT THE BOTTOM of the Tfile.

5) Go back to the top of the Tfile. Right at the top you will see two numbers, the second is the number of lines in the file. Increase this by however many new lines you are adding.

Make any changes to the new line that you need to (hint -> stormfronts mod kit ) and replace the textID with the new one you chose in step 1.

BTW, if you are setting up a factory/station the owining races name will be appended to the objects description. That way you can use one description for multiple factories (EG crystal fabs I believe have the same description and were done by egosoft like this)

6) Pack the whole lot up into correctly numbered/structured .dat , plonk it in your X2 program folder an hey presto, a new item in X2.
For everything you ever wanted to know about X2,
and more......

[ external image ]

User avatar
Damar Stiehl
Posts: 861
Joined: Mon, 3. May 04, 02:54
x3

Post by Damar Stiehl » Fri, 18. Jun 04, 22:16

Nice little guide, thank you kind sir.

marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty » Sat, 19. Jun 04, 12:02

Thought it would be quite handy as from what I know no one else has ever managed to do it (add completely new stuff, eg new lines to a to a tfile that is, not just replace existing stuff).... :D
For everything you ever wanted to know about X2,
and more......

[ external image ]

XeHonk
Posts: 1087
Joined: Sun, 7. Mar 04, 23:03
x3tc

Post by XeHonk » Sat, 19. Jun 04, 12:18

try doing that for ships.. if it works, everyone will luv u =)

User avatar
Eldorado
Posts: 291
Joined: Mon, 9. Feb 04, 18:10
x2

Post by Eldorado » Sat, 19. Jun 04, 14:06

They will love him anyway because this opens new possiblities to every modder, cause they now can create new weapons, missles, new product
(enlarge the economy part of X2 by adding new Fabs with completly new wares), and IF it's possible to add new ships you'll become a legend :lol:
Eines ihrer Schiffe wird angegriffen...<<TRANTOR>>!!

Ankhst
Posts: 225
Joined: Mon, 9. Feb 04, 16:40
x2

Post by Ankhst » Sat, 19. Jun 04, 16:25

:thumb_up:
Nice one, well done!

Being a numpty with this stuff will wait to see whether the trick works with the ships too...always fancied a Shadow cruiser with heavy beam weapons in X2....would give those Khaak a run for their money!

marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty » Sat, 19. Jun 04, 22:47

Dont know about being a legend.. :oops: but thanks for the thought :wink:

It definately works for factories (have created 11 new ones as part of the mod I'm doing), wares, and docks. All have been tried and work....

Just about to try a new ship... :wink:
Last edited by marklaverty on Sat, 19. Jun 04, 23:17, edited 1 time in total.
For everything you ever wanted to know about X2,
and more......

[ external image ]

marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty » Sat, 19. Jun 04, 23:16

:( :( :( :( :( :(

Doesn't work for ships....

Don't know why yet, but can't be far away from cracking it.

Works for everything else I've tested so far though. :D :D :D
For everything you ever wanted to know about X2,
and more......

[ external image ]

The_Rock
Posts: 4088
Joined: Wed, 6. Nov 02, 20:31
x2

Post by The_Rock » Sat, 19. Jun 04, 23:23

good luck dude. :thumb_up:
"How very touching his meaningless death was. But this fight was never for mortals".

User avatar
Eldorado
Posts: 291
Joined: Mon, 9. Feb 04, 18:10
x2

Post by Eldorado » Sun, 20. Jun 04, 13:09

New drohnes and weapons will come up soon :P
What about baluga and Alpha raks? :roll:
I wanna have them back :shock:
Eines ihrer Schiffe wird angegriffen...<<TRANTOR>>!!

XeHonk
Posts: 1087
Joined: Sun, 7. Mar 04, 23:03
x3tc

Post by XeHonk » Sun, 20. Jun 04, 13:27

drones are ships, too :]

User avatar
Eldorado
Posts: 291
Joined: Mon, 9. Feb 04, 18:10
x2

Post by Eldorado » Sun, 20. Jun 04, 14:41

:cry: >>>>> :D
Okay its enough if you get new raks and laserbeams!
Eines ihrer Schiffe wird angegriffen...<<TRANTOR>>!!

markmid
Posts: 149
Joined: Tue, 10. Feb 04, 21:03
x2

Post by markmid » Sun, 20. Jun 04, 14:48

The drinks are on me, nice one mark. :D I've also been fiddling with these sort of things looking for a way to add stuff.

Maybe ask on devnet, see if they can tell you how to add ships too?

XeHonk
Posts: 1087
Joined: Sun, 7. Mar 04, 23:03
x3tc

Post by XeHonk » Sun, 20. Jun 04, 15:11

noone's been able to add new ships, yet (afaik)

Diamonddragon
Posts: 1957
Joined: Sat, 7. Feb 04, 20:26
x3tc

Post by Diamonddragon » Sun, 20. Jun 04, 15:11

where can i download stormsongs mod kit for the tfactories?cause there are lots of numbers.... :shock:
Es ist nicht das Schicksal, was die Zukunft bestimmt.
Script- und Modliste

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

Post by Burianek » Sun, 20. Jun 04, 20:11

Where can I d/l Storm Front's mod mit?
I have version 4.0 on my website *points to signature*
"Nature's first green is gold" . . . stay golden.

marklaverty
Posts: 270
Joined: Mon, 23. Feb 04, 15:03
x2

Post by marklaverty » Mon, 21. Jun 04, 12:39

Hi,

Double shadow just sent me a PM with some more info, and without getting all complicated... don't hold your breath for new ships and weapons.

There are apparently 'other' things that prevent the adding of lines to Tships and Trockets.

Will investigate further then post some results. :D

PS.. I just found out that this isn't the first sucessfull addition to a 'T' file, apparently ollisJ managed it with the 75mw shield mod... :wink:
For everything you ever wanted to know about X2,
and more......

[ external image ]

Kuro
Posts: 87
Joined: Sat, 17. Apr 04, 20:45
x3tc

Post by Kuro » Mon, 5. Jul 04, 19:52

Okay, now the question that comes to my mind is, how do you get the products to show up in the factories correctly?

Is it linked through the .xml files? Or do you need to use a script for the products to appear?

Sun Tzu
Posts: 5
Joined: Mon, 7. Jun 04, 18:54
x2

Post by Sun Tzu » Mon, 5. Jul 04, 22:24

Found an error in Storm Front's modding kit through a bit of trial & error. In TWare_ files, the value which is shown as 'price' actually seems to affect how many of said ware can be held in a station as a maximum. I.e. a value of 4 gives 5000 - energy cells.

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

Post by Burianek » Tue, 6. Jul 04, 01:09

It's not an error, the price of a ware affects how many can be held by a station. The more expensive the ware, the fewer the object, to a minimum of 2.
"Nature's first green is gold" . . . stay golden.

Post Reply

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