Name | Type | is_array | initial_value |
Barracks | unit | Yes | |
bf | integer | No | |
BF_DefautInterval | integer | No | 3 |
BF_Hero | unit | Yes | |
BF_Max | integer | No | |
BF_n | integer | No | |
BF_SpecEffect1 | effect | Yes | |
BF_SpecEffect2 | effect | Yes | |
BF_Time | integer | Yes | |
BF_Used | boolean | Yes | |
casterZ | real | No | |
fi | integer | No | |
FI_Angle | real | Yes | |
FI_AnimSpeed | real | Yes | |
FI_DefaultHeight | real | No | 750.00 |
FI_EffectA | string | No | |
FI_EffectB | string | No | |
FI_FallHeight | real | No | |
FI_Height | real | Yes | |
FI_Hero | unit | Yes | |
FI_Max | integer | No | |
FI_n | integer | No | |
FI_Sound | string | No | |
FI_Used | boolean | Yes | |
FI_Vp | real | Yes | |
FI_Vz | real | Yes | |
FI_z | real | Yes | |
g | real | No | -10000.00 |
group | group | No | |
integer | integer | No | |
kb | integer | No | |
KB_Angle | real | Yes | |
KB_Dist | real | Yes | |
KB_Max | integer | No | |
KB_MaxDist | real | Yes | |
KB_n | integer | No | |
KB_Speed | real | Yes | |
KB_Unit | unit | Yes | |
KB_Used | boolean | Yes | |
Leaderboard | leaderboard | No | |
Mortar | group | No | |
point | location | No | |
point2 | location | No | |
point3 | location | No | |
real | real | No | |
real2 | real | No | |
Shake | real | No | |
Skill_BattleFurrySpeed | abilcode | No | |
Skill_BattleFury | abilcode | No | |
Skill_Bonebreaker | abilcode | No | |
Skill_FeralImpact | abilcode | No | |
Skill_Tornado | abilcode | No | |
SkipCin | boolean | No | |
targetZ | real | No | |
tmpCasterZ | real | No | |
tmpDiffHeight | real | No | |
tmpDistance | real | No | |
tmpHeight | real | No | |
tmpSound | sound | No | |
tmpTargetZ | real | No | |
tmpTime | real | No | |
to | integer | No | |
TO_Duration | real | Yes | |
TO_Hero | unit | Yes | |
TO_Max | integer | No | |
TO_n | integer | No | |
TO_Used | boolean | Yes | |
Type | unitcode | Yes | |
x | integer | No |
//TESH.scrollpos=0
//TESH.alwaysfold=0
Gantros, Kodan and Sankuro are three barbarians who live in different regions. However, with the
threat of humans invading each of their homelands, they unite to show the Alliance their true power.
Born, raised and trained together, the three have mastered the same techniques, vastly used to
take the battle frontline. They are specialists in opening ways through enemies and setting them
apart, besides being excellent warriors.
FERAL IMPACT: primary technique of the barbarians, which allows them to get into and out of combat.
¯¯¯¯¯¯¯¯¯¯¯¯ After a nearly endless training, they're capable of jumping great distances and
heights.
BONEBREAKER: during combat, it's constantly necessary to reduce the number of enemies
¯¯¯¯¯¯¯¯¯¯¯ around you. Therefore, the barbarians are capable of concentrating their strength
in a single blow which will certainly break one's bones.
BATTLE FURY: living wars after wars, the three barbarians acquired some dependency of them and, so,
¯¯¯¯¯¯¯¯¯¯¯ they feel a great pleasure in fighting. This makes of them ferocious fighters, wishing
to kill the largest number of enemies they can.
TORNADO: ultimate barbarian technique. They spin wildly around themselves, punishing and pushing
¯¯¯¯¯¯¯ back whoever attempts to approach them.
//TESH.scrollpos=0
//TESH.alwaysfold=0
xxxxxx INFORMATION ABOUT SPELLS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[*] All spells are MUI (Multi Unit Instanceable), that is, several units can use them simultane-
ously without the appearance of bugs.
[*] All spells use an array-index recycle, in GUI. Before you blame me for this poor indexing sys-
tem, let me explain: these spells were made for some friends of mine who cannot understand JASS
very well. I'd like them to learn this poor system in GUI first before teaching them
vJASS.
[*] Feral Impact cast range is enormous, and spells have no cooldown for cinematic purposes.
[*] All spells were made by me, with no third party systems (although I should have used)
xxxxxx INFORMATION ABOUT IMPORTS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
[MODEL] Gantros
¯¯¯¯¯¯¯
Name: Ogrim Doomhammer.mdx
Author: General Frank
[MODEL] Bonebreaker Effect
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Name: ShrapnelExplosion.mdx
Author: WILLTHEALMIGHTY
[MODEL] Nothing
¯¯¯¯¯¯¯
Name: dummy.mdx
Author: Marcelo Hossomi
(it's an invisible model with "origin" attach-point. Used for invisible pathing blockers)
[ICON] Feral Impact
¯¯¯¯¯¯¯¯¯¯¯¯
Name: BTN_CR_Chanrge.blp
Author: CrazyRussian
[ICON] Bonebreaker
¯¯¯¯¯¯¯¯¯¯¯
Name: BTN_CR_Hammerar.blp
Author: CrazyRussian
[ICON] Battle Fury
¯¯¯¯¯¯¯¯¯¯¯
Name: BTN_CR_taunt.blp
Author: CrazyRussian
[ICON] Tornado
¯¯¯¯¯¯¯
Name: BTN_CR_celestialguard.blp
Author: CrazyRussian
//TESH.scrollpos=0
//TESH.alwaysfold=0
xxxxxx THE INDEXING SYSTEM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
This is the most efficient GUI indexing system I could think of, also taking a look on some
examples on the internet.
1. What is indexing? ==================================================================
Indexing is the act of giving each thing a unique number that indenfies that thing. By 'thing',
understand anything of the same type. For example, to make things MUI, we index each instance of
the spell that is executing at the same moment, so we can store all data needed to executhe them.
2. How does indexing work? =============================================================
Before going into details about the method used, I will explain what we do after we are able to
index things.
First of all, we have a base variable that is the number of instances executing, called 'Max'.
Then, for each information we need, we create an array. For example, in Knockback, we need:
Unit (unit) - Unit being knockbacked
MaxDist (real) - Distance to push back
Angle (real) - Angle of the movement
Dist (real) - Distance already pushed back
Speed (real) - Speed of the movement
So, we will need 5 arrays of those types above (I used the same names in this map). Why?
Each instance has a unique number, right? So each instance will have a unique index in each
array. So, if we want to know any of these information about instance #12, we access the #12 index
of any of those arrays.
To execute the spell for all instances, then, we go through all indexes from 1 to 'Max' doing
what we have to do for every instance.
3. Okay, what is the method now? ========================================================
Everytime the spell is cast, we will need to "create" a new instance - therefore, we need a new
unique index for that instance. I created a separated trigger just to do that (although I could have
put it in the same main trigger).
That trigger increases 'Max' by 1. Then, this number will be our new index. So, the trigger saves
it in another variable that will be used by the main trigger (which requested the new index).
Does that really work? Yes! Imagine if we had no instances ('Max' = 0) and the unit array:
________________________________________________________
Unit: _ _ _ _ _ _ _ _ _
1 2 3 4 5 6 7 8 9
Max = 0
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Now, we will create another instance, A. From the "picture" above you can probably deduce yourself
that our new index has to be 1. Following the method I described above:
Max = Max + 1 = 1
New Index = 1
________________________________________________________
Unit: A _ _ _ _ _ _ _ _
1 2 3 4 5 6 7 8 9
Max = 1
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
If another instance B is to be created, we do the same thing:
Max = Max + 1 = 2
New Index = 2
________________________________________________________
Unit: A B _ _ _ _ _ _ _
1 2 3 4 5 6 7 8 9
Max = 2
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Now comes the trick of the system...
4. What if an instance has finished? ======================================================
Well, we could just mark that instance as "unused" and ignore it, using another boolean array var-
iable. But that would be lame - arrays have a limit and, after a lot of executions, the indexing would
be out of free indexes! Yes, it could take long, but let's think big...
We could re-use the "unused" indexes. But then we would have "holes" in our arrays. This is not
good at all, we would be wasting time looking at unused indexes.
The best way is to substitute the finished index. How? We just put the last instance where we would
have a hole. Imagine we had five instances:
________________________________________________________
Unit: A B C D E _ _ _ _
1 2 3 4 5 6 7 8 9
Max = 5
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
If we had to remove B. We would do the following:
________________________________________________________
Unit: A E C D _ _ _ _ _
1 2 3 4 5 6 7 8 9
Max = 4
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Yay! We removed B and we have no holes!
However, if we remove those instances while looping through the array, we must be careful. Imagine a
variable 'i' that is going through the indexes. Everytime we finish executing an index, we add 1 to 'i',
so that we go to the next index.
________________________________________________________
"Looping through"
Unit: A B C D E _ _ _ _
1 2 3 4 5 6 7 8 9
i
Max = 5
i = 1
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
________________________________________________________
"Finished executing A. Add 1 to i"
Unit: A B C D E _ _ _ _
1 2 3 4 5 6 7 8 9
i
Max = 5
i = 2
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
________________________________________________________
"Finished executing B. Add 1 to i"
Unit: A B C D E _ _ _ _
1 2 3 4 5 6 7 8 9
i
Max = 5
i = 3
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Now we will remove C and see (C and see, hehe) the result. Remember we only "remove" after we have finished
executing the instance:
________________________________________________________
"Finished checking C and we need to remove it"
Unit: A B E D _ _ _ _ _
1 2 3 4 5 6 7 8 9
i
Max = 4
i = 3
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
________________________________________________________
"Finished checking the index 3 (former C). Add 1 to i"
Unit: A B E D _ _ _ _ _
1 2 3 4 5 6 7 8 9
i
Max = 5
i = 4
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Wait, wait, wait! We have skipped E!
When we removed an instance and brought the last element to where 'i' was, we increase 'i' as well, because
we only remove an instance after executing it. But if we do that, we will skip the moved instance.
Therefore, we have to decrease 'i' by 1 when we remove an element, so that we compensate the increment we do
everytime we execute an instance.
"Why do we increment i even when we remove an element?", you ask. The increment is inert to the "For"
function we use in GUI, and you, GUI-user, is not able to deny it directly. The only way you can do it is by
decrementing it, so that you compensate the increment.
So, after removing C, we decrement 'i':
________________________________________________________
"Decrementing i"
Unit: A B E D _ _ _ _ _
1 2 3 4 5 6 7 8 9
i
Max = 5
i = 3
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Now we will execute E and go on with the loop normally.
This is called index recycling, because we avoid having unused indexes. This way, we will take much, I said
much longer to reach the index limit, because we would need 8191 simultaneous instances to reach it.
//TESH.scrollpos=18
//TESH.alwaysfold=0
xxxxxx IMPORTING THESE SPELLS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Importing GUI spells are quite simple. The great trick is to enable an option in the Preferences
menu. Open the window 'File > Preferences', go to 'General' tab and enable:
"Automatically create unknown variables when pasting trigger data"
This will create every variable you need when you CnP any trigger from this map to yours. You'll
have to initialize them, so copy the "Initialize" trigger to your map. This trigger will prevent you
from having to replace every ocurrence of the abilities in the triggers, as your abilities in the
Object Editor will have different Raw Codes from the ones in this map.
After copying this trigger to your map, you will have to update their values to the abilities
you will copy from the Object Editor. DONT FORGET THIS STEP, or your abilities will do nothing.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
If you want to use the same icons I used, export them and import them into your map. There are
plenty of icon importing tutorials out there.
So, here's how you import each spell:
FERAL IMPACT: 1. Copy 'Feral Impact' ability from the Object Editor
¯¯¯¯¯¯¯¯¯¯¯¯ 2. Copy these triggers, in this order:
"Shake Camera"
"Knockback Index"
"Knockback Move"
"Feral Impact"
"Feral Impact Move"
(you do NOT have to copy Knockback triggers if you have already did that)
4. Add the ability to your hero. Blademaster/variants recommended because of the
animation
BONEBREAKER: 1. Copy 'Bonebreaker' ability from the Object Editor
¯¯¯¯¯¯¯¯¯¯¯ 2. Copy these triggers, in this order:
"Knockback Index"
"Knockback Move"
"Bonebreaker"
(you do NOT have to copy Knockback triggers if you have already did that)
3. Add the ability to your hero.
BATTLE FURY: 1. Copy 'Battle Fury' ability from the Object Editor
¯¯¯¯¯¯¯¯¯¯¯ 2. Copy 'Battle Fury - Attackspeed' ability from the Object Editor
3. Copy these triggers, in this order:
"Battle Fury Index"
"Battle Fury Downgrade"
"Battle Fury"
4. Add the ability to your hero.
TORNADO: 1. Copy 'Tornado' ability from the Object Editor
¯¯¯¯¯¯¯ 2. Copy these triggers, in this order:
"Knockback Index"
"Knockback Move"
"Tornado Damage"
"Tornado"
(you do NOT have to copy Knockback triggers if you have already did that)
3. Add the ability to your hero.
Customizing hints are given in the next trigger.
//TESH.scrollpos=16
//TESH.alwaysfold=0
xxxxxx CUSTOMIZING THESE SPELLS xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
There are not much to customize in these spells, however there are a few details you could like
to change.
For all spells, you can change their cooldown (I guess you would not use a no-cooldown spell
like those in ANY map) and mana cost with no worries.
Whenever you want to change the knockback properties, for any spell, have this in mind:
KB_MaxDist Sets the distance the target will be pushed back
KB_Speed Sets the speed the target will be pushed back
The other properties of knockback are not recommended to be changed, because they should not be
changed ^^'
FERAL IMPACT: 1. To change default jump height, go to "Initialize" trigger and change
¯¯¯¯¯¯¯¯¯¯¯¯ 'default height' value. WARNING: low default height can cause problems
when jumping very high terrains, and will amplify damage bonus for height.
2. To change the effects:
LAUNCHING: go to "Initialize" trigger and change 'FI_EffectA' and
'FI_EffectB'. EffectB will be attached to the hero's chest.
LANDING: go to "Feral Impact Move" and find #2 customize tag.
3. To change the camera shake magnitude, find the #3 customize tag xD
4. To change area of effect and damage, go to "Feral Impact Move" trigger and
find #4 customize tag. There are some calculations (sorry for bad names):
'real' is the area of effect radius. The calculation is:
AoE = (Level*Increment) + Base
'real2' is the damage itself. It increases according to the difference bet-
ween the height he jumped from and the height he landed on (this difference
is FI_FallHeight). The default formula is:
DamageFactor = FI_FallHeight/DefaultHeight
The damage is calculated by:
Damage = ((Level*Increment) + Base)*DamageFactor
Remember that for level 1 spells, the Increment will still be added. So if
you want level 1 damage to be 100 with increment of 50/level, set Base to
50 (not 100).
5. To change knockback properties, find #5 customize tag (and see above for info).
6. To change gravity, go to "Initialize" trigger and change the 'g' value. This
have some mathematical effects but, in general, determines the duration of the
jump (the higher the gravity, the longer the jump).
7. To change the sound, go to "Initialize" trigger and change 'FI_Sound'.
8. To remove sound, go to "Initialize" trigger and set 'FI_Sound' to an empty string.
9. To change cast range, edit the ability in the Object Editor.
BONEBREAKER: 1. To change damage, edit the ability in the Object Editor.
¯¯¯¯¯¯¯¯¯¯¯ 2. To change knockback properties, go to "Bonebreaker" trigger and find the
customize tag (and see above for info).
BATTLE FURY: 1. To change the duration of each bonus level, go to "Initialize" trigger and change
¯¯¯¯¯¯¯¯¯¯¯ 'BF_DefaultInterval'.
2. To change the attack speed bonus, edit 'Battle Fury - Attackspeed' ability in
the Object Editor.
3. To change the effects, go to "Battle Fury" trigger and find the customize tag.
TORNADO: 1. To change duration, edit the ability in the Object Editor and go to "Tornado"
¯¯¯¯¯¯¯ trigger, changing the indicated line.
2. To change damage, go to "Tornado Damage" trigger and find the #2 customize tag.
3. To change knockback properties, go to "Tornado Damage" trigger and find #3
customize tag (and see above for info).