You must be logged in to post messages.
Please login or register

Modding and Scripting
Moderated by Yeebaagooon, nottud

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Major file format Announcment, Regarding DDTs and PRTs
« Previous Page  1 2  Next Page »
posted 27 April 2004 08:45 PM EDT (US)   
Okay, after a week and a half of shuffling files and digging up information from the far reaches of the Internet, I have come up with some very good news about these two arcaic and sometimes even finicky file formats, the DDT and the PRT.

I first tried the internet to unravel the PRT, and it worked, surprisingly. Apparently, the PRT is based off of an old file called a "Parallel Ray Trace" file, or PRT. It was designed for scene description, like in POV-Ray, for those who are familiar. It has about twenty to thirty functions, half of which are objects like cylinders. The rest are graphical, defining surface characteristics and lighting effects. It is these functions which I am sure Ensemble took, redefined with different characters, and used for the PRT file. Also, near the end, the file always makes refferance to a texture or 3D file, BRGs. (presumably with the PRT's 'instance' function) It is hard to tell this because it is broken up into seprate cahractures by a [] type symbol (in Hex, its value is 00). Like this:
S.F.X. .A. .Rain. .Cloud...t.g.a.
with the extra peroids representing the 00 value. By replacing this refferance, one could easily create their own special effects, even if no one can break the coding of the rest of the file.

The file refference is either a BRG, or TGA. The BRG is especially important since, when extracted, the file is just a grouping of flat polys that are mapped onto a simple texture, and effectively becomes a "Sprite" in-game.

The reference in the above example also lends a great clue to the DDT format. NOWHERE in ANY PRT file is there refferance to a specific DDT file, ALWAYS a TGA when a graphic is refferenced. This can only mean that the DDT is a compressed version of a TGA. This is important because, as mentioned in the texturing tutorial, there is currently no way to alter transparent effects, like on the Nidhogg's wings. Well, the TGA solves that problem because it has the unique atribute of being able to include a fourth channel, outside the usual Red, Green, and Blue, that is dubbed the Alpha Channel, or Alpha map. Most other 3D games use it for just that reason, it can show transparent and partially transpart textures.

So there, the last of the mysterious files have been (for the most part) sorted out. For any codders interested (as I am not a codder) the links to the TGA file format and the old PRT foramt are listed at the bottom of this post. Keep in mind the PRT will be hard to crack if any one tries to, it is very conveluted. ALso, the servers for the listed pages are in Russia, so it may take a while to load.

Happy modding!

http://netghost.narod.ru/gff/graphics/summary/prt.htm#PRT-DMYID.3

http://netghost.narod.ru/gff/graphics/summary/tga.htm

Lord Zorinthrox

Replies:
posted 27 April 2004 09:12 PM EDT (US)     1 / 41  
posted 27 April 2004 09:26 PM EDT (US)     2 / 41  
My hats off to ya...nice job. Ive been searching the net for weeks now and was totally unable to find any thing like this. Is it safe to assume you are using an hex editor to open up the ptrs...or another sort of similir program.

£¿ïþß첩û £¤® ~ ¿ïØûîÐ £í® §üÐ줧
Ô¿ÿmþîåñ §â££ ã §ÅÇ
Gravity is a myth, the Earth sucks.
posted 27 April 2004 09:42 PM EDT (US)     3 / 41  
Yes, I am. It proves to be an invaluable resource in modding. If anyone's interested, here's the address. Best part is it open source, one step better than freeware, and the programmer was very compentant in his abilities. And thanx.

http://www.tucows.com/preview/299911.html

[This message has been edited by Lord Zorinthrox (edited 04-27-2004 @ 09:44 PM).]

posted 27 April 2004 09:50 PM EDT (US)     4 / 41  
DO NOT CLICK ON THE ABOVE LINKS
DO NOT CLICK ON THE ABOVE LINKS
DO NOT CLICK ON THE ABOVE LINKS
DO NOT CLICK ON THE ABOVE LINKS
DO NOT CLICK ON THE ABOVE LINKS

-it causes your computer to crash and it gives you internet windows none stop!


Auron: || Aurons Site || Aurons AoM:TT Creations || MY POETRY WEBSITE ||
posted 27 April 2004 09:57 PM EDT (US)     5 / 41  
Its just Tucows, it shouldn't crash anybodies computer, unless the Russian sites are too far away for some. There isn't anything I can do if that is case.
posted 27 April 2004 09:58 PM EDT (US)     6 / 41  
Ok..I Opened up a prt with a hex editor that i already had and seen what you mean by refering to the tga file. Now what I dont get is the tga file it calls on doesnt excist. Is it able to refer to the brg format even if it calls on the tga format.


AT auron....the links worked fine for me.


£¿ïþß첩û £¤® ~ ¿ïØûîÐ £í® §üÐ줧
Ô¿ÿmþîåñ §â££ ã §ÅÇ
Gravity is a myth, the Earth sucks.
posted 27 April 2004 10:05 PM EDT (US)     7 / 41  
but i clicked on the first link, and it gave me 53 opened windows, and froze my computer!.

Auron: || Aurons Site || Aurons AoM:TT Creations || MY POETRY WEBSITE ||
posted 27 April 2004 10:13 PM EDT (US)     8 / 41  
Auron 2, that is odd, and I don't know what happened.

Flip Bizcut: WHat I was saying it a DDT is a compressed version of a TGA (or Targa Bitmap). That means that when the engine of AOM reads a DDT, it is decompiling it into a TGA, therefore, when you see a "TGA" extension in a PRT file, think DDT, and vice versa if you were editing it. Of course, there is the off chance . . . that a DDT isn't even compressed ... I'm going to go check that.

posted 27 April 2004 10:46 PM EDT (US)     9 / 41  
Seems great, but help me out here (as I'm not so great at this ), but doesn't AoMED converts the files to an editable format? (.bmp I think), if that's not what you posted about, clear me up ?

posted 27 April 2004 11:37 PM EDT (US)     10 / 41  
i ask again: how do you open PRTs? or do you have to sort of encode them yourself?
posted 28 April 2004 05:07 AM EDT (US)     11 / 41  
If you dont mind Lord Zorinthrox Ill help out all I can here. As Lord Zorinthrox said, it is possible to edit prt files with an hex editor. Just finished modding a boat load of prts in the past hour or so. All that is required is a Hex Editor. Once aquired all you have to do is load up the prt file of your choice into the hex editor. You should see a bunch of numbers to the left with letters and such to the right. Its the right side that you wanna watch for. So far the prts that ive messed with call for the image map 'tga' at the end or if not close to it. Like the sfx a generic fire large.prt file will call on the tga maps which will look something like this.

...?....S.F.X. .
A. .F.i.r.e. .F.
l.a.m.e. .A...t.
g.a.....

All you have to do is find the ddt file with that name 'SFX
A Fire Flame A.ddt' and go through the whole aomed/editing image/converting back to ddt stuff. Then change the letters in the hex editor to the name of your new ddt. Just remember to keep the file extension in the hex coding as an tga. Dont add the dtt file extension in it. Just save the prt with a new name and include it in the new units anim file.

Should look like this

OLD

SFX A Fire Flame A.ddt

...?....S.F.X. .
A. .F.i.r.e. .F.
l.a.m.e. .A...t.
g.a.....

NEW

SFX B Bobs Fumes A.ddt

...?....S.F.X. .
B. .B.o.b.s. .F.
u.m.e.s. .A...t.
g.a.....

Great job in finding this out Lord Zorinthrox. You rock my friend.


£¿ïþß첩û £¤® ~ ¿ïØûîÐ £í® §üÐ줧
Ô¿ÿmþîåñ §â££ ã §ÅÇ
Gravity is a myth, the Earth sucks.
posted 28 April 2004 05:29 AM EDT (US)     12 / 41  
What can we modders do with it, if we can't even open the files. :s

|| argalius.elpea.net
|| Cherub at AoE3H
|| In honor of FlipBizcut
|| Mod: The Age of Crusades
posted 28 April 2004 05:40 AM EDT (US)     13 / 41  
Well you can open the prt files...with a hex editor. It aint no gmax but it is a start. Im sure you can alter how the partical effects move with the hex editing as well. The example I gave above just shows how to change the colors of the prt file with out having to alter the original. IE making you own prt files. You can find a decent free Hex Editor just about any where.

£¿ïþß첩û £¤® ~ ¿ïØûîÐ £í® §üÐ줧
Ô¿ÿmþîåñ §â££ ã §ÅÇ
Gravity is a myth, the Earth sucks.

[This message has been edited by FlipBizcut (edited 04-28-2004 @ 05:45 AM).]

posted 28 April 2004 02:38 PM EDT (US)     14 / 41  
Uh, I posted the site for a FREE open source Hex editor, on Tucows.com(great site if you're looking for some freeware). Here it is again:

http://www.tucows.com/preview/299911.html

You technically don't need this, you COULD use wordpad and manually opne a PRT file, but the Hex Editor makes it easier to see. This is how I looked at both the PRT abd BT8 file (turns out the BT8 is useless, however). Its also useful for all the text type files in AOM (XML, TXT, BTI, etc.), as you can open multiple file at once, and it colors commands and such for you. A great piece of software, I really must commend the coder.

Someone said something about AomEd converting DDTs to an editable format, the BMP. Yes, that is true. BUT, all picture files can be expressed as a BMP, its like the base for them, expressing the very basic of basic information about a graphic. HOWEVER, a TGA file has a fourth channel, called the Alpha1 channel, outside the usual Red, Green, and Blue of a BMP and most other picture file formats. It is used in games to define transparent textures, like the Egyptian Phoenix is transparent(a value of "0" is clear, while "255" is totally opaque). This is the only choice left for how the transparency is put into the game, as there aren't any separate grayscale transparentcy maps. Since we don't have a way to change that transparency, I was merely notifying everyone of this so some one could make either a new version of AomED or a new converter that made DDTs into TGAs instead of BMPs, so the modding comunity can change the transparency of AOM textures. Most modders probably won't care that much, but making realistic looking wings for dragons and the like is always an added bonus. Thus, I posted the TGA file fomrat for any one who was interested.

And the refference to "cracking" the PRT file means that it would take a while to figure out how it works (save the file reference), it may even be partly compressed in a wierd way (the style looks to be a Microsoft favorite, they encode their error reports in roughly the same way). In fact, it may have nothing to do with the old PRT format I posted, but they SHOULD have something in common, since they have the same file extension, and that doesn't have anything to do with AOM.

And thanx, Flip Bizcut
Lord Z

[This message has been edited by Lord Zorinthrox (edited 04-28-2004 @ 06:01 PM).]

posted 28 April 2004 07:20 PM EDT (US)     15 / 41  
argh never thought about hex editors. thanks guys, nice find
posted 01 May 2004 05:27 AM EDT (US)     16 / 41  
AT Lord Zorinthrox...I was wanting to write a small artical on how to replace the textures of prt files. Thought I would ask the original finder if this would be ok.

£¿ïþß첩û £¤® ~ ¿ïØûîÐ £í® §üÐ줧
Ô¿ÿmþîåñ §â££ ã §ÅÇ
Gravity is a myth, the Earth sucks.
posted 01 May 2004 09:26 PM EDT (US)     17 / 41  
Shure . . . I'm too lazy to do it any way. I am only an instigator of action, not the vessel by which it is transfered . . . So go ahead. Talk to Dnas too, he does a similar thing with BRG files (turns out Ensemble did the same file refference thing with them, too).

AND one more thing: the file name does not HAVE to be the same length as the original, just delete the extra "00" bytes OR copy and paste them for longer names. Of course, check me on that (there may be a file name length encoded in the six or so bytes before the file refference, like |?...., cause the byte after the ? is sometiems different and sometimes not.)

And of course, don't forget to credit me.

Lord Z

posted 01 May 2004 09:30 PM EDT (US)     18 / 41  
I see. Thanks!

EDIT: It doesn't work. There must be a length encoding or something. It doesn't show up.


Dnas
Wildfire games 0 A. D. texture artist.
Rest In Peace, Flipbizcut (1979-2005)

[This message may have been edited by Dnas (edited 49-92-4096 @ 42:93 PM).]

[This message has been edited by Dnas (edited 05-01-2004 @ 09:38 PM).]

posted 02 May 2004 04:14 PM EDT (US)     19 / 41  
There is, and I just figured it out. Here it is in Hex (kepping in mind, of course, that hexidecimal is sixteen based, but this will be explained later). It is done is groups of four hexidecimal characters, from the file "SFX a generic smoke small.prt":

1st 803F = calling card, I guess, for end of the sfx information or the file reference. Shows up as "|?"

2nd 1700 = Length of refference file name in Hex values; this file it is 23 characters long(see end of post), not counting the "00" fillersa nd including the extenion, spaces, and dot of the extension.

Then there is "0000" just a "termination of file name length command" type thing, then the file name itself.

Oddly, Microsoft is counting things a little differently than you might expect (or at least I would expect) So heres the conversion chart for the hexvalue file name length thingy

0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
A = 10
B = 11
C = 12
D = 13
E = 14
F = 15

So, "1A" would be "26" in our normal decimal system (You'll have to list them out if you want to convert properly, like "10" isn't ten, but actually 16, or use the "Scientific View" option in MSs Calculator in Accessories, select "hex base," put in the value in the file, like 1D, then switch to dec base, and it converts it for you). Also, if anyone wants to look at this, there is a section that begins at byte 162 that (through a few initial tests) appears to control the placements of the sprite's spawn point in the SFX reletive to the "origin" of the PRT, which would also use this number system. It may be a vector definition, consisting of two sets of X, Y, and Z coordinates, since there are six parts.
And so the file reveals its secrets . . . God, I love this.

Expect another report on this.

Lord Z

[This message has been edited by Lord Zorinthrox (edited 05-02-2004 @ 05:54 PM).]

posted 02 May 2004 08:10 PM EDT (US)     20 / 41  
groovy...gonna write it out tonight. Just to make things clear though I know very little about hex editing. Got a little practice when I was modding freedom force. But I went over your hex coding reference and I think I got the hang of it now...Gonna try and see if it is possible to mod the attachment points in the models by hexing. If so then it will be REAL helpfull to us modelers out here. Will post if It is possible. Thanks for letting me do this artical...you will definatly be credited, no prob.

£¿ïþß첩û £¤® ~ ¿ïØûîÐ £í® §üÐ줧
Ô¿ÿmþîåñ §â££ ã §ÅÇ
Gravity is a myth, the Earth sucks.
posted 02 May 2004 08:29 PM EDT (US)     21 / 41  
Dude, you used my ajective! Who-hoo! Just so know, when I figure out this PRT COMLETELY I'm gonna post a report about it. But the changing the texture thing is the simple soplution for now. Tell me anything you find out so we don't end up doing twice the work, then it can be a joint venture type thing.

Oh, I figured out an easier way to convert between decimal and hex:

Take the Decimal number, divide by 16. The whole number of times 16 goes into the decimal number is the number in the "tens place" (actually the "sixteens place"). Don't forget, this value is subject to Hexidecimal rules, so if 16 goes into the decimal value 13 times, it actually goes into it D times in hex. If the number is greater than 16, then divide that nuber again, and the whole times 16 goes into it will be the "hundreds place" (really the "160s place") etc. into infinitum. The whole number remainder is what goes into the "ones place." So:

52
52/16 = 3 R 4
so 52 dec = 34 hex

OR

231
231/16 = 14 R 7
so 231 dec = E7 hex

The values go up to 255 before they require three bytes. (hence RGB - 255, 255, 255)

[This message has been edited by Lord Zorinthrox (edited 05-02-2004 @ 08:30 PM).]

posted 02 May 2004 08:51 PM EDT (US)     22 / 41  
No Pob. right now I am focusing mostly on the unit models [brg files]. Wanna figure out how to manipulate and add attachment points to my new models so I can add prt effects. I wonder how hard it would be to try and contact ES and see if they can spill the beans on attachment points. Like coolsk8ter stated a while back in another post, I too believe the dummy functions in gmax have something to do with the attachment points on models..There has to be another element that is added to make it work. I am hoping through hex I can figure this out. Will keep ya updated on what I find out though. Thanks for all this help. I think modding AoM just steped up a few notches now.

£¿ïþß첩û £¤® ~ ¿ïØûîÐ £í® §üÐ줧
Ô¿ÿmþîåñ §â££ ã §ÅÇ
Gravity is a myth, the Earth sucks.
posted 03 May 2004 01:06 PM EDT (US)     23 / 41  
Erm, all this just for a transparency?
posted 03 May 2004 02:22 PM EDT (US)     24 / 41  
NO, all this so we can change the SFX in the game, like the summon hero, for example (and in some cases, maybe even make them better). And for the transparency. Besides, my philosophy is that modders should have access to all parts of a game's workings, no matter how small. It merely enriches this culture of game editing of ours.
posted 03 May 2004 03:56 PM EDT (US)     25 / 41  
I missed this for a few days and decided not to read all the replies from the beginning... so what you're saying, Lord Zorinthrox, is that you've found a way to change the particle effects themselves, and the textures applied to the particle effects?

If so, an excellent find indeed. Good work! If not... well, I don't know what to say.


Your Divine Overlord
KING JARED
Aw, hell, I dunno, she had some tig-ole-bitties, d'int she?
big.vitt@gmail.com
« Previous Page  1 2  Next Page »
Age of Mythology Heaven » Forums » Modding and Scripting » Major file format Announcment, Regarding DDTs and PRTs
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Mythology Heaven | HeavenGames