Using TFT features in ROC editor (Using .SLK's and WinMPQ)

Tutorial By Tonks

I'm currently working on writing a tutorial about using .slk files with Microsoft Excel and winmpq to edit maps. I've figured out that using this process, you can create custom abilities, custom units with custom models, and essentially edit every aspect of a Warcraft III map, without the World Editor.
This process will let people with the limited RoC editor create maps that are TFT-editor quality. The nicest thing about this is, your map won't convert to TFT, even if you use TFT-labelled things. You can even make your map that has been converted to TFT a RoC map by labelling the TFT things as RoC things :)




Current Tutorial Status:

Download Winmpq Here (Wc3sear.ch link) or Here (Official WinMPQ site)


You may also use MPQEditer - though I don't support it and I don't know anything about it. If you use this, you're on your own. MPQEditor


IMPORTING MODELS:

Download your model. Extract said model from its ZIP file.

I will use This Grim Reaper model as my example. A great source for models is wc3sear.ch and wc3campaigns.net

Step 1: Open WinMPQ

Step 2: Open your map with WinMPQ.

Step 3: Click the “Add” button at the top, and select the .BLP file.
For me, this will be in the path Heroes / Grim / Grim.BLP

(Image)

Step 4: When you select the file, it will ask for a path. For this you will need the folders that it comes in.
For the Grim Model, I will type in “Heroes\Grim\”

(Image)

Step 5: Now you must import the .mdx file. Click the “Add” button at the top of WinMPQ, and select the .MDX file. If your model did not come with one, then the model will not work. If your model came with two, import both.
For my model, I will import Grim.mdx

Step 6: Again, you will be asked for a file path. For the .MDX file, this path does not matter. It is best to leave it blank.

(Image)

Step 7: Open your Warcraft 3 World Editor. Select the unit you want to use the model on, and in the Model field, type in the path of the main .MDX file. *Not your .BLP file
For me, this will be Grim.mdx

Step 8: Save your map, then re-import all the files using the same paths as last time. This must be done because every time you save your map, the files get deleted.

Congrats! You now know how to import models into your map :)

(Image)


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

EDITING .SLK's: (There will be visual aids below each step in the procedure.)
Note: For some reason, WinMPQ sometimes has an error in which it will not display any files. If this happens you will need to close and re-open WinMPQ.


Note: For some reason, WinMPQ sometimes has an error in which it will not display any files. If this happens you will need to close and re-open WinMPQ.

Step 1: Download Winmpq Here

Step 2: Open WinMPQ. Click the “Open” button at the top of WinMPQ. Find your Warcraft 3 directory and open War3.mpq.

(Image)

Step 3: Find the (listfile) inside the War3.mpq file (Type (listfile) in the text box at the top of WinMPQ) and extract it from the file. It does not matter where you extract to.

(Image)

Step 4: Click Options > [Add File List] and add the (listfile) (The one you just extracted)

Step 5:
Click the “Open” button at the top and select War3patch.mpq. It is inside your Warcraft 3 directory.

Step 6: Type *.SLK in the text box at the top of WinMPQ

Step 7: Highlight all the files and extract them to your Warcraft 3 directory

Now you have several new folders in your Warcraft 3 directory. These contain all the .SLK files that you can edit your map with.

Files that you just exported-

SPLATS >
LightningData:
Contains all Lightning effects. (Chain Lightning etc.)

SpawnData:
Contains Spawn effects. This includes Footprints, Blood, etc.

SplatData:
Contains Textures for effects / Terrain

UberSplatData:
Contains more Textures for effects / Terrain


DOODADS >
Doodads: Contains all Doodad information.
To create a custom doodad with a custom model, import your model into your map, assign it to a new doodad, and save. Then re-import your model.


TERRAINART >

CliffTypes:
Contains the Cliff textures for the Terrain Editor

Terrain:
Contains all the textures for the Ground tiles

Water:
Contains all the Water textures for the Terrain Editor

Weather:
Contains all the textures for the Weather effects


UI / SOUNDINFO >

AbilitySounds:

AmbienceSounds:

AnimLookUps:

AnimSounds:

DialogSounds:

EAXDefs:

EnvironmentSounds:

MIDISounds:

PortraitAnims:

UISounds:

UnitAckSounds:

UnitCombatSounds:


UNITS >

AbilityData:

DestructableData:

ItemData:

UnitAbilities:

UnitBalance:

UnitData:
UnitID:
The raw-data name for a unit.
Press CTRL-D in WE to see raw data

Sort:
What kind of unit; Hero, Building, or unit.
Letter = Race
# = Type of unit (Hero, building, unit)
a – Human
b – Orc
c – NightElf
d – Undead
n – Neutral
o – Critters
p – Neutral Buildings
z – Campaign ?

1 – Hero
2 – Unit
3 – Building
9 – Custom

