Regarding the Format of the Model files.

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

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

Troj
Posts: 586
Joined: Tue, 2. Dec 03, 16:20
x3

Post by Troj » Wed, 4. Feb 04, 01:00

No worries, apparently, thats all you'll ever need ...
Semper Pugno, semper Vinci.

Troj
Posts: 586
Joined: Tue, 2. Dec 03, 16:20
x3

Post by Troj » Wed, 4. Feb 04, 01:07

This is what I've discoveered about these Object files so far .... They are definately binary ... the format is too ordered to be simply compressed text like the PCK files ... but there is a common recurrence of data that follows the same form ... at the bottom of the files you'll see common references to VAR, SYMB and these 4 characters 'ÿÿÿÿ' ... I'd conclude that these files are of a type that can be loaded straight into a struct or collection via serialization or something similar ... Looking at other sources as well, I get the impression that these files represent the storyline (althought the galedit.obj is an enigma) and if these files dfo script storyboard actions I guess it's a wait for egosoft time :)

I guess we're not going to get an answer quickly on this one, but if any passing Programmer from Egosoft would like to throw us a little bone, then I for one would certainly be greatful :)
Semper Pugno, semper Vinci.

kryptyk
Posts: 483
Joined: Fri, 5. Dec 03, 20:19
x4

Post by kryptyk » Wed, 4. Feb 04, 01:57

Yeah....just a teensy weensy little hint..... :D puhweeese...with space whiskey on top???????

*No need to point out how pathetic I am...it's already well documented in my psych profile*

ShadowTek
Posts: 480
Joined: Sat, 20. Dec 03, 19:05
x2

Post by ShadowTek » Wed, 4. Feb 04, 03:53

Ok By looking at the TShips file you can figure out most of it, here is the Argon Titan:

940;0;0.00999;0.00499;0.00999;4;3121;30000;1400;102;1;11;373;
10000;112;247;4172;4513;852352;18;3;5;4;9;3;30;3500;3500;1;1;3;
4;2;2;4;3;5;5;6;6;-4;4;1;70000;37;38;0;7;1;0;806;0;2;1;939;38;3;2;939;33;4;3;939;43;
5;4;939;32;6;5;939;47;7;6;939;51;7;1;0;1;1;1;0;0;0;-1;-1;1;3;2;3;1;1;708;36;981;2;2;1;708;37;981;2;3;1;
708;71;981;2;4;
3;3;3;4;1;708;35;981;2;5;1;708;41;981;2;6;1;708;42;981;2;7;3;4;
3;7;1;708;44;981;2;8;1;708;45;981;2;9;1;708;46;981;2;10;3;5;3;10;
1;708;34;981;2;11;1;708;39;981;2;12;1;708;40;981;2;13;3;6;3;13;1;
708;48;981;2;14;1;708;49;981;2;15;1;708;50;981;2;16;3;7;3;16;1;
708;52;981;2;17;1;708;53;981;2;18;1;708;54;981;2;1;994432;25;1;0
;SS_SH_A_M2

940 means its playable
0.00999;0.00499;0.00999 this is the handle-ability (turnning, yaw etc)
4 is ship type 4=M2 0=TL etc
3121 determines the ship description "in game"
30000 is ship speed
1400 is ship acceleration (higher numbers is faster acceleration)
102;1;11;373 Docking info not sure how it works but I think it has to do with where the ship can dock, it has nothing to do with what can dock on this ship.
10000, Ships power, havent noticed any difference changeing it
112;247 still unknown
4172;4513 first number is ship model (ie. 04172.bob in cuts folder), second number is cockpit model
852352 main laser loadout, if ship has no main laser its meaningless as the info for turrets is stored in the TCockpits file.
18 is number of guns...totaly pointless, as changeing it does nothing, adding guns is located nere end of string as Ill explain latter.
3;5;4 shield type, max shield, and max missle (thanks to Profit_Maker)
max missile equipable
-1=none
0=mosquito
1=wasp
2=dragonfly
3=silkworm
4=hornet
If you change missile type, make sure you have the proper cargo/warehouse class. This goes for lasers to. (thanks again to Profit_Maker)
9 ??
3;30;3500;3500 engine tunnings, rudder tunnings, min cargo, max cargo
1;1;3;4;2;2;4;3;5;5;6;6 Turret data, 2 numbers per turret
1 is front turret
2 is rear turret
3 and 4 are the left and right sides
5 and 6 the top and bottom
discovered by coxpwr
-4 number of ships that can dock, a "-" sign in front of a number designates external docking, do not increase this number as you will not be able to undock extra ships
4 max cargo size, changeing to a 5 will allow station sized cargo holds, but if you want to haul stations you must change the ship type from 4 to 0
1 race:
1-Argon
2-Boron
3-Split
4-Paranid
5-Teldi
6-Xenon
7-Khaz (or whatever there called)
8-Pirate
9-Gonor
10-?? UFO??
70000 Hull strength
37;38;0;7;1;0;806;0 Still working on it, think it has to do with turret data
2;1;939;38: 2=? 1=Turret number 1, 939=turret (this refers to turret in .bob file), 38=turret location (on ship hardpoint)
3;2;939;33 as above: 3? 2=Turret # 2, 939=Turret, 33=turret hardpoint location.
This goes on for all 6 turrets, then come the guns:
1;1;1;0;0;0;-1;-1;1;3;2; Still working on it, some sort of gun data
1;1;708;36;981: 1=?gun size as displayed on ship? 1=Gun # one, 708=Gun as in .BOB file, 36=Gun location on ship
981=unknown more gun data, different for each ship
ETC ETC for all guns, you add guns to ships by adding guns to turrets, this was how I added 18 guns to carriers, however since these refer to hardpoints in the .bob files, you can only add guns to existing turrets, and you can only use existing guns, but you can have guns fire more than one shot, for example a un modified Teldi Albatross fires 3 shots from each of its single guns, 18 Guns seems to be the limit as Ive crashed and burned on exceding this, laser power is calculated by amount of guns.

