• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

[Spell] How to create buff spell

Status
Not open for further replies.
Level 2
Joined
Aug 27, 2012
Messages
25
If it's a repeat of someone, my appologice. I'm looking all around for info :(
And most of times takes a lot of time to understand these functions.
I've just started doing my map, and sorted just 2 skills for now which are multishot thru barrage(without triggers, just by changing settings) and summoming 7 lvl spell throw thunder clap with triggers :)
I'm working with world editor and here is the spell which I want to do:
I'ts a buff, which gives armor and damage when cast on him self or ally.
And the main idea of buff to make it connected with hero atributes.
i mean like example:
Starting Def 10% +0.01% per 1Int point
Dmg 10% +0.02% per 1Int point
If there is way of doing it, i will do same with summons.
like 1st summon goblin att 10-10 +0.05% per 1int point
def 1 +0.02% per 1 int point
att speed 60 +0.01% per 1 int point.
I would be wery thank full for explaining how to do it.
That kinda system with atributes i want to use on all heroes and all spells.
And it would be nice to learn how to do it.
 
Last edited:
Level 10
Joined
Jun 6, 2007
Messages
392
You will need dummy abilities for that. I'll explain it for attack speed, but the other attributes work in a similar way. If you want the icons of the abilities to be invisible, base the abilities on item abilities.

Make 3 attack speed increase abilities with 10 levels based on item attack speed bonus:
AS (+1) : +1% attack speed per level
AS (+10) : +10% attack speed per level
AS (+100) : +100% attack speed per level

When you summon the unit, set an integer variable INT to intelligence of the hero.

Set level of AS (+100) for it to (INT/100).
Set INT to (INT mod 100)
Set level of AS (+10) to (INT/10).
Set INT to (INT mod 10)
Set level of AS (+1) to INT
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Make 3 attack speed increase abilities with 10 levels...
It is 9 levels per ability :p
1% ~ 9%
10% ~ 90 %
100% ~ 900% (although you don't have to reach until 900%, because maximum AS in Warcraft III is 400%)

Although I disagree with the algorithm using base 10, I would prefer using base 2 would be nice (1, 2, 4, 8, 16, ...)
 
Level 2
Joined
Aug 27, 2012
Messages
25
No offence guys im trying my best in doing that but im newbie and kinda confuses me :(
trying to set up that at moment
Set level of AS (+100) for it to (INT/100).
Is it goes from "for each integer variables,do multiple actions" ? coz i cant find set level over there*
Takes ages for me ( not use to thease formulas.
 
Level 12
Joined
Mar 24, 2011
Messages
1,082
It is set level of ability for unit...

  • Immobile Fortress
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Avatar F
    • Actions
      • Set Fortresscaster = (Triggering unit)
      • Unit - Set Fortresscaster movement speed to 0.00
      • Set i = ((Integer((Real((Agility of (Triggering unit) (Include bonuses)))))) x 3)
      • Set n = ((i / 1000) + 1)
      • Unit - Set level of 0-9000 dmg for (Triggering unit) to n
      • Set i2 = (i - ((i / 1000) x 1000))
      • Set n2 = ((i2 / 100) + 1)
      • Unit - Set level of 0-900 dmg for (Triggering unit) to n2
      • Set i3 = (i2 - ((i2 / 100) x 100))
      • Set n3 = ((i3 / 10) + 1)
      • Unit - Set level of 0-90 dmg for (Triggering unit) to n3
      • Set i4 = (i3 - ((i3 / 10) x 10))
      • Set n4 = (i4 + 1)
      • Unit - Set level of 0-9 dmg for (Triggering unit) to n4
      • Set s = ((Integer((Real((Strength of Fortresscaster (Include bonuses)))))) / 5)
      • Set p = ((s / 100) + 1)
      • Unit - Set level of 0-900 def for (Triggering unit) to p
      • Set s2 = (s - ((s / 100) x 100))
      • Set p2 = ((s2 / 10) + 1)
      • Unit - Set level of 0-90 def for (Triggering unit) to p2
      • Set s3 = (s2 - ((s2 / 10) x 10))
      • Set p3 = (s3 + 1)
      • Unit - Set level of 0-9 def for (Triggering unit) to p3
      • Wait 10.00 seconds
      • Unit - Set Fortresscaster movement speed to (Default movement speed of Fortresscaster)
      • Unit - Set level of 0-9000 dmg for Fortresscaster to 1
      • Unit - Set level of 0-900 dmg for Fortresscaster to 1
      • Unit - Set level of 0-90 dmg for Fortresscaster to 1
      • Unit - Set level of 0-9 dmg for Fortresscaster to 1
      • Unit - Set level of 0-900 def for Fortresscaster to 1
      • Unit - Set level of 0-90 def for Fortresscaster to 1
      • Unit - Set level of 0-9 def for Fortresscaster to 1
all "i","s" and "n" are integers
The abilities are based on item defence and item atack bonus
 
Level 10
Joined
Jun 6, 2007
Messages
392
@Defskull: Ahh true, 9 levels.

If it was based on 2 instead of 10, wouldn't you need a ton of 1-level abilities?

@Chill-out: The function you are looking for is "unit - set level of ability for unit", and to get the intelligence of the hero, "hero - hero skill".
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
If it was based on 2 instead of 10, wouldn't you need a ton of 1-level abilities?
Something about XML size when converted, having tons of 1-level abilities > having low quantity of abilities, but has many levels.
Well, at least that's what Mag told me.

I used this base 2 algorithm in my Custom Stats system.
 
Level 2
Joined
Aug 27, 2012
Messages
25
Thx for help every one, but I need to read more about integers to actually understand the system, for example nedio95, posted one of his first skills based on attribute system...
It looks nice and clean, but i don't understand connection betveen all thease numbers. I'm saving this material for my education and still trying, by the way where can I drop my map just to show what I got...
Its just i got 7lvl split into 7 different triggers and here its all in one :) That's why its a bit confusing as well. thx for help anyways )
 
Level 2
Joined
Aug 27, 2012
Messages
25
duno if its right way)
Yh thats right way heres what i got for the moment
 

Attachments

  • summon and multishot skill ELF.w3x
    26.4 KB · Views: 46
Level 2
Joined
Aug 27, 2012
Messages
25
here the right one.
Trying to increase creating unit life by elf's inteligence...
But with this formula instead of making more hp to unit, it makes amount of hp coming out with this formula so about 450 or something... so if you create my soldier who has 5k hp naturally, he summons it with 450/5000 hp... (
 

Attachments

  • summon and multishot skill ELF.w3x
    26.5 KB · Views: 45
Level 2
Joined
Aug 27, 2012
Messages
25
in last function
unit-set life of ms_one (300.0+((100+(0.5xas1))+0
as that as i want to use actual hero attribute but it's not there...
so i tried to make a variable and even there for that function i couldn't find propper hero atributes, only in load real value
 
Status
Not open for further replies.
Top