Comment:
Used for reference as to which unit it is. This is just a tag, and bears no significance.

Race:
The race of the unit. Human, Orc, Undead, Night Elf, Critter, etc.

Prio:
Priority value

Threat:
Stats - Priority - Order which AI attacks it. (??)

Valid:
??

DeathType:
Death animation played when unit is killed. These animations are part of the unit.

Death:
Time (seconds) it takes them to play their animation.

CanSleep:
Does this unit sleep?
0 = No
1 = Yes

CargoSize:
Space taken up in a cargo transport

movetp:
Movement type
Fly: Flying Unit
Foot: Ground unit
Float: Water Unit
Hover: Hovering Unit

moveHeight:
Movement Height

MoveFloor:
If you change the height in triggers, it can't go less than this.

TurnRate:
The amount of space it takes for a unit to turn.

Propwin:
Prop Window; Different for each move type

OrientInterp:
Art - Orientation Interprolation - ?

formation:
When moving units in a group what position it falls in.

TargType:
Targeted as...

Pathtex:
Pathing Map (Buildings only)

fatLOS:
Art - Use Extended Line of Sight - ?

Points:
Hitpoints % (??)

buffType:
AI Placement Type - Whats the function of the building (Where should the AI put it?).

buffRadius:
AI Placement Radius - How far apart the AI should place this building.

nameCount:
Number of Proper Names for (Hero) unit.

canFlee:
Will the unit run away if it is attacked?
0 = No - (Example: Footman)
1 = Yes - (Example: Peasant)

RequireWaterRadius:
For Boat Docks. Determines how much space in the water it needs.

isBuildon: - Building Only
Stats - Whether its' built on a goldmine or not.

canBuildOn:
Can it be built on?
0 = No
1 = Yes

inbeta:
Is it in Reign of Chaos?
0 = No
1 = Yes

Version:
0 = RoC
1 = TFT
Note that just changing the Version status will not make it available in-game. This will make it so that you can select it in RoC WE. To make it available in-game, you must import a model and assign it an icon.


UnitMetaData:

UnitUI:

UnitWeapons:

UpgradeData:


Spell Editing

Requirements

1. WinMPQ
2. Excel (either this, notepad, or both)
3. Notepad (either this, excel, or both)

Step 1; Getting Started – Since you should already have the wc3 'listfile' extracted, I'll skip the part explaining how to do that. If you still need to know how, I explained it further up in this post.

Step 3; Editing – Now here comes the fun part. For those of you who have no patience be warned – the process of spell editing is extremely tedious and takes a very long time to do in the beginning. Much like anything else, practice makes perfect and you will surely see yourself improving in speed and ability the more you edit.

Here’s the first thing you have to know – there is absolutely no way to actually create your very own spell without JASS. I’m not going to go into JASS in this tutorial (or any in the future most likely) so for those of you who want highly advanced spells you’re going to have to find a more in-detail tutorial or figure it out yourself (like me !)

There are three things you have to do in order to edit or create a spell. Change the values and variables in the AbilityData.slk, edit or create new graphics and the like in the RaceAbilityFunc.txt, and edit or create new descriptions in the RaceAbilityStrings.txt.

AbilityData.slk –

This file contains all the data (obviously) for every spell and item in the game. What I’m going to take you through is how to create a new spell because in order to create a new spell you have to modify an already existing spell. Basically, if you can create a new spell you can edit old spells.

Let's begin, since your AbilityData.slk is already extracted (right?) you have to find it and open it with excel (you can use notepad but excel is so much more clean and easy to use).

Note* On a slight tangent, you can use spell editing programs but in my humble opinion THEY SUCK!

After opening the AbilityData.slk with excel you’ll see, probably to you, a lot of confusing numbers and letters. I’ll first start by briefly explaining what they all are.

(group 1) Columns A, B, and C are one of the three groups of columns that are the most important to you. These mixtures of numbers and letters are the ‘names’ of the codes within the hardcode. Under any and all circumstances you can NOT edit column B (named "code") – never, ever, ever edit this unless you want a lot of problems.

Column D is unimportant. The name of the column explains it all – it’s only for comments, basically for you to name the spell for confusion purposes.

(group 2) Columns E through K is the second group of important columns you need to deal with.

-For immediate purposes column E should always have the number 1 in it.

-Column F tells the game whether or not the ability / spell is used by a hero or by a regular unit (1 for Hero – 0 for Unit).

-G is to tell the game whether or not the ability is an item ability (1 for Item Ability – 0 For not an Item Ability).

-H is used to also tell the game what kind ability the ability is. You can use Hero, Item, or Unit.

-I actually have no clue what I is for – all I have deduced is that if the ability is an item ability I is 0, if it’s a hero ability it’s 1.

