wc3campaigns
WC3C Homepage - www.wc3c.netUser Control Panel (Requires Log-In)Engage in discussions with other users and join contests in the WC3C forums!Read one of our many tutorials, ranging in difficulty from beginner to advanced!Show off your artistic talents in the WC3C Gallery!Download quality models, textures, spells (vJASS/JASS), systems, and scripts!Download maps that have passed through our rigorous approval process!

Go Back   Wc3C.net > Warcraft III Modding > Developer's Corner > Warcraft Editing Tools > Programming
User Name
Password
Register Rules Get Hosted! Chat Pastebin FAQ and Rules Members List Calendar



Reply
 
Thread Tools Search this Thread
Old 10-08-2004, 01:18 AM   #1
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Now that Zepir has also formally quit Warcraft editing, I'll maintain his great collection of file format specifications.
Today I think I've added all the knowledge we currently have. The only thing that is currently missing are mdx/mdl specs and maybe some more details on the different ways of protecting maps.

Anyway the updated file can now be found here

EDIT: A more up-to-date version is here
__________________
Zoom (requires log in)

Last edited by PitzerMike : 06-14-2008 at 09:39 AM.
PitzerMike is offline   Reply With Quote
Sponsored Links - Login to hide this ad!
Old 10-19-2004, 01:13 PM   #2
Soar
User
 
Join Date: Feb 2003
Posts: 52

Submissions (1)

Soar is on a distinguished road (18)

Default

My fix to war3map.w3i file:

int: max number "MAXPL" of players
array of structures: then, there is MAXPL times a player data like described below.
int: max number "MAXFC" of forces
array of structures: then, there is MAXFC times a force data like described below.
int: if 0 it means that we reach the end of the w3i
if it's non-zero, the following bytes define special settings for the map (techtree, upgrades,...)

Players data format:
int: index of player
int: player type
1=Human, 2=Computer, 3=Neutral, 4=Rescuable
int: player race
1=Human, 2=Orc, 3=Undead, 4=Night Elf
int: 00000001 = fixed start position
String: Player name
float: Starting coordinate X
float: Starting coordinate Y
int: ally low priorities flags (bit "x"=1 --> set for player "x")
int: ally high priorities flags (bit "x"=1 --> set for player "x")

Forces data format:
int: Foces Flags
0x00000001: allied (force 1)
0x00000002: allied victory
0x00000004: share vision
0x00000010: share unit control
0x00000020: share advanced unit control
int: player masks (bit "x"=1 --> player "x" is in this force)
String: Force name

.w3i is ended by 3 DWORD "0"
Soar is offline   Reply With Quote
Old 10-19-2004, 04:51 PM   #3
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Thank you for your input. I've updated it again and also fixed something I mixed up with the attributes file.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 10-20-2004, 11:41 PM   #4
Quantam
User
 
Join Date: Oct 2002
Posts: 58

Quantam has little to show at this moment (4)

Default

(signature), (listfile), and (attributes) are extensions to the MPQ format, and not to be confused with W3M files specifically.

