Welcome (Read FIRST!) MODDING INFO INSIDE (2024)

WARNING!: This is a complex topic, I just briefly delved into what is possible with these tools. This tutorial is in no way comprehensive, its only aim is to get you started.. I hope this helps, and please send all questions, etc to the WARDRAFT FORUM

by: Cameron Buschardt(c027319@idt.net)
([url=http://www.geocities.com/SiliconValley/Park/1385]http://www.geocities.com/SiliconValley/Park/1385%5B/url%5D) <- War2 Util Page! (WARHACK and UDTAhack)
([url=http://idt.net/~c027319]http://idt.net/~c027319%5B/url%5D) <- for all us programmers!

Requirements:

A.) A NEW VERSION of 278 TOOLS (available on my War2 page)
B.) A text editor of some sort... ie NotePad or MSDOS editor
C.) A little knowledge of DOS commands
D.) WarDraft

A. Using the disassembler (D278)
Chances are you are not going to start of by writing an entire 278 file from scratch, you are probably just going to want to "TWEAK" what blizzard did. To do this you are going to need to extract the source from their 278 entry. Here's what to do:

First, you must have a decompressed and extracted copy of entry #278 of MAINDAT.WAR(use WarDraft to get this). Once you have extracted it, say we call it '278'. To get the source make sure D278.EXE is in the same directory as the 278 file and type the following at the DOS prompt:

C:\WAR2> D278 278 > 278src.txt

That line will create a text file called 278src.txt that you may edit. Windows 95 comes with both the MSDOS editor and notepad.. Use eitherWelcome (Read FIRST!) MODDING INFO INSIDE (1)

B. Using the assembler
Once you have made the necessary modifications to the file, you will need to recompile it simply type the following at the Dos Prompt (after making sure A278 is in the same directory as the source):

C:\WAR2> A278 278src.txt NEW278

Then in WarDraft be sure to import NEW278 ..Welcome (Read FIRST!) MODDING INFO INSIDE (2)

