Welcome (Read FIRST!) MODDING INFO INSIDE
Quote from TuPaC on May 11, 2020, 4:13 pmMore Detailed War2.exe info! PART 2
[spoiler]
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.
[/spoiler]
More Detailed War2.exe info! PART 2
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.
Quote from TuPaC on June 16, 2020, 5:37 pmMore verbose .sav file format
[spoiler]
SAV File Format 00:0000-00:001F $ Description (31 characters+line terminator=1A) 00:0020-00:0023 L Game Id tag,if saved campaign then =0 else contains PUD Id tag. 00:0024-00:0027 L Game clock ??? 00:0028-00:002B $ Indentify caption "War2" 00:002C-00:002F L Version number *** 9F=1.33 00:0030-00:0031 W In campaign game,agrees with number+1000 of entry in maindat.war,where pud is stored. 00:0032 B Reserved1 00:0033 B Allied Victory 00:0034-00:0073 L Units and buildings allowed flags (16 players) b00: Footman/Grunt b01: Peasant/Peon b02: Ballista/Catapult b03: Knight/Ogre b04: Archer/Axe Thrower b05: Mage/Death Knight b06: Tanker b07: Destroyer b08: Transport b09: Battleship/Juggernaught b0A: Submarine/Giant Turtle b0B: Flying Machine/Gobblin Zeppelin b0C: Gryphon/Dragon b0D: Unused b0E: Dwarves/Sappers b0F: Aviary/Roost b10: Farm b11: Barracks b12: Lumber Mill b13: Stables/Mound b14: Mage Tower/Temple b15: Foundry b16: Refinery b17: Inventor/Alchemists b18: Church/Altar of Storms b19: Tower b1A: Town Hall/Great Hall b1B: Keep/Stronghold b1C: Castle/Fortress b1D: Blacksmith b1E: Shipyard b1F: Wall in multiplayer 00:0074-00:00B3 L Spells already known flags (16 players) b00: Holy Vision b01: Healing b02: Unused b03: Exorcism b04: Flame Shield b05: Fireball b06: Slow b07: Invisibility b08: Polymorph b09: Blizzard b0A: Eye of Killrog b0B: Bloodlust b0C: Unused b0D: Raise Dead b0E: Death Coil b0F: Whirlwind b10: Haste b11: Unholy Armor b12: Runes b13: Death and Decay b14: Unused : Unused b1F: Unused 00:00B4-00:00F3 L Spells allowed to research flags *bits like above 00:00F4-00:0133 L Spells currently researching *bits like above 00:0134-00:0173 L Upgrades allowed b00 Arrow 1 b01 Arrow 2 b02 Sword 1 b03 Sword 2 b04 Shield 1 b05 Shield 2 b06 Ship Cannon 1 b07 Ship Cannon 2 b08 Ship Armor 1 b09 Ship Armor 2 b0A Unused b0B Unused b0C Ballista 1 b0D Ballista 2 b0E Unused b0F Unused b10 Elven Rangers b11 Longbow b12 Scouting b13 Ranger Markmanship b14 Paladins b15 Unused : Unused b1F Unused 00:0174-00:01B3 L Upgrades currently being acquired *bits like above 00:01B4-00:01F3 L Player's (0..15) lumber amount 00:01F4-00:0233 L Player's gold amount 00:0234-00:0273 L Player's oil amount 00:0274-00:0283 B Player's arrow upgrade# 0=none,1=arrow 1,2=arrow 2 00:0284-00:0293 B Player's sword upgrade state,like above 00:0294-00:02A3 B Player's horses/wolfs upgrade state (War1 redundant) 00:02A4-00:02B3 B Player's shield upgrade state 00:02B4-00:02C3 B Player's ship armor upgrade state 00:02C4-00:02D3 B Player's ship cannon upgrade state 00:02D4-00:02E3 B Player's ship speed upgrade state ( unused ) 00:02E4-00:02F3 B Player's(0..15) race , 0=Human,1=Orc,2=Neutral 00:02F4-00:0303 B Player's(0..15) owners,0=person,1=computer, 2=passive,3=nobody 00:0304-00:0305 W Tileset(0=forest,1=ice,2=wasteland,3=swamp) 00:0306-00:0307 W Song currently played 00:0308-00:0309 W Scenario objectives 00=own 4 farms and 1 barracks 01=own 4 oil platforms and 1 shipyard 02=any oil refineries in game 03=kill attack peasants,build castle, destroy enemy 04=never used 05=free mages and peasants,destroy castle 06=destroy transports,oil platforms and shipyards 07=never used 08=destroy dark portal 09=destroy castle,have runestone at end 0A=build shipyard and fortress by circle of power 0B=destroy death knights and their temple , Grom must survive 0C=get violet player units,destory green, rescue white and have all heroes 0D=destroy all,Teron must survive 0E=capture dragons,capture dragon roost 0F=destroy all enemy ships,have 5 shipyards 10=kill daemon 11=destroy human buildings,rescue mage, return him to circle of power 12=destroy all mage towers,destroy violet player 13=destroy all humans,capture dark portal 14=rescue X units , Alleria , Danath , Turalyon must survive 15=destroy all,Danath must survive 16=destroy all strongholds and fortresses, Turalyon must survive,rescue X units 17=destroy enemy,have castle 18=destroy enemy shipyards , have 3 owns 19=destroy orange,bring Turalyon and Danath to circle 1A=Kill Deathwing,Khadgar , Alleria , Kurdran must survive 1B=destroy black fortress,raze altar 1C=play until retreat,heroes must survive 1D=destroy enemy,heroes must survive 1E=destroy dark prtal,only Khadgar can do this,must survive 0100=destroy all 0200=rescue X units,described below 00:030A B Number of units to rescue. 00:030B B Which units need to be rescued 16=only Hero flag units,0=any units 00:030C-00:030D W Victory region *** 00:030E-00:032D W Player's (0..15) Rescued persons number 00:032E-00:034D W Player's (0..15) Captured persons number 00:034E-00:034F W Map Dimensions,only one 00:0350-00:0351 W Reserved2 00:0352-00:0353 W Current map *** 00:0354 B Flag if Fog of war is enabled *1=yes,0=no 00:0355 B Right click mouse style *** 00:0356-00:0357 W Color cycles *** 00:0358 B Local Players 00:0359 B Total Players 00:035A B Number of Person Players 00:035B B Player side 00:035C B Message filter *** 00:035D B Flag if it is a custom game *1=yes,0=no 00:035E-00:035F W X Position of map window ??? 00:0360-00:0361 W Y Position of map window ??? 00:0362-00:0381 W Player's (0..15) men in progress *** (men trained ???) 00:0382-00:03A1 W Player's (0..15) dead men table (men by others killed ???) 00:03A2-00:03C1 W Player's buildings in progress (buildings build ???) 00:03C2-00:03E1 W Player's destroyed buildings table (buildings by others destr???) 00:03E2-00:0401 W Player's kills 00:0402-00:0421 W Player's razings 00:0422-00:0423 W Total rescued 00:0424-00:0425 W Total NPCs 00:0426-00:0465 L Player's total gold mined 00:0466-00:04A5 L Player's total lumber chopped 00:04A6-00:04E5 L Player's total oil hauled 00:04E6-00:05E5 B Enemy table *** 00:05E6-00:062D B Save map locations ??? (72 bytes) 00:062E-00:0631 L Campaign score 00:0632-00:0671 L Player's score 00:0672-00:0679 B Valid players *** 00:067A-00:07B9 $ Player's names each player 40 chars, $00=terminator 00:07BA-00:07D9 $ Customname ??? 00:07DA-00:07F9 $ Map description , $00=terminator 00:07FA-00:07FD L Custom checksum 00:07FE-00:083D L Selected group time ??? 00:083E-00:0841 L Saved score 00:0842-00:0851 B Player's ballista upgrade state 0=none,1=ballista 1,2=ballista 2 00:0852-00:0861 B Player's Ranger/Berserker upgrade state 00:0862-00:0871 B Player's Longbow/Light Axes upgrade state 00:0872-00:0881 B Player's Scouting upgrade state 00:0882-00:0891 B Player's Marksmanship/Regeneration state 00:0892-00:08C3 B Rune X position , max. 50 rune places=10 at once available runes ??? 00:08C4-00:08F5 B Rune Y position , see above 00:08F6-00:0959 W Runes delay , countdown ??? 00:095A-00:0B09 B Computer upgrade table ??? 00:0B0A-00:0B0B W Patch signal , used by savefix.exe ??? 00:0B0C-00:0B1B B Team color reorder ??? 00:0B1C-00:0B1D W Saved by ... ??? 00:0B1E-00:0FCF B 04B2 Reserved3 bytes 00:0FD0-00:8FCF W Reaction tile map 0000 Water 4000 Land FAFF Island (No Trans, no Land) FBFF Wall FDFF Rocks FEFF Forest 00:8FD0-01:0FCF W Tile map 0..384 tiles,any order +extended tiles like wall with 75 hits etc. 01:0FD0-01:8FCF W Movement map : Lo-bytes 01=land 11=dirt 40=water 81=forest 82=coast Hi-bytes 01=here is a land unit 02=here is an air unit 04=here is a naval unit 08=here is a building 01:8FD0-02:8FCF L Ground & sea unit map,containing unit number 0..599 indexing unit array,FFFF:FFFF=no unit here 02:8FD0-03:8FD0 L Flying unit map,see above. 03:8FD0-03:CFCF B Viewing map,fog of war map Tiles : xx xx xx xo =01 oo =02 ox =03 xo oo ox xo =04 oo =00 ox =06 xo oo ox xx =07 xx =08 xx =09 xo ox oo oo oo =0A oo =0B xo =0C ox =0D xo ox oxo ox =0E xo =0F oxo =05 03:CFD0-04:0FD0 B Discovering map,full black,tiles like above 04:4FD0-04:52CF R30 Player's(0..15) AI info table , record like this Index : Feature : 00 L AI timer 04 L AI sequence pointer 08 B Player flags 09 B Flag if can attack land 0A B Flag if can attack water 0B B Flag if can attack air 0C B Flag if strategy is on 0D B Land attack group size 0E B Amount of land attack groups 0F B Sea attack group size 10 B Amount of sea attack groups 11 B Air attack group size 12 B Amount of air attack groups 13 B Number of wanted peasants 14 B Number of wanted footmans 15 B Number of wanted archers 16 B Number of wanted catapults 17 B Number of wanted knights 18 B Number of wanted oil tankers 19 B Number of wanted destroyers 1A B Number of wanted transports 1B B Number of wanted battleships 1C B Number of wanted submarines 1D B Number of wanted mages 1E B Number of wanted flying machines 1F B Number of wanted demolition squads 20 B Number of wanted dragons 21 B Agressiveness level 22 B Maximum buildable units ??? 23 L Building order table 27 L Building wait table 2B B North ??? 2C B East ??? 2D B South ??? 2E B West ??? 2F B Next side ??? 04:52D0-04:53AB W Overlap frames for each unit (0..109) * group to belong number * see unit array section on 04:6C1A for units order 04:53AC-04:54A9 W Obsolete General grafix frames b00 : Entry number counting all archives b0C b0D Flag #2 b0E Flag #1 b0F Repeat flag *FFFF means no frame available *Units from 0-126 04:54AA-04:55A7 W Obsolete Forest grafix frames *see above 04:55A8-04:56A5 W Obsolete Winter grafix frames *see above 04:55A6-04:57A3 W Obsolete Wastelands grafix frames *see above 04:57A4-04:595B L Units sight range (110 units) 04:595C-04:5A37 W Units hit points (110 units) 04:5A38-04:5AA5 B Flag if unit is magic 0=no,1=yes 04:5AA6-04:5B13 B Units build time * 6 = one second 04:5B14-04:5B81 B Units gold cost divided by 10 04:5B82-04:5BEF B Units lumber cost divided by 10 04:5BF0-04:5C5D B Units oil cost divided by 10 04:5C5E-04:5E15 L Units size in tiles , first X , then Y 04:5E16-04:5FCD L Units box size in pixels , first X , then Y 04:5FCE-04:603B B Units attack range 04:603C-04:60A9 B Computer units reaction range 04:60AA-04:6117 B Person units reaction range 04:6118-04:6185 B Units armor amount 04:6186-04:61F3 B Selectable thru rectangle 0=no,1=yes 04:61F4-04:6261 B Priority , AI treatment, high x low 04:6262-04:62CF B Basic damage 04:62D0-04:633D B Piercing damage 04:633E-04:63AB B Weapon upgradable 0=no,1=yes 04:63AC-04:6419 B Armor upgradable 0=no,1=yes 04:641A-04:6487 B Missile weapon type 00 Lightning 01 Griffon Hammer 02 Dragon Breath 03 Flame Shield 04 ??? 05 ??? 06 ??? 07 Big Cannon 08 ??? 09 ??? 0A Touch of Death 0B ??? 0C ??? 0D Catapult Rock 0E Ballista Bolt 0F Arrow 10 Axe 11 Submarine Missile 12 Turtle Missile 13 ??? 14 ??? 15 ??? 16 ??? 17 ??? 18 Small Cannon 19 ??? 1A ??? 1B Daemon Fire 1C ??? 1D None *1E-FF ??? 04:6488-04:64F5 B Unit type 0=land,1=fly,2=naval *changes only appearance 04:64F6-04:6563 B Decay rate *dies in dacay * 6 , 0=never *only for units created via spell 04:6564-04:65D1 B Annoy computer factor 04:65D2-04:660B B Second mouse button click 01 Attack 02 Move 03 Harvest 04 Haul Oil 05 Demolish 06 Sail *only the first 58 units 04:660C-04:66E7 W Point value for killing unit 04:66E8-04:6755 B Which terrain can unit target 00 Nothing 01 Land 02 Sea 03 Land and Sea 04 Air 05 Land and Air 06 Land and Sea 07 Everything *Some missiles can not hit air units 04:6756-04:690D L Unit flags b00: Land unit b01: Air unit b02: Explode when killed (used on catapult) b03: Sea unit b04: Critter b05: Is a building b06: Is a submarine b07: Can see submarine b08: Is a peon b09: Is a tanker b0A: Is a transport b0B: Is a place to get oil b0C: Is a storage for gold b0D: Not used b0E: Can ground attack (only catapult and ships) b0F: Is undead (exorcism work on them) b10: Is a Shore building b11: Can cast spell b12: Is a storage for wood b13: Can attack b14: Is a tower b15: Is an oil patch b16: Is a mine b17: Is a hero b18: Is a storage for oil b19: Invisibility/Unholy armor kill this unit b1A: This unit act like a mage b1B: Is this unit organic (spells) b1C: Not used b1D: Not used b1E: Not used b1F: Not used 04:690E-04:6941 B Upgrade time *Upgrade type offsets 00 Sword 1 01 Sword 2 02 Axe 1 03 Axe 2 04 Arrow 1 05 Arrow 2 06 Spear 1 07 Spear 2 08 Human Shield 1 09 Human Shield 2 0A Orc Shield 1 0B Orc Shield 2 0C Human Ship Cannon 1 0D Human Ship Cannon 2 0E Orc Ship Cannon 1 0F Orc Ship Cannon 2 10 Human Ship Armor 1 11 Human Ship Armor 2 12 Orc Ship Armor 1 13 Orc Ship Armor 2 14 Catapult 1 15 Catapult 2 16 Ballista 1 17 Ballista 2 18 Train Rangers 19 Longbow 1A Ranger Scouting 1B Ranger Marksmanship 1C Train Berserkers 1D Lighter Axes 1E Berserker Scouting 1F Berserker Regeneration 20 Train Ogre Mages 21 Train Paladins 22 Holy Vision 23 Healing 24 Exorcism 25 Flame Shield 26 Fireball 27 Slow 28 Invisibility 29 Polymorph 2A Blizzard 2B Eye of Killrogg 2C Bloodlust 2D Raise Dead 2E Death Coil 2F Whirlwind 30 Haste 31 Unholy Armor 32 Runes 33 Death and Decay 04:6942-04:69A9 W Upgrade gold cost 04:69AA-04:6A11 W Upgrade lumber cost 04:6A12-04:6A79 W Upgrade oil cost 04:6A7A-04:6AE1 W Upgrade icon 04:6AE2-04:6B49 W Upgrade group applies to 04:6B4A-04:6C19 L Affect flags,what upgrade gives *For flags see unit and buildings *allowed section on 00:0034 04:6C1A-05:A179 R84 Units array,600 units , record 134 B long Index: Unit Feature: 00 W Display and clickable X position*32 02 W Display and clickable Y position*32 04 W Animator pointer in entry #278 06 B ??? 07 B Wait counter in entry #278 ??? 08 B ??? 09 B Unit frame nr. 0A B Orientation 0-7 , 0=N,1=NE,...,7=NW : : 10 W Real X position,used by minimap too 12 W Real Y position,used by minimap too : : 16 B Flags if unit can be healed ??? : : 1A W Hit points 1C B ??? 1D B Icon menu,available abilities to command 1E B Magic pts/Complete pts bar 1F B Unit identity,what really unit is 20 W Flag if unit slot is valid (FFFF=free) 22 B Move mode,0=ground,1=fly,2=water,3=nothing 23 B Look out,how unit is drawn on big map 24 B Which player control this unit 25 B Unit color of player dress 26 B Unit current action type : : 3C W Invisibility remaining time 3E W Unholy armor remaining time 40 W Bloodlust remaining time 42 W Haste/Slow remaining time Positive is haste , nagative slow 44 W ??? 46 W Flame shield remaining time : : 50 W X position in tiles ??? 52 W Y position in tiles ??? : : 64 W Start X position in tiles 66 W Start Y position in tiles 6D B If bit 5 set , unit has goods If bit 6 set , computer controlled ??? : : 76 B Command (14=building)??? 77 B Building what ??? 78 W Building X position ??? 7A W Gold in mine/Oil in patch divided by 100 Building Y position ??? 7C W Target X position/ % completed 7E W Target Y position 80 L Offset to unit array section to targeted unit *** *Unit Types 00 Footman 01 Grunt 02 Peasant 03 Peon 04 Ballista 05 Catapult 06 Knight 07 Ogre 08 Archer 09 Axethrower 0A Mage 0B Death Knight 0C Paladin 0D Ogre Mage 0E Dwarves 0F Goblin Sappers 10 Attack Peasant 11 Attack Peon 12 Ranger 13 Berserker 14 Alleria 15 Teron Gorefiend 16 Kurdan and Sky'ree 17 Dentarg 18 Khadgar 19 Grom Hellscream 1A Tanker H 1B Tanker O 1C Transport H 1D Transport O 1E Elven Destroyer 1F Troll Destroyer 20 Battleship 21 Juggernaught 22 Nothing 23 Deathwing 24 Nothing 25 Nothing 26 Gnomish Submarine 27 Giant Turtle 28 Gnomish Flying Machine 29 Goblin Zeppelin 2A Gryphon Rider 2B Dragon 2C Turalyon 2D Eye of Kilrogg 2E Danath 2F Korgath Bladefist 30 Nothing 31 Cho'gall 32 Lothar 33 Gul'dan 34 Uther Lightbringer 35 Zuljin 36 Nothing 37 Skeleton 38 Daemon 39 Critter 3A Farm 3B Pig Farm 3C Barracks H 3D Barracks O 3E Church 3F Altar of Storms 40 Scout Tower H 41 Scout Tower O 42 Stables 43 Ogre Mound 44 Gnomish Inventor 45 Goblin Alchemist 46 Gryphon Aviary 47 Dragon Roost 48 Shipyard H 49 Shipyard O 4A Town Hall 4B Great Hall 4C Elven lumber mill 4D Troll Lumber Mill 4E Foundry H 4F Foundry O 50 Mage Tower 51 Temple of the Damned 52 Blacksmith H 53 Blacksmith O 54 Refinery H 55 Refinery O 56 Oil Platform H 57 Oil Platform O 58 Keep 59 Stronghold 5A Castle 5B Fortress 5C Gold Mine 5D Oil Patch 5E Start Location H 5F Start Location O 60 Guard Tower H 61 Guard Tower O 62 Cannon Tower H 63 Cannon Tower O 64 Circle of Power 65 Dark Portal 66 Runestone 67 Wall H - not yet build 68 Wall O - not yet build 69 Dead Body 6A 1x1 Destroyed Place 6B 2x2 Destroyed Place 6C 3x3 Destroyed Place 6D 4x4 Destroyed Place 6E : Warcraft II Crashes FF 05:A17A-05:CA19 R34 Missiles array,200 missiles,record 52 B long Index : Missile Feature : 00 B ??? : 10 W Half of greater X or Y distance rounded down , but at least 1 12 W The greater of X or Y distance to target 14 W The lesser of X or Y distance to target : 17 B b05 Set if Y direction positive b06 Set if X direction positive b07 Set if X distance >= Y 18 W The greater of X or Y distance to target : 1E W Left time to hit target ??? 20 W X position in pixels of target 22 W Y position in pixels of target 24 L Offset to start of data for targeted unit : 2C B Missille type ??? : 2F B Damage amount *Missile types 00 Lightning 01 Griffon Hammer 02 Dragon Breath and Fireball 03 Fireball by Flame Shield 04 Flame Shield 05 Blizzard 06 Death and Deacy 07 Big Cannon 08 Exorcism 09 Heal Effect 0A Touch of Death 0B Rune 0C Whirlwind 0D Catapult Rock 0E Ballista Bolt 0F Arrow 10 Axe 11 Submarine Missile 12 Turtle Missile 13 Small Fire 14 Big Fire 15 Ballista and Catapult impact 16 Normal Spell 17 Explosion 18 Small Cannon 19 Cannon Explosion 1A Cannon Tower Explosion 1B Daemon Fire 1C Green Cross 1D None *1E-FF ??? 05:CA1A-05:D6FD B ??? Unknown 3300 bytes 05:D6FE-05:D93D B ??? Unknown 576 bytes 05:D93E < End of File[/spoiler]
More verbose .sav file format
SAV File Format 00:0000-00:001F $ Description (31 characters+line terminator=1A) 00:0020-00:0023 L Game Id tag,if saved campaign then =0 else contains PUD Id tag. 00:0024-00:0027 L Game clock ??? 00:0028-00:002B $ Indentify caption "War2" 00:002C-00:002F L Version number *** 9F=1.33 00:0030-00:0031 W In campaign game,agrees with number+1000 of entry in maindat.war,where pud is stored. 00:0032 B Reserved1 00:0033 B Allied Victory 00:0034-00:0073 L Units and buildings allowed flags (16 players) b00: Footman/Grunt b01: Peasant/Peon b02: Ballista/Catapult b03: Knight/Ogre b04: Archer/Axe Thrower b05: Mage/Death Knight b06: Tanker b07: Destroyer b08: Transport b09: Battleship/Juggernaught b0A: Submarine/Giant Turtle b0B: Flying Machine/Gobblin Zeppelin b0C: Gryphon/Dragon b0D: Unused b0E: Dwarves/Sappers b0F: Aviary/Roost b10: Farm b11: Barracks b12: Lumber Mill b13: Stables/Mound b14: Mage Tower/Temple b15: Foundry b16: Refinery b17: Inventor/Alchemists b18: Church/Altar of Storms b19: Tower b1A: Town Hall/Great Hall b1B: Keep/Stronghold b1C: Castle/Fortress b1D: Blacksmith b1E: Shipyard b1F: Wall in multiplayer 00:0074-00:00B3 L Spells already known flags (16 players) b00: Holy Vision b01: Healing b02: Unused b03: Exorcism b04: Flame Shield b05: Fireball b06: Slow b07: Invisibility b08: Polymorph b09: Blizzard b0A: Eye of Killrog b0B: Bloodlust b0C: Unused b0D: Raise Dead b0E: Death Coil b0F: Whirlwind b10: Haste b11: Unholy Armor b12: Runes b13: Death and Decay b14: Unused : Unused b1F: Unused 00:00B4-00:00F3 L Spells allowed to research flags *bits like above 00:00F4-00:0133 L Spells currently researching *bits like above 00:0134-00:0173 L Upgrades allowed b00 Arrow 1 b01 Arrow 2 b02 Sword 1 b03 Sword 2 b04 Shield 1 b05 Shield 2 b06 Ship Cannon 1 b07 Ship Cannon 2 b08 Ship Armor 1 b09 Ship Armor 2 b0A Unused b0B Unused b0C Ballista 1 b0D Ballista 2 b0E Unused b0F Unused b10 Elven Rangers b11 Longbow b12 Scouting b13 Ranger Markmanship b14 Paladins b15 Unused : Unused b1F Unused 00:0174-00:01B3 L Upgrades currently being acquired *bits like above 00:01B4-00:01F3 L Player's (0..15) lumber amount 00:01F4-00:0233 L Player's gold amount 00:0234-00:0273 L Player's oil amount 00:0274-00:0283 B Player's arrow upgrade# 0=none,1=arrow 1,2=arrow 2 00:0284-00:0293 B Player's sword upgrade state,like above 00:0294-00:02A3 B Player's horses/wolfs upgrade state (War1 redundant) 00:02A4-00:02B3 B Player's shield upgrade state 00:02B4-00:02C3 B Player's ship armor upgrade state 00:02C4-00:02D3 B Player's ship cannon upgrade state 00:02D4-00:02E3 B Player's ship speed upgrade state ( unused ) 00:02E4-00:02F3 B Player's(0..15) race , 0=Human,1=Orc,2=Neutral 00:02F4-00:0303 B Player's(0..15) owners,0=person,1=computer, 2=passive,3=nobody 00:0304-00:0305 W Tileset(0=forest,1=ice,2=wasteland,3=swamp) 00:0306-00:0307 W Song currently played 00:0308-00:0309 W Scenario objectives 00=own 4 farms and 1 barracks 01=own 4 oil platforms and 1 shipyard 02=any oil refineries in game 03=kill attack peasants,build castle, destroy enemy 04=never used 05=free mages and peasants,destroy castle 06=destroy transports,oil platforms and shipyards 07=never used 08=destroy dark portal 09=destroy castle,have runestone at end 0A=build shipyard and fortress by circle of power 0B=destroy death knights and their temple , Grom must survive 0C=get violet player units,destory green, rescue white and have all heroes 0D=destroy all,Teron must survive 0E=capture dragons,capture dragon roost 0F=destroy all enemy ships,have 5 shipyards 10=kill daemon 11=destroy human buildings,rescue mage, return him to circle of power 12=destroy all mage towers,destroy violet player 13=destroy all humans,capture dark portal 14=rescue X units , Alleria , Danath , Turalyon must survive 15=destroy all,Danath must survive 16=destroy all strongholds and fortresses, Turalyon must survive,rescue X units 17=destroy enemy,have castle 18=destroy enemy shipyards , have 3 owns 19=destroy orange,bring Turalyon and Danath to circle 1A=Kill Deathwing,Khadgar , Alleria , Kurdran must survive 1B=destroy black fortress,raze altar 1C=play until retreat,heroes must survive 1D=destroy enemy,heroes must survive 1E=destroy dark prtal,only Khadgar can do this,must survive 0100=destroy all 0200=rescue X units,described below 00:030A B Number of units to rescue. 00:030B B Which units need to be rescued 16=only Hero flag units,0=any units 00:030C-00:030D W Victory region *** 00:030E-00:032D W Player's (0..15) Rescued persons number 00:032E-00:034D W Player's (0..15) Captured persons number 00:034E-00:034F W Map Dimensions,only one 00:0350-00:0351 W Reserved2 00:0352-00:0353 W Current map *** 00:0354 B Flag if Fog of war is enabled *1=yes,0=no 00:0355 B Right click mouse style *** 00:0356-00:0357 W Color cycles *** 00:0358 B Local Players 00:0359 B Total Players 00:035A B Number of Person Players 00:035B B Player side 00:035C B Message filter *** 00:035D B Flag if it is a custom game *1=yes,0=no 00:035E-00:035F W X Position of map window ??? 00:0360-00:0361 W Y Position of map window ??? 00:0362-00:0381 W Player's (0..15) men in progress *** (men trained ???) 00:0382-00:03A1 W Player's (0..15) dead men table (men by others killed ???) 00:03A2-00:03C1 W Player's buildings in progress (buildings build ???) 00:03C2-00:03E1 W Player's destroyed buildings table (buildings by others destr???) 00:03E2-00:0401 W Player's kills 00:0402-00:0421 W Player's razings 00:0422-00:0423 W Total rescued 00:0424-00:0425 W Total NPCs 00:0426-00:0465 L Player's total gold mined 00:0466-00:04A5 L Player's total lumber chopped 00:04A6-00:04E5 L Player's total oil hauled 00:04E6-00:05E5 B Enemy table *** 00:05E6-00:062D B Save map locations ??? (72 bytes) 00:062E-00:0631 L Campaign score 00:0632-00:0671 L Player's score 00:0672-00:0679 B Valid players *** 00:067A-00:07B9 $ Player's names each player 40 chars, $00=terminator 00:07BA-00:07D9 $ Customname ??? 00:07DA-00:07F9 $ Map description , $00=terminator 00:07FA-00:07FD L Custom checksum 00:07FE-00:083D L Selected group time ??? 00:083E-00:0841 L Saved score 00:0842-00:0851 B Player's ballista upgrade state 0=none,1=ballista 1,2=ballista 2 00:0852-00:0861 B Player's Ranger/Berserker upgrade state 00:0862-00:0871 B Player's Longbow/Light Axes upgrade state 00:0872-00:0881 B Player's Scouting upgrade state 00:0882-00:0891 B Player's Marksmanship/Regeneration state 00:0892-00:08C3 B Rune X position , max. 50 rune places=10 at once available runes ??? 00:08C4-00:08F5 B Rune Y position , see above 00:08F6-00:0959 W Runes delay , countdown ??? 00:095A-00:0B09 B Computer upgrade table ??? 00:0B0A-00:0B0B W Patch signal , used by savefix.exe ??? 00:0B0C-00:0B1B B Team color reorder ??? 00:0B1C-00:0B1D W Saved by ... ??? 00:0B1E-00:0FCF B 04B2 Reserved3 bytes 00:0FD0-00:8FCF W Reaction tile map 0000 Water 4000 Land FAFF Island (No Trans, no Land) FBFF Wall FDFF Rocks FEFF Forest 00:8FD0-01:0FCF W Tile map 0..384 tiles,any order +extended tiles like wall with 75 hits etc. 01:0FD0-01:8FCF W Movement map : Lo-bytes 01=land 11=dirt 40=water 81=forest 82=coast Hi-bytes 01=here is a land unit 02=here is an air unit 04=here is a naval unit 08=here is a building 01:8FD0-02:8FCF L Ground & sea unit map,containing unit number 0..599 indexing unit array,FFFF:FFFF=no unit here 02:8FD0-03:8FD0 L Flying unit map,see above. 03:8FD0-03:CFCF B Viewing map,fog of war map Tiles : xx xx xx xo =01 oo =02 ox =03 xo oo ox xo =04 oo =00 ox =06 xo oo ox xx =07 xx =08 xx =09 xo ox oo oo oo =0A oo =0B xo =0C ox =0D xo ox oxo ox =0E xo =0F oxo =05 03:CFD0-04:0FD0 B Discovering map,full black,tiles like above 04:4FD0-04:52CF R30 Player's(0..15) AI info table , record like this Index : Feature : 00 L AI timer 04 L AI sequence pointer 08 B Player flags 09 B Flag if can attack land 0A B Flag if can attack water 0B B Flag if can attack air 0C B Flag if strategy is on 0D B Land attack group size 0E B Amount of land attack groups 0F B Sea attack group size 10 B Amount of sea attack groups 11 B Air attack group size 12 B Amount of air attack groups 13 B Number of wanted peasants 14 B Number of wanted footmans 15 B Number of wanted archers 16 B Number of wanted catapults 17 B Number of wanted knights 18 B Number of wanted oil tankers 19 B Number of wanted destroyers 1A B Number of wanted transports 1B B Number of wanted battleships 1C B Number of wanted submarines 1D B Number of wanted mages 1E B Number of wanted flying machines 1F B Number of wanted demolition squads 20 B Number of wanted dragons 21 B Agressiveness level 22 B Maximum buildable units ??? 23 L Building order table 27 L Building wait table 2B B North ??? 2C B East ??? 2D B South ??? 2E B West ??? 2F B Next side ??? 04:52D0-04:53AB W Overlap frames for each unit (0..109) * group to belong number * see unit array section on 04:6C1A for units order 04:53AC-04:54A9 W Obsolete General grafix frames b00 : Entry number counting all archives b0C b0D Flag #2 b0E Flag #1 b0F Repeat flag *FFFF means no frame available *Units from 0-126 04:54AA-04:55A7 W Obsolete Forest grafix frames *see above 04:55A8-04:56A5 W Obsolete Winter grafix frames *see above 04:55A6-04:57A3 W Obsolete Wastelands grafix frames *see above 04:57A4-04:595B L Units sight range (110 units) 04:595C-04:5A37 W Units hit points (110 units) 04:5A38-04:5AA5 B Flag if unit is magic 0=no,1=yes 04:5AA6-04:5B13 B Units build time * 6 = one second 04:5B14-04:5B81 B Units gold cost divided by 10 04:5B82-04:5BEF B Units lumber cost divided by 10 04:5BF0-04:5C5D B Units oil cost divided by 10 04:5C5E-04:5E15 L Units size in tiles , first X , then Y 04:5E16-04:5FCD L Units box size in pixels , first X , then Y 04:5FCE-04:603B B Units attack range 04:603C-04:60A9 B Computer units reaction range 04:60AA-04:6117 B Person units reaction range 04:6118-04:6185 B Units armor amount 04:6186-04:61F3 B Selectable thru rectangle 0=no,1=yes 04:61F4-04:6261 B Priority , AI treatment, high x low 04:6262-04:62CF B Basic damage 04:62D0-04:633D B Piercing damage 04:633E-04:63AB B Weapon upgradable 0=no,1=yes 04:63AC-04:6419 B Armor upgradable 0=no,1=yes 04:641A-04:6487 B Missile weapon type 00 Lightning 01 Griffon Hammer 02 Dragon Breath 03 Flame Shield 04 ??? 05 ??? 06 ??? 07 Big Cannon 08 ??? 09 ??? 0A Touch of Death 0B ??? 0C ??? 0D Catapult Rock 0E Ballista Bolt 0F Arrow 10 Axe 11 Submarine Missile 12 Turtle Missile 13 ??? 14 ??? 15 ??? 16 ??? 17 ??? 18 Small Cannon 19 ??? 1A ??? 1B Daemon Fire 1C ??? 1D None *1E-FF ??? 04:6488-04:64F5 B Unit type 0=land,1=fly,2=naval *changes only appearance 04:64F6-04:6563 B Decay rate *dies in dacay * 6 , 0=never *only for units created via spell 04:6564-04:65D1 B Annoy computer factor 04:65D2-04:660B B Second mouse button click 01 Attack 02 Move 03 Harvest 04 Haul Oil 05 Demolish 06 Sail *only the first 58 units 04:660C-04:66E7 W Point value for killing unit 04:66E8-04:6755 B Which terrain can unit target 00 Nothing 01 Land 02 Sea 03 Land and Sea 04 Air 05 Land and Air 06 Land and Sea 07 Everything *Some missiles can not hit air units 04:6756-04:690D L Unit flags b00: Land unit b01: Air unit b02: Explode when killed (used on catapult) b03: Sea unit b04: Critter b05: Is a building b06: Is a submarine b07: Can see submarine b08: Is a peon b09: Is a tanker b0A: Is a transport b0B: Is a place to get oil b0C: Is a storage for gold b0D: Not used b0E: Can ground attack (only catapult and ships) b0F: Is undead (exorcism work on them) b10: Is a Shore building b11: Can cast spell b12: Is a storage for wood b13: Can attack b14: Is a tower b15: Is an oil patch b16: Is a mine b17: Is a hero b18: Is a storage for oil b19: Invisibility/Unholy armor kill this unit b1A: This unit act like a mage b1B: Is this unit organic (spells) b1C: Not used b1D: Not used b1E: Not used b1F: Not used 04:690E-04:6941 B Upgrade time *Upgrade type offsets 00 Sword 1 01 Sword 2 02 Axe 1 03 Axe 2 04 Arrow 1 05 Arrow 2 06 Spear 1 07 Spear 2 08 Human Shield 1 09 Human Shield 2 0A Orc Shield 1 0B Orc Shield 2 0C Human Ship Cannon 1 0D Human Ship Cannon 2 0E Orc Ship Cannon 1 0F Orc Ship Cannon 2 10 Human Ship Armor 1 11 Human Ship Armor 2 12 Orc Ship Armor 1 13 Orc Ship Armor 2 14 Catapult 1 15 Catapult 2 16 Ballista 1 17 Ballista 2 18 Train Rangers 19 Longbow 1A Ranger Scouting 1B Ranger Marksmanship 1C Train Berserkers 1D Lighter Axes 1E Berserker Scouting 1F Berserker Regeneration 20 Train Ogre Mages 21 Train Paladins 22 Holy Vision 23 Healing 24 Exorcism 25 Flame Shield 26 Fireball 27 Slow 28 Invisibility 29 Polymorph 2A Blizzard 2B Eye of Killrogg 2C Bloodlust 2D Raise Dead 2E Death Coil 2F Whirlwind 30 Haste 31 Unholy Armor 32 Runes 33 Death and Decay 04:6942-04:69A9 W Upgrade gold cost 04:69AA-04:6A11 W Upgrade lumber cost 04:6A12-04:6A79 W Upgrade oil cost 04:6A7A-04:6AE1 W Upgrade icon 04:6AE2-04:6B49 W Upgrade group applies to 04:6B4A-04:6C19 L Affect flags,what upgrade gives *For flags see unit and buildings *allowed section on 00:0034 04:6C1A-05:A179 R84 Units array,600 units , record 134 B long Index: Unit Feature: 00 W Display and clickable X position*32 02 W Display and clickable Y position*32 04 W Animator pointer in entry #278 06 B ??? 07 B Wait counter in entry #278 ??? 08 B ??? 09 B Unit frame nr. 0A B Orientation 0-7 , 0=N,1=NE,...,7=NW : : 10 W Real X position,used by minimap too 12 W Real Y position,used by minimap too : : 16 B Flags if unit can be healed ??? : : 1A W Hit points 1C B ??? 1D B Icon menu,available abilities to command 1E B Magic pts/Complete pts bar 1F B Unit identity,what really unit is 20 W Flag if unit slot is valid (FFFF=free) 22 B Move mode,0=ground,1=fly,2=water,3=nothing 23 B Look out,how unit is drawn on big map 24 B Which player control this unit 25 B Unit color of player dress 26 B Unit current action type : : 3C W Invisibility remaining time 3E W Unholy armor remaining time 40 W Bloodlust remaining time 42 W Haste/Slow remaining time Positive is haste , nagative slow 44 W ??? 46 W Flame shield remaining time : : 50 W X position in tiles ??? 52 W Y position in tiles ??? : : 64 W Start X position in tiles 66 W Start Y position in tiles 6D B If bit 5 set , unit has goods If bit 6 set , computer controlled ??? : : 76 B Command (14=building)??? 77 B Building what ??? 78 W Building X position ??? 7A W Gold in mine/Oil in patch divided by 100 Building Y position ??? 7C W Target X position/ % completed 7E W Target Y position 80 L Offset to unit array section to targeted unit *** *Unit Types 00 Footman 01 Grunt 02 Peasant 03 Peon 04 Ballista 05 Catapult 06 Knight 07 Ogre 08 Archer 09 Axethrower 0A Mage 0B Death Knight 0C Paladin 0D Ogre Mage 0E Dwarves 0F Goblin Sappers 10 Attack Peasant 11 Attack Peon 12 Ranger 13 Berserker 14 Alleria 15 Teron Gorefiend 16 Kurdan and Sky'ree 17 Dentarg 18 Khadgar 19 Grom Hellscream 1A Tanker H 1B Tanker O 1C Transport H 1D Transport O 1E Elven Destroyer 1F Troll Destroyer 20 Battleship 21 Juggernaught 22 Nothing 23 Deathwing 24 Nothing 25 Nothing 26 Gnomish Submarine 27 Giant Turtle 28 Gnomish Flying Machine 29 Goblin Zeppelin 2A Gryphon Rider 2B Dragon 2C Turalyon 2D Eye of Kilrogg 2E Danath 2F Korgath Bladefist 30 Nothing 31 Cho'gall 32 Lothar 33 Gul'dan 34 Uther Lightbringer 35 Zuljin 36 Nothing 37 Skeleton 38 Daemon 39 Critter 3A Farm 3B Pig Farm 3C Barracks H 3D Barracks O 3E Church 3F Altar of Storms 40 Scout Tower H 41 Scout Tower O 42 Stables 43 Ogre Mound 44 Gnomish Inventor 45 Goblin Alchemist 46 Gryphon Aviary 47 Dragon Roost 48 Shipyard H 49 Shipyard O 4A Town Hall 4B Great Hall 4C Elven lumber mill 4D Troll Lumber Mill 4E Foundry H 4F Foundry O 50 Mage Tower 51 Temple of the Damned 52 Blacksmith H 53 Blacksmith O 54 Refinery H 55 Refinery O 56 Oil Platform H 57 Oil Platform O 58 Keep 59 Stronghold 5A Castle 5B Fortress 5C Gold Mine 5D Oil Patch 5E Start Location H 5F Start Location O 60 Guard Tower H 61 Guard Tower O 62 Cannon Tower H 63 Cannon Tower O 64 Circle of Power 65 Dark Portal 66 Runestone 67 Wall H - not yet build 68 Wall O - not yet build 69 Dead Body 6A 1x1 Destroyed Place 6B 2x2 Destroyed Place 6C 3x3 Destroyed Place 6D 4x4 Destroyed Place 6E : Warcraft II Crashes FF 05:A17A-05:CA19 R34 Missiles array,200 missiles,record 52 B long Index : Missile Feature : 00 B ??? : 10 W Half of greater X or Y distance rounded down , but at least 1 12 W The greater of X or Y distance to target 14 W The lesser of X or Y distance to target : 17 B b05 Set if Y direction positive b06 Set if X direction positive b07 Set if X distance >= Y 18 W The greater of X or Y distance to target : 1E W Left time to hit target ??? 20 W X position in pixels of target 22 W Y position in pixels of target 24 L Offset to start of data for targeted unit : 2C B Missille type ??? : 2F B Damage amount *Missile types 00 Lightning 01 Griffon Hammer 02 Dragon Breath and Fireball 03 Fireball by Flame Shield 04 Flame Shield 05 Blizzard 06 Death and Deacy 07 Big Cannon 08 Exorcism 09 Heal Effect 0A Touch of Death 0B Rune 0C Whirlwind 0D Catapult Rock 0E Ballista Bolt 0F Arrow 10 Axe 11 Submarine Missile 12 Turtle Missile 13 Small Fire 14 Big Fire 15 Ballista and Catapult impact 16 Normal Spell 17 Explosion 18 Small Cannon 19 Cannon Explosion 1A Cannon Tower Explosion 1B Daemon Fire 1C Green Cross 1D None *1E-FF ??? 05:CA1A-05:D6FD B ??? Unknown 3300 bytes 05:D6FE-05:D93D B ??? Unknown 576 bytes 05:D93E < End of File
Quote from TuPaC on June 16, 2020, 5:38 pmIcon stuff 1.33
[spoiler]
Explanation of the icon banks (unit/building graphics use exactly the same format) ================================================================================== The icons (or "buttons") are stored in maindat.war, entry #356 (summer), #357 (winter), #358 (wasteland) and #471 (swamp). (The respective color palettes are #2,#10,#18 and #438.) Table of contents: 1. File header format 2. Icon data header 3. Icon graphics data 4. Example *1* File header format: The icon file starts with an offset-table, similar to war-archives or string-tables: (Offs.) (Len) (Explanation) (I'll refer to this as..) $0000 1 word number of entries (icons) "nument" $0002 1 word maximum width in pixels (46) "maxw" $0004 1 word maximum height in pixels (38) "maxh" $0006 8 bytes infos and offset for icon #0 (see below) $000E 8 bytes infos and offset for icon #1 (see below) ... 6+(nument-2)*8 8 bytes infos and offset for icon #(nument-2) (see below) 6+(nument-1)*8 8 bytes infos and offset for icon #(nument-1) (see below) The 8 bytes for each icon are structured like this: 1 byte X displacement 1 byte Y displacement 1 byte width in pixels 1 byte height in pixels 1 long offset from beginning of file to the actual icon data *2* Icon data header: This starts with an offset table again; these offsets are relative to the start of the icon data, and there is one offset (word) for each vertical line. (I'll refer to the start of the icon data as "IStart"): (Fileoffset) (Len) (explanation) IStart + $0000 1 word offset to graphics data for line 0 IStart + $0002 1 word offset to graphics data for line 1 ... IStart + (height-1)*2 1 word offset to graphics data for line (height-1) *3* Icon graphics data: The actual graphics data is compressed with a variation of RLE (Run Length Encoding): The first byte is a control byte (I'll call it "count"). If bit #6 is set in count (count AND $40 <> 0): repeat the next byte (count - $40) times If bit #7 is set in count (count AND $80 <> 0): leave (count - $80) pixels transparent If neither bit #6 or #7 are set: take the next (count) bytes as pixel values "count"(binary) action to perform 00xxxxxx take the next xxxxxx bytes as pixel values 01xxxxxx repeat the next byte xxxxxx times 1yyyyyyy leave yyyyyyy pixels transparent After the pixel values there is another control byte, and so on.... Attention: if you write a decoding routine, keep in mind that in some cases the length of the "compressed" data is actually longer than uncompressed ! *4* Example: Ok, let's extract the icon of a grunt (icon #3); we'll use the summer icons (entry #356). First we need to get the information entry for this icon: Go to file position 6+3*8 (= $1E). Read two bytes "X -" and "Y displacement" (both 0) Read one byte "width" ($2E = dec. 46) Read one byte "height" ($26 = dec. 38) Read one long "IStart" ($000018F6) Now we know the icon has size 46 x 38. Let's decode the first line (line #0): Go to file position (IStart + line# * 2); for line #0 this is IStart ($18F6) Read one word "dataoffset" ($004C) Go to file position (IStart + dataoffset) ($1942) Read one byte "count" ($82) $82 has bit #7 set and #6 cleared, so this means we have to make the next 2 pixels transparent; Preserve the value of coordinates (0,0); Preserve the value of coordinates (1,0); (or set them both to the background colour; depends on what you use transparent pixels for) Read one byte "count" ($03) $03 has neither bit #6 or #7 set, meaning the following three bytes are pixel values: Read one byte ($EF), put color $EF to coordinates (2,0); Read one byte ($EF), put color $EF to coordinates (3,0); Read one byte ($63), put color $63 to coordinates (4,0); Read one byte "count" ($45) $45 has bit #7 cleared and #6 set, meaning that we have to repeat the next byte 5 times: Read one byte ($65) Put color $65 to coordinates (5,0),(6,0),(7,0),(8,0) and (9,0) Read one byte "count" ($21) $21 has neither bit #6 or #7 set, meaning the following $21 (dec.33) bytes are pixel values: Read one byte ($68), put color $68 to coordinates (10,0); Read one byte ($6B), put color $6B to coordinates (11,0); ...... Read one byte ($86), put color $86 to coordinates (42,0); Read one byte "count" ($43) $43 has bit #7 cleared and #6 set, meaning that we have to repeat the next byte 3 times: Read one byte ($87) Put color $87 to coordinates (43,0),(44,0) and (45,0) Since the icon width is 45, we are done with line #0. Now repeat this for lines #1 - #37; If you find that there is something wrong with the above explanation, please let me know. Alexander Cech <e8900070@student.tuwien.ac.at>[/spoiler]
Icon stuff 1.33
Explanation of the icon banks (unit/building graphics use exactly the same format) ================================================================================== The icons (or "buttons") are stored in maindat.war, entry #356 (summer), #357 (winter), #358 (wasteland) and #471 (swamp). (The respective color palettes are #2,#10,#18 and #438.) Table of contents: 1. File header format 2. Icon data header 3. Icon graphics data 4. Example *1* File header format: The icon file starts with an offset-table, similar to war-archives or string-tables: (Offs.) (Len) (Explanation) (I'll refer to this as..) $0000 1 word number of entries (icons) "nument" $0002 1 word maximum width in pixels (46) "maxw" $0004 1 word maximum height in pixels (38) "maxh" $0006 8 bytes infos and offset for icon #0 (see below) $000E 8 bytes infos and offset for icon #1 (see below) ... 6+(nument-2)*8 8 bytes infos and offset for icon #(nument-2) (see below) 6+(nument-1)*8 8 bytes infos and offset for icon #(nument-1) (see below) The 8 bytes for each icon are structured like this: 1 byte X displacement 1 byte Y displacement 1 byte width in pixels 1 byte height in pixels 1 long offset from beginning of file to the actual icon data *2* Icon data header: This starts with an offset table again; these offsets are relative to the start of the icon data, and there is one offset (word) for each vertical line. (I'll refer to the start of the icon data as "IStart"): (Fileoffset) (Len) (explanation) IStart + $0000 1 word offset to graphics data for line 0 IStart + $0002 1 word offset to graphics data for line 1 ... IStart + (height-1)*2 1 word offset to graphics data for line (height-1) *3* Icon graphics data: The actual graphics data is compressed with a variation of RLE (Run Length Encoding): The first byte is a control byte (I'll call it "count"). If bit #6 is set in count (count AND $40 <> 0): repeat the next byte (count - $40) times If bit #7 is set in count (count AND $80 <> 0): leave (count - $80) pixels transparent If neither bit #6 or #7 are set: take the next (count) bytes as pixel values "count"(binary) action to perform 00xxxxxx take the next xxxxxx bytes as pixel values 01xxxxxx repeat the next byte xxxxxx times 1yyyyyyy leave yyyyyyy pixels transparent After the pixel values there is another control byte, and so on.... Attention: if you write a decoding routine, keep in mind that in some cases the length of the "compressed" data is actually longer than uncompressed ! *4* Example: Ok, let's extract the icon of a grunt (icon #3); we'll use the summer icons (entry #356). First we need to get the information entry for this icon: Go to file position 6+3*8 (= $1E). Read two bytes "X -" and "Y displacement" (both 0) Read one byte "width" ($2E = dec. 46) Read one byte "height" ($26 = dec. 38) Read one long "IStart" ($000018F6) Now we know the icon has size 46 x 38. Let's decode the first line (line #0): Go to file position (IStart + line# * 2); for line #0 this is IStart ($18F6) Read one word "dataoffset" ($004C) Go to file position (IStart + dataoffset) ($1942) Read one byte "count" ($82) $82 has bit #7 set and #6 cleared, so this means we have to make the next 2 pixels transparent; Preserve the value of coordinates (0,0); Preserve the value of coordinates (1,0); (or set them both to the background colour; depends on what you use transparent pixels for) Read one byte "count" ($03) $03 has neither bit #6 or #7 set, meaning the following three bytes are pixel values: Read one byte ($EF), put color $EF to coordinates (2,0); Read one byte ($EF), put color $EF to coordinates (3,0); Read one byte ($63), put color $63 to coordinates (4,0); Read one byte "count" ($45) $45 has bit #7 cleared and #6 set, meaning that we have to repeat the next byte 5 times: Read one byte ($65) Put color $65 to coordinates (5,0),(6,0),(7,0),(8,0) and (9,0) Read one byte "count" ($21) $21 has neither bit #6 or #7 set, meaning the following $21 (dec.33) bytes are pixel values: Read one byte ($68), put color $68 to coordinates (10,0); Read one byte ($6B), put color $6B to coordinates (11,0); ...... Read one byte ($86), put color $86 to coordinates (42,0); Read one byte "count" ($43) $43 has bit #7 cleared and #6 set, meaning that we have to repeat the next byte 3 times: Read one byte ($87) Put color $87 to coordinates (43,0),(44,0) and (45,0) Since the icon width is 45, we are done with line #0. Now repeat this for lines #1 - #37; If you find that there is something wrong with the above explanation, please let me know. Alexander Cech <e8900070@student.tuwien.ac.at>
Quote from TuPaC on June 16, 2020, 5:41 pmTile info
[spoiler]
How the map tile graphics are stored ==================================== In maindat.war there is a section for each terrain-type, consisting of 7 entries. I will refer to these entries as "entry A" ... "entry G" For summer these are entry 2-8, wasteland: 10-16, winter: 18-24 and swamp: 438-444. I will use the expressions - "minitile" for 8x8 pixel raw graphic data - "megatile" for 32x32 pixel graphics, composed out of 16 minitiles - "map tile" for the values used in the MTXM section in PUDs Entry A: Color palette for the terrain type (256 * 3 bytes [RGBRGBRGB... and so on]) Entry B: Information about how to find the "minitiles" (8x8) for "megatiles" (32x32) Entry C: Contains 16 masks (32x32) for the fog of war, followed by the minitile-data Entry D: Information about how to find the "megatiles" for "map tiles" (the values in MTXM) Entry E-G: Still unknown. Confused by now ? Well, it isn't too complicated: Each megatile is composed out of 16 minitiles in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Entry B contains 16 words for each mega-tile; the last two bits of this word are mirror-flags. if bit #0 is set you have to flip the minitile about its Y-axis, if bit #1 is set, the X-axis. The rest of the word (word AND $FFFC) has to be multiplied by 16 to get an offset into entry C: there you find the respective mini-tile data. Entry D contains a chunk of 42 bytes for each unique map tile ($000x - $09Dx). The first 16 words of this chunk contain tile-numbers for the variations of this map tile (the "x" above). If one of these words is zero, that means the respective tile-number is not used. (to get the correct offset just use this formula: ((map tile >> 4) * 42 + (map tile AND 15) * 2) Then come 8 bytes and 1 word; these are still unknown. Ok, I think an example will make this *much* clearer: Suppose we find map tile $0052 (light grass) in MTXM. This means we need the third (counting starts with 0) word in the fifth chunk of entry D: 5 * 42 + 2 * 2 = 214, so we read the word at offset 214 in entry D. (This is 356 for summer) Now we have the tile-number. We need to multiply this by 32, because entry B contains 32 bytes (16 words) for each tile-number: 356 * 32 = 11392. We go to offset 11392 in entry B; there we find an array of 16 words: $1288, $10F8, $1104, ...., $114F, $11F8. ^__ notice this one ! (see text below) Each of these (words AND $FFFC) is the file-offset into entry C, divided by 16. So to read the data for the first mini-tile we go to offset $12880 (= $1288 * 16) in entry C and read 64 bytes of data (64, because each minitile is size 8x8). This minitile goes directly (because neither bit #0 or #1 is set) into the upper left corner, of the megatile. Now the next minitile: go to offset $10F80 (= $10F8 * 16) in entry C, read 64 bytes, place it into the second "column" in the first "row" (see illustration above). And so on... We eventually reach the word $114F - this has both bit #0 and #1 set, meaning the tile we find at offset $114C0 (= ($114F AND $FFFC) * 16) has to be X-flipped AND Y-flipped before copying it into position 15 (according to the diagram above). Continue, until we have read the last minitile at offset $11F80 and placed it into the lower right corner. DONE! Note that there are a lot of zeroes in entry D, because not all theoretically possible map tiles are used. If you find that there is something wrong with the above explanation, please let me know. Alexander Cech <e8900070@student.tuwien.ac.at> Appendix: The tilenumbers 0-15 are reserved for the masks; the first "real" tilenumber is 16. Entry B contains the following data in its first 16 chunks (each 32 bytes long): (Offset) (Data) $0000 $0000, 15 x $0000 $0020 $0004, 15 x $0000 $0040 $0008, 15 x $0000 $0060 $000C, 15 x $0000 ... $01E0 $003C, 15 x $0000 The 8 unknown bytes for each megatile in entry B are used by the map editor to set the surroundings of a placed tile.[/spoiler]
Tile info
How the map tile graphics are stored ==================================== In maindat.war there is a section for each terrain-type, consisting of 7 entries. I will refer to these entries as "entry A" ... "entry G" For summer these are entry 2-8, wasteland: 10-16, winter: 18-24 and swamp: 438-444. I will use the expressions - "minitile" for 8x8 pixel raw graphic data - "megatile" for 32x32 pixel graphics, composed out of 16 minitiles - "map tile" for the values used in the MTXM section in PUDs Entry A: Color palette for the terrain type (256 * 3 bytes [RGBRGBRGB... and so on]) Entry B: Information about how to find the "minitiles" (8x8) for "megatiles" (32x32) Entry C: Contains 16 masks (32x32) for the fog of war, followed by the minitile-data Entry D: Information about how to find the "megatiles" for "map tiles" (the values in MTXM) Entry E-G: Still unknown. Confused by now ? Well, it isn't too complicated: Each megatile is composed out of 16 minitiles in this order: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Entry B contains 16 words for each mega-tile; the last two bits of this word are mirror-flags. if bit #0 is set you have to flip the minitile about its Y-axis, if bit #1 is set, the X-axis. The rest of the word (word AND $FFFC) has to be multiplied by 16 to get an offset into entry C: there you find the respective mini-tile data. Entry D contains a chunk of 42 bytes for each unique map tile ($000x - $09Dx). The first 16 words of this chunk contain tile-numbers for the variations of this map tile (the "x" above). If one of these words is zero, that means the respective tile-number is not used. (to get the correct offset just use this formula: ((map tile >> 4) * 42 + (map tile AND 15) * 2) Then come 8 bytes and 1 word; these are still unknown. Ok, I think an example will make this *much* clearer: Suppose we find map tile $0052 (light grass) in MTXM. This means we need the third (counting starts with 0) word in the fifth chunk of entry D: 5 * 42 + 2 * 2 = 214, so we read the word at offset 214 in entry D. (This is 356 for summer) Now we have the tile-number. We need to multiply this by 32, because entry B contains 32 bytes (16 words) for each tile-number: 356 * 32 = 11392. We go to offset 11392 in entry B; there we find an array of 16 words: $1288, $10F8, $1104, ...., $114F, $11F8. ^__ notice this one ! (see text below) Each of these (words AND $FFFC) is the file-offset into entry C, divided by 16. So to read the data for the first mini-tile we go to offset $12880 (= $1288 * 16) in entry C and read 64 bytes of data (64, because each minitile is size 8x8). This minitile goes directly (because neither bit #0 or #1 is set) into the upper left corner, of the megatile. Now the next minitile: go to offset $10F80 (= $10F8 * 16) in entry C, read 64 bytes, place it into the second "column" in the first "row" (see illustration above). And so on... We eventually reach the word $114F - this has both bit #0 and #1 set, meaning the tile we find at offset $114C0 (= ($114F AND $FFFC) * 16) has to be X-flipped AND Y-flipped before copying it into position 15 (according to the diagram above). Continue, until we have read the last minitile at offset $11F80 and placed it into the lower right corner. DONE! Note that there are a lot of zeroes in entry D, because not all theoretically possible map tiles are used. If you find that there is something wrong with the above explanation, please let me know. Alexander Cech <e8900070@student.tuwien.ac.at> Appendix: The tilenumbers 0-15 are reserved for the masks; the first "real" tilenumber is 16. Entry B contains the following data in its first 16 chunks (each 32 bytes long): (Offset) (Data) $0000 $0000, 15 x $0000 $0020 $0004, 15 x $0000 $0040 $0008, 15 x $0000 $0060 $000C, 15 x $0000 ... $01E0 $003C, 15 x $0000 The 8 unknown bytes for each megatile in entry B are used by the map editor to set the surroundings of a placed tile.
Quote from TuPaC on October 31, 2020, 11:04 amWarHack Tutorial
[spoiler]
The Complete (almost) WarHack Manual, version 1.0Created by Andy Bond (King Arthur) with some additional notes provided by Cameron Buschardt (aka Merlin), author of WarHack.
Please direct all questions regarding this manual to: Merlin or Otak
Definitions:NOTE: For sake of correct referencing, all ranges, etc that I refer to assume that we are starting from 0, and including that number in the count... which would mean 0, 1, 2, 3 rather than 1,2,3,4... so if you would prefer to get the actual numbers, etc, then add 1 to each value I give you, but you must use the correct 0 -> ? referencing in WarHack when entering variables, etc. If you don't then the game will most likely crash, and we don't want that to happen, now do we? 🙂
ALSO NOTE: All values which I will be refering to are derived from the 1.33 version of WarCraft II, which has come to be used as the universally hacked exe, due to its relative ease of use, and the lack of any code encryption. Also, most people use this, or have access to it when editing because it is by far the most popular version of the EXE. While 1.0, 1.2, 1.3, 1.4, and 1.5 are all probably in use, they each might have different values for certain variables, and are not as widely used. 1.4 and 1.5 were made by Blizzard to combat the cheating, etc that had been going on in multiplayer games. While this was their main reason for introducing a new version of the EXE, they also were able to encrypt much of the exe, making it relatively unhackable as yet... Therefore, while you are certainly able to use most of the above-mentioned EXE versions, be aware that values which I refer to may be different depending on your version.
Byte: A single variable of information. Values range from 0-255 Decimal.
Word: Two bytes of information stored in sequence.
Double Word: Four bytes of information stored in sequence.
Unit Editor: Used to define various values for each of the 104 units in WarCraft, in addition to the extra non-unit listings towards the end. Unit 105 is the generic corpse which decays on the battlefield. Units 106-109 are the four Rubble areas as refered to in PudDraft, in sequence of their size, 1x1, 2x2, 3x3, 4x4. Units 110-119 are the group commands and the cancel buttons which appear. They have no direct link to any of the units in that changing variables here will effect any units. Changing variables here will only effect the appearance of various group commands, etc. In addition, the Basic and Advanced menus for the peasant/peon are located in unit positions 111-114.
Each of the following defined variables may be accessed by pressing their corresponding key on the keyboard, which is highlighted in Blue next to them. For your convenience, I have organized this list in access-key alphabetical order, and not the alphabetical order of the variable. For example: The icon variable may be changed by pressing the letter "a" on the keyboard. This will bring up a small box where you can enter in the value you desire.
Icon: This is the icon of the unit displayed when you click on it. The numbers here refer to the sequence in the icon entries of Maindat.war. As such, any editing you make must be within the values of 0-195, otherwise the game will crash. In the icon entries, there are also various quarter-sized icons which were left over from the Alpha version of WarCraft. Although you may use these icons if you wish, I strongly reccomend against it. Several times I tried to use them and either my game crashed, or they appeared incorrectly. They appear the same size that they do in the Icon bitmap in Maindat.war, and the resulting border around them in the area which is not filled with the icon is filled with random colors.
Name: This is the string loaded from the names entry of Strdat.war which defines what your unit is called. While you may use any string you want, keep in mind that many strings towards the end are training strings to be used only in the command editor, and would produce undesireable effects should you decide to use them as unit names.
Unk: Although marked as Unknown, this variable actually determines what type of unit the selected unit is. All non-magic units have a value of 1, all magic units such as the Paladin, Mage, etc. have a value of 2, all buildings have a value of 3, and both Start Locations have a value of 0. While you may set this value to whatever you desire, it is reccomended that you stick with unit type values for units and building type values for buildings. I have not as yet tested what would happen if you gave a unit a value of 3, but I would not reccomend it.
Fn A: This Function A defines what the selected unit acts like. All units except for the Peasant, Peon, Attack Peasant, Attack Peon, Transports, and Oil Tankers have a value of 180524. Peasant, Peon, Attack Peasant, and Attack Peon values are: 182912. Oil Tanker values are: 183036. Transport values are: 183200. The buildings have different values for almost each different building, although the variables are grouped so that the Humans and Orcs have the same value for their equivalent buildings.
Fn B: This Function B determines what values are shown in the status area of a unit when you click on it. The values are as follows for version 1.33. Should you wish to determine the values for 1.3, simply subtract 400 from each value listed.
178680 = Nothing 180780 = Picture, name, health, level 180876 = Standard unit, sword and shield upgrades 181676 = Standard unit, ballista and shield upgrades 182008 = Standard unit, arrow and shield upgrades 182572 = Picture, name, health 182988 = Unknown 183264 = Standard ship, doesn't show health when has passengers 183716 = Standard unit, cannon and armor upgrades 184624 = Food stats 185960 = Standard building, Training: 186260 = Show all production 186696 = Standard building, Training: 187136 = Show wood production, Upgrading: 187444 = Standard building, Upgrading: 187744 = Standard building, Researching: 188036 = Standard building, Training:/Researching: 188432 = Standard building, Upgrading: 188736 = Unit stats except speed 189064 = Show oil production 189476 = Show oil remaining. Str Text: String Text which is not directly editable. You would have to change what is displayed by either changing the value in the name variable in WarHack, or by Changing the corresponging string in WarDraft's String editor. The Str Text simply displays the value you've selected from your current Data files.
Commands: Determines how many commands that a particular unit has. For units which have no commands at all, this value is set to 0. (obviously) Keep in mind that because of upgrades, etc units which appear to have only 5 or 6 commands in WarCraft II may in fact have more due to their changing icons or functions. As such, you will need to "enable" all commands for a unit by using the appropriate number of commands that you have changed in the Command Editor, not the final number of displayed commands.
Cmd Data: The value here determines the starting offset of the command your unit is to use. Often this value is displayed with a "*" after the numerical value, but it is not necessary to put one in there, and indeed one will not always show up if you put one in there. Don't worry if it doesn't, though, the correct number of commands will still be read, provided you have given the unit the proper offsets, etc.
I should make note that several interesting effects can happen through careful and prudent editing of this value... You may do what I call "Command Overloading." Simply defined, this allows a unit to access the commands of whichever unit has them directly after your units commands. However, this does not mean that if you chose the Footman for example, you would necessarily obtain the grunt's commands. How do you accomplish this: simply change the Commands value as described above to be a number higher than your unit actually has. If you are able to determine which units commands follow the current units, you can in fact add more commands to a unit then are currently listed. So in effect you could take the normal footman, which has 10 commands, change the Commands value to 20 or something, and double its number of commands. Without proper editing of the second set of commands, you will have very buggy and silly looking structures of commands. However, with patience and careful editing, you will be able to create your desired effect and utilize all the commands you wish. Keep in mind that only 9 commands can be displayed at a time, however. You can also do what I refer to as "Command Splicing." Based on the same principles as "Command Overloading," Command Splicing merely takes the commands that you desire from a unit which already has them defined, but only takes a beginning, middle, or end section. Careful manipulation will allow you to use whichever commands you desire, should you organize them in the target unit's commands correctly. You will be unable to use out of sequence commands, however. For an example, let's say I wanted to give the Flying Machine only one command, that of the Footman's Patrol command. To start off with, I would change the Commands value to 1. Then I would exit out of the Unit Editor and bring up the Command Editor. I would load up the footman's commands on the screen and scroll over until I reached his Patrol command, in this case command #8. Then you must take careful note of the Current CMD Offs (Current Command Offsets), and write down the value that is displayed here... this value you will then put
into the Flying Machine's Cmd Data: section in the Unit Editor. When you load up WarCraft II, the Flying Machine will now have the Patrol Icon in its command section, and will be able to patrol.
I have tested this method and it has worked for me... so far. Your use of these methods will probably remain limited for a while, at least until you become more familiar with WarHack.
After Death: The value here determines what is shown after the death sequence of a unit. The possible values you may use are:
0 = Displays no corpse after the units death sequence. (The mage and ballista have this set, for example) 1 = Displays a Human-type corpse after its death sequence. 2 = Displays and Orc-type corpse after its death sequence. 3 = Displays air bubbles after the sink sequence of a ship. Ready: The value will choose which sound is played when the unit is finished training. The value is referenced from the Sound Editor order, and not from the order of the WAV files in Sfxdat.sud. For further information for advanced editors, I think this is the sound played during the units' Event 0 (unit created?) animation seqence in the 278 entry, but I'm not sure on whether the created event is in fact Event 0.
Attack: The attack sound to play for a unit during its attack animation sequence, as referenced by the Sound Editor.
Ack Fn: The Acknowledge function value which determines which sounds are to be played by the particular unit after you have given it an order.
Sel.Fn: The Selected function value which determines which sounds are played when you select a unit, as well as the annoyed sounds (if any) for a unit.
Command Editor: This is a somewhat advanced and complicated editor that should not be messed around with casually. Capable of wreaking havoc with your EXE, this editor can prove to be very useful and very dangerous. I reccomend that you write down ANY and ALL changes you make in the Command Editor. This will save you a lot of time debugging programs, and will enable you to backtrack until you are able to get your EXE to work properly. I also suggest that you make as few changes as possible to the EXE at a time, and test after each set of changes is complete... this will make your debugging even easier, as you will know exactly what caused any problems due to the small number of changes you should make each time. The Command Editor allows you to change ALL commands in the EXE for every unit that has them. You should also be aware that many units share commands, and as such, when you change commands for one unit, you may be inadvertantly changing them for another unit.
Each of the following defined variables may be accessed by pressing their corresponding key on the keyboard, which is highlighted in Blue next to them. For your convenience, I have organized this list in access-key alphabetical order, and not the alphabetical order of the variable. For example: The icon variable may be changed by pressing the letter "a" on the keyboard. This will bring up a small box where you can enter in the value you desire.
Icon: The number of the Icon to be displayed on the button of a particular command. The useable and defined values are from 0-195.
Pos: The position that a command is to take in the command section of the WarCraft II screen. You may use the following table as a reference for the locations (keeping in mind that many commands will have the same position as another, merely because they are upgraded icons, etc):
0 1 2 3 4 5 6 7 8 String: The string that is displayed when your mouse pointer is over a button, it also defines the "hotkey" that will activate the command. The hotkey is shown in lower-case in the preview Str Txt section. The values in the String section refer to the Names string in Strdat.war, in the order that they appear there.
Req Var: The Requirement variable which determines when an icon (or command if you prefer) is to appear in the Command Section of the WarCraft II screen. The value here is set to 0 most of the time, except with commands which reflect upgrades or other changes which would cause a different icon or command to appear or be called. The Req var can also store the value that an upgrade is to add to the current value of a weapon, etc. The requirement variable is also used by Magic units to determine whether the necessary researching has been performed. The values of the Requirement variables for spells ONLY are:
0 = Holy Vision 1 = Healing 2 = Unknown/Unused Spell 3 = Exorcism 4 = Flame Shield 5 = Fireball 6 = Slow 7 = Invisibility 8 = Polymorph 9 = Blizzard 10 = Eye of Krilogg 11 = Bloodlust 12 = Unknown - Possibly another unused spell. 13 = Raise Dead 14 = Death Coil 15 = Whirlwind 16 = Haste 17 = Unholy Armor 18 = Runes 19 = Death & Decay 20 = Unknown - Possibly another unused spell. Act Var: The Action variable of the command is set to 0 for most of the commands, except those which train units, perform upgrades, research spells, cast spells, or have multiple menus for commands, such as the peasant or peon. In the case of training units, the value here is the number of the unit to be trained, as referenced by the order of the units in WarHack, and the corresponding numbers beside the units' name. When performing an upgrade, the Act Var determines the number of the upgrade which is parsed, or read by the Action Function. So far I have been able to determine the values of defined upgrades as follows: (At the end there are additional values found by Cameron Buschardt (aka Merlin) with their corresponding costs, etc.)
0 = Human Sword Upgrade #1 1 = Human Sword Upgrade #2 2 = Orc Weapon Upgrade #1 3 = Orc Weapon Upgrade #2 4 = Arrow Upgrade #1 5 = Arrow Upgrade #2 6 = Axe Upgrade #1 7 = Axe Upgrade #2 8 = Human Shield Upgrade #1 9 = Human Shield Upgrade #2 10 = Orc Shield Upgrade #1 11 = Orc Shield Upgrade #2 12 = Human Ship Cannon Upgrade #1 13 = Human Ship Cannon Upgrade #2 14 = Orc Ship Cannon Upgrade #1 15 = Orc Ship Cannon Upgrade #2 16 = Human Ship Armor Upgrade #1 17 = Human Ship Armor Upgrade #2 18 = Orc Ship Armor Upgrade #1 19 = Orc Ship Armor Upgrade #2 20 = Catapult Upgrade #1 21 = Catapult Upgrade #2 22 = Ballista Upgrade #1 23 = Ballista Upgrade #2 24 = Archer -> Ranger Upgrade 25 = Ranger Scouting 26 = Ranger Longbow 27 = Ranger Marksmanship 28 = Axethrower -> Beserker Upgrade 29 = Beserker Scouting 30 = Beserker Lighter Axes 31 = Beserker Regeneration 32 = Ogre -> Ogre Mage Upgrade 33 = Knight -> Paladin Upgrade 53 = Crashes when you click on it. Cost 1 lumber. 54 = Crashes when you click on it. Cost 1 lumber + 8 oil. 55 = Does nothing when clicked - might have no effect flag. Costs 1 lumber. 56 = When upgrading, it shows the lumbermill, has a build time and an unknown effect. Costs 4 oil. 58 = Does nothing when clicked - might have no effect flag. Costs 8 oil. 59 = Does nothing when clicked - might have no effect flag. Shows Arrow #1 when you click on it. Costs nothing. 61 = Does nothing when clicked - might have no effect flag. Cost 21 lumber. 62 = Does nothing when clicked - might have no effect flag. Cost 21 lumber + 1 oil. 100 = Does nothing when clicked - might have no effect flag. Cost 16 lumber. 150 = Does nothing when clicked - might have no effect flag. Cost 8192 gold + 103 lumber. The Action Variable may also be used when spells are researched. The following values define which spell is researched by which Act Var. You'll notice that I have defined values here for spells which aren't actually required to be researched. This should help you if you decide you want to make the Holy Vision spell, for example, not appear automatically, but rather be researched by the paladin before he can use it.
34 = Holy Vision 35 = Healing 36 = Exorcism 37 = Flame Shield 38 = Fireball 39 = Slow 40 = Invisible 41 = Polymorph 42 = Blizzard 43 = Eye of Krilogg 44 = Bloodlust 45 = Raise Dead 46 = Death Coil 47 = Whirlwind 48 = Haste 49 = Unholy Armor 50 = Runes 51 = Death & Destruction When casting spells, the Action Variable called determines which spell is cast. The order is as follows: (The values actually determine which Actions are called in the Action Editor... you may change the values here to those of another action, but I've not experimented with this).
38 = Holy Vision 39 = Healing 40 = Unknown/ Unused Spell 41 = Exorcism 42 = Flame Shield 43 = Fireball 44 = Slow 45 = Invisibility 46 = Polymorph 47 = Blizzard 48 = Eye of Krilogg 49 = Bloodlust 50 = Raise Dead 51 = Death Coil 52 = Whirlwind 52 = Haste 53 = Unholy Armor 54 = Runes 55 = Death and Decay The multiple menus refer to the fact that when you click on the Basic and Advanced Build buttons of the peasant or peon, these commands in turn call an additional list of commands which will clear the current screen and display the new build commands. The Act Var of the Peasant's (or Peon's) Basic or Advanced Build buttons determines what menu will be called, referencing to the order of the Units in WarHack. The predifined values for the Peasant and Peon Act Vars for these Basic Build and Advanced Build icons are: 111, 112, 113, 114, in order. While I believe it would be possible to set the values here to something different, I have not tested it. Theoretically, you could call another Units' commands this way, but I wouldn't try doing this until you're familiar and comfortable with WarHack.
Req Fn: The Requirement Function for a command sometimes utilizes the Requirement Variable to determine when an icon (or command) appears. This is not always the case, and there are many preset values which determine when the icon (or command) appears without a Req Var. The following list (written by Cameron Buschardt) will define all the possible values that the Requirement Function may have. Any X that is used in the definition refers to the value in the Requirement Variable. All defininitions refer only to the Human units, although the orc units equivalents are implied unless an orc value is defined separately.
Value Meaning Used For 172688 Always Move, Patrol, Stand Ground, various others. 172796 Can build Oil Platform Tanker command 5 172820 ?? Cancel group command 1 172852 ?? Cancel group command 2 172900 ?? Cancel group command 3 173044 Can upgrade arrows to X+1 Lumber mill commands 1 & 2 173080 If arrow upgrade = X Attack for archers and axethrowers. 173112 Can upgrade sword to X+1 Blacksmith commands 1 & 2 173148 Can upgrade ballista to X+1 Blacksmith commands 5 & 6 173184 Can upgrade to Rang./Bers. Lumber mill 3 173260 Can upgrade range Lumber mill 5 173324 Can upgrade scouting Lumber mill 4 173388 Can upgrade Marks./Regen. Lumber mill 6 173452 Always ? Human/? Orc Attack, Patrol, & Stand Ground 173464 If sword upgrade = X Attack for units with upgradeable weapons. 173496 Can upgrade shield to X+1 Blacksmith commands 3 & 4 173532 If shield upgrade = X Stop for units with upgradeable shields. 173564 Can upgrade cannon to X+1 Foundry commands 1 & 2 173600 If cannon upgrade = X Attack for ships with upgradeable cannons. 173632 Can upgrade armor to X+1 Foundry commands 3 & 4 173668 If armor upgrade = X Stop for ships with upgradeable armor. 173700 If attack ground flag set Attack Ground. 173756 Can upgrade Hall to X+1 Hall commands 2 & 3 173924 Can upgrade Tower to X+1 Watch tower commands 1 & 2 174004 Can research upgrade X Mage Tower commands 2-6, Church command 1 174100 Can research upgrade X Church commands 2 & 3 174152 Know Spell X Mage commands 4-9, Paladin commands 10-12 174216 Can train Peasant Hall command 1 174288 Can train Archer Barracks command 2 174344 Can train Ranger Barracks command 3 174400 Can train Footman Barracks command 1 174472 Can train Ballista Barracks command 4 174532 Can train Knight Barracks command 5 174608 Can train Paladin Barracks command 6 174684 Can train Mage Mage tower command 1 174756 Can train Oil Tanker Shipyard command 1 174828 Can train Destroyer Shipyard command 2 174900 Can train Transport Shipyard command 3 174948 Can train Battleship Shipyard command 4 174996 Can train Submarine Shipyard command 5 175044 Can train Flying Machine Inventor command 1 175104 Can train Demolition Squad Inventor command 2 175152 Can train Grypon Riders Grypon Aviary command 1 175804 Can build Wall Basic build command 7 175856 Can build Hall Basic build command 3 175884 Can build Lumber mill Basic build command 4 175912 Can build Blacksmith Basic build command 5 175940 Can build Farm Basic build command 1 175968 Can build Barracks Basic build command 2 175996 Can build Watch Tower Basic build command 6 176024 Can build a basic building Peasant command 7 176148 Can build Shipyard Advanced build command 1 176200 Can build Foundry Advanced build command 2 176252 Can build Oil Refinery Advanced build command 3 176304 Can build Stables Advanced build command 5 176376 Can build Inventor Advanced build command 4 176448 Can build Church Advanced build command 6 176500 Can build Mage Tower Advanced build command 7 176552 Can build Gryphon Aviary Advanced build command 8 176604 Can build an Adv. Building Peasant command 8 176744 Is not carrying any goods Peasant command 5, Tanker command 6 176824 Is carrying goods Peasant command 6, Tanker command 7 176904 Is transporting passengers Transport command 5 Action Fn: This determines what exactly the command does, and sometimes reads data from the action variable. Possible values for the Action variable are as follows (defined by Cameron Buschardt (aka Merlin)), with any X refers to the Action Variable. Values for the spells are again defined:
Value Command 123174 Move 121904 Stop 123740 Attack 123160 Patrol 123712 Stand Ground 123432 Attack Ground 124000 Repair 123920 Harvest Lumber/Mine Gold 124148 Return with goods 189704 Bring up a menu for unit x 166764 Cast spell X (where X is) 38=Holy Vision 39=Healing 40=Unused 41=Exorcism 42=Flame Shield 43=Fireball 44=Slow 45=Invisibility 46=Polymorph 47=Blizzard 48=Eye of Killrog 49=Bloodlust 50=Raise Dead 51=Death Coil 52=Whirlwind 53=Haste 54=Unholy Armor 55=Runes 56=Death and Decay 123756 Demolish/Self Destruct 124224 Build structure #X (where x is it's id)
(WARNING! Only a unit with act like peasant set in the UDTA can do this)
(DON'T TRY IT WITH X BEING A UNIT)42932 Build unit #X
(Similar warnings as last one)42908 Upgrade Spell #X 42952 if x=0 upgrade -> Stronghold if x=1 upgrade -> Castle 42884 Upgrade Weapons #X Flags: The current function of this value is unknown. They are believed to be flags for the commands, but it is unknown what each flag represents. The value given here is in binary, followed by its decimal equivalent in parentheses. You may enter either type of value into WarHack, and it will interpret it accordingly.
Str Txt: The text displayed in a mouse-over of the command icon, and the value which is the "hotkey" for each command. The "hotkey" is displayed in lower-case in the same format that it is found in the Names entry of Strdat.war
Current CMD Offsets: This value is the offset of the command that you have currently selected. For the first command of any unit, it is the same as the value displayed in the Unit Editor Command Data section.
Icon Cross-references: Displays the units which share the currently displayed command. In other words, any changes that you make to the currently selected command will have the same effect on all units which share the command. This is why you must be careful to isolate units so that units don't share commands which you don't want altered for certain units. You should be able to find units which have redundant commands, such as the Knight, Ogre, Gnomish Submarine, Giant Turtle, Attack Peasant, Attack Peon, Gnomish Flying Machine, Goblin Zeppelin, which use redundant commands, that is to say commands which other units have. If you change the above listed units' Command Data in the Unit Editor to those of the other units, you will be able to utilize the redundant commands for other units. For instance, the above listed units could have their commands changed to the following (keeping the same order): Footman, Grunt, Battleship, Juggernaught, Footman, Grunt, Footman, Grunt without sacrificing any differences in performance for the original units, provided that you keep their Commands value in the Unit Editor the same (and thereby limiting them to only the number of commands that they previously had).
Action Editor: Previously called the Spell Editor, this editor enables you to edit the various actions taken by units. Although many actions appear here which also appear in the Command Editor, please do not get them confused... there is a large difference between what each editor is capable of doing to each of these actions or commands. The Action Editor is able to change the range, mana cost, various function calls, the animation frames called by a certain action, as well as several unknown variables for each Action in the editor. However, you will be unable to edit all of the above-mentioned properties for each of these Actions. Many of them have values which have not been located in the EXE, and as such, you will not be able to edit them.
Mana: This sets the mana requirement for the Action. While it is not reccomended that you use this variable for anything but spells, you may change it for any Actions where it's enabled. Possible values are from 0 - 255.
Range: The range that a particular action has. Possible values are 0-255. It is not reccomended that you change the ranges of any action other than spells. Doing so to another action may result in undesired effects or performance, and even in crashing the game.
FnA: Presumably this determines legal "targets" for Spells, and possibly for other actions. I believe that if there is no FnC defined, it determines what the particular action does.
FnB: Unknown exactly what this does. However, all spells have the same value. I beleive that if an FnA has been defined, the FnA is the legal target, and the FnB determines what the action does.
FnC: Unknown exactly. However, I believe that if the FnA is defined, the FnA determines the legal targets, the FnB determines what type of action to perform, and the FnC determines what the Action does. If there is no FnB defined, but an FnA and FnC defined, then I believe that the FnA determines what the action does, and the FnC is the Requirement Function.
Unk1: (also may be defined as Event Call or something similar): This value, previously unknown, I finally determined calls animation events from the 278 entry. That is, when the action is performed, which animation Event is to be displayed. For instance, all the spells have a value of 4 because they call the Attack (Event 4) animation when casting. Conceivably, you could add Events to the 278 entry which would define different animations for each spell, rather than only the attack animation. You could conceivably set the unit's stop Action to call Event 1 (death animation) and therefore make your units appear dead and decaying when not moving. When they did move they would appear to become re-animate and resurrected from the dead 🙂 IMPORTANT WARNING: I do not reccomend that you set the attack animation (Event 4) to anything other than what it has currently been selected for. The reason is that the game crashes when there is no target nearby for the units to attack. In other words, this is because of the shoot command that is in the attack animation. Without a target, the game crashes.
Unk2: Attack flag. Only set when the Event Call (unk1) has been set to 4. I believe that WarCraft would crash if not set to 0 on an action which doesn't call the attack animation. The only values which would be here are 0 or 2. 0 for all actions except certain Actions which call the attack animation. I don't know what it does, but I presume it calls an additional variable somewhere in the EXE. Only two spells have this set currently: Slow and Haste. The other Actions which have the flag set are: Attack (Action 8), Action 9, Action 12, Action 15, Action 16, Attack Ground (Action 17), Demolish (Action 19), Action 20, Action 21.
Unk3: Unknown. All spells have a value of 12... possibly determines what type of Action it is...?
File Indexes: It's very likely that you will never have the need to use this editor at all... unless you're doing a Total Conversion, or something which would require you to manipulate the positions of the Data File entries, etc. All values here are referenced according to their entry in the data file (from entry 0) + the data file reference. Maindat.war's reference is 1000, Snddat.war's reference is 2000, Rezdat.war's reference is 3000, Strdat.war's reference is 4000, Sfxdat.sud's reference is 5000, and Muddat.cud's reference is 6000. For instance, if you were looking at the File Indexes entry for the location of the 278 animation controls text, you would that it's current value is 1278, which means that it is stored at entry 278 of the 1000 data file, Maindat.war. Perhaps you desire for some reason to move the 278 file to Strdat.war, entry 999 (which doesn't actually exist, and would cause your game to crash if you put in that value, but I figured that way you'd get an example that you'd never try 🙂 In order to change it to read from Strdat.war's entry 999, press "a" and enter in 4999, because 4000 is the reference for Strdat.war, and 999 is the entry in it you want it to look at. Most everything else is self-explanatory here. There are a few redundant entries which appear here several times. You'll have to make sure that you catch each one.
See the help choice from the main menu for information about the File Indexes editor.
Sound Editor: You'll probably not use this editor very often either, except maybe as a reference for the number of a sound which is referenced to the data files here. The editor itself is mainly self-explanatory, and as such requires little for me to say...
Orc Sound Ref (& Human Sound Ref): The entry of the selected sound in the data files, with the Orc sound ref being of course for the equivalent orc sound, and the human sound ref for the equivalent human sound. The value here uses the same structure as the File Indexes values do... they simply take the entry of the sound, and add on the data file reference. Maindat.war's reference is 1000, Snddat.war's reference is 2000, Rezdat.war's reference is 3000, Strdat.war's reference is 4000, Sfxdat.sud's reference is 5000, and Muddat.cud's reference is 6000. For instance, all of the default values in this editor before any changes list as 5000 + the entry of the sound, simply because the 5000 tells the computer to look in Sfxdat.sud, and the remaining value tells the computer to look in which ever entry is defined.
Orc & Hum Repeated: As of the release of this help file, no sound in the Sound Editor had this flag checked. Possible values are either 0 or 1: binary, with 0 being no, and 1 being yes. I have not experimented with these values, and so I'm not sure as to whether they actually work... I wouldn't reccomend changing these values at all, unless you are an advanced editor who has a need to.
Unk1/2: Possibly defines it as an attack sound... I'm not sure. Values of 0 or 1
Orc/Human Hero: Defines (I think) whether the sound is the voice of a hero or not... values of 0 or 1.
Victory conditions: As yet, I don't understand what the values in this editor are for... I will try and research what they are capable of doing, but right now they will go unidentified... let me or Cam know if you find out anything about them that would be useful.
Missile Editor: Contains stats, etc for the 30 missiles in the game. You may edit them as you wish, but be prepared for undesired results.
Speed: This is rather obvious... the speed at which the missile will travel after it has been shot. All values are multiples of 4. I wouldn't suggest changing it to anything but those multiples, i.e. only 4, 8, 12, 16... I've also only tried 16 as the maximum speed. I would assume that 20, etc would also work, but I have not tested it, so don't be surprised if it doesn't. Another acceptable value is 0. This will cause the missile (obviously) to not move from where it was shot.
Is there a delay?: In the exe, this value is stored in binary format, with 0 being no (there is no delay before it is shot), and 1 being yes (there is a delay before it is shot). As such, when you press "b" to edit these values, you will be unable to bring up an edit box. The most you can do is simply toggle the delay on or off. I should also note that when this delay checking routine is set to no, the value stored in the delay box is ignored. Any changes made there will only be read if you have the toggle for this variable set to yes.
Delay: The numerical value of the delay. Again, this will only have an effect if the delay is toggled. A delay of 0 will essentially be the same as toggling the delays off. (I think, but I've not tested this... it would seem logical...). I'm not sure if there is a maximum value for the delay. Currently used values are: 0-3. I would not reccomend going much above that.
(Damage) Range: Determines the range that a projectile will deal its damage. Actually, the value listed here and in the exe is one less than the actual value. In other words, to get the actual value of the delay, add one to the listed value. So if you wanted to change the lightening missile to have a damage range of 4, you would set the value here to 3, as one will automatically be added to it. It should be noted that a range of 0 (255 + 1) will mean that the damage will be limited to only where the missile was directed towards. So if you shot a missile at a unit, it would only damage that unit. A value of 1 (0+1) would mean that for a range of 1 around the impact spot, the damage for that particular missile would be dealt. The values for the missiles are not stored in the EXE. You can only edit these values by changing the basic and peircing attack of units which use them in the UDTA.
Type: Pressing "e" brings up a selection box of possible types of missiles. At this point, I'm not sure if Cameron has corrected/appended what he has there, so I will just recap what I have quickly:
Missile Types: 0 = Missile does nothing when shot... simply stays where it was shot. Missiles which use this type: Unit Shadow. 1 = Standard projectile missile... disappears after impact. In effect a point-to-point missile. Missiles which use this type: Lightening, Large Cannon, Exorcism, Heal Effect, Touch of Death, Ballista bolt, Arrow, Axe, Sub Missile, Turtle Missile, Demon Fire. 2 = Appears to have nearly the same effect as type #1, however, the projectile does remain for a few miliseconds longer after impact. Missiles which use this type: Catapult rock, Cannon. 3 = Same effect as #'s 1,2 & 4, causes no damage upon impact. Missiles which use this type: None 4 = Same effect as #'s 1,2 & 3, causes no damage upon impact. Missiles which use this type: None 5 = Missile does not move, but unlike # 0, it does clear itself from the screen. Missiles which use this type: Rune, Small Fire, Big Fire, Ballista/ Catapult Impact, Normal Spell, Explosion, Cannon Explosion, Cannon Tower Explosion. 6 = Same behavior as # 5. Missiles which use this type: None 7 = Missile "bounces" three times, dealing diminished damage each time. Missiles which use this type: Gryphon Hammer, Dragon Breath. 8 = Begins as a type 1, 2, 3 or 4 missile, then "morphs" into a Flame Shield. Missiles which use this type: Flame Shield Fireball. 9 = This type is unbelievable. Sets the current missile to surround the caster. Unfortunately, if the missile it is set to does not decay, then you will be able to cast unlimited missiles around you... which ain't exactly bad 🙂 Missiles which use this type: Flame Shield 10 = Appears to have no change in the way a missile is shot. Missiles which use this type: Blizzard 11 = Appears to have no change in the way a missile is shot. Missiles which use this type: Death & Decay 12 = This one is kinda fun to play around with. It creates missiles like normal, but they are really slow and start randomly moving around the map... if the particluar missile has no decay time specified, then you will be able to create an unlimited number of missiles that last forever, circling around the map killing everything but the original thing which created the missiles. Missiles which use this type: Tornado 13 = Causes the missile to go through all of its frames in the blink of an eye without travelling anywhere. Missiles which use this type: Green Cross I believe that if you try any more numbers higher than 13 either nothing will happen, or you will crash the game. There is also supposedly going to be a decay value somewhere in the exe which should define the "decay rates" of each of the missiles... how long they last after they have been created... it might or might not be in there... I've not found it yet. That's all I have now...
[/spoiler]
WarHack Tutorial
The Complete (almost) WarHack Manual, version 1.0Created by Andy Bond (King Arthur) with some additional notes provided by Cameron Buschardt (aka Merlin), author of WarHack.
Please direct all questions regarding this manual to: Merlin or Otak
Definitions:
NOTE: For sake of correct referencing, all ranges, etc that I refer to assume that we are starting from 0, and including that number in the count... which would mean 0, 1, 2, 3 rather than 1,2,3,4... so if you would prefer to get the actual numbers, etc, then add 1 to each value I give you, but you must use the correct 0 -> ? referencing in WarHack when entering variables, etc. If you don't then the game will most likely crash, and we don't want that to happen, now do we? 🙂
ALSO NOTE: All values which I will be refering to are derived from the 1.33 version of WarCraft II, which has come to be used as the universally hacked exe, due to its relative ease of use, and the lack of any code encryption. Also, most people use this, or have access to it when editing because it is by far the most popular version of the EXE. While 1.0, 1.2, 1.3, 1.4, and 1.5 are all probably in use, they each might have different values for certain variables, and are not as widely used. 1.4 and 1.5 were made by Blizzard to combat the cheating, etc that had been going on in multiplayer games. While this was their main reason for introducing a new version of the EXE, they also were able to encrypt much of the exe, making it relatively unhackable as yet... Therefore, while you are certainly able to use most of the above-mentioned EXE versions, be aware that values which I refer to may be different depending on your version.
Byte: A single variable of information. Values range from 0-255 Decimal.
Word: Two bytes of information stored in sequence.
Double Word: Four bytes of information stored in sequence.
Unit Editor: Used to define various values for each of the 104 units in WarCraft, in addition to the extra non-unit listings towards the end. Unit 105 is the generic corpse which decays on the battlefield. Units 106-109 are the four Rubble areas as refered to in PudDraft, in sequence of their size, 1x1, 2x2, 3x3, 4x4. Units 110-119 are the group commands and the cancel buttons which appear. They have no direct link to any of the units in that changing variables here will effect any units. Changing variables here will only effect the appearance of various group commands, etc. In addition, the Basic and Advanced menus for the peasant/peon are located in unit positions 111-114.
Each of the following defined variables may be accessed by pressing their corresponding key on the keyboard, which is highlighted in Blue next to them. For your convenience, I have organized this list in access-key alphabetical order, and not the alphabetical order of the variable. For example: The icon variable may be changed by pressing the letter "a" on the keyboard. This will bring up a small box where you can enter in the value you desire.
Icon: This is the icon of the unit displayed when you click on it. The numbers here refer to the sequence in the icon entries of Maindat.war. As such, any editing you make must be within the values of 0-195, otherwise the game will crash. In the icon entries, there are also various quarter-sized icons which were left over from the Alpha version of WarCraft. Although you may use these icons if you wish, I strongly reccomend against it. Several times I tried to use them and either my game crashed, or they appeared incorrectly. They appear the same size that they do in the Icon bitmap in Maindat.war, and the resulting border around them in the area which is not filled with the icon is filled with random colors.
Name: This is the string loaded from the names entry of Strdat.war which defines what your unit is called. While you may use any string you want, keep in mind that many strings towards the end are training strings to be used only in the command editor, and would produce undesireable effects should you decide to use them as unit names.
Unk: Although marked as Unknown, this variable actually determines what type of unit the selected unit is. All non-magic units have a value of 1, all magic units such as the Paladin, Mage, etc. have a value of 2, all buildings have a value of 3, and both Start Locations have a value of 0. While you may set this value to whatever you desire, it is reccomended that you stick with unit type values for units and building type values for buildings. I have not as yet tested what would happen if you gave a unit a value of 3, but I would not reccomend it.
Fn A: This Function A defines what the selected unit acts like. All units except for the Peasant, Peon, Attack Peasant, Attack Peon, Transports, and Oil Tankers have a value of 180524. Peasant, Peon, Attack Peasant, and Attack Peon values are: 182912. Oil Tanker values are: 183036. Transport values are: 183200. The buildings have different values for almost each different building, although the variables are grouped so that the Humans and Orcs have the same value for their equivalent buildings.
Fn B: This Function B determines what values are shown in the status area of a unit when you click on it. The values are as follows for version 1.33. Should you wish to determine the values for 1.3, simply subtract 400 from each value listed.
178680 | = | Nothing |
180780 | = | Picture, name, health, level |
180876 | = | Standard unit, sword and shield upgrades |
181676 | = | Standard unit, ballista and shield upgrades |
182008 | = | Standard unit, arrow and shield upgrades |
182572 | = | Picture, name, health |
182988 | = | Unknown |
183264 | = | Standard ship, doesn't show health when has passengers |
183716 | = | Standard unit, cannon and armor upgrades |
184624 | = | Food stats |
185960 | = | Standard building, Training: |
186260 | = | Show all production |
186696 | = | Standard building, Training: |
187136 | = | Show wood production, Upgrading: |
187444 | = | Standard building, Upgrading: |
187744 | = | Standard building, Researching: |
188036 | = | Standard building, Training:/Researching: |
188432 | = | Standard building, Upgrading: |
188736 | = | Unit stats except speed |
189064 | = | Show oil production |
189476 | = | Show oil remaining. |
Str Text: String Text which is not directly editable. You would have to change what is displayed by either changing the value in the name variable in WarHack, or by Changing the corresponging string in WarDraft's String editor. The Str Text simply displays the value you've selected from your current Data files.
Commands: Determines how many commands that a particular unit has. For units which have no commands at all, this value is set to 0. (obviously) Keep in mind that because of upgrades, etc units which appear to have only 5 or 6 commands in WarCraft II may in fact have more due to their changing icons or functions. As such, you will need to "enable" all commands for a unit by using the appropriate number of commands that you have changed in the Command Editor, not the final number of displayed commands.
Cmd Data: The value here determines the starting offset of the command your unit is to use. Often this value is displayed with a "*" after the numerical value, but it is not necessary to put one in there, and indeed one will not always show up if you put one in there. Don't worry if it doesn't, though, the correct number of commands will still be read, provided you have given the unit the proper offsets, etc.
I should make note that several interesting effects can happen through careful and prudent editing of this value... You may do what I call "Command Overloading." Simply defined, this allows a unit to access the commands of whichever unit has them directly after your units commands. However, this does not mean that if you chose the Footman for example, you would necessarily obtain the grunt's commands. How do you accomplish this: simply change the Commands value as described above to be a number higher than your unit actually has. If you are able to determine which units commands follow the current units, you can in fact add more commands to a unit then are currently listed. So in effect you could take the normal footman, which has 10 commands, change the Commands value to 20 or something, and double its number of commands. Without proper editing of the second set of commands, you will have very buggy and silly looking structures of commands. However, with patience and careful editing, you will be able to create your desired effect and utilize all the commands you wish. Keep in mind that only 9 commands can be displayed at a time, however.
You can also do what I refer to as "Command Splicing." Based on the same principles as "Command Overloading," Command Splicing merely takes the commands that you desire from a unit which already has them defined, but only takes a beginning, middle, or end section. Careful manipulation will allow you to use whichever commands you desire, should you organize them in the target unit's commands correctly. You will be unable to use out of sequence commands, however. For an example, let's say I wanted to give the Flying Machine only one command, that of the Footman's Patrol command. To start off with, I would change the Commands value to 1. Then I would exit out of the Unit Editor and bring up the Command Editor. I would load up the footman's commands on the screen and scroll over until I reached his Patrol command, in this case command #8. Then you must take careful note of the Current CMD Offs (Current Command Offsets), and write down the value that is displayed here... this value you will then put
|
I have tested this method and it has worked for me... so far. Your use of these methods will probably remain limited for a while, at least until you become more familiar with WarHack.
After Death: The value here determines what is shown after the death sequence of a unit. The possible values you may use are:
0 | = | Displays no corpse after the units death sequence. (The mage and ballista have this set, for example) |
1 | = | Displays a Human-type corpse after its death sequence. |
2 | = | Displays and Orc-type corpse after its death sequence. |
3 | = | Displays air bubbles after the sink sequence of a ship. |
Ready: The value will choose which sound is played when the unit is finished training. The value is referenced from the Sound Editor order, and not from the order of the WAV files in Sfxdat.sud. For further information for advanced editors, I think this is the sound played during the units' Event 0 (unit created?) animation seqence in the 278 entry, but I'm not sure on whether the created event is in fact Event 0.
Attack: The attack sound to play for a unit during its attack animation sequence, as referenced by the Sound Editor.
Ack Fn: The Acknowledge function value which determines which sounds are to be played by the particular unit after you have given it an order.
Sel.Fn: The Selected function value which determines which sounds are played when you select a unit, as well as the annoyed sounds (if any) for a unit.
Command Editor: This is a somewhat advanced and complicated editor that should not be messed around with casually. Capable of wreaking havoc with your EXE, this editor can prove to be very useful and very dangerous. I reccomend that you write down ANY and ALL changes you make in the Command Editor. This will save you a lot of time debugging programs, and will enable you to backtrack until you are able to get your EXE to work properly. I also suggest that you make as few changes as possible to the EXE at a time, and test after each set of changes is complete... this will make your debugging even easier, as you will know exactly what caused any problems due to the small number of changes you should make each time. The Command Editor allows you to change ALL commands in the EXE for every unit that has them. You should also be aware that many units share commands, and as such, when you change commands for one unit, you may be inadvertantly changing them for another unit.
Each of the following defined variables may be accessed by pressing their corresponding key on the keyboard, which is highlighted in Blue next to them. For your convenience, I have organized this list in access-key alphabetical order, and not the alphabetical order of the variable. For example: The icon variable may be changed by pressing the letter "a" on the keyboard. This will bring up a small box where you can enter in the value you desire.
Icon: The number of the Icon to be displayed on the button of a particular command. The useable and defined values are from 0-195.
Pos: The position that a command is to take in the command section of the WarCraft II screen. You may use the following table as a reference for the locations (keeping in mind that many commands will have the same position as another, merely because they are upgraded icons, etc):
0 | 1 | 2 |
3 | 4 | 5 |
6 | 7 | 8 |
String: The string that is displayed when your mouse pointer is over a button, it also defines the "hotkey" that will activate the command. The hotkey is shown in lower-case in the preview Str Txt section. The values in the String section refer to the Names string in Strdat.war, in the order that they appear there.
Req Var: The Requirement variable which determines when an icon (or command if you prefer) is to appear in the Command Section of the WarCraft II screen. The value here is set to 0 most of the time, except with commands which reflect upgrades or other changes which would cause a different icon or command to appear or be called. The Req var can also store the value that an upgrade is to add to the current value of a weapon, etc. The requirement variable is also used by Magic units to determine whether the necessary researching has been performed. The values of the Requirement variables for spells ONLY are:
0 | = | Holy Vision |
1 | = | Healing |
2 | = | Unknown/Unused Spell |
3 | = | Exorcism |
4 | = | Flame Shield |
5 | = | Fireball |
6 | = | Slow |
7 | = | Invisibility |
8 | = | Polymorph |
9 | = | Blizzard |
10 | = | Eye of Krilogg |
11 | = | Bloodlust |
12 | = | Unknown - Possibly another unused spell. |
13 | = | Raise Dead |
14 | = | Death Coil |
15 | = | Whirlwind |
16 | = | Haste |
17 | = | Unholy Armor |
18 | = | Runes |
19 | = | Death & Decay |
20 | = | Unknown - Possibly another unused spell. |
Act Var: The Action variable of the command is set to 0 for most of the commands, except those which train units, perform upgrades, research spells, cast spells, or have multiple menus for commands, such as the peasant or peon. In the case of training units, the value here is the number of the unit to be trained, as referenced by the order of the units in WarHack, and the corresponding numbers beside the units' name. When performing an upgrade, the Act Var determines the number of the upgrade which is parsed, or read by the Action Function. So far I have been able to determine the values of defined upgrades as follows: (At the end there are additional values found by Cameron Buschardt (aka Merlin) with their corresponding costs, etc.)
0 | = | Human Sword Upgrade #1 |
1 | = | Human Sword Upgrade #2 |
2 | = | Orc Weapon Upgrade #1 |
3 | = | Orc Weapon Upgrade #2 |
4 | = | Arrow Upgrade #1 |
5 | = | Arrow Upgrade #2 |
6 | = | Axe Upgrade #1 |
7 | = | Axe Upgrade #2 |
8 | = | Human Shield Upgrade #1 |
9 | = | Human Shield Upgrade #2 |
10 | = | Orc Shield Upgrade #1 |
11 | = | Orc Shield Upgrade #2 |
12 | = | Human Ship Cannon Upgrade #1 |
13 | = | Human Ship Cannon Upgrade #2 |
14 | = | Orc Ship Cannon Upgrade #1 |
15 | = | Orc Ship Cannon Upgrade #2 |
16 | = | Human Ship Armor Upgrade #1 |
17 | = | Human Ship Armor Upgrade #2 |
18 | = | Orc Ship Armor Upgrade #1 |
19 | = | Orc Ship Armor Upgrade #2 |
20 | = | Catapult Upgrade #1 |
21 | = | Catapult Upgrade #2 |
22 | = | Ballista Upgrade #1 |
23 | = | Ballista Upgrade #2 |
24 | = | Archer -> Ranger Upgrade |
25 | = | Ranger Scouting |
26 | = | Ranger Longbow |
27 | = | Ranger Marksmanship |
28 | = | Axethrower -> Beserker Upgrade |
29 | = | Beserker Scouting |
30 | = | Beserker Lighter Axes |
31 | = | Beserker Regeneration |
32 | = | Ogre -> Ogre Mage Upgrade |
33 | = | Knight -> Paladin Upgrade |
53 | = | Crashes when you click on it. Cost 1 lumber. |
54 | = | Crashes when you click on it. Cost 1 lumber + 8 oil. |
55 | = | Does nothing when clicked - might have no effect flag. Costs 1 lumber. |
56 | = | When upgrading, it shows the lumbermill, has a build time and an unknown effect. Costs 4 oil. |
58 | = | Does nothing when clicked - might have no effect flag. Costs 8 oil. |
59 | = | Does nothing when clicked - might have no effect flag. Shows Arrow #1 when you click on it. Costs nothing. |
61 | = | Does nothing when clicked - might have no effect flag. Cost 21 lumber. |
62 | = | Does nothing when clicked - might have no effect flag. Cost 21 lumber + 1 oil. |
100 | = | Does nothing when clicked - might have no effect flag. Cost 16 lumber. |
150 | = | Does nothing when clicked - might have no effect flag. Cost 8192 gold + 103 lumber. |
The Action Variable may also be used when spells are researched. The following values define which spell is researched by which Act Var. You'll notice that I have defined values here for spells which aren't actually required to be researched. This should help you if you decide you want to make the Holy Vision spell, for example, not appear automatically, but rather be researched by the paladin before he can use it.
34 | = | Holy Vision |
35 | = | Healing |
36 | = | Exorcism |
37 | = | Flame Shield |
38 | = | Fireball |
39 | = | Slow |
40 | = | Invisible |
41 | = | Polymorph |
42 | = | Blizzard |
43 | = | Eye of Krilogg |
44 | = | Bloodlust |
45 | = | Raise Dead |
46 | = | Death Coil |
47 | = | Whirlwind |
48 | = | Haste |
49 | = | Unholy Armor |
50 | = | Runes |
51 | = | Death & Destruction |
When casting spells, the Action Variable called determines which spell is cast. The order is as follows: (The values actually determine which Actions are called in the Action Editor... you may change the values here to those of another action, but I've not experimented with this).
38 | = | Holy Vision |
39 | = | Healing |
40 | = | Unknown/ Unused Spell |
41 | = | Exorcism |
42 | = | Flame Shield |
43 | = | Fireball |
44 | = | Slow |
45 | = | Invisibility |
46 | = | Polymorph |
47 | = | Blizzard |
48 | = | Eye of Krilogg |
49 | = | Bloodlust |
50 | = | Raise Dead |
51 | = | Death Coil |
52 | = | Whirlwind |
52 | = | Haste |
53 | = | Unholy Armor |
54 | = | Runes |
55 | = | Death and Decay |
The multiple menus refer to the fact that when you click on the Basic and Advanced Build buttons of the peasant or peon, these commands in turn call an additional list of commands which will clear the current screen and display the new build commands. The Act Var of the Peasant's (or Peon's) Basic or Advanced Build buttons determines what menu will be called, referencing to the order of the Units in WarHack. The predifined values for the Peasant and Peon Act Vars for these Basic Build and Advanced Build icons are: 111, 112, 113, 114, in order. While I believe it would be possible to set the values here to something different, I have not tested it. Theoretically, you could call another Units' commands this way, but I wouldn't try doing this until you're familiar and comfortable with WarHack.
Req Fn: The Requirement Function for a command sometimes utilizes the Requirement Variable to determine when an icon (or command) appears. This is not always the case, and there are many preset values which determine when the icon (or command) appears without a Req Var. The following list (written by Cameron Buschardt) will define all the possible values that the Requirement Function may have. Any X that is used in the definition refers to the value in the Requirement Variable. All defininitions refer only to the Human units, although the orc units equivalents are implied unless an orc value is defined separately.
Value Meaning | Used For | |
172688 | Always | Move, Patrol, Stand Ground, various others. |
172796 | Can build Oil Platform | Tanker command 5 |
172820 | ?? | Cancel group command 1 |
172852 | ?? | Cancel group command 2 |
172900 | ?? | Cancel group command 3 |
173044 | Can upgrade arrows to X+1 | Lumber mill commands 1 & 2 |
173080 | If arrow upgrade = X | Attack for archers and axethrowers. |
173112 | Can upgrade sword to X+1 | Blacksmith commands 1 & 2 |
173148 | Can upgrade ballista to X+1 | Blacksmith commands 5 & 6 |
173184 | Can upgrade to Rang./Bers. | Lumber mill 3 |
173260 | Can upgrade range | Lumber mill 5 |
173324 | Can upgrade scouting | Lumber mill 4 |
173388 | Can upgrade Marks./Regen. | Lumber mill 6 |
173452 | Always | ? Human/? Orc Attack, Patrol, & Stand Ground |
173464 | If sword upgrade = X | Attack for units with upgradeable weapons. |
173496 | Can upgrade shield to X+1 | Blacksmith commands 3 & 4 |
173532 | If shield upgrade = X | Stop for units with upgradeable shields. |
173564 | Can upgrade cannon to X+1 | Foundry commands 1 & 2 |
173600 | If cannon upgrade = X | Attack for ships with upgradeable cannons. |
173632 | Can upgrade armor to X+1 | Foundry commands 3 & 4 |
173668 | If armor upgrade = X | Stop for ships with upgradeable armor. |
173700 | If attack ground flag set | Attack Ground. |
173756 | Can upgrade Hall to X+1 | Hall commands 2 & 3 |
173924 | Can upgrade Tower to X+1 | Watch tower commands 1 & 2 |
174004 | Can research upgrade X | Mage Tower commands 2-6, Church command 1 |
174100 | Can research upgrade X | Church commands 2 & 3 |
174152 | Know Spell X | Mage commands 4-9, Paladin commands 10-12 |
174216 | Can train Peasant | Hall command 1 |
174288 | Can train Archer | Barracks command 2 |
174344 | Can train Ranger | Barracks command 3 |
174400 | Can train Footman | Barracks command 1 |
174472 | Can train Ballista | Barracks command 4 |
174532 | Can train Knight | Barracks command 5 |
174608 | Can train Paladin | Barracks command 6 |
174684 | Can train Mage | Mage tower command 1 |
174756 | Can train Oil Tanker | Shipyard command 1 |
174828 | Can train Destroyer | Shipyard command 2 |
174900 | Can train Transport | Shipyard command 3 |
174948 | Can train Battleship | Shipyard command 4 |
174996 | Can train Submarine | Shipyard command 5 |
175044 | Can train Flying Machine | Inventor command 1 |
175104 | Can train Demolition Squad | Inventor command 2 |
175152 | Can train Grypon Riders | Grypon Aviary command 1 |
175804 | Can build Wall | Basic build command 7 |
175856 | Can build Hall | Basic build command 3 |
175884 | Can build Lumber mill | Basic build command 4 |
175912 | Can build Blacksmith | Basic build command 5 |
175940 | Can build Farm | Basic build command 1 |
175968 | Can build Barracks | Basic build command 2 |
175996 | Can build Watch Tower | Basic build command 6 |
176024 | Can build a basic building | Peasant command 7 |
176148 | Can build Shipyard | Advanced build command 1 |
176200 | Can build Foundry | Advanced build command 2 |
176252 | Can build Oil Refinery | Advanced build command 3 |
176304 | Can build Stables | Advanced build command 5 |
176376 | Can build Inventor | Advanced build command 4 |
176448 | Can build Church | Advanced build command 6 |
176500 | Can build Mage Tower | Advanced build command 7 |
176552 | Can build Gryphon Aviary | Advanced build command 8 |
176604 | Can build an Adv. Building | Peasant command 8 |
176744 | Is not carrying any goods | Peasant command 5, Tanker command 6 |
176824 | Is carrying goods | Peasant command 6, Tanker command 7 |
176904 | Is transporting passengers | Transport command 5 |
Action Fn: This determines what exactly the command does, and sometimes reads data from the action variable. Possible values for the Action variable are as follows (defined by Cameron Buschardt (aka Merlin)), with any X refers to the Action Variable. Values for the spells are again defined:
Value | Command |
123174 | Move |
121904 | Stop |
123740 | Attack |
123160 | Patrol |
123712 | Stand Ground |
123432 | Attack Ground |
124000 | Repair |
123920 | Harvest Lumber/Mine Gold |
124148 | Return with goods |
189704 | Bring up a menu for unit x |
166764 | Cast spell X (where X is) |
38=Holy Vision | |
39=Healing | |
40=Unused | |
41=Exorcism | |
42=Flame Shield | |
43=Fireball | |
44=Slow | |
45=Invisibility | |
46=Polymorph | |
47=Blizzard | |
48=Eye of Killrog | |
49=Bloodlust | |
50=Raise Dead | |
51=Death Coil | |
52=Whirlwind | |
53=Haste | |
54=Unholy Armor | |
55=Runes | |
56=Death and Decay | |
123756 | Demolish/Self Destruct |
124224 | Build structure #X (where x is it's id) (WARNING! Only a unit with act like peasant set in the UDTA can do this) (DON'T TRY IT WITH X BEING A UNIT) |
42932 | Build unit #X (Similar warnings as last one) |
42908 | Upgrade Spell #X |
42952 | if x=0 upgrade -> Stronghold if x=1 upgrade -> Castle |
42884 | Upgrade Weapons #X |
Flags: The current function of this value is unknown. They are believed to be flags for the commands, but it is unknown what each flag represents. The value given here is in binary, followed by its decimal equivalent in parentheses. You may enter either type of value into WarHack, and it will interpret it accordingly.
Str Txt: The text displayed in a mouse-over of the command icon, and the value which is the "hotkey" for each command. The "hotkey" is displayed in lower-case in the same format that it is found in the Names entry of Strdat.war
Current CMD Offsets: This value is the offset of the command that you have currently selected. For the first command of any unit, it is the same as the value displayed in the Unit Editor Command Data section.
Icon Cross-references: Displays the units which share the currently displayed command. In other words, any changes that you make to the currently selected command will have the same effect on all units which share the command. This is why you must be careful to isolate units so that units don't share commands which you don't want altered for certain units. You should be able to find units which have redundant commands, such as the Knight, Ogre, Gnomish Submarine, Giant Turtle, Attack Peasant, Attack Peon, Gnomish Flying Machine, Goblin Zeppelin, which use redundant commands, that is to say commands which other units have. If you change the above listed units' Command Data in the Unit Editor to those of the other units, you will be able to utilize the redundant commands for other units. For instance, the above listed units could have their commands changed to the following (keeping the same order): Footman, Grunt, Battleship, Juggernaught, Footman, Grunt, Footman, Grunt without sacrificing any differences in performance for the original units, provided that you keep their Commands value in the Unit Editor the same (and thereby limiting them to only the number of commands that they previously had).
Action Editor: Previously called the Spell Editor, this editor enables you to edit the various actions taken by units. Although many actions appear here which also appear in the Command Editor, please do not get them confused... there is a large difference between what each editor is capable of doing to each of these actions or commands. The Action Editor is able to change the range, mana cost, various function calls, the animation frames called by a certain action, as well as several unknown variables for each Action in the editor. However, you will be unable to edit all of the above-mentioned properties for each of these Actions. Many of them have values which have not been located in the EXE, and as such, you will not be able to edit them.
Mana: This sets the mana requirement for the Action. While it is not reccomended that you use this variable for anything but spells, you may change it for any Actions where it's enabled. Possible values are from 0 - 255.
Range: The range that a particular action has. Possible values are 0-255. It is not reccomended that you change the ranges of any action other than spells. Doing so to another action may result in undesired effects or performance, and even in crashing the game.
FnA: Presumably this determines legal "targets" for Spells, and possibly for other actions. I believe that if there is no FnC defined, it determines what the particular action does.
FnB: Unknown exactly what this does. However, all spells have the same value. I beleive that if an FnA has been defined, the FnA is the legal target, and the FnB determines what the action does.
FnC: Unknown exactly. However, I believe that if the FnA is defined, the FnA determines the legal targets, the FnB determines what type of action to perform, and the FnC determines what the Action does. If there is no FnB defined, but an FnA and FnC defined, then I believe that the FnA determines what the action does, and the FnC is the Requirement Function.
Unk1: (also may be defined as Event Call or something similar): This value, previously unknown, I finally determined calls animation events from the 278 entry. That is, when the action is performed, which animation Event is to be displayed. For instance, all the spells have a value of 4 because they call the Attack (Event 4) animation when casting. Conceivably, you could add Events to the 278 entry which would define different animations for each spell, rather than only the attack animation. You could conceivably set the unit's stop Action to call Event 1 (death animation) and therefore make your units appear dead and decaying when not moving. When they did move they would appear to become re-animate and resurrected from the dead 🙂 IMPORTANT WARNING: I do not reccomend that you set the attack animation (Event 4) to anything other than what it has currently been selected for. The reason is that the game crashes when there is no target nearby for the units to attack. In other words, this is because of the shoot command that is in the attack animation. Without a target, the game crashes.
Unk2: Attack flag. Only set when the Event Call (unk1) has been set to 4. I believe that WarCraft would crash if not set to 0 on an action which doesn't call the attack animation. The only values which would be here are 0 or 2. 0 for all actions except certain Actions which call the attack animation. I don't know what it does, but I presume it calls an additional variable somewhere in the EXE. Only two spells have this set currently: Slow and Haste. The other Actions which have the flag set are: Attack (Action 8), Action 9, Action 12, Action 15, Action 16, Attack Ground (Action 17), Demolish (Action 19), Action 20, Action 21.
Unk3: Unknown. All spells have a value of 12... possibly determines what type of Action it is...?
File Indexes: It's very likely that you will never have the need to use this editor at all... unless you're doing a Total Conversion, or something which would require you to manipulate the positions of the Data File entries, etc. All values here are referenced according to their entry in the data file (from entry 0) + the data file reference. Maindat.war's reference is 1000, Snddat.war's reference is 2000, Rezdat.war's reference is 3000, Strdat.war's reference is 4000, Sfxdat.sud's reference is 5000, and Muddat.cud's reference is 6000. For instance, if you were looking at the File Indexes entry for the location of the 278 animation controls text, you would that it's current value is 1278, which means that it is stored at entry 278 of the 1000 data file, Maindat.war. Perhaps you desire for some reason to move the 278 file to Strdat.war, entry 999 (which doesn't actually exist, and would cause your game to crash if you put in that value, but I figured that way you'd get an example that you'd never try 🙂 In order to change it to read from Strdat.war's entry 999, press "a" and enter in 4999, because 4000 is the reference for Strdat.war, and 999 is the entry in it you want it to look at. Most everything else is self-explanatory here. There are a few redundant entries which appear here several times. You'll have to make sure that you catch each one.
See the help choice from the main menu for information about the File Indexes editor.
Sound Editor: You'll probably not use this editor very often either, except maybe as a reference for the number of a sound which is referenced to the data files here. The editor itself is mainly self-explanatory, and as such requires little for me to say...
Orc Sound Ref (& Human Sound Ref): The entry of the selected sound in the data files, with the Orc sound ref being of course for the equivalent orc sound, and the human sound ref for the equivalent human sound. The value here uses the same structure as the File Indexes values do... they simply take the entry of the sound, and add on the data file reference. Maindat.war's reference is 1000, Snddat.war's reference is 2000, Rezdat.war's reference is 3000, Strdat.war's reference is 4000, Sfxdat.sud's reference is 5000, and Muddat.cud's reference is 6000. For instance, all of the default values in this editor before any changes list as 5000 + the entry of the sound, simply because the 5000 tells the computer to look in Sfxdat.sud, and the remaining value tells the computer to look in which ever entry is defined.
Orc & Hum Repeated: As of the release of this help file, no sound in the Sound Editor had this flag checked. Possible values are either 0 or 1: binary, with 0 being no, and 1 being yes. I have not experimented with these values, and so I'm not sure as to whether they actually work... I wouldn't reccomend changing these values at all, unless you are an advanced editor who has a need to.
Unk1/2: Possibly defines it as an attack sound... I'm not sure. Values of 0 or 1
Orc/Human Hero: Defines (I think) whether the sound is the voice of a hero or not... values of 0 or 1.
Victory conditions: As yet, I don't understand what the values in this editor are for... I will try and research what they are capable of doing, but right now they will go unidentified... let me or Cam know if you find out anything about them that would be useful.
Missile Editor: Contains stats, etc for the 30 missiles in the game. You may edit them as you wish, but be prepared for undesired results.
Speed: This is rather obvious... the speed at which the missile will travel after it has been shot. All values are multiples of 4. I wouldn't suggest changing it to anything but those multiples, i.e. only 4, 8, 12, 16... I've also only tried 16 as the maximum speed. I would assume that 20, etc would also work, but I have not tested it, so don't be surprised if it doesn't. Another acceptable value is 0. This will cause the missile (obviously) to not move from where it was shot.
Is there a delay?: In the exe, this value is stored in binary format, with 0 being no (there is no delay before it is shot), and 1 being yes (there is a delay before it is shot). As such, when you press "b" to edit these values, you will be unable to bring up an edit box. The most you can do is simply toggle the delay on or off. I should also note that when this delay checking routine is set to no, the value stored in the delay box is ignored. Any changes made there will only be read if you have the toggle for this variable set to yes.
Delay: The numerical value of the delay. Again, this will only have an effect if the delay is toggled. A delay of 0 will essentially be the same as toggling the delays off. (I think, but I've not tested this... it would seem logical...). I'm not sure if there is a maximum value for the delay. Currently used values are: 0-3. I would not reccomend going much above that.
(Damage) Range: Determines the range that a projectile will deal its damage. Actually, the value listed here and in the exe is one less than the actual value. In other words, to get the actual value of the delay, add one to the listed value. So if you wanted to change the lightening missile to have a damage range of 4, you would set the value here to 3, as one will automatically be added to it. It should be noted that a range of 0 (255 + 1) will mean that the damage will be limited to only where the missile was directed towards. So if you shot a missile at a unit, it would only damage that unit. A value of 1 (0+1) would mean that for a range of 1 around the impact spot, the damage for that particular missile would be dealt. The values for the missiles are not stored in the EXE. You can only edit these values by changing the basic and peircing attack of units which use them in the UDTA.
Type: Pressing "e" brings up a selection box of possible types of missiles. At this point, I'm not sure if Cameron has corrected/appended what he has there, so I will just recap what I have quickly:
Missile Types: | ||
0 | = | Missile does nothing when shot... simply stays where it was shot. |
Missiles which use this type: Unit Shadow. | ||
1 | = | Standard projectile missile... disappears after impact. In effect a point-to-point missile. |
Missiles which use this type: Lightening, Large Cannon, Exorcism, Heal Effect, Touch of Death, Ballista bolt, Arrow, Axe, Sub Missile, Turtle Missile, Demon Fire. | ||
2 | = | Appears to have nearly the same effect as type #1, however, the projectile does remain for a few miliseconds longer after impact. |
Missiles which use this type: Catapult rock, Cannon. | ||
3 | = | Same effect as #'s 1,2 & 4, causes no damage upon impact. |
Missiles which use this type: None | ||
4 | = | Same effect as #'s 1,2 & 3, causes no damage upon impact. |
Missiles which use this type: None | ||
5 | = | Missile does not move, but unlike # 0, it does clear itself from the screen. |
Missiles which use this type: Rune, Small Fire, Big Fire, Ballista/ Catapult Impact, Normal Spell, Explosion, Cannon Explosion, Cannon Tower Explosion. | ||
6 | = | Same behavior as # 5. |
Missiles which use this type: None | ||
7 | = | Missile "bounces" three times, dealing diminished damage each time. |
Missiles which use this type: Gryphon Hammer, Dragon Breath. | ||
8 | = | Begins as a type 1, 2, 3 or 4 missile, then "morphs" into a Flame Shield. |
Missiles which use this type: Flame Shield Fireball. | ||
9 | = | This type is unbelievable. Sets the current missile to surround the caster. Unfortunately, if the missile it is set to does not decay, then you will be able to cast unlimited missiles around you... which ain't exactly bad 🙂 |
Missiles which use this type: Flame Shield | ||
10 | = | Appears to have no change in the way a missile is shot. |
Missiles which use this type: Blizzard | ||
11 | = | Appears to have no change in the way a missile is shot. |
Missiles which use this type: Death & Decay | ||
12 | = | This one is kinda fun to play around with. It creates missiles like normal, but they are really slow and start randomly moving around the map... if the particluar missile has no decay time specified, then you will be able to create an unlimited number of missiles that last forever, circling around the map killing everything but the original thing which created the missiles. |
Missiles which use this type: Tornado | ||
13 | = | Causes the missile to go through all of its frames in the blink of an eye without travelling anywhere. |
Missiles which use this type: Green Cross | ||
I believe that if you try any more numbers higher than 13 either nothing will happen, or you will crash the game. | ||
There is also supposedly going to be a decay value somewhere in the exe which should define the "decay rates" of each of the missiles... how long they last after they have been created... it might or might not be in there... I've not found it yet. |
That's all I have now...
Quote from TuPaC on October 31, 2020, 11:06 amWarDraft Manual
[spoiler]
A WarDraft ManualCreated by Andy Bond (King Arthur)
Please note: If you decide to use this tutorial, or the technology described within, please give me some credit for discovering it, and/or describing how to use it. Thanks!
Okay, here goes. I suppose you all want to know how to add tilesets to your Campaigns/TC's. Well, if you follow these steps exactly, you will be able to do just that. This tutorial will allow one to add 3 tilesets to Warcraft (for a total of 7), which is normally only capable of the 4 basic ones we've all been used to. Many people just replaced tilesets, but what happened if you wanted to keep the existing tilesets? Or, what if you wanted to have campaigns have access to 7 tilesets? Now you can, thanks to Cameron Buschardt's UDTAhack and Warhack (DOS), and Alex Cech's Wardraft and Warcraft Campaign Maker. These utilities will enable you to add the tilesets of your choice to any campaign/TC that you want. Well, let's get on with the tutorial, shall we?
- First of all, you'll need to obtain Wardraft & Warhack (DOS). UDTAhack is completely optional, it depends on if the tilesets you're using contain new critter gfx, and if they do, this whole process gets more complicated, but don't worry.
- From here on out, I'm assuming you're at least familiar with the basic operations of WarDraft (like extracting, importing, and creating Campaign distribution files (W/the campaign builder). If not, I suggest you get someone who knows about this stuff to edit things for you. This tutorial is not meant to teach you the basics of the editors, that should be easy enough for you to figure out on your own. If not, write me, and I might work on a basic tutorial.)
- I'm also going to separate this tutorial into 3-4 parts (I'm not sure yet, and may forget to update this text). The first will deal with WarDraft Stuff. The second will deal with UDTAhack stuff. The third part will deal with War2hack stuff. The fourth, if there is one, will deal with finally distributing your tilesets, but it might not be there)
Part one - WarDraft Stuff:
- Okay, now you'll have to select your tilesets, and if you're not the author, I'd strongly reccomend contacting the author for permission to use their files. Who knows, maybe if you're nice, they'll include a template file that they used for their tilesets, and that would make your whole life a lot easier (cause then you'd know what files were replaced :).
- Alright, now we're done with the idiot stuff. On to the real tough stuff!
- Okay, now you'll need to open up each of the "wcd" files that is included with each tileset. You can view them in WarDraft, but to do so, you'll have to type in "*.wcd" into the "filename" box when the "open file" dialog box opens up. Now, depending on what the author decided to do with the tilesets, there may or may not be a file that contains a description that says what their "wcd" file does. If so, it'll be the first entry, 0, that WarDraft lists. If you want, you can double click on it, and WarDraft will show a hex dump of the entry's contents. On the left, you should see a whole bunch of gibberish, and numbers, about 8 rows of it, I think. On the right, if it's the campaign data info file, you should see bunches of text that are wrapped around ackwardly. You'll know what I'm talking about if it's the info file. If there's nothing there but more gibberish, you've either got the wrong entry, or there's no campagin info (description) file included. It doesn't really matter either way, I'm just letting you know what that file could be, so you're not confused later on.
- Now, depending on what replacements the author has decided to make with this tileset, there could be any number of entries after the description file (if there is one). At least three of those files contain info that's related to the tilesets directly. There could be a fourth palette file in there, which should be automatically identified by WarDraft, but if there's not one, don't panic. That just means that the author decided to use an existing palette file for some weird reason. It also makes your life more difficult.
- If there's a palette file, skip this step. If not, you'll have to do some careful searching, and find out which of the tilesets this new tileset was designed to replace. If you can't find out which one it is, try contacting the author, they should be able to supply you with this info. If all else fails, though, you'll have to back up your data files before you proceed to do the next thing. Now that the data files have all been renamed, you will now install the tileset into your copy of Warcraft, using whatever batch file that the author provided to do so. Once that's done, open up the modified data file in WarDraft, then search through each of the tileset entries identified by the knowledge bases. There should be a group of four entries for each tileset, with the first three towards the top; Forest, Wasteland, and Winter, and the Swamp tileset entries towards the bottom. Now, when you find whichever tileset was replaced or modified, extract the palette entry for that tileset, and choose decompress and "Save it like it is". Now you've got your pallete and you can proceed to the next step.
- Repeat the above step(s) for each tileset you're adding (or replacing if you really must have all 7!), and then you'll have to identify each of the three other files that are required for the tilesets within the "wcd" file. To do that, you'll probably have to open up two copies of Wardraft, one with Maindat (note: this assumes that you've restored your maindat to it's original version, if it's been modified, like in the above step), and the other with the "wcd" file that you're working with for the particular tileset. Comparing entry sizes is the easiest way I know of determining which entries are which in the "wcd" file. Otherwise, you may end up extracting the wrong files, and that could be as disastrous as my first version of the new tilesets thing. (I'll explain that if you want - I didn't realize that the small (around 770 bytes) 0 entry was the description entry. I thought since it was the same size as the palette file, that that was probably what it was. Turns out I was wrong, and so I got two description files put into the data directory rather than two new palette files for each of the new tilesets. Oops.)
- Alright, now since this can be tricky, you may end up going through that process several times until you get to the right one. Once you have, you'll need to extract each of the three other files, so you'll have a total of four. One's the palette file, the second is the Minitile mapping info, the third is the Map Minitiles, and the fourth is the Tile mapping info. I have no idea what the difference is between them. You should name all the extracted files in the order you extracted them, this really simplifies things later on.
- Alright, now that you've got all the files extracted, you'll have to look for sets of four blank entries in "Maindat.war". I was only able to find three sets of four consecutive blank entries (hence the 7 tileset limitation) which are denoted by a blank line across their length, flag and description. They are located here: (28-31), (71-74), (75-78). There are a number of blank individual entries, but you can't use them because WarCraft always reads tilesets as a group of four entries, all in consecutive order. It's a limitation in the exe file, one which cannot be overridden, since the only entry that's identified for the group is the first one, the palette file, and so it just adds 1, 2, & 3 to get the numbers for the rest. Otherwise, you could have more tilesets. I suppose you could also try adding entries to "Maindat.war", but to do that, you'd have to have a very advanced editor indeed, and I don't know where to even look for such a beast.
- Alright. Now that you've decided on where each of them is going, you'll have to match up the filenames of the extracted tileset entries with the blank entries. To do this, you'll need to open up Campaign Builder in WarDraft. Click on the "+" button. It brings up a little dialog box. One part says "Maindat.war". That's a scroll down list of the data file you want your entry inserted into. The little box beside it labels the entry number to be replaced. Underneath that, there's another text box, with a browse button beside it. Now that I've described it as best as I'm able, the rest should be easy. Alright, now the entries that you want to add for the tilesets are all going into blank entries in "Maindat.war" So, for now, you can leave the box that says "Maindat.war" alone. So, let's replace a blank entry with a palette file that you extracted from the new tilesets. You'll have to type into the little box beside "Maindat.war" the number of the blank entry you want replaced. Since this will be for your first tileset, I'd suggest replacing 28-31 first, then 71-78. Alright, now type in 28 into that box, and click on the browse button to locate the palette file for the first tileset. Once that's done, click open, then ok, and that's it. Repeat the above process for each of the files required for each tileset, and you're almost done with WarDraft.
- Now here's where I warned you that things could get compicated, depending on how many additional entries were in the new tileset's "wcd" file. If there were more than 3 or 4, you're going to have to follow the next step. If not, skip this one and the next.
- Now, here's where installing the tileset the way the author intended it comes in handy. If the author replaced any critters, icons, or buildings, you'll have to find out which of those was replaced, and which entry in the "wcd" file it's contained in. The absolute easiest way to do this is to write to the author. I didn't and had to do it the hard way. See, here's where the Template file could come in handy. But, let's say you're lazy, or the author's ignoring you. (Neither of which is probably the case). You'll have to install the tileset and then compare file sizes again! Fun, right? Not really, unless you are weird, or wired, whichever suits you. For instance, Cameron Vine's Desert Tileset replaces the wasteland critter with a scorpion. You'll have to hunt it down in the "wcd" file, if you want to use it, and I'd suggest it.
- Alright, so I lied, if you've only got 3-4 entries, you could skip this step, too, but I'd advise against it, there's important info here. Now, here's where those extra single blank entries come in handy. You'll have to pick one, (I don't care which, they're all over the place, your choice), and then extract the new critter gfx, open back up the Campagin builder, and add that new critter gfx file to it, pointing to one of those blank entries. Now, since you've decided to include the critter, you're going to have to use UDTAhack (2.0) to replace the gfx entry. Before I go any further, I suppose I should point out that in none of your editors will you have access to the three new tilesets. At least not directly. That's why I'd suggest setting up a pattern here. (you don't have to follow this one, it's just an example). For every pud file that you want to access, say Cameron's Desert Tileset, just tell it to use the Forest tileset (you'll understand why later on). Well, okay, you win. It's because you're going to be creating another exe file for your users to utilize the 3 new tilesets with. This new exe will edit the file indexes so that the old tileset groups will be pointing to the new ones. This will ensure that your users don't have to worry about something crashing and not working. If it doesn't work, they simply don't have to use the other exe file, they can just ignore the changes it made, since you're adding tilesets, not replacing. Anyway, this paragraph's getting too long, and I lost my point, so let's end it, shall we?
- The tileset author may have also elected to replace the icons to reflect the look of the new tileset. If they did, it'll be a big entry in the "wcd" file, about 220k, and not compressed much. It should be easy to pick out. You won't be able to get your new tilesets to access the new icons, but who cares, they're icons, right?
Part Two - UDTAhack Stuff (Optional - depends on your tileset).
- Okay, you'll now (i've gotta find a different word... Now this, now that... It's driving me up the wall! STOP IT!) have to open up UDTAhack and replace the gfx entries for the critters of whichever tilesets you decided to "model" after the other ones. So, if you're installing Cam Vine's Desert tileset, and you decided to call it the Forest one in all puds, just so it can be accessed, you'll have to change the GFX entry number for the critter in the Forest entry of the critter. So, you'd have to type in the number of the blank entry in Maindat that you imported the new critter gfx to. You'll have to do that for each new critter and tileset.
- Once you've finished that, save the "udt" file, and open back up WarDraft. Look for another blank entry in Maindat. (Not the one that your icons or critters is now inhabiting). Once you've found it, the you'll have to open back up the Campaign Builder and then add another replacement for the UDTA, only don't get it to replace the normal UDTA, just type into the small box beside the "Maindat.war" thing the blank entry number that you will import the new UDTA into. Now your new tilesets will be able to access their new critters. You could also make any necessary changes to the UDTA that you wanted here, too.
- Now, at this point, depending on what you're doing, you may or may not be finished with UDTAhack and/or WarDraft. I don't care, I'm finished with them (I think), and in any case, it's a good place to save your work and create your own "wcd" file with the new tilesets.
Part Three - War2hack Stuff:
- First thing you must do is to make a copy of the original war2.exe file. I repeat, this is not optional, I'm ordering you to do it. You won't gain anything at all by messing with the original, except a big headache.
- Now, open up the file in War2hack (the dos version is the only one that will do the necessary changes so far, so that's why I'm having you use it, archaic though it may appear).
- Once it finishes loading, and you press a key, you should see a menu which lists the editors. For this tutorial, I'm only going to be dealing with the File Indexes module. I'll not be held responsible for any other modifications you make to the exe with the other modules based on this tutorial and your own intution. I'd suggest Mordraug's adding a unit tutorial, and my Training a new unit tutorial (a supplement to Mordraug's) if you want to mess with that kind of stuff.
- Alrighty then. Arrow down to "File Indexes" and press return. You should get a two paned screen. On the left is a listing of all the indexes contained in the exe. The inexes point to stuff in the Data files that the Exe accesses. On the right is a box which lists the offset, and a description of how to decipher the offset. The only editing you can do with this editor is with the Offset number (accessed by pressing "A"). So, let's say you wanted to change the location of the Default UDTA (Don't actually do this). You'd press "A" and then a little box would pop up. Let's say that you wanted to change this to reflect a new UDTA that you'd imported to blank entry #991 (it doesn't actually exist, but that's to make sure you don't put it in anyway.) in "Maindat.war". Right now it says "Offset: 1000" for the location of the default UDTA. Now, here's where things can get tricky if you're a normal household pet like my dog Ralph (Note: ralph doesn't actually exist, which is fortunate because I still haven't fed him. Also ignore any references made to my habitual beating of ralph, that's just hogwash. Oh, and just so you don't take any offense by that phrase, I use my cat Cecilia to wash my pigs 🙂 (It's humor like that that caused me to create my TC in the first place. If you've never seen Monty Python, just ignore me).
- Alright, back to beating Ralph. (Writing Tutorials for over 2 hours straight gets to you after a while :). (And no, that's not a picture of me drooling back there. It's simply a smily face that I felt needed a period after it. (never mind)).
- So, what you have to understand is that when it says "Offset: 1000" in War2hack, it's not actually pointing to entry #1000 in Maindat.war Each of the data files has it's own number. Maindat happens to be 1000. Any entry in Maindat is identified by inserting its number behind the 1000, or something like that. Anyway, since the Default UDTA is normally located in entry number "O" of Maindat, it reads "1000". So, if we wanted to change it to read the new UDTA, which is not really at entry 991, we'd change the offset to read: "1991". Get it? If not, you'd be a good playmate for my dog Ralph.
- Okay, so you're going to vant to replace the Default UDTA and Expansion UDTA with the entry number that you will be inserting the new UDTA you created into. Then, you'll need to scroll down to the end to find the group entries for each of the tilesets. You'll have to change the offsets to reflect the number of the entry you're going to insert the new palette into. You'll have to make sure that the palette is the first of the four entries for this to work, though.
Part Four - Miscellaneous Stuff:
- That should just about do it. Again, make any other changes you want to the exe, but I'd suggest saving it first.
- Now that the exe's done, you can build your "wcd" file, if you haven't done so, and then generate your exe patch file. You should also create batch files that your users can run to automatically run the tileset stuff. You could base them on my batch file, for instance. You also should include a text file explaining for which pud files the user should use the default four tilesets, (and the original exe file), and the pud files which the user should use the new three tilesets for (and the new exe file that you've just created). There's no way to access all 7 at once.. sorry.
- You may also wish to modify the strings to reflect the names of the new Tilesets. To do this, you'll have to open back up WarDraft, open Strdat.war, and then double click on string 46 I think, It should be called Multiplayer selections, or something similar. In it, somewhere, are the names of the tilesets. By editing this, you'll be able to allow the user to select the proper tileset with custom and possibly multiplayer games. It also looks cool and professional. You'd then have to add this to your campaign builder template, and insert it into the blank entry in strdat (I don't know the number, but there should only be one). You'll then have to recompile the "wcd" file to reflect the changes. You'll also have to change the file indexes in the new exe to change the location of the new multiplayer strings to the new one.
- In any case, don't forget to recompile everything & make new patches after you make changes. That should do it for the Tutorial (this one, at least). Don't hesitate to contact me if you're still totally lost or need a clarification. Better yet, let me know of any mistakes. Hey, it's possible after two-three hours of typing a tutorial that your brain turns to mush and you create imaginary pets. Warn me if you see any signs of this in the tutorial. As always, happy hacking!
This tutorial was written by King Arthur on 9/21/97. Do not modify it w/o his (my) permission. Thanks!
[/spoiler]
WarDraft Manual
A WarDraft ManualCreated by Andy Bond (King Arthur)
Please note: If you decide to use this tutorial, or the technology described within, please give me some credit for discovering it, and/or describing how to use it. Thanks!
Okay, here goes. I suppose you all want to know how to add tilesets to your Campaigns/TC's. Well, if you follow these steps exactly, you will be able to do just that. This tutorial will allow one to add 3 tilesets to Warcraft (for a total of 7), which is normally only capable of the 4 basic ones we've all been used to. Many people just replaced tilesets, but what happened if you wanted to keep the existing tilesets? Or, what if you wanted to have campaigns have access to 7 tilesets? Now you can, thanks to Cameron Buschardt's UDTAhack and Warhack (DOS), and Alex Cech's Wardraft and Warcraft Campaign Maker. These utilities will enable you to add the tilesets of your choice to any campaign/TC that you want. Well, let's get on with the tutorial, shall we?
- First of all, you'll need to obtain Wardraft & Warhack (DOS). UDTAhack is completely optional, it depends on if the tilesets you're using contain new critter gfx, and if they do, this whole process gets more complicated, but don't worry.
- From here on out, I'm assuming you're at least familiar with the basic operations of WarDraft (like extracting, importing, and creating Campaign distribution files (W/the campaign builder). If not, I suggest you get someone who knows about this stuff to edit things for you. This tutorial is not meant to teach you the basics of the editors, that should be easy enough for you to figure out on your own. If not, write me, and I might work on a basic tutorial.)
- I'm also going to separate this tutorial into 3-4 parts (I'm not sure yet, and may forget to update this text). The first will deal with WarDraft Stuff. The second will deal with UDTAhack stuff. The third part will deal with War2hack stuff. The fourth, if there is one, will deal with finally distributing your tilesets, but it might not be there)
Part one - WarDraft Stuff:
- Okay, now you'll have to select your tilesets, and if you're not the author, I'd strongly reccomend contacting the author for permission to use their files. Who knows, maybe if you're nice, they'll include a template file that they used for their tilesets, and that would make your whole life a lot easier (cause then you'd know what files were replaced :).
- Alright, now we're done with the idiot stuff. On to the real tough stuff!
- Okay, now you'll need to open up each of the "wcd" files that is included with each tileset. You can view them in WarDraft, but to do so, you'll have to type in "*.wcd" into the "filename" box when the "open file" dialog box opens up. Now, depending on what the author decided to do with the tilesets, there may or may not be a file that contains a description that says what their "wcd" file does. If so, it'll be the first entry, 0, that WarDraft lists. If you want, you can double click on it, and WarDraft will show a hex dump of the entry's contents. On the left, you should see a whole bunch of gibberish, and numbers, about 8 rows of it, I think. On the right, if it's the campaign data info file, you should see bunches of text that are wrapped around ackwardly. You'll know what I'm talking about if it's the info file. If there's nothing there but more gibberish, you've either got the wrong entry, or there's no campagin info (description) file included. It doesn't really matter either way, I'm just letting you know what that file could be, so you're not confused later on.
- Now, depending on what replacements the author has decided to make with this tileset, there could be any number of entries after the description file (if there is one). At least three of those files contain info that's related to the tilesets directly. There could be a fourth palette file in there, which should be automatically identified by WarDraft, but if there's not one, don't panic. That just means that the author decided to use an existing palette file for some weird reason. It also makes your life more difficult.
- If there's a palette file, skip this step. If not, you'll have to do some careful searching, and find out which of the tilesets this new tileset was designed to replace. If you can't find out which one it is, try contacting the author, they should be able to supply you with this info. If all else fails, though, you'll have to back up your data files before you proceed to do the next thing. Now that the data files have all been renamed, you will now install the tileset into your copy of Warcraft, using whatever batch file that the author provided to do so. Once that's done, open up the modified data file in WarDraft, then search through each of the tileset entries identified by the knowledge bases. There should be a group of four entries for each tileset, with the first three towards the top; Forest, Wasteland, and Winter, and the Swamp tileset entries towards the bottom. Now, when you find whichever tileset was replaced or modified, extract the palette entry for that tileset, and choose decompress and "Save it like it is". Now you've got your pallete and you can proceed to the next step.
- Repeat the above step(s) for each tileset you're adding (or replacing if you really must have all 7!), and then you'll have to identify each of the three other files that are required for the tilesets within the "wcd" file. To do that, you'll probably have to open up two copies of Wardraft, one with Maindat (note: this assumes that you've restored your maindat to it's original version, if it's been modified, like in the above step), and the other with the "wcd" file that you're working with for the particular tileset. Comparing entry sizes is the easiest way I know of determining which entries are which in the "wcd" file. Otherwise, you may end up extracting the wrong files, and that could be as disastrous as my first version of the new tilesets thing. (I'll explain that if you want - I didn't realize that the small (around 770 bytes) 0 entry was the description entry. I thought since it was the same size as the palette file, that that was probably what it was. Turns out I was wrong, and so I got two description files put into the data directory rather than two new palette files for each of the new tilesets. Oops.)
- Alright, now since this can be tricky, you may end up going through that process several times until you get to the right one. Once you have, you'll need to extract each of the three other files, so you'll have a total of four. One's the palette file, the second is the Minitile mapping info, the third is the Map Minitiles, and the fourth is the Tile mapping info. I have no idea what the difference is between them. You should name all the extracted files in the order you extracted them, this really simplifies things later on.
- Alright, now that you've got all the files extracted, you'll have to look for sets of four blank entries in "Maindat.war". I was only able to find three sets of four consecutive blank entries (hence the 7 tileset limitation) which are denoted by a blank line across their length, flag and description. They are located here: (28-31), (71-74), (75-78). There are a number of blank individual entries, but you can't use them because WarCraft always reads tilesets as a group of four entries, all in consecutive order. It's a limitation in the exe file, one which cannot be overridden, since the only entry that's identified for the group is the first one, the palette file, and so it just adds 1, 2, & 3 to get the numbers for the rest. Otherwise, you could have more tilesets. I suppose you could also try adding entries to "Maindat.war", but to do that, you'd have to have a very advanced editor indeed, and I don't know where to even look for such a beast.
- Alright. Now that you've decided on where each of them is going, you'll have to match up the filenames of the extracted tileset entries with the blank entries. To do this, you'll need to open up Campaign Builder in WarDraft. Click on the "+" button. It brings up a little dialog box. One part says "Maindat.war". That's a scroll down list of the data file you want your entry inserted into. The little box beside it labels the entry number to be replaced. Underneath that, there's another text box, with a browse button beside it. Now that I've described it as best as I'm able, the rest should be easy. Alright, now the entries that you want to add for the tilesets are all going into blank entries in "Maindat.war" So, for now, you can leave the box that says "Maindat.war" alone. So, let's replace a blank entry with a palette file that you extracted from the new tilesets. You'll have to type into the little box beside "Maindat.war" the number of the blank entry you want replaced. Since this will be for your first tileset, I'd suggest replacing 28-31 first, then 71-78. Alright, now type in 28 into that box, and click on the browse button to locate the palette file for the first tileset. Once that's done, click open, then ok, and that's it. Repeat the above process for each of the files required for each tileset, and you're almost done with WarDraft.
- Now here's where I warned you that things could get compicated, depending on how many additional entries were in the new tileset's "wcd" file. If there were more than 3 or 4, you're going to have to follow the next step. If not, skip this one and the next.
- Now, here's where installing the tileset the way the author intended it comes in handy. If the author replaced any critters, icons, or buildings, you'll have to find out which of those was replaced, and which entry in the "wcd" file it's contained in. The absolute easiest way to do this is to write to the author. I didn't and had to do it the hard way. See, here's where the Template file could come in handy. But, let's say you're lazy, or the author's ignoring you. (Neither of which is probably the case). You'll have to install the tileset and then compare file sizes again! Fun, right? Not really, unless you are weird, or wired, whichever suits you. For instance, Cameron Vine's Desert Tileset replaces the wasteland critter with a scorpion. You'll have to hunt it down in the "wcd" file, if you want to use it, and I'd suggest it.
- Alright, so I lied, if you've only got 3-4 entries, you could skip this step, too, but I'd advise against it, there's important info here. Now, here's where those extra single blank entries come in handy. You'll have to pick one, (I don't care which, they're all over the place, your choice), and then extract the new critter gfx, open back up the Campagin builder, and add that new critter gfx file to it, pointing to one of those blank entries. Now, since you've decided to include the critter, you're going to have to use UDTAhack (2.0) to replace the gfx entry. Before I go any further, I suppose I should point out that in none of your editors will you have access to the three new tilesets. At least not directly. That's why I'd suggest setting up a pattern here. (you don't have to follow this one, it's just an example). For every pud file that you want to access, say Cameron's Desert Tileset, just tell it to use the Forest tileset (you'll understand why later on). Well, okay, you win. It's because you're going to be creating another exe file for your users to utilize the 3 new tilesets with. This new exe will edit the file indexes so that the old tileset groups will be pointing to the new ones. This will ensure that your users don't have to worry about something crashing and not working. If it doesn't work, they simply don't have to use the other exe file, they can just ignore the changes it made, since you're adding tilesets, not replacing. Anyway, this paragraph's getting too long, and I lost my point, so let's end it, shall we?
- The tileset author may have also elected to replace the icons to reflect the look of the new tileset. If they did, it'll be a big entry in the "wcd" file, about 220k, and not compressed much. It should be easy to pick out. You won't be able to get your new tilesets to access the new icons, but who cares, they're icons, right?
Part Two - UDTAhack Stuff (Optional - depends on your tileset).
- Okay, you'll now (i've gotta find a different word... Now this, now that... It's driving me up the wall! STOP IT!) have to open up UDTAhack and replace the gfx entries for the critters of whichever tilesets you decided to "model" after the other ones. So, if you're installing Cam Vine's Desert tileset, and you decided to call it the Forest one in all puds, just so it can be accessed, you'll have to change the GFX entry number for the critter in the Forest entry of the critter. So, you'd have to type in the number of the blank entry in Maindat that you imported the new critter gfx to. You'll have to do that for each new critter and tileset.
- Once you've finished that, save the "udt" file, and open back up WarDraft. Look for another blank entry in Maindat. (Not the one that your icons or critters is now inhabiting). Once you've found it, the you'll have to open back up the Campaign Builder and then add another replacement for the UDTA, only don't get it to replace the normal UDTA, just type into the small box beside the "Maindat.war" thing the blank entry number that you will import the new UDTA into. Now your new tilesets will be able to access their new critters. You could also make any necessary changes to the UDTA that you wanted here, too.
- Now, at this point, depending on what you're doing, you may or may not be finished with UDTAhack and/or WarDraft. I don't care, I'm finished with them (I think), and in any case, it's a good place to save your work and create your own "wcd" file with the new tilesets.
Part Three - War2hack Stuff:
- First thing you must do is to make a copy of the original war2.exe file. I repeat, this is not optional, I'm ordering you to do it. You won't gain anything at all by messing with the original, except a big headache.
- Now, open up the file in War2hack (the dos version is the only one that will do the necessary changes so far, so that's why I'm having you use it, archaic though it may appear).
- Once it finishes loading, and you press a key, you should see a menu which lists the editors. For this tutorial, I'm only going to be dealing with the File Indexes module. I'll not be held responsible for any other modifications you make to the exe with the other modules based on this tutorial and your own intution. I'd suggest Mordraug's adding a unit tutorial, and my Training a new unit tutorial (a supplement to Mordraug's) if you want to mess with that kind of stuff.
- Alrighty then. Arrow down to "File Indexes" and press return. You should get a two paned screen. On the left is a listing of all the indexes contained in the exe. The inexes point to stuff in the Data files that the Exe accesses. On the right is a box which lists the offset, and a description of how to decipher the offset. The only editing you can do with this editor is with the Offset number (accessed by pressing "A"). So, let's say you wanted to change the location of the Default UDTA (Don't actually do this). You'd press "A" and then a little box would pop up. Let's say that you wanted to change this to reflect a new UDTA that you'd imported to blank entry #991 (it doesn't actually exist, but that's to make sure you don't put it in anyway.) in "Maindat.war". Right now it says "Offset: 1000" for the location of the default UDTA. Now, here's where things can get tricky if you're a normal household pet like my dog Ralph (Note: ralph doesn't actually exist, which is fortunate because I still haven't fed him. Also ignore any references made to my habitual beating of ralph, that's just hogwash. Oh, and just so you don't take any offense by that phrase, I use my cat Cecilia to wash my pigs 🙂 (It's humor like that that caused me to create my TC in the first place. If you've never seen Monty Python, just ignore me).
- Alright, back to beating Ralph. (Writing Tutorials for over 2 hours straight gets to you after a while :). (And no, that's not a picture of me drooling back there. It's simply a smily face that I felt needed a period after it. (never mind)).
- So, what you have to understand is that when it says "Offset: 1000" in War2hack, it's not actually pointing to entry #1000 in Maindat.war Each of the data files has it's own number. Maindat happens to be 1000. Any entry in Maindat is identified by inserting its number behind the 1000, or something like that. Anyway, since the Default UDTA is normally located in entry number "O" of Maindat, it reads "1000". So, if we wanted to change it to read the new UDTA, which is not really at entry 991, we'd change the offset to read: "1991". Get it? If not, you'd be a good playmate for my dog Ralph.
- Okay, so you're going to vant to replace the Default UDTA and Expansion UDTA with the entry number that you will be inserting the new UDTA you created into. Then, you'll need to scroll down to the end to find the group entries for each of the tilesets. You'll have to change the offsets to reflect the number of the entry you're going to insert the new palette into. You'll have to make sure that the palette is the first of the four entries for this to work, though.
Part Four - Miscellaneous Stuff:
- That should just about do it. Again, make any other changes you want to the exe, but I'd suggest saving it first.
- Now that the exe's done, you can build your "wcd" file, if you haven't done so, and then generate your exe patch file. You should also create batch files that your users can run to automatically run the tileset stuff. You could base them on my batch file, for instance. You also should include a text file explaining for which pud files the user should use the default four tilesets, (and the original exe file), and the pud files which the user should use the new three tilesets for (and the new exe file that you've just created). There's no way to access all 7 at once.. sorry.
- You may also wish to modify the strings to reflect the names of the new Tilesets. To do this, you'll have to open back up WarDraft, open Strdat.war, and then double click on string 46 I think, It should be called Multiplayer selections, or something similar. In it, somewhere, are the names of the tilesets. By editing this, you'll be able to allow the user to select the proper tileset with custom and possibly multiplayer games. It also looks cool and professional. You'd then have to add this to your campaign builder template, and insert it into the blank entry in strdat (I don't know the number, but there should only be one). You'll then have to recompile the "wcd" file to reflect the changes. You'll also have to change the file indexes in the new exe to change the location of the new multiplayer strings to the new one.
- In any case, don't forget to recompile everything & make new patches after you make changes. That should do it for the Tutorial (this one, at least). Don't hesitate to contact me if you're still totally lost or need a clarification. Better yet, let me know of any mistakes. Hey, it's possible after two-three hours of typing a tutorial that your brain turns to mush and you create imaginary pets. Warn me if you see any signs of this in the tutorial. As always, happy hacking!
This tutorial was written by King Arthur on 9/21/97. Do not modify it w/o his (my) permission. Thanks!
Quote from TuPaC on October 31, 2020, 11:24 amA full blown tutorial with resources attached to add unit into 1.33 war2 dos.
[spoiler]
How to create a "new" unit for Warcraft II, ver 1.33
So, you would like to create a new unit for Warcraft. Don't we all? It's a rather difficult and lengthy process which can be screwed up rather easily, if you're not careful. Many people have asked me recently, after trying my Total Conversion, Funcraft III: Deride & Plunder, how I went about creating four new characters. I started out fully intending to make them brand new characters, but as time went on I discovered that only two unused readily editable slots exist in the Warcraft Exe. So what I did was to replace four of the heroes of the human race, Khadgar, Turalyon, Uther Lightbringer, and Danath. This was the easiest solution, because it meant I only had to change one unit's gfx entries, and the fact that they could be added into any existing pud file without being trained first helped out a lot. Replacing, or even adding new units is a very complicated and long process, one which I would not suggest undertaking unless you have lots of patience, and time. I elected not to include new gfx for my new units, as it would enlarge the size of an already large zip file, as well as the fact that I am definitely not an artist, except when it came time for hacking the title screen for my TC, which took me over a week to do. alright, I suppose you are tired of hearing me toot my own horn. Here goes with the tutoria, which will allow you to train nine new units:
- Download the following tools which are required to add/replace a unit: Wardraft, War2hack & UDTAhack.
- Once you've done that re-install Warcraft II with the expansion into two separate directories. This will insure that you will avoid altering any work that was added to your exe by downloading other patch files/Campaigns/Total Conversions. One installation will be the source of the files you are going to edit, your Work directory, and the other one will serve as a Test directory for when you finish all of your editing.
- I'm assuming that you've already decided what the units will be called, and which heroes will be replaced. So your first step is to open up Wardraft, load the knowledge bases, and open up the file Strdat.war in the Work directory you created in step 2. Double click on the entry labeled "1". This is the strings entry which holds all the data for the unit and building names. Scroll down the list to the unit names you want to change. For example, let's say that you want to replace Uther Lightbringer. You would scroll down to where you see his name and click on it. That will bring his name up in the box below the list. You can now edit the name to whatever you wish. Let's say you wanted to change it to read "Sir Lancelot". Simply type it in, it's as simple as that. When you're finished with that, don't click "OK", instead click on another name to apply the change.
- Now we need to create a new string to train the unit. This is a little more complicated than replacing the name. First, find a blank string and click on it. Now type in something in the following format:
(a lowercase "hotkey")<C0>TRAIN <C3>(Uppercase hotkey)<C0>(the rest of the name of the unit)
It would appear as follows:f<C0>TRAIN <C3>F<C0>OOTMAN
or
l<C0>TRAIN SIR<C3>L<C0>ANCELOT
so whatever key you pick for the hotkey, the shortcut key to be pressed to activate the training without the mouse, it must appear first in the string in lowercase, and then again between the <C3><C0> brackets. The latter part highlights the letter in a different color than the rest of the name.
- For the sake of this example, let's say you picked string 327, which contains the Breed Faster Horses upgrade string, one that is unused in Warcraft, but is read by War2hack. I must warn you , however, that the text War2hack displays for string data is hard-coded into it. So you wouldn't see a Train Lancelot string, instead you'd see the old breed faster horses string, but at least you can tell you've got the right number.
- Follow the same procedure for each unit you wish to add/replace. When you've finished that, then click on "OK". Wardraft will ask you if you wish to "Save as a separate file" or "Replace Selected Entry in War Archive". Choose the first one, "Save as a separate file", and call it "Names.dat", or something like that, and make sure you place it in your Work directory.
- You're not finished with Wardraft yet, so don't close it. Instead click on in the menu bar "Tools", then "Campaign Builder". Once it loads, click on the "+" button to add an entry replacement. It will bring up a dialog box which should look like this:
- See where it says "MAINDAT.WAR"? Click there and scroll down until it says "STRDAT.WAR". In the "Entry" Box, there's a zero. Replace that with a one, and it'll replace the entry labeled 1 in STRDAT.WAR. Click "Browse" to find the "Names.dat" file that you created in step 6. Once that's done, click OK. The finished product will look like this:
- Okay, now I'm not finished with Wardraft. I minimize it & I open up UDTAhack, make any necessary changes to the heroes I am replacing, and then save the Warcraft II Unit Data File in the work directory. I'm now finished with UDTAhack, and I switch back to Warcraft. I now need to add another entry into my template. You'll notice that when you maximize WarDraft, the Campaign Builder has disappeared. Don't worry, it's still there. Click on "Tools", "Campaign Builder" again and it'll be restored to where you left it. Add a new entry, using the same procedure as before, only this time it has to go into MAINDAT.WAR, entry 470 (not that this replaces only the Unit data for the expansion set, so if you want to replace that of the original Unit data, you'll need to add another entry just like the previous one, only it should replace entry 0). The finished product (for 1.33) will look like this:
- alright, now it's up to you to add any more data files to this template that will be included in your Total Conversion/Campaign file. I won't cover how to do that, but it's pretty self explanatory. After that, save your template file ( the text in the main screen). Once you're done with that, you'll need to complied/build the data file to be distributed. Click on this button in the tool bar: and choose to save it in your Work directory.
- Okay, now that does it for Wardraft. If you've saved everything, close it out, and then switch to Windows Explorer/File Manager/Dos Prompt and make a copy of the War2.exe file. Call it the name of your TC/Campaign, I don't care. I'm calling mine Funcraft.exe
- Open up War2hack, type in the full path of your newly created/copied exe file, and wait for it to identify it.
- Highlight the Unit Editor and press Enter. This will bring up a five paned window. One vertical pane on the left contains the number and name of every unit and building. The right pane is divided into four horizontal panes. The topmost contains basic properties such as icons, string names, etc. The next down contains the Command Data entry and number of commands, the third contains the after death animation, and the fourth contains the sound information. I'm only going to cover how to train your unit here, and not how to change sfx, after death animation, etc. This also assumes that you have replaced or decided to use the heroes' icons.
- What you do next depends on the number of new units you wish to train. I wanted to train four units extra in my TC, but it is possible to train up to nine extra units (fairly easily). Of course, you can't train more than an extra three in the barracks without serious hacking, which I'm not going to cover here in this tutorial. Let's assume worst case that you want to add training spots for ten hero replacements. If not, just ignore the extra hero steps (obviously). So, in order to train six units, you'll have to train three at the barracks, and six at another building, like the church. I really wouldn't suggest adding so many new units, as it might cause instability, and it would be difficult if the game did crash, where the problem lies.
- The next steps all refer to human units, and their icons/strings, etc. To change Orc units, follow the same procedure, just substituting the data by writing down details from the orc barracks and altar of storms.
- First, scroll down to the knight. His command data number should read: "2280*" Change it to read: "288*". This change will give the knights the command data of the Footman and Ballista, however, no performance differences will result due to this change. Now, scroll down to the Barracks. Change the number of commands from "6" to "9", and the command data from "5512*" to "2280*" This will link the Command data of the barracks to the knight, who has more commands to manipulate, as well as allowing it to have more commands than before.
- Repeat the same procedure for adding commands to the Church. Scroll to the Gnomish Submarine, and change its command data from "3512*" to "3840*". This will give the Gnomish Submarine the command data of the destroyer and the battleship, and no performance differences will result. Scroll down to the Church. Change its command data from "6016*" to "3840*". That changes the Church's command data from that of the church to that of the Sub's which has 9 commands, rather than the 3 that the Church has. To access the 9 commands, you'll have to type "F" followed by "9". You will also need to change the (E) Fn B data of the Church, not the sub, from "187744" to "188036", the Fn B of the Mage Tower, which can research and train. If you don't change it the church won't properly train units.
- Okay, now you're finished with the Unit Editor. Press "Esc" and scroll down to the Command Editor. Scroll down in that menu until you reach the barracks. For each of the six commands listed for the barracks (scroll sideways to view them all), you need to write down everything with the letters A-H beside it, keeping in mind that the F is out of order, last. Once that is finished, repeat the same process for the church for each of it's three commands. Now scroll up to the knight. Replace each of his first six commands with the six commands you wrote down from the barracks. Repeat with the Destroyer's first three commands.
- Now here comes the tricky part. I'll explain it as best as I can, using existing hero units.
- Scroll back up to the knight in the command editor. Scroll sideways until you get to the 7th command. Now, let's say we wanted to train Sir Lancelot (formerly Uther Lightbringer) in this spot. Copy all the data from the 6th command (the train paladin command) to the 7th command. Now, Lancelot's (Uther's) icon number is 34, so you'll have to replace the "10" in the icon spot with "34". You'll also have to change the position of the icon. Move it one over so that it isn't on top of another icon. So change it from "3" to "4". You'll also have to change the string from "277"(Train Paladin) to "327"(The train Lancelot string you created earlier, way back in step 4). If you're getting another unit to be trained, and switched its string number to another number besides 327, you'll have to switch it to the corresponding number you replaced. You need to finally change the act var from "12" to "52". This specifies the unit number you want trained. So instead of a paladin (12), you're training Lancelot (Uther, 52)
- The following is just for example purposes only:
String 328 is to train Lothar
String 159 is to train Alleria
String 243 is to train Turalyon
String 386 is to train Danath
String 390 is to train Khadgar
String 364 is to train Kurdran and Sky'ree
String 368 is to train a Daemon
String 337 is to train a Critter(If you decide to train all of these units, you should probably give them a decay rate of 50-100, and add a cost in gold and/or lumber to each unit in UDTAhack).
All of the above strings are either blank or unused by Warcraft, and I'm only specifying them so that you will know what string numbers to use and what I'm referring to. I also had to use both Orc and Human heroes because, well I ran out. If you do follow the steps to replace the last two units, the daemon and critter, keep in mind they'll be changes involved in the unit data for these units. The changes are in the next step.
- These following changes in this step are only necessary if you wish to train a Daemon and Critter. Switch out to the Unit editor. Scroll down to the Daemon. Change his Fn B (E) to "180876" This will allow him to be multi selectable. Change his command data from "468*" to "288*". This changes his icons to human ones, since you're training him at an orc barracks. (and actually, it frees up his commands (468*), so if you have to have one more unit trained, choose to modify his commands rather than the sub's.) Now you'll need to scroll down to the critter. Copy down all his data, and I mean all of it, death animations and sounds included. You'll be replacing the orc hero Zuljin (he's rather useless, anyway, but if you want, you can replace one of the other orc heroes.) So, replace each of the entries in the Zuljin box with the critter's. You'll then need to add the command data "288*", which it doesn't have, and change the Fn B (E) to "180876". Don't forget to change the death animations and sounds. You'll then need to open up UDTAhack and change the gfx entry for Zuljin to those of the critter's. And note that the critter has four different gfx's for each season, so modify that accordingly. You'll also need to remove his missile data, and change the range to 1, so that he doesn't fire an axe at a distance of 5 or 6 tiles. That should do it for UDTAhack, so save it and you'll need to use Wardraft again to update the data file. Change back to War2hack and the Command Editor.
- Make sure you're in the knight command data. Scroll over to the 8th command, and copy the data you wrote down for the paladin (6th command). You'll need to make the same changes you had to make to train Lancelot (Uther) with Lothar. Change the icon from "10" to "32", Lothar's icon, move the position from "3" to "5" to make room for Lancelot & the paladin. Change the string from "277" to "328", the string for Lothar, and the act ver from "12" to "50".
- Scroll over one more to the last command, 9. Copy the data from the ranger's build command(the 3rd) to the 9th. You will then replace the icon # "6" with "187", Alleria's icon. Move the position from "1" to "6", right next to Lothar's. Change the string from "273" to "159", and the act ver from "18" to "20"
- Now you'll need to switch to the Sub's commands, and scroll over to the 4th one. Copy the data again from the paladin (the 6th command of the barracks) to the 4th command of the destroyer. Change the icon from "10" to "195", the position from "3" to "2", the string from "277" to "243", and the act var from "12" to "44".
- Scroll over one to the 5th command of the Sub, copy over the data from the footman's training command at the barracks (1st command), and replace the following items: Icon "2" > "188", Pos "0" > "3", Str "283" > "386", Act var "0" > "46"
- Change to the 6th command, copy the data taken from the train Mage command in the Mage Tower (first command), and modify these values: Icon "14" > "193", Pos "0" > "4", Str "281" > "390", Act var "10" > "24".
- Move to the 7th command, copy the data taken from the Gryphon Aviary to train the gryphon (first command), and modify these values: Icon "30" > "191", Pos "0" > "5", Str "295" > "364", Act var "42" > "22".
- Move to the 8th command, copy the data taken from the Gryphon Aviary to train the gryphon (first command), and modify these values: Icon "30" > "37", Pos "0" > "6", Str "295" > "368", Act var "42" > "56".
- Move to the 9th command, copy the data taken from the first command of the Human barracks (train footman), and modify these values: Icon "2" > "115", Pos "0" > "7", Str "283" > "337", Act var "0" > "53".
- And that's it for War2hack. Save the changes, and exit to a Dos prompt in your Work directory. Type the following: genpatch war2.exe (name of modified exe) (name of patch file to be created).
- Now you need to create a batch file for your Total Conversion/Campaign. Copy this text into a text editor (ms-dos' edit utility works the best): exepatch war2.exe (name of modified exe) (name of patch file). Save it as the name of your TC/Campaign, with a .bat extension. Follow the same format for your wcd file patch. it should look like this: wcm (name of wcd file). So you should have those two lines in your bat file.
- Create a text file explaining the changes you have made to Warcraft, and whatever else they need to know when they download your files. Make sure you call it the name of your TC/Campaign, and not Readme.txt, etc., because we all have that file in our War II directory already. The zipped up version of this file includes a template from which you can work.
- Just a tip here, really, but if you are including new sounds for your units, don't have the campaign builder compress them. Instead, just leave them at their normal size, as putting the data file in a zip file decreases the size of the data file more than Blizzard's compression techniques. (and no, it doesn't work better if you compress and zip, it actually makes the files larger, for some strange reason.)
- That's all really, except make sure you put everything into a zip file that your patches need to run, this includes wcm.exe and exepatch.exe. Copy the zip file to your Test directory, the second installation you did in the first step, and run the batch file. Load Warcraft and make sure everything loads correctly, and that all the units function the way they are supposed to.
- As always, let me know if this just confuses you more, or what needs to be fixed if something doesn't work correctly, although it should. Contact me here. I hope this helps you out. For any other tutorials, see Mordraug's page, or Cameron's page.
[/spoiler]
A full blown tutorial with resources attached to add unit into 1.33 war2 dos.
How to create a "new" unit for Warcraft II, ver 1.33
So, you would like to create a new unit for Warcraft. Don't we all? It's a rather difficult and lengthy process which can be screwed up rather easily, if you're not careful. Many people have asked me recently, after trying my Total Conversion, Funcraft III: Deride & Plunder, how I went about creating four new characters. I started out fully intending to make them brand new characters, but as time went on I discovered that only two unused readily editable slots exist in the Warcraft Exe. So what I did was to replace four of the heroes of the human race, Khadgar, Turalyon, Uther Lightbringer, and Danath. This was the easiest solution, because it meant I only had to change one unit's gfx entries, and the fact that they could be added into any existing pud file without being trained first helped out a lot. Replacing, or even adding new units is a very complicated and long process, one which I would not suggest undertaking unless you have lots of patience, and time. I elected not to include new gfx for my new units, as it would enlarge the size of an already large zip file, as well as the fact that I am definitely not an artist, except when it came time for hacking the title screen for my TC, which took me over a week to do. alright, I suppose you are tired of hearing me toot my own horn. Here goes with the tutoria, which will allow you to train nine new units:
- Download the following tools which are required to add/replace a unit: Wardraft, War2hack & UDTAhack.
- Once you've done that re-install Warcraft II with the expansion into two separate directories. This will insure that you will avoid altering any work that was added to your exe by downloading other patch files/Campaigns/Total Conversions. One installation will be the source of the files you are going to edit, your Work directory, and the other one will serve as a Test directory for when you finish all of your editing.
- I'm assuming that you've already decided what the units will be called, and which heroes will be replaced. So your first step is to open up Wardraft, load the knowledge bases, and open up the file Strdat.war in the Work directory you created in step 2. Double click on the entry labeled "1". This is the strings entry which holds all the data for the unit and building names. Scroll down the list to the unit names you want to change. For example, let's say that you want to replace Uther Lightbringer. You would scroll down to where you see his name and click on it. That will bring his name up in the box below the list. You can now edit the name to whatever you wish. Let's say you wanted to change it to read "Sir Lancelot". Simply type it in, it's as simple as that. When you're finished with that, don't click "OK", instead click on another name to apply the change.
- Now we need to create a new string to train the unit. This is a little more complicated than replacing the name. First, find a blank string and click on it. Now type in something in the following format:
(a lowercase "hotkey")<C0>TRAIN <C3>(Uppercase hotkey)<C0>(the rest of the name of the unit)
It would appear as follows:f<C0>TRAIN <C3>F<C0>OOTMAN
or
l<C0>TRAIN SIR<C3>L<C0>ANCELOT
so whatever key you pick for the hotkey, the shortcut key to be pressed to activate the training without the mouse, it must appear first in the string in lowercase, and then again between the <C3><C0> brackets. The latter part highlights the letter in a different color than the rest of the name.
- For the sake of this example, let's say you picked string 327, which contains the Breed Faster Horses upgrade string, one that is unused in Warcraft, but is read by War2hack. I must warn you , however, that the text War2hack displays for string data is hard-coded into it. So you wouldn't see a Train Lancelot string, instead you'd see the old breed faster horses string, but at least you can tell you've got the right number.
- Follow the same procedure for each unit you wish to add/replace. When you've finished that, then click on "OK". Wardraft will ask you if you wish to "Save as a separate file" or "Replace Selected Entry in War Archive". Choose the first one, "Save as a separate file", and call it "Names.dat", or something like that, and make sure you place it in your Work directory.
- You're not finished with Wardraft yet, so don't close it. Instead click on in the menu bar "Tools", then "Campaign Builder". Once it loads, click on the "+" button to add an entry replacement. It will bring up a dialog box which should look like this:
- See where it says "MAINDAT.WAR"? Click there and scroll down until it says "STRDAT.WAR". In the "Entry" Box, there's a zero. Replace that with a one, and it'll replace the entry labeled 1 in STRDAT.WAR. Click "Browse" to find the "Names.dat" file that you created in step 6. Once that's done, click OK. The finished product will look like this:
- Okay, now I'm not finished with Wardraft. I minimize it & I open up UDTAhack, make any necessary changes to the heroes I am replacing, and then save the Warcraft II Unit Data File in the work directory. I'm now finished with UDTAhack, and I switch back to Warcraft. I now need to add another entry into my template. You'll notice that when you maximize WarDraft, the Campaign Builder has disappeared. Don't worry, it's still there. Click on "Tools", "Campaign Builder" again and it'll be restored to where you left it. Add a new entry, using the same procedure as before, only this time it has to go into MAINDAT.WAR, entry 470 (not that this replaces only the Unit data for the expansion set, so if you want to replace that of the original Unit data, you'll need to add another entry just like the previous one, only it should replace entry 0). The finished product (for 1.33) will look like this:
- alright, now it's up to you to add any more data files to this template that will be included in your Total Conversion/Campaign file. I won't cover how to do that, but it's pretty self explanatory. After that, save your template file ( the text in the main screen). Once you're done with that, you'll need to complied/build the data file to be distributed. Click on this button in the tool bar: and choose to save it in your Work directory.
- Okay, now that does it for Wardraft. If you've saved everything, close it out, and then switch to Windows Explorer/File Manager/Dos Prompt and make a copy of the War2.exe file. Call it the name of your TC/Campaign, I don't care. I'm calling mine Funcraft.exe
- Open up War2hack, type in the full path of your newly created/copied exe file, and wait for it to identify it.
- Highlight the Unit Editor and press Enter. This will bring up a five paned window. One vertical pane on the left contains the number and name of every unit and building. The right pane is divided into four horizontal panes. The topmost contains basic properties such as icons, string names, etc. The next down contains the Command Data entry and number of commands, the third contains the after death animation, and the fourth contains the sound information. I'm only going to cover how to train your unit here, and not how to change sfx, after death animation, etc. This also assumes that you have replaced or decided to use the heroes' icons.
- What you do next depends on the number of new units you wish to train. I wanted to train four units extra in my TC, but it is possible to train up to nine extra units (fairly easily). Of course, you can't train more than an extra three in the barracks without serious hacking, which I'm not going to cover here in this tutorial. Let's assume worst case that you want to add training spots for ten hero replacements. If not, just ignore the extra hero steps (obviously). So, in order to train six units, you'll have to train three at the barracks, and six at another building, like the church. I really wouldn't suggest adding so many new units, as it might cause instability, and it would be difficult if the game did crash, where the problem lies.
- The next steps all refer to human units, and their icons/strings, etc. To change Orc units, follow the same procedure, just substituting the data by writing down details from the orc barracks and altar of storms.
- First, scroll down to the knight. His command data number should read: "2280*" Change it to read: "288*". This change will give the knights the command data of the Footman and Ballista, however, no performance differences will result due to this change. Now, scroll down to the Barracks. Change the number of commands from "6" to "9", and the command data from "5512*" to "2280*" This will link the Command data of the barracks to the knight, who has more commands to manipulate, as well as allowing it to have more commands than before.
- Repeat the same procedure for adding commands to the Church. Scroll to the Gnomish Submarine, and change its command data from "3512*" to "3840*". This will give the Gnomish Submarine the command data of the destroyer and the battleship, and no performance differences will result. Scroll down to the Church. Change its command data from "6016*" to "3840*". That changes the Church's command data from that of the church to that of the Sub's which has 9 commands, rather than the 3 that the Church has. To access the 9 commands, you'll have to type "F" followed by "9". You will also need to change the (E) Fn B data of the Church, not the sub, from "187744" to "188036", the Fn B of the Mage Tower, which can research and train. If you don't change it the church won't properly train units.
- Okay, now you're finished with the Unit Editor. Press "Esc" and scroll down to the Command Editor. Scroll down in that menu until you reach the barracks. For each of the six commands listed for the barracks (scroll sideways to view them all), you need to write down everything with the letters A-H beside it, keeping in mind that the F is out of order, last. Once that is finished, repeat the same process for the church for each of it's three commands. Now scroll up to the knight. Replace each of his first six commands with the six commands you wrote down from the barracks. Repeat with the Destroyer's first three commands.
- Now here comes the tricky part. I'll explain it as best as I can, using existing hero units.
- Scroll back up to the knight in the command editor. Scroll sideways until you get to the 7th command. Now, let's say we wanted to train Sir Lancelot (formerly Uther Lightbringer) in this spot. Copy all the data from the 6th command (the train paladin command) to the 7th command. Now, Lancelot's (Uther's) icon number is 34, so you'll have to replace the "10" in the icon spot with "34". You'll also have to change the position of the icon. Move it one over so that it isn't on top of another icon. So change it from "3" to "4". You'll also have to change the string from "277"(Train Paladin) to "327"(The train Lancelot string you created earlier, way back in step 4). If you're getting another unit to be trained, and switched its string number to another number besides 327, you'll have to switch it to the corresponding number you replaced. You need to finally change the act var from "12" to "52". This specifies the unit number you want trained. So instead of a paladin (12), you're training Lancelot (Uther, 52)
- The following is just for example purposes only:
String 328 is to train Lothar
String 159 is to train Alleria
String 243 is to train Turalyon
String 386 is to train Danath
String 390 is to train Khadgar
String 364 is to train Kurdran and Sky'ree
String 368 is to train a Daemon
String 337 is to train a Critter(If you decide to train all of these units, you should probably give them a decay rate of 50-100, and add a cost in gold and/or lumber to each unit in UDTAhack).
All of the above strings are either blank or unused by Warcraft, and I'm only specifying them so that you will know what string numbers to use and what I'm referring to. I also had to use both Orc and Human heroes because, well I ran out. If you do follow the steps to replace the last two units, the daemon and critter, keep in mind they'll be changes involved in the unit data for these units. The changes are in the next step.
- These following changes in this step are only necessary if you wish to train a Daemon and Critter. Switch out to the Unit editor. Scroll down to the Daemon. Change his Fn B (E) to "180876" This will allow him to be multi selectable. Change his command data from "468*" to "288*". This changes his icons to human ones, since you're training him at an orc barracks. (and actually, it frees up his commands (468*), so if you have to have one more unit trained, choose to modify his commands rather than the sub's.) Now you'll need to scroll down to the critter. Copy down all his data, and I mean all of it, death animations and sounds included. You'll be replacing the orc hero Zuljin (he's rather useless, anyway, but if you want, you can replace one of the other orc heroes.) So, replace each of the entries in the Zuljin box with the critter's. You'll then need to add the command data "288*", which it doesn't have, and change the Fn B (E) to "180876". Don't forget to change the death animations and sounds. You'll then need to open up UDTAhack and change the gfx entry for Zuljin to those of the critter's. And note that the critter has four different gfx's for each season, so modify that accordingly. You'll also need to remove his missile data, and change the range to 1, so that he doesn't fire an axe at a distance of 5 or 6 tiles. That should do it for UDTAhack, so save it and you'll need to use Wardraft again to update the data file. Change back to War2hack and the Command Editor.
- Make sure you're in the knight command data. Scroll over to the 8th command, and copy the data you wrote down for the paladin (6th command). You'll need to make the same changes you had to make to train Lancelot (Uther) with Lothar. Change the icon from "10" to "32", Lothar's icon, move the position from "3" to "5" to make room for Lancelot & the paladin. Change the string from "277" to "328", the string for Lothar, and the act ver from "12" to "50".
- Scroll over one more to the last command, 9. Copy the data from the ranger's build command(the 3rd) to the 9th. You will then replace the icon # "6" with "187", Alleria's icon. Move the position from "1" to "6", right next to Lothar's. Change the string from "273" to "159", and the act ver from "18" to "20"
- Now you'll need to switch to the Sub's commands, and scroll over to the 4th one. Copy the data again from the paladin (the 6th command of the barracks) to the 4th command of the destroyer. Change the icon from "10" to "195", the position from "3" to "2", the string from "277" to "243", and the act var from "12" to "44".
- Scroll over one to the 5th command of the Sub, copy over the data from the footman's training command at the barracks (1st command), and replace the following items: Icon "2" > "188", Pos "0" > "3", Str "283" > "386", Act var "0" > "46"
- Change to the 6th command, copy the data taken from the train Mage command in the Mage Tower (first command), and modify these values: Icon "14" > "193", Pos "0" > "4", Str "281" > "390", Act var "10" > "24".
- Move to the 7th command, copy the data taken from the Gryphon Aviary to train the gryphon (first command), and modify these values: Icon "30" > "191", Pos "0" > "5", Str "295" > "364", Act var "42" > "22".
- Move to the 8th command, copy the data taken from the Gryphon Aviary to train the gryphon (first command), and modify these values: Icon "30" > "37", Pos "0" > "6", Str "295" > "368", Act var "42" > "56".
- Move to the 9th command, copy the data taken from the first command of the Human barracks (train footman), and modify these values: Icon "2" > "115", Pos "0" > "7", Str "283" > "337", Act var "0" > "53".
- And that's it for War2hack. Save the changes, and exit to a Dos prompt in your Work directory. Type the following: genpatch war2.exe (name of modified exe) (name of patch file to be created).
- Now you need to create a batch file for your Total Conversion/Campaign. Copy this text into a text editor (ms-dos' edit utility works the best): exepatch war2.exe (name of modified exe) (name of patch file). Save it as the name of your TC/Campaign, with a .bat extension. Follow the same format for your wcd file patch. it should look like this: wcm (name of wcd file). So you should have those two lines in your bat file.
- Create a text file explaining the changes you have made to Warcraft, and whatever else they need to know when they download your files. Make sure you call it the name of your TC/Campaign, and not Readme.txt, etc., because we all have that file in our War II directory already. The zipped up version of this file includes a template from which you can work.
- Just a tip here, really, but if you are including new sounds for your units, don't have the campaign builder compress them. Instead, just leave them at their normal size, as putting the data file in a zip file decreases the size of the data file more than Blizzard's compression techniques. (and no, it doesn't work better if you compress and zip, it actually makes the files larger, for some strange reason.)
- That's all really, except make sure you put everything into a zip file that your patches need to run, this includes wcm.exe and exepatch.exe. Copy the zip file to your Test directory, the second installation you did in the first step, and run the batch file. Load Warcraft and make sure everything loads correctly, and that all the units function the way they are supposed to.
- As always, let me know if this just confuses you more, or what needs to be fixed if something doesn't work correctly, although it should. Contact me here. I hope this helps you out. For any other tutorials, see Mordraug's page, or Cameron's page.
Recent comments