-If your ability is a hero ability it’ll most likely have levels. J tells the game how many levels the spell has. 3 is the limit.

-K is used to tell the game at what level the hero can learn the ability.

(group 3) Columns L and on are in the third group. These are the last things you have to edit in order to make a spell.

-L is used to tell the game what targets the spell can cast on.

-M is how long it takes to cast the spell at the abilities first level.

-N and O kind of work together. They’re how long the duration of the spell’s affect lasts for its first level – but that varies among the spells. In excel there are sometimes comments to help you on what each column does for each spell.

-P is how long it takes to recast the spell at its first level.

-Q is the amount of mana it costs at its first level.

-R is the area of effect at its first level (again it can vary, read the comments).

-S is the range of the spell at its first level (and again it can vary, read the comments).

-T through W are the data the game uses for the spell. Like damage, regeneration rates, hp for summoned units, what type of unit is summoned, etc., all for the ability’s first level. Much like the other spells the data columns can vary in what they do, just read the comments.

The rest of the columns after that do the same thing as group 3’s columns, the only difference is that they are for the next levels of the spell. (It’s easy to tell which columns are for which levels – at the top it’ll say cast1 and dur1, or cast2 and dur2, or cast3 and dur3. 1 is for the first level, 2 is for the second level, and three is for the third level)

Now that that’s all explained, we can finally start our spell. I’m going to show you how to make a spell I made in my map (5/30/03 the day this tutorial was written my map isn’t finished so you may not have heard of it yet). This spell is called Waterblade and it is used by the Outcast Samurai. I’m going to use this spell because it’s pretty basic and easy to understand.

Go all the way up top and find the ability used by the BladeMaster named "critical strike". Highlight this entire row and copy it, then scroll all the way down and it paste it in a new row.

Change column A and C to Aswb (always capitalize the first letter, just to be safe).

Change column D to Samurai – Waterblade.

No need to change the rest of the columns until we get to the data part, because E through K are already what we want them to be.

Skip all the way to T. This is the first thing we have to change – it will give us the percent chance the Samurai will use the Waterblade ability in battle at level 1. Change it to 10.

The next column is the damage multiplier. Since we don’t want to multiply his damage by anything just make it 1, because anything x 1 is always itself (yay for math).

The next column is the amount of damage added to the Samurai’s attack if he hits. Change that number to 100.

Go to the columns that correspond with the spells second level (starts at AF). Lets see if you can figure this out (because if you can’t then you should just stop right now ;-) ) – For level 2 make the percent chance still 10, the multiplied damage still 1, and the added damage 150. For level 3 still keep a 10% chance with no multiplied damage but an added 200 bonus damage.

When you’re done, save the file, remember that the Alias and Uberalias is Aswb, and close excel (if you want).

Congratulations, you just created the code for a new spell.

-------------

AbilityFunc.txt-

