| 09-23-2007, 12:57 AM | #1 | |
regarding: war3map.w3u Yes, the w3m units file! This is the binary file that stores any custom created units in a .w3m/.w3x map. Units would be created in the world editor, and then WE generates this .w3u file--but I want to edit the .w3u file by itself, after extracting it with WinMPQ. I could edit the file with a hex editor--but reading binary is very confusing... I prefer reading letters not bytes. So what I need is a script that will parse the binary file and output a new ascii file... the format could really be anything--whether it prints to an only slightly-more meaningful .txt file or an excel database. I'm not sure if I know how to do this(it could be a learning experience!), but I'll certainly script something before I resort to using a hex editor to play around... Consequently, I'll need a second script that will parse the outputted file and re-create a new binary .w3u. :P I did come across a tool that accomplished just this: see <http://www.thewarcenter.net/forums/index.php?showtopic=23786> Quote:
However, this is a dead link :(( If it's at all possible this file exists somewhere at wc3campaigns still, I'd love to get ahold of it! Otherwise, wish me luck trying to code something that can parse the file with perl. I did find the specifications for the .w3u file here: http://www.wc3campaigns.net/tools/specs/index.html (thanks zipir/pitzermike/blackdick) |
| 09-23-2007, 05:41 AM | #2 | |
Well, I went ahead and started reading it as binary in a hex editor... with an added pen and paper so I could translate it to "human" :P This is what I figured out(not that it isn't already listed on the w3m file formats page): Quote:
The header is basically irrelevant. The first table lists original units that are merely modified in some attribute, and the second table that follows has a very similar format, but creates a new unit id that is based off the original unit id but has all new attributes(does that make sense? I doubt any of this makes sense rofl :P).. Anyway, the attribute ids correspond to the fields you can modify in the Unit Editor(missile art, armor type, model file, etc). For instance, modification id [ua1m] corresponds to the attack 1 missile art field in Unit Editor. These ids are all available in the Units\UnitMetaData.slk database from the war3.mpq, but the names aren't very clear. My new question, then, is if anyone knows a handy webpage resource that lists all these unit datafield ids with what they control? But yeah, this would be insane to edit in a hex editor, so I'll need to figure out a way to parse it into a more "user-friendly" file format. |
| 09-25-2007, 12:50 AM | #3 |
--snip-- |