(signature) contains the weak (old-style) MPQ digital signature. This is still used on PC games (at least pre-WoW, which I haven't checked) by Bnupdate to authenticate Blizzard patches. War3 maps use the strong (new-style) digital signature to authenticate War3 maps, with a different public key than the default "Blizzard key". In other words, you should never encounter (signature) in a War3 map.
Quantam is offline   Reply With Quote
Old 02-08-2005, 12:18 PM   #5
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Updated again. I've completely rewritten the w3i, doo and Units.doo specs. Now it includes tech availability data, random item tables, random unit tables and TFT specs for the Units.doo file.

I'd especially like to point out that the doodad definitions in the .doo file are now blocks of variable length in version 8 (because of items dropped on death).
Meaning that some maps can get fucked up by BlackDick's trick of reverting the version of the doo file to version 7 (to save 2 ints for each doodad).
The doodad data has NO fixed length any more!!!

Also I paid attention to pointing out that (signature), (listfile) and (attributes) are not W3M files specifically.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 03-21-2005, 10:14 PM   #6
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

Something about Crap integers in w3a/w3q/w3d

The first crap integer is the level of the field. If the field is not level specific it is 0. When it is a doodad it is the variation of the field.

The second crap integer seems to be just a separator, could mean something but it at this moment I would still call it crap.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 03-22-2005, 01:20 PM   #7
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Quote:
Originally Posted by Lord Vexorian
Something about Crap integers in w3a/w3q/w3d

The first crap integer is the level of the field. If the field is not level specific it is 0. When it is a doodad it is the variation of the field.

The second crap integer seems to be just a separator, could mean something but it at this moment I would still call it crap.

Yeah, I actually found out the meaning of those integers when working on the Widgetizer, just didn't update the specs yet.

The second one is only used by w3a files, specifically for values that are stored in "Data" columns in AbilityData.slk.
When you look into AbilityData you will see that there is no Data-column, but only DataA, DataB, DataC and so on, then when you look into the MetaData file you will also see, that the column name there is only Data. So when compiling the changes of the w3a file into a new AbilityData.slk file when the map is loaded it needs to know to which of these columns the new value should be copied. That's the second "crap" value. 0 = A, 1 = B, 2 = C .....

So a value that is originally in DataC2 would have the level int set to 2 and the letter int set to 2
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 05-21-2005, 03:56 PM   #8
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

I've fixed the w3a/w3q/w3d specs, fixed another bunch of smaller errors and added a reference to KMK's mdx specs.
We should maybe add gamecache file specifications next.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 08-19-2005, 08:13 PM   #9
Vexorian
Free Software Terrorist
 
Vexorian's Avatar


Technical Director
 
Join Date: Apr 2003
Posts: 14,898

Submissions (37)

Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)Vexorian has a reputation beyond repute (1062)

Hero Contest #3 - 2nd Place

Default

I found out that the blp format has 16 mipmaps not 15.

I say that xvi32 is a better thing for a link to hex editor, it needs a lot less space, and is by the way freeware it also works perfectly.
__________________
Zoom (requires log in)Wc3 map optimizer 5.0
Someone should fix .wav sound in this thing.
Zoom (requires log in)JassHelper 0.A.2.A
Turns your simple code into something that is complicated enough to work.
Faster != more useful
Vexorian is offline   Reply With Quote
Old 12-31-2005, 11:57 AM   #10
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

I shall update the blp and mdl/mdx specs soon.
If anyone wants to contribute gamecache formats just contact me.

A link to the replay format will be provided too. Although the hash algorithm used for replay checksums has been reverse engineered by now it cannot be included in this document. Contact Soar if you feel you need insight in the algorithm, he might help you if it's for a good use.

Last edited by PitzerMike : 12-31-2005 at 12:27 PM.
PitzerMike is offline   Reply With Quote
Old 03-09-2006, 11:12 PM   #11
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Finally I had some time to update this again.

1) Added packed file format, gamecache file format and a tiny bit of the savegame format
2) Fixed and improved BLP and SLK documentation abit, especially paletted BLPs
3) Fixed broken links and added more links to external documentation for MDX/MDL, BLP, SLK, TGA, W3G (replay files)
4) Added local backups of external documentation

I think this is pretty complete now and won't require any major updates in the future. We finally have every existing file type covered, except FDF maybe.
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 04-08-2006, 03:06 AM   #12
PipeDream
Moderator
 
PipeDream's Avatar


Code Moderator
 
Join Date: Feb 2006
Posts: 1,405

Submissions (6)

PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)

Default

Quote:
more details on the different ways of protecting maps.

I just ran into a ..bug.. that I have not seen described before and that might be appropriate for this document. In war3map.w3i on tft, if you truncate the file after the MAXFC # of forces and append ff0a, warcraft still loads ok but the WE crashes immediately. Fix is just fill out UCOUNT/TCOUNT/UTCONT/ITCOUNT with zeroes.
PipeDream is offline   Reply With Quote
Old 04-13-2006, 10:23 PM   #13
PitzerMike
Alcopops
 
PitzerMike's Avatar


Tools & Tutorials Moderator
 
Join Date: Jan 2003
Posts: 2,794

Submissions (12)

PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)PitzerMike is a splendid one to behold (643)

Approved Map: Pitzer's Minesweeper

Default