C. The scripting Language
Chances are you are not going to understand the code immediately so this section is devoted to showing you the in/outs of the language and the basic theory. Later on you will get some examples and practical applications. (

Here is a basic list of the language syntax: (note for the items in brackets, this means there if more than one POSSIBLE name, chose one from inside the brackets)

xxxx:A label where xxxx is the name of the label ; - Anything after a ';' is a COMMENT, and is ignored by A278.
[CMD_3,Goto] xxxxA Jump Command,transfers to label xxxx. Uxxx label - Unit declaration. Tells the game where to find the table of event handlers for a unit.
Exx labelDeclares an event handler. CMD_0,RESET,TASK_WAIT - End sequence (do other tasks)
[CMD_1,WAIT1,WAIT] xxxxWait (not affected by Haste or Slow) where xxxx is the amount of time
[CMD_2,DEAD_WAIT]Dead (waits for maximum length)
[CMD_4,SHOW] xxxxShow frame #xxxx
[CMD_5,WALK] xxxxMOVE xxxx pixels(note in one MOVE handler the unit needs to move 32 pixels(no more no less). Also, this is for LAND units only !
[CMD_6,WALK_F,WALK_SHOW] xxxx,yyyyWalk xxxx pixels and show frame #yyyy
[CMD_7,WAIT2,WAIT_HSTSLW] xxxxWait (affected by both Haste and Slow) for xxxx amount of time. If Haste is cast of this unit, this delay is shortened, and if slow is cast, this delay is lengthened
[CMD_8,WAIT_HST] xxxxWait (affected by HASTE only) for xxxx amount of time. If slow is cast there is NO affect. If haste is cast, this delay is shortened.
[CMD_9,WAIT3,WAIT_SLW] xxxxWait(affected by SLOW only) for xxxx time.. Used by knights, (they never can go faster even with haste, but are vincible to SLOWWelcome (Read FIRST!) MODDING INFO INSIDE (3)
[CMD_A,SOUND]Play Attack Sound
[CMD_B,SHOOT]Deal damage and fire projectile.
[CMD_C,WAIT4,WAIT_LOAD]Wait with load (adds one to wait time, then does 7) (ie allows load)
[CMD_D,FLOAT] xxxxMOVE xxxx pixels(note in one MOVE handler the unit needs to move 32 pixels(no more no less). Also, this is for SEA and AIR units only !
[CMD_E,FLOAT_A,FLOAT_SHOW] xxxxSAIL/FLY xxxx pixels and show frame #yyyy
[CMD_F,NEUTRALIZE]Make unit neutral (not this unit, rather its enemy)
Beyond the basic code syntax, the code is broken up into 3 sections (noted by the labels)

UNITS,PROGRAMS, and EVENTS. The Units section contain a pointer for each unit to its corresponding animation program. the PROGRAMS section has a pointer for each event handler. And the EVENTS section has the actual code for the event handlers.

Also note that in the EVENTS section: Event0 - Called after the unit dies.. After death animation? Event2 - Called for static animation(when the unit isn't moving)

D. A quick lesson
Well this is great you have a reference to the commands, you know a bit about the language, but how do you do cool stuff with this info? For example:

1. Giving the Paladins their own GFX

In the UNITS section, find the line for paladin (U12).
Write down the label (PROG_...) then change the line to read to read:

U12 Prog_Paladin ; Paladin 2.

Use Search to find the declaration of the label you wrote down (ie 'PROG_01C4:'), you should land in the PROGRAMS section with a group label 'knights and lothar' or something.

Copy the entire mini-group (your copied text should look something like the following):

Prog_01C4: ; Knight, Lothar E0 Global_1393 ;
Event0 E1 Event_08B7 ; Die E2
Event_08CE ; Event2 E3
Event_08D3 ; Move E4
Event_0903 ; Attack E5
Global_1389 ;Event5 E6
Global_1389 ; Event6

Now that you have Copied that, past it right above the one you copied it from, (2 identical ones in a row), and change the label of the newly added on to PROG_PALADIN: ..

Locate the events you want make "UNIQUE" by changing their labels in the newly added PROG_PALADIN section... ie to change the death event, look at E1, the label is EVENT_08B7 (write that down), then change it to Event_PDeath (paladin death).

Search for for the label you wrote down PLUS a colon at the end, and you will wind up and the event handler for the knights death.

Copy the entire routine(the comment, code,label, and up until the next handler starts) and paste a duplication in. Changes the duplicate's label to EVENT_PDEATH..

To customize his death simply change the code in your new event handler (PDEATH). Such examples would be to LENGTHEN the delays for the death animation so it remains longer, or to add a SHOOT command or 2 as sort of a kamikazeWelcome (Read FIRST!) MODDING INFO INSIDE (4)Anything you please.

D. More Coding tips
Now that you know the basics of it, you must know HOW the handlers work. The handler gets called for the unit, and during of which NO other events for that UNIT are called, so you must tell the computer when you're done by using RESET. On the computer routines you will notice them calling "GOTO GLOBAL_xxx" alot at the end of their programs.. This is simply a jump to a reset. But beware, the next time the animation is called it will return to after the last RESET (in that event handler). So a blank event handler would look like:

EVENT: RESET GOTO EVENT

If you emitted the RESET the unit would appear to freeze..Welcome (Read FIRST!) MODDING INFO INSIDE (5)(He couldn't even die!) Also be sure to APPROPRIATELY use the WAIT1,2,and 3 instructions as you don't want an organic unit that is immune to HASTE and SLOW.

Also you probably don't understand (or immediatly know) what I am talking about on all this stuff, so please expierament and read the code.. D278 is perfect for learning.

5. Cool Things to try:
1. Take a grunt, and under his attack routine romove all of the shoot commands(so he can't fire) and create a custom EVENT_0 handler(unit created) that reads the following:

FOOTMAN_CREATE:
SHOOT ;********** this line has it shoot flame shield on itself..(never goes away)
_FOOTMAN_LOOP:
RESET
GOTO _FOOTMAN_LOOP

Then in UDTAhack make his main projectile: CAST FLAME-SHIELD ON SELF .. Now you have flame shielded footmen!

2. Add the neutralize command to the attack sequence of a unitWelcome (Read FIRST!) MODDING INFO INSIDE (6)

3. Give units a SHOOT command(or 20) in their death sequence (so they kill lots of guys when they get killed)

THE END! Well I hope it was helpful, it is a confusing topic, unless you have previous programming experience. If you have any questions please mail them to the WarDraft Forum.
Modify the 278 FILE

[code]
WARNING!: This is a complex topic, I just briefly delved into what is possible with these tools. This tutorial is in no way comprehensive, its only aim is to get you started.. I hope this helps, and please send all questions, etc to the WARDRAFT FORUM

by: Cameron Buschardt(c027319@idt.net)
([url=http://www.geocities.com/SiliconValley/Park/1385]http://www.geocities.com/SiliconValley/Park/1385%5B/url%5D) <- War2 Util Page! (WARHACK and UDTAhack)
([url=http://idt.net/~c027319]http://idt.net/~c027319%5B/url%5D) <- for all us programmers!

Requirements:

A.) A NEW VERSION of 278 TOOLS (available on my War2 page)
B.) A text editor of some sort... ie NotePad or MSDOS editor
C.) A little knowledge of DOS commands
D.) WarDraft

A. Using the disassembler (D278)
Chances are you are not going to start of by writing an entire 278 file from scratch, you are probably just going to want to "TWEAK" what blizzard did. To do this you are going to need to extract the source from their 278 entry. Here's what to do:

First, you must have a decompressed and extracted copy of entry #278 of MAINDAT.WAR(use WarDraft to get this). Once you have extracted it, say we call it '278'. To get the source make sure D278.EXE is in the same directory as the 278 file and type the following at the DOS prompt:

C:\WAR2> D278 278 > 278src.txt

That line will create a text file called 278src.txt that you may edit. Windows 95 comes with both the MSDOS editor and notepad.. Use eitherWelcome (Read FIRST!) MODDING INFO INSIDE (7)

B. Using the assembler
Once you have made the necessary modifications to the file, you will need to recompile it simply type the following at the Dos Prompt (after making sure A278 is in the same directory as the source):

C:\WAR2> A278 278src.txt NEW278

Then in WarDraft be sure to import NEW278 ..Welcome (Read FIRST!) MODDING INFO INSIDE (8)

C. The scripting Language
Chances are you are not going to understand the code immediately so this section is devoted to showing you the in/outs of the language and the basic theory. Later on you will get some examples and practical applications. (

Here is a basic list of the language syntax: (note for the items in brackets, this means there if more than one POSSIBLE name, chose one from inside the brackets)

xxxx:A label where xxxx is the name of the label ; - Anything after a ';' is a COMMENT, and is ignored by A278.
[CMD_3,Goto] xxxxA Jump Command,transfers to label xxxx. Uxxx label - Unit declaration. Tells the game where to find the table of event handlers for a unit.
Exx labelDeclares an event handler. CMD_0,RESET,TASK_WAIT - End sequence (do other tasks)
[CMD_1,WAIT1,WAIT] xxxxWait (not affected by Haste or Slow) where xxxx is the amount of time
[CMD_2,DEAD_WAIT]Dead (waits for maximum length)
[CMD_4,SHOW] xxxxShow frame #xxxx
[CMD_5,WALK] xxxxMOVE xxxx pixels(note in one MOVE handler the unit needs to move 32 pixels(no more no less). Also, this is for LAND units only !
[CMD_6,WALK_F,WALK_SHOW] xxxx,yyyyWalk xxxx pixels and show frame #yyyy
[CMD_7,WAIT2,WAIT_HSTSLW] xxxxWait (affected by both Haste and Slow) for xxxx amount of time. If Haste is cast of this unit, this delay is shortened, and if slow is cast, this delay is lengthened
[CMD_8,WAIT_HST] xxxxWait (affected by HASTE only) for xxxx amount of time. If slow is cast there is NO affect. If haste is cast, this delay is shortened.
[CMD_9,WAIT3,WAIT_SLW] xxxxWait(affected by SLOW only) for xxxx time.. Used by knights, (they never can go faster even with haste, but are vincible to SLOWWelcome (Read FIRST!) MODDING INFO INSIDE (9)
[CMD_A,SOUND]Play Attack Sound
[CMD_B,SHOOT]Deal damage and fire projectile.
[CMD_C,WAIT4,WAIT_LOAD]Wait with load (adds one to wait time, then does 7) (ie allows load)
[CMD_D,FLOAT] xxxxMOVE xxxx pixels(note in one MOVE handler the unit needs to move 32 pixels(no more no less). Also, this is for SEA and AIR units only !
[CMD_E,FLOAT_A,FLOAT_SHOW] xxxxSAIL/FLY xxxx pixels and show frame #yyyy
[CMD_F,NEUTRALIZE]Make unit neutral (not this unit, rather its enemy)
Beyond the basic code syntax, the code is broken up into 3 sections (noted by the labels)

UNITS,PROGRAMS, and EVENTS. The Units section contain a pointer for each unit to its corresponding animation program. the PROGRAMS section has a pointer for each event handler. And the EVENTS section has the actual code for the event handlers.

Also note that in the EVENTS section: Event0 - Called after the unit dies.. After death animation? Event2 - Called for static animation(when the unit isn't moving)

D. A quick lesson
Well this is great you have a reference to the commands, you know a bit about the language, but how do you do cool stuff with this info? For example:

1. Giving the Paladins their own GFX

In the UNITS section, find the line for paladin (U12).
Write down the label (PROG_...) then change the line to read to read:

U12 Prog_Paladin ; Paladin 2.

Use Search to find the declaration of the label you wrote down (ie 'PROG_01C4:'), you should land in the PROGRAMS section with a group label 'knights and lothar' or something.

Copy the entire mini-group (your copied text should look something like the following):

Prog_01C4: ; Knight, Lothar E0 Global_1393 ;
Event0 E1 Event_08B7 ; Die E2
Event_08CE ; Event2 E3
Event_08D3 ; Move E4
Event_0903 ; Attack E5
Global_1389 ;Event5 E6
Global_1389 ; Event6

Now that you have Copied that, past it right above the one you copied it from, (2 identical ones in a row), and change the label of the newly added on to PROG_PALADIN: ..

Locate the events you want make "UNIQUE" by changing their labels in the newly added PROG_PALADIN section... ie to change the death event, look at E1, the label is EVENT_08B7 (write that down), then change it to Event_PDeath (paladin death).

Search for for the label you wrote down PLUS a colon at the end, and you will wind up and the event handler for the knights death.

Copy the entire routine(the comment, code,label, and up until the next handler starts) and paste a duplication in. Changes the duplicate's label to EVENT_PDEATH..

To customize his death simply change the code in your new event handler (PDEATH). Such examples would be to LENGTHEN the delays for the death animation so it remains longer, or to add a SHOOT command or 2 as sort of a kamikazeWelcome (Read FIRST!) MODDING INFO INSIDE (10)Anything you please.

D. More Coding tips
Now that you know the basics of it, you must know HOW the handlers work. The handler gets called for the unit, and during of which NO other events for that UNIT are called, so you must tell the computer when you're done by using RESET. On the computer routines you will notice them calling "GOTO GLOBAL_xxx" alot at the end of their programs.. This is simply a jump to a reset. But beware, the next time the animation is called it will return to after the last RESET (in that event handler). So a blank event handler would look like:

EVENT: RESET GOTO EVENT

If you emitted the RESET the unit would appear to freeze..Welcome (Read FIRST!) MODDING INFO INSIDE (11)(He couldn't even die!) Also be sure to APPROPRIATELY use the WAIT1,2,and 3 instructions as you don't want an organic unit that is immune to HASTE and SLOW.

Also you probably don't understand (or immediatly know) what I am talking about on all this stuff, so please expierament and read the code.. D278 is perfect for learning.

5. Cool Things to try:
1. Take a grunt, and under his attack routine romove all of the shoot commands(so he can't fire) and create a custom EVENT_0 handler(unit created) that reads the following:

FOOTMAN_CREATE:
SHOOT ;********** this line has it shoot flame shield on itself..(never goes away)
_FOOTMAN_LOOP:
RESET
GOTO _FOOTMAN_LOOP

Then in UDTAhack make his main projectile: CAST FLAME-SHIELD ON SELF .. Now you have flame shielded footmen!

2. Add the neutralize command to the attack sequence of a unitWelcome (Read FIRST!) MODDING INFO INSIDE (12)

3. Give units a SHOOT command(or 20) in their death sequence (so they kill lots of guys when they get killed)

THE END! Well I hope it was helpful, it is a confusing topic, unless you have previous programming experience. If you have any questions please mail them to the WarDraft Forum.

Welcome (Read FIRST!) MODDING INFO INSIDE (2024)
Top Articles
Preschool Teacher in Philadelphia, PA for St. Peter's School
Hayworth-Miller Silas Creek Chapel
Strange World Showtimes Near Amc Brazos Mall 14
Jody Plauche Wiki
Fnv Mr Cuddles
Memphis Beauty 2084
Restaurants Near Defy Trampoline Park
Mets Game Highlights
On Trigger Enter Unity
Wgu Academy Phone Number
Allegra Commercial Actress 2022
Seafood Restaurants Open Late Near Me
Rimworld Prison Break
Nyu Paralegal Program
Rhiel Funeral Durand
Okay Backhouse Mike Lyrics
Waitlistcheck Sign Up
Tethrd Coupon Code The Hunting Public
Weather Arlington Radar
Eaglecraft Minecraft Unblocked
Antonios Worcester Menu
Reptile Expo Spokane
Pennys Department Store Near Me
Dell Optiplex 7010 Drivers Download and Update for Windows 10
Perry County Mugshots Busted
Calamity Shadow Fish
Why Zero Raised to the Zero Power is defined to be One « Mathematical Science & Technologies
Adventhealth Employee Handbook 2022
Minor Additions To The Bill Crossword
Should Jenn Tran Join 'Bachelor in Paradise'? Alum Mari Pepin Weighs In
Sentara Norfolk General Visiting Hours
Ontpress Fresh Updates
Late Bloomers Summary and Key Lessons | Rich Karlgaard
Walgreens Rufe Snow Hightower
Wells Fargo Hiring Hundreds to Develop New Tech Hub in the Columbus Region
Hospice Thrift Store St Pete
Warrior Badge Ability Wars
Craigslist Pinellas County Rentals
Smarthistory – Leonardo da Vinci, “Vitruvian Man”
Scarabaeidae), with a key to related species – Revista Mexicana de Biodiversidad
Rage Of Harrogath Bugged
Limestone Bank Hillview
Congdon Heart And Vascular Center
Z93 Local News Monticello Ky
4225 Eckersley Way Roseville Ca
Green Press Gazette Obits
4Myhr Mhub
Busted Newspaper Lynchburg County VA Mugshots
Akc Eo Tryouts 2022
Transportationco.logisticare
C Weather London
Latest Posts
Article information

Author: Edwin Metz

Last Updated:

Views: 5446

Rating: 4.8 / 5 (78 voted)

Reviews: 85% of readers found this page helpful

Author information

Name: Edwin Metz

Birthday: 1997-04-16

Address: 51593 Leanne Light, Kuphalmouth, DE 50012-5183

Phone: +639107620957

Job: Corporate Banking Technician

Hobby: Reading, scrapbook, role-playing games, Fishing, Fishing, Scuba diving, Beekeeping

Introduction: My name is Edwin Metz, I am a fair, energetic, helpful, brave, outstanding, nice, helpful person who loves writing and wants to share my knowledge and understanding with you.