Now we move on to the AbilityFunc.txt. Since the spell we created was based off of an Orc ability you have to open the OrcAbilityFunc.txt. In my opinion I would open the file with notepad. After you’ve got that file opened you need to scroll through all the abilities and find where the BladeMaster’s Critical Strike ability is. When you do that, copy everything that has to do with Critical Strike (from the // comment line to the end of the spell) and paste it at the bottom of the document. If your ability has a [Bxxx] or [Xxxx] stop RIGHT before it, do not copy any further.

The AbilityFunc.txt is used to define all the graphics for everything to do with the spell and where the buttons are placed on the unit that uses the ability. (because I’m started to get tired I’m just going to copy exactly what I have in the notepad document)

This is what the final copy (with notes) of what Func.txt should look like for our spell –

// Waterblade (commented name, just for organization)

[Aswb] (the alias you used in excel, you must change this to the alias you used)

Art=ReplaceableTextures\CommandButtons\BTNThoriumMelee.blp (what the button looks like)

Researchart=ReplaceableTextures\CommandButtons\BTNThoriumMelee.blp (what the research button looks like)

Buttonpos=0,2 (where the button is in the matrix)

Researchbuttonpos=0,0 (where the research button is in the matrix)

For those of you who have no programming knowledge or don’t know what a matrix here’s a brief definition – a matrix is a grid with a user determined amount of boxes. In WC3’s case Blizzard made a 3 x 4 matrix for buttons. These are all the coordinates:

| 0,0 | 1,0 | 2,0 | 3,0 |

| 0,1 | 1,1 | 2,1 | 3,1 |

| 0,2 | 1,2 | 2,2 | 3,2 |

You can change other things as well, like the targetart, or casterart and the like. For some spells that don’t have these other subjects (like targetart or casterart) you may have to add them yourself to get the desired effect, or remove them.

Here’s a definition of each term and what you should or shouldn’t do:

Art= (this is the button graphic of your new ability - .blp file)
Researchart= (this is the button graphic when researching - .blp file)
Buttonpos= (this is your button position or the ability slot)
Researchbuttonpos= (position of the research slot)
Casterart= (what art is associated with the caster - .mdl file)
Areaeffectart= (AOE art displayed at the target AOE - .mdl file)
Effectart= (effect art associated with the spell - .mdl file)
Specialart= (special effect art associated with the target - .mdl file)
Requires= (what this spell requires)
Requiresamount= (i.e. 1 = Adept, 2=Master, can be left out if 1)
Missileart= (the projectile art, if needed - .mdl file)
Missilespeed= (the speed of the above projectile art)
Missilearc= (the visual arc of the projectile art)
Effectsound= (plays a sound)

(through personal experience and help of others, DO NOT CHANGE THE FOLLOWING VARIABLES)

Order= Unorder= OrderOn= OrderOff=

Congratulations, you just finished editing the AbilityFunc.txt.

-------------

AbilityStrings.txt-

Now for the final step, the AbilityStrings.txt. This is the file that makes all the descriptions for the spells. The research description, the name of the spell in the editor and in the game, and the description after you’ve researched the spell.

Do the same as AbilityFunc.txt, open the OrcAbilityStrings.txt and find Critical Strike. Copy and paste the whole thing down at the bottom of the document (again, if your ability has [Bxxx] or [Xxxx] stop before those). This is what the final copy should look like.

// Waterblade (again, the commented name for organization)

[Aswb] (alias, must be what you named it in excel)

Name=Waterblade (the name that shows up in the editor)

Tip=Waterblade - [|cffffcc00Level 1|r],Waterblade - [|cffffcc00Level 2|r],Waterblade - [|cffffcc00Level 3|r] (after being researched this displays at the top when you hover your mouse over the icon, I suggest just using what I have and changing the name and / or colors)

Ubertip="When faced against his adversaries, the Samurai moves his blade with the calm of a stream and the power of the ocean. Using this technique the Samurai can inflict great pain upon his enemy.","When faced against his adversaries, the Samurai moves his blade with the calm of a stream and the power of the ocean. Using this technique the Samurai can inflict great pain upon his enemy.","When faced against his adversaries, the Samurai moves his blade with the calm of a stream and the power of the ocean. Using this technique the Samurai can inflict great pain upon his enemy." (same thing as the tip, except this is the actually description you want to give the spell)

Researchtip="Learn |cffffcc00W|raterblade - [|cffffcc00Level %d|r]" (same thing as tip but when you want to research it)

Researchubertip="When faced against his adversaries, the Samurai moves his blade with the calm of a stream and the power of the ocean. Using this technique the Samurai can inflict great pain upon his enemy. |n|n|cffffcc00Level 1|r - 10% chance, 100 damage. |n|cffffcc00Level 2|r - 10% chance, 150 damage. |n|cffffcc00Level 3|r - 10% chance, 200 damage." (same thing as the ubertip, except in the research screen)

Researchhotkey=W (what the person can hit on the keyboard to research it without clicking the icon)

Other variables:

Untip= (tip displayed to activate, i.e. right-click to autocast)
UnUbertip= (tip displayed end activation, i.e. right-click to end autocast)

Hotkey= (hotkey to turn ability on)
UnHotkey= (hotkey to turn ability off)

Congratulations, you just finished every step necessary to create a spell…

But there’s one more thing you have to do to make the spell playable.


Step 4; Implementation –

That’s right, you need to put the ability into the game. Considering everything was done perfectly (or at least for the most part) you can now put your ability into the game. First thing’s first, you have to open the editor and give a hero your ability. If you did everything I told you to do there should be no problem with this – you can give the hero the ability just as easily as any other ability.

After that’s done, save your map and close it. Then re-open WinMPQ (if you haven’t closed it, close it and re-open it). Now you have to hit the "open" button again and find your map and….open…it…

After that’s done you then have to hit "add". A browser window should appear – once that happens you have to find your WarCraft III directory again and open the "Units" folder I told you to create. Highlight every file in the "Units" folder and hit open. Another window will pop up, simply just type "Units\" and hit ‘ok’.

Congratulations, your map now has your new ability. Lastly, to be on the safe side don’t use a custom loading screen – use the default.


This is all I have for the tutorial right now. I fully intend to explain every file, but that will, of course, take some time.
Please comment on what I have so far. If I put a "??", I didn't understand what that path meant. If you know what it means, please tell me. If I put a "(??)" next to it, I thought I knew what it meant, but I wasn't sure.


Credit to: Pacify for the Spell Editing section of this tutorial. That part was taken from Here and edited a bit.

Click here to comment on this tutorial.
 
 
Blizzard Entertainment, Inc.
Silkroad Online Forums
Team Griffonrawl Trains Muay Thai and MMA fighters in Ohio.
Apex Steel Pipe - Buys and sells Steel Pipe.