When you add guns say 3 guns to a turret that originaly fire one gun, you can either have one gun fire 3 shots or chose from other gun locations (as defined above) but you must make sure that gun can hit everywhere the turret can see, for example, if you add 3 guns to a top turret, dont chose the bottom gun to fire with the top turret cause it wont fire throu ship.

Also with the 18 gun setup, guns 1-3 are front turret
4-6 are Right
7-9 are rear
10-12 are left
13-15 are top
16-18 are bottom

You can probably put 18 guns on a argon Nova by haveing each gun fire multiple times, but havent confirmed this yet, there may be a 3 shots per gun limit.

Example:
Original 6 gun Argon M1 Gun and Turret Data:
1;1;708;30;981;2;2;1;3;1;2;1;708;32;981;2;3;1;4;1;3;1;708;35;981;
2;4;1;5;1;4;1;708;31;981;2;5;1;6;1;5;1;708;37;981;2;6;1;7;1;6;1;
708;39;981

Modified for 18 Guns:
1;1;708;30;981;2;2;1;708;30;981;2;3;1;708;30;981;2;4;3;3;3;4;1;
708;32;981;2;5;1;708;32;981;2;6;1;708;32;981;2;7;3;4;3;7;1;708;
35;981;2;8;1;708;35;981;2;9;1;708;35;981;2;10;3;5;3;10;1;708;31;
981;2;11;1;708;31;981;2;12;1;708;31;981;2;13;3;6;3;13;1;708;37;
981;2;14;1;708;37;981;2;15;1;708;37;981;2;16;3;7;3;16;1;708;39;
981;2;17;1;708;39;981;2;18;1;708;39;981

Most of this info I got from various charts and threads, the only thing I really did was figure out the specifics on guns and turrets at the end of the TShips files.

To add gun types to turrets open up the TCockpits file and notice on line 9 that long number, use this handy chart to add weapons (I did not make this chart but it works flawlessly):
Code:

1,2,4,
8,16,32,
64,128,256,
512,1024,2048,
4096,8192,16384,
32768,65536,131072,
262144,524288,1048576,
2097152,4194304,8388608

GIRE A, GIRE B, GIRE G
PAC A, PAC B, PAC C
HEPT A, HEPT B, HEPT G
PSG A, PSG B, PSG G
Mining, KH A, KH B
KH G, Mass, Ion D
PPC A, PPC B, PPC G
OL, KH_Endfight, Repair

All leagle guns: 2039807 (edited believe this is right now)

All Guns 4194303 (Profit_Maker)

Thanks to Slocket for excellent chart

Numbers on top refer to guns on bottom. if you want to change the main laser gun type, use above chart on line 19 in TShips file. Simply add the numbers of each gun you want together.
Last edited by ShadowTek on Wed, 4. Feb 04, 05:37, edited 9 times in total.
Proud member of the PHPBB Network!
Feel free to upload or download X2 Mods!!

User avatar
Storm_Front
Posts: 1021
Joined: Mon, 15. Dec 03, 05:27
x2

Post by Storm_Front » Wed, 4. Feb 04, 04:29

*Edited-- This is in response to Shadowtech's post above*


Some additional info and corrections:(let me know if you find any errors, but I believe this is accurate)

1)10000, ships power, increasing this allows the lasers to operate longer before you hear, "warning, energy low" Edit: so I thought it did, maybe not
2)3;5;4; shield type; # of shields; max missile equipable

3)main laser loadout "4194303" is the magic number (any weapon including laser tower weapon)

Thanks Shadowtech, the turrets were giving me a hard time.

Edited again
max missile equipable
-1=none
0=mosquito
1=wasp
2=dragonfly
3=silkworm
4=hornet
If you change missile type, make sure you have the proper cargo/warehouse class. This goes for lasers to.
Last edited by Storm_Front on Wed, 4. Feb 04, 05:28, edited 2 times in total.

ShadowTek
Posts: 480
Joined: Sat, 20. Dec 03, 19:05
x2

