• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

How to add a new ability to the Object Editor and use it in your map

Step -2. Implement the ability in C++, recompile the game and send patches to the people. If you can't do that, then go to Step -1, if you can, then you are lucky :^), go to Step 0.
Step -1. Find an ability that is already implemented, but not exposed to the Object Editor (this tutorial uses 1 such ability).

Step 0. Extract the files Units\ItemAbilityFunc.txt, Units\ItemAbilityStrings.txt, Units\AbilityData.slk and Units\AbilityMetaData.slk from War3Patch.mpq (or wherever you can find them) to the directory path\to\your\Warcraft III. Enable local files, using the Registry Editor, so that the Object Editor will read these files first.

The ability we are going to be exposing to the Object Editor has a fourcc code of AImn, it is an item ability that gives permanent mana points.

Step 1. Add an entry for AImn to file Units\ItemAbilityFunc.txt:

Code:
[AImn]
Art=ReplaceableTextures\CommandButtons\BTNManual.blp
Casterart=Abilities\Spells\Items\AIlm\AIlmTarget.mdl
Casterattach=origin

Step 2. Add an entry for AImn to file Units\ItemAbilityStrings.txt:
Code:
[AImn]
Name=Item Permanent Mana Gain
EditorSuffix=(+50)

Step 3. Add an entry for AImn to file Units\AbilityData.slk by opening it in Excel/LibreOfficeCalc. Copy the already existing entry for AImh, then change the first value from AImh to AImn, then the second value from AImi to again AImn. Save the file as slk. You might have to clean the slk file, using a text editor, from Excel/LibreOfficeCalc's "garbage" fields, or not, I don't know.

Step 4. Open Units\AbilityMetaData.slk and add AImn to the list: AImm,AImb,AIbm => AImm,AImb,AIbm,AImn

Step 5. Open the Object Editor and make sure that the new item ability shows up in the Abilities tab (search for AImn). Open the Items tab and create a new item that uses the ability. Import Units\AbilityData.slk and Units\ItemAbilityFunc.txt to the map at the same paths Units\AbilityData.slk and Units\ItemAbilityFunc.txt (when you import a file, its path is set to war3mapImported\<filename>), so that the game can read our modified files.
 
Last edited:
Big fan of the color usage.

However this is not a very user friendly 'tutorial'.

Step -2 or -1 is incredibly vague. I get the impression it's made in jest because I've not heard of object editor entries you can't access but it's also not something I've put any focus on.

Step 0, how do you extract something? I happen to know this but maybe it should not be taken for granted.

Further, it assumes you know why you would choose to do this and what upsides/downsides it might have compared to whatever the alternatives are.
 
Another example of adding an ability to the Object Editor.

Step 0. Extract the same files as before, and also the file UI\WorldEditStrings.txt, to the directory path\to\your\Warcraft III.

The ability we are going to be exposing to the Object Editor, this time, has a fourcc code of Arem, it is similar to Arel (Item Life Regeneration), but regenerates mana instead of life. It is different than AIrm, which gives a "percentage" bonus to mana regenaration, while Arem gives a "flat" bonus to mana regeneration.

Step 1. Add an entry for Arem to file Units\ItemAbilityFunc.txt (you can add it bellow the entry for Arel):

Code:
[Arem]
Art=ReplaceableTextures\CommandButtons\BTNRingPurple.blp

Step 2. Add an entry for Arem to file Units\ItemAbilityStrings.txt:
Code:
[Arem]
Name=Item Mana Regeneration
EditorSuffix=(Flat)

Step 3. Add an entry for Arem to file Units\AbilityData.slk, by copying the entry for Arel. Then rename the 2 Arel values (first 2 columns) to Arem. You can also edit the value in the 3rd column (comment) to Regen Mana, for example. Save the Units\AbilityData.slk file. You can also try to open the file with a text editor and remove any "garbage" fields that Excel/LibreOfficeCalc might have saved. Only lines beginning with ID, B, C or E should remain.

Step 4. Add an entry for Arem to file Units\AbilityMetaData.slk, by copying the entry Arel. Rename Ihpr to Impr, WESTRING_AEVAL_IHPR to WESTRING_AEVAL_IMPR and x0i028 to x0i047, for the row we copied.

Step 5. Add WESTRING_AEVAL_IMPR to file UI\WorldEditStrings.txt:

Code:
WESTRING_AEVAL_IMPR=Mana Points Regenerated Per Second

Step 6. Open the Object Editor and make sure that the new item ability shows up in the Abilities tab (search for Arem). Import Units\AbilityData.slk, Units\ItemAbilityFunc.txt, and this time also Units\AbilityMetaData.slk, to the map at the same paths, so that the game can read our modified files.
 
Last edited:
Back
Top