Interesting, it probably works because a stream that reached its end ind C/C++ usually generates zeros when being read. I wonder why the editor can't handle it though.

Also, has your random quote any special meaning?
__________________
Zoom (requires log in)
PitzerMike is offline   Reply With Quote
Old 04-13-2006, 10:29 PM   #14
PipeDream
Moderator
 
PipeDream's Avatar


Code Moderator
 
Join Date: Feb 2006
Posts: 1,405

Submissions (6)

PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)PipeDream is a glorious beacon of light (463)

Default

No. No relevance at all. Nothing to see here, folks.

Last edited by PipeDream : 04-13-2006 at 10:35 PM.
PipeDream is offline   Reply With Quote
Old 05-02-2006, 10:51 PM   #15
RaeVanMorlock
User
 
Join Date: Dec 2003
Posts: 432

RaeVanMorlock has little to show at this moment (4)

Default

[I've been going through changing/adding/removing things as I experiment further while waiting for a reply so please excuse me if certain things seem misplaced or confusing.]


Great specs.. actually found (and older version of) the file through google before seeing it referenced here. You might want to try contacting him and asking him to update it--http://mr-nutz.no-ip.org/bioinfo/Val...w3m-specs.html



Also, I'm having some trouble with manually creating new files. I used HHD's Free Hex Editor to create a new, blank war3map.doo file.

Code:
0x0000   57 33 64 6f   07 00 00 00   09 00 00 00   00 00 00 00
0x0010   00 00 00 00   00 00 00 00

Then I put it into the mpq and ran it in the World Editor, but it crashes. It says that the .doo file data is corrupt. I made a blank map, saved it, and compared it's .doo file to mine and they're exactly the same--so my best guess is that there's some kind of date information stored somewhere in the MPQ.



Also, I have some questions about the war3map.doo information:
- Is this really just trees and cliff doodads? Where are all the other doodads/destructibles stored at?
- It says the 3rd int is rarely set to 7--I've never seen this.. I've only seen it set to 9.. so when have you ever seen it set to 7? I'd imagine if this has been set (primarily) to 9 since '04 (according to the older version above) then it's not just a subversion
- In reference to the flags, how can you set a doodad to be anything other than solid and visible?
- The "special" doodads could be explained a little better... From testing, I gather that they're cliff doodads--is it possible to add custom ones though?


Big question: What's the "NEW 'Frozen Throne expansion pack beta' format" thing? Are you documenting the RoC war3map.doo file and then the TFT war3map.doo file? TFT has been out of beta for a long time now... it makes it look like that section is some rough notes on some beta that's in-the-works.

The format that I've found applies the top section--my first tree having the unique ID of 0 and the second one being 1... neither has a item table defined, but neither has a -1 to indicate that there's no item table either. Are these values skipped if none is defined? (I'll have to test this myself, but it might be useful to document it more thoroughly for other people).




So then after the trees, there's a sub-header section that has an integer (always set to 0?) followed by an integer for the number of special doodads. Then, if there are doodads, they're defined by the cliff ID and three unknown integers (12 bytes) which you're saying (guessing?) are the x-y-z coordinates. If they are coordinates, shouldn't they be listed as floats instead of ints? And why would the Z be before X and Y here and after X and Y in the tree section? This isn't making a whole lot of sense.




Another thought... How sure are you that the second integer is the file version? Has it ever changed? I don't know what else it could be, but I've never seen it change and I don't like to say definitely what something represents unless I've been able to change the value and see the change.

Regardless, there is a bit of a pattern in this file.
Header:Tree Header:Tree Data*:Cliff Doodad Header:Cliff Data*

*Only present if object types exist

In which case, the file could be:

HEADER:
- File ID ('W3do')
- File Version (7)

TREE HEADER:
- Tree Version (9)
- Number of Trees

CLIFF DOODAD HEADER:
- Cliff Doodad Version (0)
- Number of Cliff Doodads


I say this because both 'sections' have an undefined integer located before the number of objects in their respective section. So these pairs of ints could be more easily viewed as their own headers in which case they'd likely have version numbers.

It might be interested to uninstall WC3 and reincrement through the versions to see if this file's format has changed and, if so, if those unknown integers have changed along with it to represent a versioning.... I'll have to do that later.

Update

I've uninstalled WC3 and reinstalled it to RoC 1.00 4448 and, to my surprise, the war3map.doo file is exactly the same format.

I don't have a war3map.doo file that uses item tables at the moment, and it will be some time before I increment back to the current version (I'm doing each one periodically and saving a copy). But when I do, I'll see if the addition of an item table on a tree will make a difference or not.


I suppose 7, 9, and 0 could be version numbers for pre-retail applications... but then why still use them? If they fit the format of the first retail version, there's no reason to keep support for a pre-retail version so I would assume they'd be changed to all 0's (or all 1's). This whole file is confusing.



