Basic Skill Editing Part 2

In this next edition of Diablo 2 Skill Editing we will discuss removing spell timers, summoning all golems at once, decreasing mana cost, and making Chilling Armor attack melee attackers. This is a wealth of information, so don't skip out on it!
Tools Required
- A tab-delimited spreadsheet application, such as AFJ's Sheet Edit
- A .MPQ file extractor, such as MPQView, to extract the files below -OR-
- Nefarius' fixed text files
Tutorial Prerequisite
Files Needed
Extract files from Patch_d2.mpq (If not using fixed txts):
- Skills.txt
- PetType.txt
Skill Level: Intermediate
Part 1: Removing Spell Timers, and info regarding spell timers.
Open Skills.txt. Scroll down to the Fire Wall row (row 53). Now scroll horizontally to the 'delay' column (column FJ). Remove the value here. The delay column controls how long a spell delay will be, in frames. (As mentioned in BSE part 1, each frame is 1/25th of a second.). So if we wanted to add a one second delay to Glacial Spike, we would scroll down to the Glacial Spike row, and add a '25' in the 'delay' column.
Spell timers weren't around until LOD, so if you want to make a D2 classic preservation mod, you would remove all spell timers.
Part 2 - Making Shapeshifted Druids able to use 'Elemental' spells
Ever notice you can't cast Volcano or Firestorm while shapeshifted? Well, I'll teach you how to fix that right up.
Scroll down to the 'Volcano' row (row 246) and scroll horizontally to the 'restrict' column (column FF). Put a 1 in this column.
The restrict column works in an odd way. If left blank, the skill is unusable while shapeshifted. If a 1 is put in the column, you can use it while shapeshifted and while unshapeshifted. However, if a 2 is put in this column, the skill will only be usable while shapeshifted in one of the 3 states listed in 'State1', 'State2', and 'State3'.
Part 3 - Summoning all golems at once
By far, this requires the most work. In skills.txt, scroll down to the Clay Golem row (row 77). Now scroll horizontally to the pettype column (column BJ). In this cell, put ClayGolem.
In the Blood Golem row (row 87), under pettype, put BloodGolem.
In the Iron Golem row (row 92), under pettype, put IronGolem.
In the Fire Golem row (row 96), under pettype, put Fire Golem.
Now open pettype.txt.
Add a new row to the bottom, and give it these parameters:
Row#1:
- pet type: ClayGolem
- idx: (next number down)
- basemax: 0
- warp: 1
- partysend: 1
- unsummon: 1
- automap: 1
- name: StrUI0
- drawhp: 1
- icontype: 1
- baseicon: earthgolumicon
Leave all other columns blank. Now clone the row 3 times, and change these parameters accordingly:
- pet type
- idx
- baseicon
A little explanation about this file. Every time you summon a pet using a skill, it has a pettype to go along with it. Heres a file guide to explain the various parameters.
Part 4 - Editing Mana Cost
Another very simple edit that requires a little explaining as to how it works. Open skills.txt and scroll horizontally to column NoCostInState (column FN).
I'm going to do a sweep as to what each of these columns do:
- NoCostinState: Boolean. When 1, no mana cost when in State1, State2, or State3. Useful for Werewolf and Werebear where you don't want an extra mana cost to go back to human form.
- usemanaondo: Boolean. This is a weird field that you really need to see to believe. If set to 1, the mana display will only update after the skill has completed its function. For example, if you set it on Zeal, the mana bubble will not lower until you are done hitting.
- startmana: Minimum mana required to cast. Used on Inferno and Arctic Blast. This is not the same as mana, it just states how high your mana has to be before you can cast it. For example, if we set mana to 10, and startmana to 100, you would need 100 mana before you could cast it, but once you casted it, it would only take away 10 mana.
- minmana: The minimum amount of mana this skill must cost. See mana for more information. WARNING: Do not put this below 0. I haven't tried with it below 0, but to be on the safe side don't put it below 0. However, if nothing bad happens when you set it below 0, and it works as intended, then you might get a good +Mana clone.
- manashift: This is a field that controls how precise the mana cost is. Lets say you put 100 in mana, and 8 in manashift. Thus, the skill costs 100 mana. But if we change manashift to 6, it will be lower. Mana is divided into 256s in Diablo II's code for more precise mana costs.
manashift precision multiplier percentage example mana cost
(mana = 1000)
-------------------------------------------------------------------
0 1/256 = 0.00390625 ( 0.390625%) 3.90625
1 2/256 = 0.00781250 ( 0.781250%) 7.8125
2 4/256 = 0.01562500 ( 1.562500%) 15.5625
3 8/256 = 0.03125000 ( 3.125000%) 31.25
4 16/256 = 0.06250000 ( 6.250000%) 62.5
5 32/256 = 0.12500000 ( 12.500000%) 120
6 64/256 = 0.25000000 ( 25.000000%) 250
7 128/256 = 0.50000000 ( 50.000000%) 500
8 256/256 = 1.00000000 (100.000000%) 1000
9 512/256 = 2.00000000 (200.000000%) 2000
Source: The Phrozen Keep
- mana: The basis of mana cost. Mana runs through the manashift divider and takes away that set amount every time you cast the ability. In addition, the mana cost is increased or reduced every skill level by the amount listed in lvlmana. NOTE: Mana cost cannot go below the amount listed in minmana.
- lvlmana: Amount of mana increased per skill level. If negative, it will reduce mana cost per level, until it hits minmana.
So for example, if we wanted to change Frozen Orb's mana cost, we would edit the value in mana.
Part 5 - Events
Events are special 'happenings' that occur in Diablo 2. If you scroll over to the auraevent1 column, you can see some events that certain skills use, such as Frozen Armor, Bone Armor, and Energy Shield use.
Here is the full list of events that the game can use:
- hitbymissile: Hit by a missile
- damagedinmelee: Damaged by a melee monster
- damagedbymissile: Damaged by a missile.
- attackedinmelee: This happens when a monster attacks you, but when the monster doesn't always hit you
- doactive: Unknown
- domeleedamage: Occurs when the player does melee damage
- domissiledamage: Occurs when the player does damage via a missile such as Fire Bolt
- domeleeattack: Occurs when the player launches an attack, this will happen regardless of whether it hits
- domissileattack: Occurs when the player shoots a missile, regardless of whether it hits
- kill: Occurs when the player kills something
- killed: Occurs when the player is killed
- absorbdamage: I'm not really sure what this is used for, but its used for Bone Armor and Cyclone Armor
- levelup: Occurs when the player gains a level.
Now, lets make Chilling Armor affect melee attackers as well as ranged attackers. Scroll down to the Chilling Armor row (row 62), and scroll over to auraevent2. Put damagedinmelee in this column. In the next column, auraeventfunc2, put a 1 here. This means that when the player is Damaged in Melee, it will fire srvmissilea without forcing a player through an animation.
You are done! This concludes BSE Part 2. Stay tuned for Basic Skill Editing part 3, where we will discuss skill descriptions.

