WARCRAFT 3: Spell and MPQ Editing FAQ. by Seraphimon v0.5 7th June, 2003 This FAQ is Copyright 2003 by Seraphimon. Contact me via the GameFAQs RoC and FT boards. Or send an email to me- da_fgs@hotmail.com. Suggestions and errors are welcome. I’m especially looking for an experienced modeler who can add to this stuff first. Offensive stuff will get modded (since it’s a ToS violation) on the board, and emailers of such stuff will be blocked on my email. Questions to my email already answered will be awarded with a block as well. Copyright 2003 Seraphimon. This may be not be reproduced under any circumstances except for personal, private use. It may not be placed on any web site or otherwise distributed publicly without advance written permission. Use of this guide on any other web site or as a part of any public display is strictly prohibited, and a violation of copyright. All trademarks and copyrights contained in this document are owned by their respective trademark and copyright holders. ----------------------------------------------------------------------- CONTENTS 1. Before We Begin And FAQ 1.1 Before We Begin 1.2 FAQ 2. The MPQ Editing Process 2.1 The MPQ Editing Process 2.2 MPQ Extractors 3. Editing Spells 3.1 Stuff You Should Know 3.2 Editing The AbilityData.slk File 3.3 Editing The (Race)AbilityFunc.txt File 3.4 Editing The (Race)AbilityStrings.txt File 3.5 How To Make Your Edited Spell-Related Files Appear In The World Editor 4. Thanks To 5. Credits ----------------------------------------------------------------------- 1. BEFORE WE BEGIN AND FAQ 1.1 BEFORE WE BEGIN This FAQ was written, put simply, because a lot of people have become annoyed on the WC3 board, of people who keep on asking questions about spell editing and expect it to be a walk in the park. I felt like the current spell editing FAQ, currently embedded in GameFAQ’s World Editor FAQ, was inadequate, aka it did not explain clearly enough the process. Thus this FAQ was born. This FAQ is incomplete, I’ve put the important stuff in with a bit of other stuff. This important stuff is the basic MPQ editing process, and how to spell edit. 1.2 FAQ a. What is MPQ editing? MPQ editing is the editing of files inside the MPQ files given by Blizzard. Blizzard’s standard archiving and compressing file has been the MPQ (short for MoPaQ) since Diablo, I believe. For Warcraft III, we mainly deal with the war3.mpq, and the map we’re creating (a map is an MPQ file, though its filename is blahblahblah.w3m- remember this!). By editing files in the MPQ (since it contains many, many, many files), we can edit spells, skins and more. b. Is MPQ editing legal? Will it get my CD-key banned from Battle Net? MPQ editing has been authorized by Blizzard (I don’t know about selling editing MPQ files, but common sense tells you that selling is illegal). It may be technically against the EULA, but it *IS* authorized. c. Will MPQ editing screw up my game? No, unless you mess up because you have no idea what you’re doing. Which is why you came here. d. How do I make the edited stuff apply to anyone playing my map, not just my own game? Duh. Insert (check the MPQ extraction section if you don’t know what I’m talking about) the edited files into your MAP, not into war3patch.mpq. e. My changes don’t work, even though I’ve inserted them into my map! A common error. There are two things you may be doing, 1. using a custom loading screen (which bugs up edited files and makes them not load), and 2. not using the right capital letter while naming folders and filenames when you insert. f. How do I open slk files? You use Microsoft Excel. If you don’t have it, get it. There isn’t anything else to say. g. How do I use this (insert name of Spell Editor here)? Nearly all spell editors suck. There is one that has been getting good popularity, but I’m not acquainted with it. Leave it at that. ----------------------------------------------------------------------- 2. The MPQ Editing Process 2.1 The Process I’ll just list the parts of the process, and explain each one. 1. Extraction. By using an MPQ extracting program, you decompress the files inside the MPQ, into your computer. An MPQ extracting program uses a listfile. See, there are 10,561 files in war3.mpq, and you need a way of identifying each one. Using a listfile does that. An MPQ extraction program ALWAYS needs one. Some get it by searching through the MPQ file itself for it- the listfile is called ‘(listfile)’ with no file extension. Others make you find one, and feed it to them. Anyway, after you do this, and have access to the MPQ, we proceed. (I will talk more about this in the MPQ Extractors section). So right now you’re looking at 10,561 files of goodness. There are features in MPQ extractors to help you find the files you want, as an example, to find the type of file you want. So extract the file you want. They will appear, in the subfolder(s) they appeared in, in the subfolders you directed them to go into (confusing eh). 2. Editing. This is the main part. Now, depending on what you want to do (spell editing, skinning and modeling etc) this can be different, and most of the FAQ will deal with this part, in different sections. 3. Inserting. With your edited file, you insert it into the map you want to have the changes in. You do this via the MPQ extraction program. Use the ‘Add’ feature. Note that, if you edit your map in the World Editor, and save, all inserted files will be deleted! 2.2 MPQ Extractors There are 3 dominant MPQ Extractors: WinMPQ, TechMPQ and MPQView. My preferred is WinMPQ. WinMPQ searches for the listfile inside the MPQ itself, so it is slower than other MPQ extractors- it takes me a minute to load war3.mpq, with my 466 mhz processor (yes I know my processor sucks anyway. It can also be ‘tricked’ by giving an incomplete or invalid listfile, or by simply deleting it, in which case you’ll need to do some research or use your own knowledge to create a real listfile for it. You can download WinMPQ and other files it requires from http://shadowflare.ancillaediting.net/dwnload.html. TechMPQ is much faster than WinMPQ, but it requires you to feed it a listfile outside the MPQ. I’ve heard of errors in which it can stuff up a map and make it unreadable, but I’ve never seen such errors. Download it from www.wc3campaigns.com. MPQView is the only extractor of these 3 I do not know too much about. Information about this is welcome. Download it from www.wc3campaigns.com. About using the extractor... there isn’t much to say. Simply open the MPQ, after loading the extractor. If it asks for a listfile, give the path name of one. The listfile should be a text file. Get it from http://www.campaigncreations.org/warcraft/programs/index.shtml ----------------------------------------------------------------------- 3. EDITING SPELLS 3.1 STUFF YOU SHOULD KNOW I’m fairly sure some people read the contents, then skipped EVERYTHING until they got to here. To them: you WILL get lost if you don’t read everything (except maybe the FAQ, which you read when you have more in-depth problems) from the contents to here. Also note: there is NO WAY to actually create a new spell by MPQ editing. I can’t create the Frozen Throne spell Flamestrike in Reign of Chaos by MPQ editing, but I could create a very close equivalent with HEAVY triggering. But that’s a different story. Anyway, the files you will need for spell editing are: AbilityData.slk HumanAbilityFunc.txt NeutralAbilityFunc.txt NightElfAbilityFunc.txt OrcAbilityFunc.txt UndeadAbilityFunc.txt HumanAbilityStrings.txt NeutralAbilityStrings.txt NightElfAbilityStrings.txt OrcAbilityStrings.txt UndeadAbilityStrings.txt The AbilityData.slk is for editing the actual data values of the spell. The (Race)AbilityFunc.txt are for editing some other important information, such as what animation is played (as an example, creating a greenish black ball of energy while casting Death Coil). The (Race)AbilityStrings.txt are for editing the tooltips you find when ingame. 3.2 EDITING THE ABILITYDATA.SLK FILE Ok, you are looking at an unedited AbilityData.slk file. If not, open it =). Now, you’ll find that there are 56 columns, and... a lot of rows. Find the row you want (hint: use the ‘comments’ column to find the name of the spell, as you know it). Now, if you edit values in that row, you can edit the spell. Each column + row has a different value, when ‘_’ (no apostrophes) means nothing is meant to be in there, or the value is 0. I’ll list what each column means now. Alias: This is the unique code of the spell, unique to THIS row. Blizzard for creeps and Blizzard for the Archmage use EXACTLY the same programming, but their values are different. TO distinguish between them, the alias is used. If you want to create a new spell (based on an old one), copy the row, and change the Alias. Code: This is the code the game uses to identify what programming should be used. Which means 1. that this is what makes the 2 Blizzards similar, and 2. that you don’t touch it. UberAlias: Like the alias. I’ve never edited it with bugs, but I advise you do. Comments: This is just to name it. The value you enter (or change) will help you identify the spell, while editing or creating it- nothing more. useInEditor: There are 2 values, 1 and 0. And what this means, is whether the spell will be displayed in the World Editor (see below for how to make your spells appear in the World Editor). 1 = yes, 0 = no. Always put ‘1’. hero: Tells the game if the spell is a hero spell or not. 1 = yes, 0 = no. item: Tells the game if the spell is an item spell or not. 1 = yes, 0 = no. If both the hero and item values are 0, then the game accepts it as a unit spell. sort: Used by the World Editor, to show how the spell is sorted. You have 3 values: hero, unit, and item. CheckDep: No idea. Nothing’s happened when I edited it. =S levels: Ok, this is important. This is how many levels the spell is. Below 1 can mess up the game. 1 level is typically item spells, unit spells, and hero ultimate spells. 3 levels is an example of a normal hero spell. Note that you cannot give a spell more than 3 spells (though you can create an equivalent with triggering). Actually in theory you can, but the icon for it disappears in the Hero Selection part of a hero, ingame, after reaching level 3. Note that while editing or creating spells, an ultimate spell can be given more levels (but not more than 3). reqLevel: The required initial level for this spell. Non-hero spells get a value of 0. Normal hero spells get a value of 1. Ultimates get a level of 6. You can edit it to anything (I don’t know what would happen to a hero spell on a hero with a required level of 0 or below), but obviously not past 10 without it being useless ingame. Note that if it has multiple levels, after the first level, the next level will be available exactly 2 levels after- you cannot change this. Targs: The targets you’re allowed to aim the spell on, or in other cases the targets the spell effects. As an example, ground, air, unit, hero. To completely disable it targeting against a certain type of unit, give the type of unit, and add a ‘non-‘ before it, as an example, non-ancient (like Death Coil). Cast1, Dur1, HeroDur1, Cool1, Cost1, Area1, Rng1, Data11, Data12, Data13, Data14, UnitID1: The values for the first level of the spell, or the entire spell for unit and item spells. Cast1 = How long it takes to cast the spell. Dur1 = How long it lasts, not always used. HeroDur1 = how long it lasts on a hero. Cool1 = The cooldown. Cost1 = The Mana Cost. Area1 = The area it affects, not always used. Rng1 = The Range of the spell. Data11 to Data14 are unique to the code of the spell. Read the comment given by its maker, to learn what it is for. UnitID1 is rarely used, but used sometimes, for stuff like what the Demon Hunter in Night Elf form transforms into (as a unit code, this is like the spell code, it identifies the type of unit). Cast2, Dur2, HeroDur2, Cool2, Cost2, Area2, Rng2, Data21, Data22, Data23, Data24, UnitID2: The values for the first level of the spell, or the entire spell for unit and item spells. Cast2 = How long it takes to cast the spell. Dur2 = How long it lasts, not always used. HeroDur2 = how long it lasts on a hero. Cool2 = The cooldown. Cost2 = The Mana Cost. Area2 = The area it affects, not always used. Rng2 = The Range of the spell. Data21 to Data24 are unique to the code of the spell. Read the comment given by its maker, to learn what it is for. UnitID12 is rarely used, but used sometimes, for stuff like what the Demon Hunter in Night Elf form transforms into (as a unit code, this is like the spell code, it identifies the type of unit). Cast3, Dur3, HeroDur3, Cool3, Cost3, Area3, Rng3, Data31, Data32, Data33, Data34, UnitID3: The values for the first level of the spell, or the entire spell for unit and item spells. Cast3 = How long it takes to cast the spell. Dur3 = How long it lasts, not always used. HeroDur3 = how long it lasts on a hero. Cool3 = The cooldown. Cost3 = The Mana Cost. Area3 = The area it affects, not always used. Rng3 = The Range of the spell. Data11 to Data14 are unique to the code of the spell. Read the comment given by its maker, to learn what it is for. UnitID3 is rarely used, but used sometimes, for stuff like what the Demon Hunter in Night Elf form transforms into (as a unit code, this is like the spell code, it identifies the type of unit). CastCheck, DurCheck, HeroDurCheck, CoolCheck, CostCheck, AreaCheck, RngCheck: No idea. They’re never actually used by Blizzard. =S. Ok, that is it. Just edit the values now. You can create a new spell based off an old one, by copying the row of the old spell, pasting it at the end, and changing the values- especially the Alias and UberAlias, to identify it. You will also need to make a new entry for it using the Alias you made, into both the (Race)AbilityFunc.txt and (Race)AbilityStrings.txt. 3.3 EDITING THE (RACE)ABILITYFUNC.TXT FILE Ok, you’ve edited or created the spell in the AbilityData.slk. Now open the corresponding (Race)AbilityFunc.txt file to the spell. You’ll find all these values, as an examples, for Gyrocopter Bombs: // Gyrocopter Bombs [Agyb] Requires=Rhgb Art=ReplaceableTextures\PassiveButtons\PASBTNHumanArtilleryUpOne.blp Buttonpos=1,2 I’ll identify each required part, for all of them. Note that when it says blahblahblah=something, the something is the value you can change, not the blahblahblah. // Gyrocopter Bombs : The name of the spell. It won’t affect the game, it is just helpful when you edit the spell. [Agyb] : The alias of the spell. This is used, to connect to the row containing the alias, in the AbilityData.slk. Requires=Rhgb : This shows what upgrades are required. Rhgb is an upgrade code- an upgrade code is used to easily identify the icon. Art=ReplaceableTextures\PassiveButtons\PASBTNHumanArtilleryUpOne.blp : This shows what picture is shown on the unit’s ‘toolbar’ ingame. Note that the blp file is the primary type of image file Warcraft 3 uses, and the type of file you’ll need to use. Buttonpos=1,2 : This is where the picture (see above) and the tooltip will appear, on the unit’s toolbar, ingame. The value will be expressed as X,Y. X is what column it is in. The first column from the left = 0, the next = 1, until the last, which is 3. Y is what row it is in. The first column from the top = 0, the middle column = 1, the bottom column = 2. I’ll explain the unexplained parts of the Footman’s Defend ability now. First, here is the spell. // Defend [Adef] Art=ReplaceableTextures\CommandButtons\BTNDefend.blp Unart=ReplaceableTextures\CommandButtons\BTNDefendStop.blp Buttonpos=0,2 Unbuttonpos=0,2 Casterart=Abilities\Spells\Human\Defend\DefendCaster.mdl Requires=Rhde Order=defend Unorder=undefend Now, here are unexplained parts, and the explanation. Unart=ReplaceableTextures\CommandButtons\BTNDefendStop.blp : Upon using Defend, the picture on the toolbar changes. This shows the change. Unbuttonpos=0,2 : This is where the location for the tooltip and the new picture for turning it off are. Casterart=Abilities\Spells\Human\Defend\DefendCaster.mdl : This is the animation happening to the caster. Its unique to the unit (so it would only apply to the Footman) so don’t worry too much about it yet). Order=defend Unorder=undefend : The order to turn it on, and order to turn off. Used by the game. Also used in the World Editor. Lets look at Flare: // Flare [Afla] Art=ReplaceableTextures\CommandButtons\BTNFlare.blp Buttonpos=0,2 Requires=Rhfl Order=flare Casterart=Abilities\Spells\Human\Flare\FlareCaster.mdl [Xfla] Effectart=Abilities\Spells\Human\Flare\FlareTarget.mdl Now: [Xfla] Effectart=Abilities\Spells\Human\Flare\FlareTarget.mdl : this shows what happens to the rest of the flare. The effectart of this part of the ability is the animation played. Note that if you CREATE a spell based off this, it will refer to THIS, not anything else you also create. Look at Inner Fire: // Inner Fire [Ainf] Art=ReplaceableTextures\CommandButtons\BTNInnerFireOn.blp Unart=ReplaceableTextures\CommandButtons\BTNInnerFireOff.blp Buttonpos=2,2 Unbuttonpos=2,2 Casterart= Requires=Rhpt Requiresamount=2 Effectsound=InnerFireCast Order=innerfire Orderon=innerfireon Orderoff=innerfireoff [Binf] Buffart=ReplaceableTextures\CommandButtons\BTNInnerFire.blp Targetart=Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl Targetattachcount=1 Targetattach=overhead //Targetattach1=hand,left //Targetattach2=hand,right Casterart= : What animation effect is played on the caster. Here, nothing happens. Requires=Rhpt Requiresamount=2 : First it lists the upgrade. Next, it gives the amount of times you need to research it- here, Priest Training. You need to research it twice. I’m not sure, but I think you need to change the value HERE, if you’ve created a new spell. Effectsound=InnerFireCast: An effect used by the game. Don’t worry too much about it, right now. Order=innerfire Orderon=innerfireon Orderoff=innerfireoff : The order is ‘innerfire’, we’ve covered that. The Orderon and Orderoff are the orders used by the game, for autocast. Note that you cannot remove autocast from a spell with autocast- the game stuffs up. Nor can you give autocast to a spell without it. [Binf] : This is another part of the spell, for what else happens when you cast the spell. What happens after MUST be edited here, if you created the spell. Targetart=Abilities\Spells\Human\InnerFire\InnerFireTarget.mdl: What animation happens to the target when the spell is cast. Targetattachcount=1 : I’m not sure, but it should be how many times the animation is played onto the target/ Targetattach=overhead : This is where the animation is played, on the unit. There are several values here- see other entries in the (Race)AbilityFunc.txt for an idea, or check the World Editor FAQ, I think that has it. =S. //Targetattach1=hand,left : No idea. =S. Email me if you know. //Targetattach2=hand,right : Ditto. Look at Summon Water Elemental now. // Summon Water Elemental [AHwe] Art=ReplaceableTextures\CommandButtons\BTNSummonWaterElemental.blp Researchart=ReplaceableTextures\CommandButtons\BTNSummonWaterElemental.blp Buttonpos=1,2 Researchbuttonpos=1,0 Order=waterelemental [BHwe] Buffart=ReplaceableTextures\CommandButtons\BTNSummonWaterElemental.blp Here: Researchart=ReplaceableTextures\CommandButtons\BTNSummonWaterElemental.blp : On the hero, when selecting skills after leveling, this is the picture that appears for that spell. Researchbuttonpos=1,0 : The position of the spell, when you learn it in the skill selection screen. 3.4 EDITING THE (RACE)ABILITYSTRINGS.TXT FILE Once again, I’ll give examples, and explain them. // Gyrocopter Bombs [Agyb] Name=Gyrocopter Bombs Tip=Gyrocopter Bombs Ubertip="Allows Gyrocopters to attack land units." Now, // Gyrocopter Bombs : Just to make things easier. Won’t affect game. [Agyb] : Like in the (Race)AbilityFunc.txt, the alias the game uses to link to the corresponding spell in the AbilityData.slk file. Name=Gyrocopter Bombs : This is the name given to the spell in the World Editor, and the game itself. Tip=Gyrocopter Bombs : The general name given in the tooltip, ingame. Ubertip="Allows Gyrocopters to attack land units." : The tooltip, when you hover the mouse over the picture in the unit’s toolbar, when ingame. Look at the Gyrocopter’s True Sight now. // Gyrocopter Vision [Agyv] Name=True Sight Tip=True Sight Ubertip="Reveals nearby invisible units." EditorSuffix= (Gyrocopter) The part we need to look at is EditorSuffix. EditorSuffix= (Gyrocopter) : This is used by the World Editor. This will make the spell appear as ‘True Sight (Gyrocopter)’. It won’t appear ingame. Once again, look at Defend. // Defend [Adef] Name=Defend Tip=|cffffcc00D|refend Ubertip="Activate to take only <Adef,Data11,%>% of the damage from Piercing attacks, but have <Adef,Data13,%>% reduced movement speed." Untip=Stop |cffffcc00D|refend Unubertip="Deactivate to move at normal speed, but take regular damage from Piercing attacks." Hotkey=D Unhotkey=D Tip=|cffffcc00D|refend : The weird lettering around the ‘D’ makes the D yellow ingame, using colour coding, which is another topic. But after the D|, you need to put an ‘r’ to tell the game to stop this different colour. The ‘D’ is a different colour, to show players it’s a hotkey. Ubertip="Activate to take only <Adef,Data11,%>% of the damage from Piercing attacks, but have <Adef,Data13,%>% reduced movement speed." : The <Adef,Data11,%>% makes this part of the tooltip directly based off its corresponding value in the AbilityData.slk. The Adef is the alias. The Data11 is the column to look under. Unubertip="Deactivate to move at normal speed, but take regular damage from Piercing attacks." : The tooltip shown when Defend is on. Hotkey=D Unhotkey=D : Hotkeys. I don’t need to say more. We’ll look at a hero spell now. // Blizzard [AHbz] Name=Blizzard Tip=|cffffcc00B|rlizzard - [|cffffcc00Level 1|r],|cffffcc00B|rlizzard - [|cffffcc00Level 2|r],|cffffcc00B|rlizzard - [|cffffcc00Level 3|r] Ubertip="Calls down <AHbz,Data11> freezing ice shard waves; each wave deals <AHbz,Data12> damage to units in a small area.","Calls down <AHbz,Data21> freezing ice shard waves; each wave deals <AHbz,Data22> damage to units in a large area.","Calls down <AHbz,Data31> freezing ice shard waves; each wave deals <AHbz,Data32> damage to units in a very large area." Hotkey=B Researchtip="Learn |cffffcc00B|rlizzard - [|cffffcc00Level %d|r]" Researchubertip="Calls down waves of freezing ice shards that damage units in a target area. |nEach level increases the area of effect. |n|n|cffffcc00Level 1|r - <AHbz,Data11> waves at <AHbz,Data12> damage each. |n|cffffcc00Level 2|r - <AHbz,Data21> waves at <AHbz,Data22> damage each. |n|cffffcc00Level 3|r - <AHbz,Data31> waves at <AHbz,Data32> damage each." Researchhotkey=B Here are the new parts: Tip=|cffffcc00B|rlizzard - [|cffffcc00Level 1|r],|cffffcc00B|rlizzard - [|cffffcc00Level 2|r],|cffffcc00B|rlizzard - [|cffffcc00Level 3|r] : This is to change the colours of the important parts. This value also changes each level. Commas separate this. Ubertip="Calls down <AHbz,Data11> freezing ice shard waves; each wave deals <AHbz,Data12> damage to units in a small area.","Calls down <AHbz,Data21> freezing ice shard waves; each wave deals <AHbz,Data22> damage to units in a large area.","Calls down <AHbz,Data31> freezing ice shard waves; each wave deals <AHbz,Data32> damage to units in a very large area." : Commas separate the differences between each level. 3.5 HOW TO MAKE YOUR EDITED SPELL-RELATED FILES APPEAR IN THE WORLD EDITOR This is easy. Ok, the files you would have edited would have appeared in the MPQ as: Units\(insertfilename).(insertextenstion) Now the World Editor reads all that in the folder its in. So create a subfolder called Units in the folder which contains World Editor. So if I have the World Editor in C:\Program Files\Warcraft III, I'd create a subfolder called Units, like so: C:\Program Files\Warcraft III\Units Now, dump your edited files in this folder. They will appear in the World Editor. 4. THANKS TO a. God, and the Lord Jesus Christ. I think why is self-explanatory, but if you really don't know, its because their love (and Christ's sacrifice) changed me into the person I am. b. My friends. I won't name them, they know who they are. c. The folks at www.warcraftiii.net, who taught me much of what I knew. d. Darky26, who by looking at his maps taught me nearly all I knew. e. The people on the Warcraft 3 board. Especially ShockWaveTrio, Dark Hammer and Wood Elf, when talking about the World Editor and related stuff. 5. CREDITS a. www.wc3campaigns.com and www.campaigncreations.org, from where I downloaded many tools required for MPQ editing. I also downloaded WinMPQ http://shadowflare.ancillaediting.net/dwnload.html. Note that I did not design any of these programs. b. Blizzard, for 1. making the game, and 2. providing the MPQ, a tiny bit of which appears as text here (mainly material from HumanAbilityFunc.txt and HumanAbilityStrings.txt. Note that making the game includes making all of the 'mechanics' of the game, especially the way the MPQ file format, which I explained. I did not invent the spell editing and creating process, Blizzard did- I am explaining it. The people at www.warcraftiii.net, who taught me all I knew, to their knowledge or not to their knowledge, noting that the user with the screen name Darky26 used www.warcraftiii.net.