Custom GFX Information
What is a GFX?
A GFX file is the file type that Warcraft II uses for all of it's images. It contains all the animations of a unit. These files are contained in MAINDAT.WAR in the DATA directory of War 2. This section will tell you to extract and edit them.
How to make Custom GFX's
To make a Custom GFX, you first need to extract the GFX file you want to edit from MAINDAT.WAR. To do this, you will need to use WarDraft. Just open it up and extract the file you want. After that, you need to extract the pallette you want to use. For Forest terrain, extract #2, for Wasteland, extract #10, for Winter, extract #18, and for Swamp, extract #438. Make sure to save them as .RGB files. If you just want to edit a unit (meaning that it isn't specifically for a certain terrain), then it doesn't matter what pallette you use (I suggest just using #2). Now, you need to use GFXConverter (which is now built into WarDraft) to convert the GFX into a BMP file for editing. Just open the GFX and pallette files and click on "Start Conversion". This should create a BMP file and a TXT file. When it asks you if you want to create a Mask file, choose no. Now, you need to use a paint program to edit the files. I use Paint Shop Pro, because it's easy to use and works good. When editing the files, depending on the pallette you are using, certain colors are different. Unless the unit you are editing are terrain specific, then you probably don't want to use those colors. Otherwise, your unit will look wrong in other terrains. Now, save it. When you are done, open up GFXConverter again. At the top, there should be 2 tags. The first one (which should already be selected), is for converting GFX's to BMP's, the second one is for converting BMP's back into GFX's. Click on the second one and choose the BMP file and TXT file you edited. After you're done, click on "Start Conversion" and it will change it back into a GFX file. Now you're done! Look at the next section to find out how to use them in the game.
How to Import a Custom GFX back into Warcraft II
If you want to use a Custom GFX that either you made or you downloaded, again, you need to have WarDraft. Open up MAINDAT.WAR and find the file that the GFX replaces. If you downloaded one from this page, the # that is in parenthesis is the offset(s) that the GFX is at (that's the # on the far left in WarDraft). Now, go to the right offset, and click on the "Import" button. A screen will come up asking you the location of the GFX and some other info. Put the location in the box (either by typeing it or using the Browse button). Now, click on the Box that says "Compress". Click on Import and then you're done.
What is a GFA file?
A GFA is almost exactly the same as a GFX. GFA is file type that War2 Alpha uses for its graphics. It is only slightly different than the GFX, but you can't even tell when you're editing them. Just read about GFX's, and you will understand GFA's.
How do I make a Custom GFA?
Making a Custom GFA is almost exactly the same as making a Custom GFX. The only difference is, that when you are in GFX Converter, to change a GFA file to a BMP, you must Choose "Alpha Standard" as the file type instead of the default "Standard". Otherwise, your bmp file will be all screwed up (it's a slightly different format than GFX's, as I said earlier). Just follow the rest of the steps for the Custom GFX, and you should be fine.
Where can I learn some more tricks on editing GFX's?
I created a much more extensive guide in Cameron's Campaign Author's Guide. It contains some extra tips on things, and more advanced explanations than here. Go under the "Graphic Editing" section.
WARNING!: This is a complex topic, I just briefly delved into what is possible with these tools. This tutorial is in no way comprehensive, its only aim is to get you started.. I hope this helps, and please send all questions, etc to the WARDRAFT FORUM
by: Cameron Buschardt(c027319@idt.net)
([url=http://www.geocities.com/SiliconValley/Park/1385]http://www.geocities.com/SiliconValley/Park/1385[/url]) <- War2 Util Page! (WARHACK and UDTAhack)
([url=http://idt.net/~c027319]http://idt.net/~c027319[/url]) <- for all us programmers!
Requirements:
A.) A NEW VERSION of 278 TOOLS (available on my War2 page)
B.) A text editor of some sort... ie NotePad or MSDOS editor
C.) A little knowledge of DOS commands
D.) WarDraft
A. Using the disassembler (D278)
Chances are you are not going to start of by writing an entire 278 file from scratch, you are probably just going to want to "TWEAK" what blizzard did. To do this you are going to need to extract the source from their 278 entry. Here's what to do:
First, you must have a decompressed and extracted copy of entry #278 of MAINDAT.WAR(use WarDraft to get this). Once you have extracted it, say we call it '278'. To get the source make sure D278.EXE is in the same directory as the 278 file and type the following at the DOS prompt:
C:\WAR2> D278 278 > 278src.txt
That line will create a text file called 278src.txt that you may edit. Windows 95 comes with both the MSDOS editor and notepad.. Use either :)
B. Using the assembler
Once you have made the necessary modifications to the file, you will need to recompile it simply type the following at the Dos Prompt (after making sure A278 is in the same directory as the source):
C:\WAR2> A278 278src.txt NEW278
Then in WarDraft be sure to import NEW278 .. :)
C. The scripting Language
Chances are you are not going to understand the code immediately so this section is devoted to showing you the in/outs of the language and the basic theory. Later on you will get some examples and practical applications. (
Here is a basic list of the language syntax: (note for the items in brackets, this means there if more than one POSSIBLE name, chose one from inside the brackets)
xxxx: A label where xxxx is the name of the label ; - Anything after a ';' is a COMMENT, and is ignored by A278.
[CMD_3,Goto] xxxx A Jump Command,transfers to label xxxx. Uxxx label - Unit declaration. Tells the game where to find the table of event handlers for a unit.
Exx label Declares an event handler. CMD_0,RESET,TASK_WAIT - End sequence (do other tasks)
[CMD_1,WAIT1,WAIT] xxxx Wait (not affected by Haste or Slow) where xxxx is the amount of time
[CMD_2,DEAD_WAIT] Dead (waits for maximum length)
[CMD_4,SHOW] xxxx Show frame #xxxx
[CMD_5,WALK] xxxx MOVE xxxx pixels(note in one MOVE handler the unit needs to move 32 pixels(no more no less). Also, this is for LAND units only !
[CMD_6,WALK_F,WALK_SHOW] xxxx,yyyy Walk xxxx pixels and show frame #yyyy
[CMD_7,WAIT2,WAIT_HSTSLW] xxxx Wait (affected by both Haste and Slow) for xxxx amount of time. If Haste is cast of this unit, this delay is shortened, and if slow is cast, this delay is lengthened
[CMD_8,WAIT_HST] xxxx Wait (affected by HASTE only) for xxxx amount of time. If slow is cast there is NO affect. If haste is cast, this delay is shortened.
[CMD_9,WAIT3,WAIT_SLW] xxxx Wait(affected by SLOW only) for xxxx time.. Used by knights, (they never can go faster even with haste, but are vincible to SLOW :)
[CMD_A,SOUND] Play Attack Sound
[CMD_B,SHOOT] Deal damage and fire projectile.
[CMD_C,WAIT4,WAIT_LOAD] Wait with load (adds one to wait time, then does 7) (ie allows load)
[CMD_D,FLOAT] xxxx MOVE xxxx pixels(note in one MOVE handler the unit needs to move 32 pixels(no more no less). Also, this is for SEA and AIR units only !
[CMD_E,FLOAT_A,FLOAT_SHOW] xxxx SAIL/FLY xxxx pixels and show frame #yyyy
[CMD_F,NEUTRALIZE] Make unit neutral (not this unit, rather its enemy)
Beyond the basic code syntax, the code is broken up into 3 sections (noted by the labels)
UNITS,PROGRAMS, and EVENTS. The Units section contain a pointer for each unit to its corresponding animation program. the PROGRAMS section has a pointer for each event handler. And the EVENTS section has the actual code for the event handlers.
Also note that in the EVENTS section: Event0 - Called after the unit dies.. After death animation? Event2 - Called for static animation(when the unit isn't moving)
D. A quick lesson
Well this is great you have a reference to the commands, you know a bit about the language, but how do you do cool stuff with this info? For example:
1. Giving the Paladins their own GFX
In the UNITS section, find the line for paladin (U12).
Write down the label (PROG_...) then change the line to read to read:
U12 Prog_Paladin ; Paladin 2.
Use Search to find the declaration of the label you wrote down (ie 'PROG_01C4:'), you should land in the PROGRAMS section with a group label 'knights and lothar' or something.
Copy the entire mini-group (your copied text should look something like the following):
Prog_01C4: ; Knight, Lothar E0 Global_1393 ;
Event0 E1 Event_08B7 ; Die E2
Event_08CE ; Event2 E3
Event_08D3 ; Move E4
Event_0903 ; Attack E5
Global_1389 ;Event5 E6
Global_1389 ; Event6
Now that you have Copied that, past it right above the one you copied it from, (2 identical ones in a row), and change the label of the newly added on to PROG_PALADIN: ..
Locate the events you want make "UNIQUE" by changing their labels in the newly added PROG_PALADIN section... ie to change the death event, look at E1, the label is EVENT_08B7 (write that down), then change it to Event_PDeath (paladin death).
Search for for the label you wrote down PLUS a colon at the end, and you will wind up and the event handler for the knights death.
Copy the entire routine(the comment, code,label, and up until the next handler starts) and paste a duplication in. Changes the duplicate's label to EVENT_PDEATH..
To customize his death simply change the code in your new event handler (PDEATH). Such examples would be to LENGTHEN the delays for the death animation so it remains longer, or to add a SHOOT command or 2 as sort of a kamikaze :) Anything you please.
D. More Coding tips
Now that you know the basics of it, you must know HOW the handlers work. The handler gets called for the unit, and during of which NO other events for that UNIT are called, so you must tell the computer when you're done by using RESET. On the computer routines you will notice them calling "GOTO GLOBAL_xxx" alot at the end of their programs.. This is simply a jump to a reset. But beware, the next time the animation is called it will return to after the last RESET (in that event handler). So a blank event handler would look like:
EVENT: RESET GOTO EVENT
If you emitted the RESET the unit would appear to freeze.. :)(He couldn't even die!) Also be sure to APPROPRIATELY use the WAIT1,2,and 3 instructions as you don't want an organic unit that is immune to HASTE and SLOW.
Also you probably don't understand (or immediatly know) what I am talking about on all this stuff, so please expierament and read the code.. D278 is perfect for learning.
5. Cool Things to try:
1. Take a grunt, and under his attack routine romove all of the shoot commands(so he can't fire) and create a custom EVENT_0 handler(unit created) that reads the following:
FOOTMAN_CREATE:
SHOOT ;********** this line has it shoot flame shield on itself..(never goes away)
_FOOTMAN_LOOP:
RESET
GOTO _FOOTMAN_LOOP
Then in UDTAhack make his main projectile: CAST FLAME-SHIELD ON SELF .. Now you have flame shielded footmen!
2. Add the neutralize command to the attack sequence of a unit :)
3. Give units a SHOOT command(or 20) in their death sequence (so they kill lots of guys when they get killed)
THE END! Well I hope it was helpful, it is a confusing topic, unless you have previous programming experience. If you have any questions please mail them to the WarDraft Forum.
Adding a unit
Last updated 7/25
This tutorial covers everything neccessary to add a unit into an unused slot, with my patch switching the unused unit34 into an Elder Assassin as an example. Doing this can require editing to UDTA, 278, icons, strings, sounds, and the EXE. It appears that adding in a train button doesn't work in version 1.5, I suggest you simply use an earlier version.
UDTA
There are two things to do in the UDTA. The simple part is merely switching all the stats from the old values to whatever stats you want the new unit to have. Also you need to change the default GFX for the unit, use UDTAhack for this.
278
This is fairly simple, just move the unit into the group you want it in, or move it to a new group and create all the necessary stuff for it. For the Elder Assassin I just moved it into the same group as the Archer, Ranger, and Alleria.
Icons
To add an icon, just convert each icon entry in maindat.war to a bmp with WarDraft, add in an icon to the end with a paint program, modify the layout.txt to look for one more icon, and reconvert. I'll put more info on exactly how to do this later. Replacing an unused icon instead of adding one is also an option.
Strings
Two strings are necessary, one for the unit's name and another for the train command. The names of the units are all in order, and there are blank strings for the unused entries, so you should probably enter the names here. The train unit could be placed in any unused string, or even on one added in if there was a program capable of adding strings to the list, I replaced string #280, Train Cleric.
Sounds
All you have to do with these is just stick them in a data file somewhere, and modify the EXE to point to them. I used the sounds from the German version of WarCraft II, you can get these and several other languages at Shlongler's page. I stuck the Assassin sounds in maindat entries 30-32 and 71-79.
The EXE
Basic Unit Stuff
Set Icon to the number of the icon you want to use, name to the string number that contains the name. Set unk to 1 if the new unit has no spells, 2 if it does. Fn A is believed to determine what the AI does when it controls the unit, all the moving units have the same value except the peasant, peon, tankers, and transports. You will normally want your unit to be the same as the normal units. Fn B determines which stats and upgrades are shown in the units stats box, set these to be the same as whichever unit you want this to be the same as. (Elvish Archer in the case of the Elder Assassin.) After death animation should be set based on what type of corpse you want, see WarHack's help for info on exact values.
Commands
Well, for the Elder Assassin patch we want the Elder Assassin to have the same commands as the Elvish Archer, so we simply change Unit34's commands and command data to be the same as an Archer's. We also want to add one command to the Barracks, which is more complicated. To do this, first set the Barracks commands to be one higher than before, and set the Command Data to be the same as the knight's. Then set the knight's commands and command data to be the same as a footman. Then go to the Command Editor and copy over the 6 commands from the barracks to the knight, and then add the new "Train Elder Assassin" command in the knight's seventh command slot. For the new command, the Icon value should be the same as the new unit's icon value, Position should normally be one higher than the highest position in the earlier commands, string should be the number of the string you want to show up for this command. Requirement variable and function should be set to the same as the build or train command for some other unit, and then this unit will not be available until the time that that unit or building is available. For the Elder Assassin, I set this to be the same as build church, so you can train an Elder Assassin once you have a Castle, just like a church. The action function should be the same as all the other train commands, and the action variable set to the number of the unit type you want to be trained. Flags are always 0 for the train commands, though I don't know what they do.
Sounds
For any sound that is not new for this unit, just set the value to be the same as another unit that uses the sound you want to use. The Elder Assassin does this for the attack sound, just set this value to be the same as the Elvish Archer's attack sound. For the new sounds we find a unit of the opposite race that has the same number of acknowledgement, selected, and annoyed sounds as our new unit. The Goblin Sapper works for the Elder Assassin. We then set the Elder Assassin's ready sound, acknowledgement function, and selected function to be the same as the Goblin Sapper's. Now we go to the sound list and find the which sounds refer to the Goblin Sappers. The Goblin Sapper's sounds are in entries 155-166 in Sfxdat.sud, so the entries that refer to them will have a value of 5155-5166. Also we know from the ready sound that sound 129 is the Goblin Sapper's ready sound. So we find that entries 126-137 refer to the Goblin Sapper's sounds. We now change the Human sound reference to point to the appropriate Elder Assassin sound. Leave the Hum Hero? bit set, I don't know what this does but I left it on and it worked :-) This will make it so that if a human captures a Goblin Sapper, it will sound like an Elder Assassin, and if an orc captures an Elder Assassin, it will sound like a Goblin Sapper, but as Peons, Peasants, Footman, and Grunts already sound wrong when captured, as does every building, this shouldn't matter.
If you have any questions or comments, or there is something you would like to see covered in a later tutorial, e-mail me.
For Warcraft II version 1.3 and 1.33 and 1.5 for PC. If there is only one offset, it applies to 1.33. When there are two offsets, the first is for 1.33 and the second is for 1.3. Any offset in {} is for version 1.5. Some info found by Cameron Buschardt.
Generic Info
A word is two bytes, a dword (double-word) or long is four bytes,
A file reference is a word that contains a value used to determine which entry in which data file to use. The value is equal to the entry number plus the data file number. Also, the high 3 bits (maybe more, but I haven't see others used yet) serve as flags, though I'm not sure what they are used for. In UDTA, it has file references for the GFX of each unit, there the high bit is set if the GFX has been used by a previous unit. Here are the data file numbers:
Maindat.war: 1000
Snddat.war: 2000
Rezdat.war: 3000
Strdat.war: 4000
Sfxdat.sun: 5000
Muddat.cud: 6000
Fixup Table Stuff - the fixup table is used by the dos extender, it changes all the values of all the call commands in the code to point to the proper location after it has switched to flat mode. Or something like that.
Offset 229361 / 229361: 129 dwords. Add these values to 229877 to get the offset of a section of the fixup table.
Offset 229877 / 229877: Fixup table. 7 or 9 bytes per entry.
Byte 1: 7
Byte 2: if 0, this one is length 9; if 16, length 7.
Bytes 3-4: 12 bit offset to place where this call is located. Add this value to 377508, and then add (4096 * x), where x is equal to the number of the section this function is in, with the first section being section 0.
Byte 5: Unknown
Bytes 6-7 or 6-9: Value of call. This same value will also be at the spot pointed to by bytes 3-4. You should change the value here, and not at the spot pointed to. Frequently this value is an offset in the code section, in which case you add it to 377508 to find the assembly code that gets called.
Built-in Levels
There are 52 of these, alternating Human then Orc, from levels 1-14, then 1x-12x.
Offset 844496: Victory Condition. Dword for each level. This is the Vicond table described in Laurence Pittenger's victory condition description, which can be found at the WarDraft message forum, I think.
Offset 844704: Rescue Table. Dword for each level. Described in same document.
Offset 844912: Unit and building restrictions. Dword for each level. Same format as in ALOW section of PUDs.
Offset 845120: Upgrade restrictions. Dword for each level. Same format as in ALOW section of PUDs.
Offset 845328: Spell restrictions. Dword for each level. Same format as in ALOW section of PUDs.
Sounds
Sound List
Offset 845608: Human Sound list. 345 words with references to the sounds to play for the human player. The high three bits are flags, with an unknown purpose.
Offset 846300: Orc Sound list. 345 words with reference to the sounds to play for the orc player. The high three bits are flags, with an unknown purpose.
Units
All Units
Offset 868288 / 868276: Unit Data. 14 bytes for all 110 units.
Bytes 1-2: Icon - number of the icon to show for this unit.
Bytes 3-4: Unknown
Bytes 5-6: Name string - number of the string to show as this units name.
Bytes 7-10: Function A - Unknown. Don't change the value here, change it in the fixup table.
Bytes 11-14: Function B - Determines what stats are shown when you click on a unit. For instance, if you change the footman's value to that of the farm, when you click on a footman it will show food grown and used.
Offset 867568 / 867556: More unit data. 6 bytes for 110 units, +10 other things. These come afterward and are:
Blank
Human Basic Build
Human Advanced Build
Orc Basic Build
Orc Advanced Build
Cancel
Cancel (I don't know how this is different from the previous one)
Cancel group. 3 cancel icons, with different strings associated with each.
Human group. These are the commands for a group of units controlled by the human player.
Orc group. Same as above, but for an orcish player.
Bytes 1-2: Number of commands
Bytes 3-6: Call to command data section. Change this value in the fixup table. Add this number to 836260 to find offset of first command. (As if they were in section 112.)
Offset 843736 - Function Z. Dword for each unit. Sets various variables based on the number of units of this type you have. Sets number of different types of units (at least, I think that is what this is), number of buildings, number of "dangerous" buildings, and amount of food produced by buildings.
Offset 490292 / 490132 - One byte for each unit. I don't know what it does.
Offset 490398 / 490242 - One byte for each unit. When switched to the value of another unit, the unit seems to become identical to the unit switched whose value it was switched to, and can cause Warcraft to crash.
First 58 units (non-building units)
Offset 844333: Death type. One byte each. What to do after death animation.
0 - Nothing.
1 - Leave human corpse.
2 - Leave orcish corpse.
3 - Sink.
Offset 847692: Unit attack sound. 58 words, one for each of the non-building units. This number refers to the sound from the sound list for the appropriate race. The first sound in the sound list is considered sound #0.
Offset 847808: Unit acknowledgement function. 58 dwords, each a call to a function that plays a random acknowledgment sound.
Offset 848040: Unit ready sound. 58 words. Number of sound in sound list to play when unit has just finished being trained.
Offset 848156: Unit selected sound. 58 dwords, each a call to a function that either plays a random selected sound, or the appropriate annoyed sound.
Command Data
Offset 861056 / 861044: Start of command data stuff. Each command has length 18, but because calling a location on a dword boundary is slightly faster, there are 2 unused bytes after the commands of each unit with an odd number of commands.
Bytes 1-2: Position - which spot this icon appears in.
Bytes 3-4: Icon - same as for units.
Bytes 5-8: Function - requirements for the command appearing. Change in fixup table.
Bytes 9-12: Function - action function. Call to code that tells unit what to do when command is executed.
Byte 13: Variable passed to requirement function. For icons that change with upgrade, such as the shield and sword icons, this determines which one is at which level. The one with this value set to 0 is there before you upgrade, 1 after 1st upgrade, and 2 after 2nd upgrade. Also, it seems to be 1 for commands which train a unit. Also set for spells.
Byte 14: Variable passed to action function. For commands that build a unit, building, or upgrade, it is the number of that building, unit, or upgrade. For build commands, has number of unit whose commands are switched to. Also set for spells.
Bytes 15-16: String. The string displayed at the bottom of the screen when the cursor is over this command.
Bytes 17-18: Unknown. Appears to be bit flags, with only one bit set in all cases.
Actions
There are 61 of these, listed in this order, from 0 to 60. Ones that are not listed are unknown, possible unused.
2 - Stop
3 - Move
5 - Patrol
8 - Attack
13 - Stand Ground
17 - Attack Ground
19 - Demolish
23 - Harvest
24 - Return with Goods
27 - Repair
29 - Unload Passengers
38 - Holy Vision
39 - Healing
41 - Exorcism
42 - Flame Shield
43 - Fireball
44 - Slow
45 - Invisibility
46 - Polymorph
47 - Ice Storm
48 - Eye of Kilrogg
49 - Bloodlust
50 - Raise Dead
51 - Death Coil
52 - Whirlwind
53 - Haste
54 - Unholy Armor
55 - Runes
56 - Death and Decay
Offset 860932 / 860920: Spells Casting Cost. 2 bytes for each of 61 actions. Set to 0 for all except spells.
Offset 854508: Spell Range. 1 byte for each of 61 actions. Possibly unused except for spells, I haven't checked.
Offset 853532: Action function A. Dword for each action. Change in fixup table. Probably determines legal targets.
Offset 853776: Action function B. Dword for each action. Change in fixup table. Unknown purpose, possibly action to take. All spells have the same value.
Offset 854020: Action function C. Dword for each action. Change in fixup table. For spells, action to take when cast. Most others are 0, possibly spells are the only ones used.
Offset 854264: Byte for each action. Unknown purpose. Values range from 0-6.
Offset 854325: Byte for each action. Unknown purpose. Value of 0 or 2.
Offset 854386: Word for each action. Unknown pupose. Possibly flags. Value of 12 for all spells.
Misc. action related stuff.
Flame Shield
Offset 547307: Word. Flame Shield duration.
Fireball
Offset 434476: Byte. Fireball damage.
Slow
Offset 547515: Word. Slow duration. This should always be negative. Only used when unit is already slowed.
Offset 547523: Dword. Amount to subtract from duration. Slow and haste share the same memory location, so if the value there is negative, the unit is slow, and if it is positive, it is hasted. This makes it so that a unit who is hasted, then slowed, will have the haste counteracted, and slow will take effect for less time the depending on how much time that was left on the haste.
Invisibility
Offset 547642: Word. Invisibility duration.
Polymorph
Offset 547752: Dword. The unit into which polymorph transforms units.
Ice Storm
Offset 433746: Byte. Ice Storm damage per missile.
Eye of Kilrogg
Offset 548125: Dword. Which unit to summon when Eye of Kilrogg is cast.
Bloodlust
Offset 548238: Word. Bloodlust duration.
Raise Dead
Offset 548432: Dword. The unit raised by raise dead.
Death Coil
Offset 549161: Byte. Death Coil damage.
Offset 549170: Byte. Death Coil damage.
Offset 549189: Byte. Death Coil damage.
Offset 549193: Dword. Death Coil damage.
Haste
Offset 549583: Word. Haste Duration. Only used if unit is already hasted.
Offset 549591: Dword. Value to add if not already hasted. See slow.
Unholy Armor
Offset 549712: Word. Unholy Armor duration.
Death and Decay
Offset 434161: Byte. Death and Decay damage per missile.
Missiles
There are 29 of these, from 0-28, in this order. A value of 29 is none.
Lightning
Gryphon Hammer
Dragon Breath/Fireball
Fireball when casting Flame Shield
Flame Shield
Blizzard
Death and Decay
Big Cannon
Exorcism
Heal Effect
Touch of Death
Rune
Tornado
Catapult Rock
Ballista Bolt
Arrow
Axe
Submarine Missile
Turtle Missile
Small Fire
Big Fire
Ballista/Catapult Impact
Normal Spell
Explosion
Cannon
Cannon Explosion
Cannon-Tower Explosion
Daemon Fire
Green Cross
Offset 848388: Word. Sound to play when missile hits target. Sometimes has high bit set.
Misc. File References
Tables
Offset 845588: Terrain list. 4 words, with references to the palette for the terrain type. Also loads the next 3 entries.
Offset 870684: Intro Image list. 52 words. File references for images to shown during intro of level. Alternates between human and orc, first with 14 original levels, then 12 expansion.
Offset 870788: Intro Sound list. File references to the wavs of the mission briefings. Each level has 1 or more file references, terminated by a word with value 0. Starts with the 14 basic orc levels, then the 12 expansion orc levels, then the 14 basic human levels, then the 12 expansion human levels.
Single Reference
Offset 486404 {489876}: 1000. Default UDTA.
Offset 493616 {497088}: 1001. Default UGRD.
Offset 576847 {581247}: 1187. Symbol GFX: Gold, Wood, Oil, Mana.
Offset 487253: 1192. First human level. Also refers to subsequent levels.
Offset 487298: 1192. First human level. Also refers to subsequent levels.
Offset 487315: 1192. First human level. Also refers to subsequent levels.
Offset 488263: 1192. First human level. Also refers to subsequent levels.
Offset 488278: 1192. First human level. Also refers to subsequent levels.
Offset 533377: 1192. First human level. Also refers to subsequent levels.
Offset 533514: 1192. First human level. Also refers to subsequent levels.
Offset 640277: 1192. First human level. Also refers to subsequent levels.
Offset 533370: 1193. First orc level. Also refers to subsequent levels.
Offset 533507: 1193. First orc level. Also refers to subsequent levels.
Offset 640220: 1193. First orc level. Also refers to subsequent levels.
Offset 487629: 1218. Last human level.
Offset 487757: 1218: Last human level.
Offset 487305: 1219. Last orc level.
Offset 488270: 1219. Last orc level.
Offset 469905 {473377}: 1277. AI control programs.
Offset 535987 {540387}: 1278. Unit movement control programs.
Offset 488615 {492087}: 1279. Font: Large font: episode titles.
Offset 488600 {492072}: 1280. Font: Small font: episode titles.
Offset 486073 {489545}: 1281. Font: Large font: menus.
Offset 486058 {489530}: 1282. Font: Small font: menus.
Offset 486043 {489515}: 1283. Font: Game font.
Offset 569957 {574357}: 1293. Image: Minimap border (top). Use this value if human, add one if orc.
Offset 495406 {498878}: 1295. Image: Minimap. Use this value if human, add one if orc.
Offset 569369 {573769}: 1297. Image: Panel (actions). Use this value if human, add one if orc.
Offset 569610 {574010}: 1297. Image: Panel (actions). Use this value if human, add one if orc.
Offset 582531 {586931}: 1299. Image: Title Screen.
Offset 485999 {489471}: 1300. Palette: for 299.
Offset 582559 {586959}: 1300. Palette: for 299.
Offset 486016 {489488}: 1301. Cursor: Human Gauntlet.
Offset 447264 {450736}: 1301. All of the cursors. A number from 0-21 is added to this.
Offset 486031 {489503}: 1313. Cursor: Hourglass.
Offset 466874 {470346}: 1323. Symbol GFX: Bloodlust, Haste, Slow, Invisibility, Shield.
Offset 466825 {470297}: 1324. All the Missile GFX. A number from 0-27 is added to this, depending on which missile it is.
Offset 466855 {470327}: 1353. GFX: Unit shadow.
Offset 571363 {575763}: 1354. Graphics: Panel (Unit stats). Use this value if human, add one if orc.
Offset 571336 {575736}: 1356. Icon GFX. Use this value if forest, add one if winter, add two if wasteland.
Offset 618269 {622697}: 1359. Images: Human/Orc Win/Lose. Use this value if human, add one if orc. Add two if you lost.
Offset 618239 {6222667}: 1363. Palettes: Human/Orc Win/Lose. Use this value if human, add one if orc. Add two if you lost.
Offset 634944 {639408}: 1367. Palette for Level Intro Images. Use this value if human, add one if orc.
Offset 537727 {542127}: 1432. Wav file.
Offset 539878 {544278}: 1432. Wav file.
Offset 571329 {575729}: 1471. Icon GFX for swamp.
Offset 486462 {489934}: 1472. Default UDTA for expansion.
Offset 493582 {497054}: 1472. Default UDTA for expansion.
Offset 454083 {457555}: 3000. Button GFX. Use this value if human, add one if orc.
Offset 486299 {489771}: 3001. Button GFX.
Offset 582311 {586711}: 3001. Button GFX.
Offset 402479 {404715}: 3002. Image: CD icon.
Offset 503339 {506811}: 3003. Image: Panel. Use this value if human, add one if orc.
Offset 620159 {624623}: 3003. Image: Panel. Use this value if human, add one if orc.
Offset 620747 {625211}: 3003. Image: Panel. Use this value if human, add one if orc.
Offset 622439 {626903}: 3003. Image: Panel. Use this value if human, add one if orc.
Offset 628123 {632587}: 3003. Image: Panel. Use this value if human, add one if orc.
Offset 629083 {633547}: 3003. Image: Panel. Use this value if human, add one if orc.
Offset 630235 {634699}: 3003. Image: Panel. Use this value if human, add one if orc.
Offset 404013 {406333}: 3005. Image: Panel. Use this value if human, add one if orc.
Offset 633311 {637775}: 3005. Image: Panel. Use this value if human, add one if orc.
Offset 625271 {629735}: 3007. Image: Panel. Use this value if human, add one if orc.
Offset 386151 {388215}: 3009. Image: Panel. Use this value if human, add one if orc.
Offset 386467 {388531}: 3009. Image: Panel. Use this value if human, add one if orc.
Offset 497610 {501082}: 3009. Image: Panel. Use this value if human, add one if orc.
Offset 611859 {616275}: 3009. Image: Panel. Use this value if human, add one if orc.
Offset 612143 {616563}: 3009. Image: Panel. Use this value if human, add one if orc.
Offset 612239 {616659}: 3009. Image: Panel. Use this value if human, add one if orc.
Offset 623615 {628079}: 3011. Image: Panel. Use this value if human, add one if orc.
Offset 582702 {587102}: 3013. Image: menu background with title. Also this value plus one, Palette.
Offset 582833 (587233}: 3013. Image: menu background with title. Also this value plus one, Palette.
Offset 638379 {642843}: 3014. Palette: for 0-13, 15, 91.
Offset 489126 {78436}: 3017. Palette: for maps.
Offset 635662 {640126}: 3027. Palette: for 28, 29.
Offset 635674 {640138}: 3028. Image: Credits background.
Offset 452592 {456064}: 3029. Image: End. Use this value if human, add one if orc.
Offset 452562 {456034}: 3031. Palette for Image: End. Use this value if human, add one if orc.
Offset 571385 {575785}: 3037. Screen layout info.
Offset 571400 {575800}: 3038. Screen layout info.
Offset 571420 {575820}: 3039. Screen layout info.
Offset 638830 {643294}: 3041. Screen layout info.
Offset 639915 {644379}: 3042. Screen layout info.
Offset 640173 {644637}: 3043. Screen layout info.
Offset 620995 {625459}: 3044. Screen layout info.
Offset 621965 {626429}: 3044. Screen layout info.
Offset 622127 {626591}: 3044. Screen layout info.
Offset 622386 {626850}: 3044. Screen layout info.
Offset 622830 {627294}: 3044. Screen layout info.
Offset 621766 {626230): 3045. Screen layout info.
Offset 622866 {627330}: 3045. Screen layout info.
Offset 621125 {625689}: 3046. Screen layout info.
Offset 621329 {625793}: 3046. Screen layout info.
Offset 621425 {625889}: 3046. Screen layout info.
Offset 621588 {626052}: 3046. Screen layout info.
Offset 621819 {626283}: 3046. Screen layout info.
Offset 622938 {627402}: 3046. Screen layout info.
Offset 621734 {626198}: 3047. Screen layout info.
Offset 622902 {627366}: 3047. Screen layout info.
Offset 620538 {625002}: 3048. Screen layout info.
Offset 629342 {633806}: 3049. Screen layout info.
Offset 628458 {632922}: 3050. Screen layout info.
Offset 622327 {626791}: 3051. Screen layout info.
Offset 622974 {627438}: 3051. Screen layout info.
Offset 623145 {627609}: 3052. Screen layout info.
Offset 622249 {626713}: 3055. Screen layout info.
Offset 623010 {627474}: 3055. Screen layout info.
Offset 622294 {626758}: 3056. Screen layout info.
Offset 623046 {627510}: 3056. Screen layout info.
Offset 612047 {616468}: 3057. Screen layout info.
Offset 612371 {616976}: 3058. Screen layout info.
Offset 618978 {623423}: 3062. Screen layout info.
Offset 626799 {631263}: 3063. Screen layout info.
Offset 626890 {631354}: 3063. Screen layout info.
Offset 626932 {631396}: 3063. Screen layout info.
Offset 627051 {631515}: 3063. Screen layout info.
Offset 626722 {631186}: 3064. Screen layout info. Add one sometimes.
Offset 626849 {631313}: 3064. Screen layout info. Add one sometimes.
Offset 630610 {635074}: 3066. Screen layout info.
Offset 630642 {635106}: 3067. Screen layout info.
Offset 404641 {406961}: 3068. Screen layout info.
Offset 404610 {406930}: 3069. Screen layout info.
Offset 404581 {406901}: 3070. Screen layout info.
Offset 404808 {407128}: 3070. Screen layout info.
Offset 404553 {406873}: 3071. Screen layout info.
Offset 404776 {407096}: 3071. Screen layout info.
Offset 632127 {636591}: 3072. Screen layout info.
Offset 632746 {637210}: 3073. Screen layout info.
Offset 632814 {637278}: 3074. Screen layout info.
Offset 385844 {387908}: 3075. Screen layout info.
Offset 499194 {502666}: 3076. Screen layout info.
Offset 633594 {638058}: 3077. Screen layout info.
Offset 386610 {388674}: 3078. Screen layout info.
Offset 638059 {642523}: 3079. Screen layout info.
Offset 638442 (642906}: 3079. Screen layout info.
Offset 402457 {404693}: 3080. Screen layout info.
Offset 621138 {625602}: 3081. Screen layout info.
Offset 621793 {626257}: 3081. Screen layout info.
Offset 635567 {640031}: 3082. Screen layout info. Use this value if human, add one if orc.
Offset 636438 {640902}: 3084. Screen layout info.
Offset 503570 {507042}: 3085. Screen layout info.
Offset 503706 {507178}: 3085. Screen layout info.
Offset 623962 {628426}: 3086. Screen layout info.
Offset 497983 {501455}: 3087. Screen layout info.
Offset 489789 {493261}: 3088. Screen layout info.
Offset 410351 {412675}: 3089. Screen layout info.
Offset 453390 {456862}: 3090. Screen layout info.
Offset 453462 {456934}: 3090. Screen layout info.
Offset 453535 {457007}: 3090. Screen layout info.
Offset 402494 {404730}: 3091. Image: Patch.
Offset 402440 {404676}: 3092. Screen layout info.
Offset 636102 {640566}: 3093. Palette for 94.
Offset 636114 {640578}: 3094. Image: Credits for extension background.
Offset 636468 {640932}: 3095. Screen layout info.
Offset 571299 {575699}: 4001. Strings: Unit names, etc.
Offset 384007 {386071}: 4040. Strings: Error and game messages.
Offset 633261 {637725}: 4043. Strings: Tips.
Offset 402350 {404586}: 4046. Strings: Multiplayer selections.
Offset 638042 {642506}: 4051. Strings: Insert CD-ROM.
Offset 620776 {625240}: 4054. Strings: Level objectives and titles.
Offset 634677 {639141}: 4054. Strings: Level objectives and titles.
Offset 452952 {456424}: 4058. Strings: Credits.
Offset 635738 {640202}: 4058. Strings: Credits.
Offset 618887 {623332}: 4059. Strings: Ranks.
Offset 623658 {628122}: 4060. Strings: Help dialog.
Offset 631490 {635954}: 4061. Strings: Modem dialog.
Offset 639579 {644042}: 4061. Strings: Modem dialog.
Offset 489156 {492628}: 4062. Strings: Act titles.
Offset 411775 {414099}: 4064. Strings: Titles of built in extra levels.
Offset 635045 {639509}: 4065. Strings: Intro for level. Add a value from 0-27. The value to add is (level number -1) * 2, +1 if orc. This is only used for Tides of Darkness levels.
Offset 635032 {639496}: 4071. Strings: Intro for level. Add a value from 28-51. The value to add is (level number - 13) * 2, +1 if orc. This is only used for Beyond the Dark Portal levels.
Offset 452691 {456163}: 4093. Strings: Final victory messages.
Offset 636144 {640608}: 4123. Strings: Credits.
Offset 638254 {642818}: 4125. Strings: Insert CD-ROM.
Offset 402375 {404611}: 6001. Screen layout info.
Offset 639174 {643638}: 6007. Screen layout info.
Offset 402416 {404652}: 6013. Screen layout info.
Misc.
Version Info: v1.0 offset 440788; v1.2 offset 441764; v1.3 offset 451460; v1.33 offset 451604. This is the string printed when you exit WarCraft, and includes the version number. For example, in 1.0 it is WARCRAFT 2 RETAIL v1.0.
Offset 855150 / 855138 - 7 pairs of 2 bytes. Each is a string number. I would guess the 7 longs following them are function calls for each of these.
Some 2 byte string values: These offset are only for 1.3, I haven't bothered finding them in 1.33 yet.
Offset 561342: "Food Usage"
Offset 561389: "Used:"
Offset 561450: "Grown:"
Well, that's it for now. This page will be updated as I learn more. If you have any questions or comments, email me at peterhatch@juno.com.