Update 2

Okay, I created a tree with an item table in TFT 1.07 6031 and found some interesting results. For starters, the first two unknown integers are now 8 and 11, respectively. Also, the flag is set to 0 (invisible and non-solid)--I've no idea why this happened.



war3map.doo Format
Code:
Type      Description
----------------------------------------------------------
HEADER
char[4]   File ID ('W3do')
int       Unknown (07=Skip Custom Item Tables, 08=Load Custom Item Tables)
HEADER1
int       Unknown (09=ROC?, 0B=TFT?)
int       Number of doodads
DATA1*
char[4]   Tree ID
int       Doodad Variation
float     X-coordinate
float     Y-coordinate
float     Z-coordinate
float     Rotation Angle (Radian)
float     X-scale
float     Y-scale
float     Z-scale
byte      Flags (0 = invisible and non-solid, 1 = visible and non-solid, 2 = visible and solid)
byte      Life Percentage
----if TFT-------------------------------------------
HEADER2
int       Item Table Pointer (or -1 for custom table)
int       Number of Item Tables (or 0 if pointer is defined)
HEADER2a*
int       Number of items in Table
DATA2a*
char[4]   Item ID
int       Chance to drop
-----------------------------------------------------
int       Unique ID number
HEADER3
int       Unknown (0)
int       Number of cliff doodads
DATA3*
char[4]   Cliff ID
int       Unknown (0)
int       Unknown
int       Unknown




Has anyone thoroughly tested what types of doodads/destructables go into which section?

Thus far, I've noticed that all the Destructibles (Trees/Destructibles, Pathing Blockers, and Bridges/Ramps) appear in the upper section. Also, when editing their properties, they each can have an item table defined.

I've also noticed that all Doodads from the Cliff/Terrain group seem to go into the bottom section. What's odd though is that other doodads appear in the top section with an entry for an item table even though the editor doesn't allow you to define one for them and (to my knowledge) they can't have one because they can't be killed.

Update
Environment doodads (or at least, the bush) also get placed in the top section. Moreover, although the deleting the war3map.doo file is one way to protect your map (the game can still run, but the editor won't open it) doing so seems to remove the only available reference to doodads and, thus, they aren't placed in the game (there is no CreateDoodad function like there is a CreateDestructable function).


....

I think I'm trying way too hard--it's blowing my brain out. In the WE, once you add a custom item table to a doodad, the expansion is required because "Dropped items have been specified for doodads (Doodad Properties)"; however, if you then put that doodad file into a W3M map and load it in RoC 1.20d, it works! I mean--I haven't tried it in the game--but you can access the item table and change it around and shit from within the doodad's properties. Near as I can figure, RoC 1.20d supports item tables on doodads.... so this is just confusing the hell out of me.


Also, I've made another discovery. If the first unknown bit is set to 07 then item tables aren't loaded on the doodads--no error occurs, it just skips over it. If it's set to 08, then they are loaded. The second unknown integer doesn't seem to have any effect on this (or anything else, as far as I can figure) regardless of whether it's set to 09, 0B, or 01.

Last edited by RaeVanMorlock : 05-03-2006 at 11:33 PM.
RaeVanMorlock is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT. The time now is 04:16 PM.


Affiliates
The Hubb The JASS Vault Clan WEnW Campaign Creations Clan CBS GamesModding Flixreel Videos

Powered by vBulletin (Copyright ©2000 - 2019, Jelsoft Enterprises Ltd).
Hosted by www.OICcam.com
IT Support and Services provided by Executive IT Services