Post by ShadowTek » Wed, 4. Feb 04, 04:32

Thanks Profit_Maker

PS..Added some more info on that post for adding guns

PS theres no guarrentee that everythings accurate but together we can figure out every single number in the TShips file

I never noticed any difference in raiseing the power supply as the number of guns determins the laser power (like in Ship details where it says hull, shields, laser power) but mabey I didnt raise it high enough, will check it out. Thanks for the missle info, knew that had to be in there somewhere :oops: but as I never use missles I never bothered to hunt for it, But I'll update original post :)

***EDIT***
Perhaps power supply affects the re-charge rate, rather than actually adding more laser power.

***EDIT # 2***
Just tried a experiment and changed 10,000 generater to 100,000 Generater, it didnt affect re-charge rate or allow for more shots to be fired, it may just be cosmetic but Ill keep experimenting with it.
Proud member of the PHPBB Network!
Feel free to upload or download X2 Mods!!

Troj
Posts: 586
Joined: Tue, 2. Dec 03, 16:20
x3

Post by Troj » Wed, 4. Feb 04, 09:38

Good lord Cheers for that Shadowtech ... I'll read it properly when I can open my eyelids fully :)
Semper Pugno, semper Vinci.

ShadowTek
Posts: 480
Joined: Sat, 20. Dec 03, 19:05
x2

Post by ShadowTek » Wed, 4. Feb 04, 16:18

I made a seperate thread called the TShips file exposed, with updated info, this way more people might find it and add to it (I hope) anywho, gotta go truckin for a few days, Ill be interested in any progress you made on decipering the ship files. Getting the outline in Milhshape is a good start :)
Proud member of the PHPBB Network!
Feel free to upload or download X2 Mods!!

User avatar
Storm_Front
Posts: 1021
Joined: Mon, 15. Dec 03, 05:27
x2

Post by Storm_Front » Wed, 4. Feb 04, 19:04

kryptyk wrote:
Troj wrote:Lol - Hey nobody said ... no ... everybody just said they didn't know if Modding information is coming out ... We know that BurnIt! is working on the Scripting engine, so we'll just have to be patient ... Besides the ship model isnt as much a problem as an undocumented script engine :)
:D Yeah I know....just wanted to add some drama for S&G's. Would you happen to know anything about the OBJ files by chance. Like what's stored in them and what format?
This is far from my area of expertise, but aren't obj files primarily used for 3d graphics.

Troj
Posts: 586
Joined: Tue, 2. Dec 03, 16:20
x3

Post by Troj » Wed, 4. Feb 04, 20:11

You'd think so because of the name ... but an obj can be anything - Very likely not 3d models in X2's case though
Semper Pugno, semper Vinci.

Troj
Posts: 586
Joined: Tue, 2. Dec 03, 16:20
x3

New Picture

Post by Troj » Wed, 4. Feb 04, 20:22

A far better screenshot - The model looks skewed because it's a model of a Wrecked Argon M2
http://russ.uk.net/new.jpg
Semper Pugno, semper Vinci.

n0tsane
Posts: 327
Joined: Tue, 9. Dec 03, 00:44
x3tc

Post by n0tsane » Thu, 5. Feb 04, 01:33

its looking better

Troj
Posts: 586
Joined: Tue, 2. Dec 03, 16:20
x3

Post by Troj » Thu, 5. Feb 04, 09:54

Cheers :)
Semper Pugno, semper Vinci.

ShadowTek
Posts: 480
Joined: Sat, 20. Dec 03, 19:05
x2

Post by ShadowTek » Sat, 7. Feb 04, 14:01

@ Troj
How are you doing this? Are you useing Milkshape? How did you get the obj files this far into the program your useing? I remember you saying you converted to ascii, I knew you could unpack some of the files, How are you getting them into milkshape? What program are you useing to convert to ascii, tell me all your secrets of how your doing this :gruebel: :D I must know :twisted: pls tell me how to get as far as youve gotton at editing the obj files, I really want to add turrets, I have Milkshap and 3dstudio max, once youve converted into this program, are you able to convert back? Once you have the ship converted, can you modify it?
Proud member of the PHPBB Network!
Feel free to upload or download X2 Mods!!

Troj
Posts: 586
Joined: Tue, 2. Dec 03, 16:20
x3

Post by Troj » Sat, 7. Feb 04, 19:14

Lol Deep Breath ...

I am using Milkshape, I did convert the Pbd files to Ascii ... and I've wrote my own program (in C#) that 'converts' them to Milkshape Ascii files ... When its all finished you'll freely be able to convert to and from ... but there's no telling when this will be the case :)

The problem with the format of the Pbd files is that they contain the definitions for multiple parts Ie the lower poly versions that you get when AQC kicks in ... so Im working on getting these exported probably as different files that can be re-imported back into one body file ...

Anyway as I've mentioned I've got a Job and a Family so this is a sparetime project :)
Semper Pugno, semper Vinci.

Post Reply

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