• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Items empowering unit ability on Hero

Status
Not open for further replies.
Level 2
Joined
Aug 22, 2020
Messages
18
Hello guys,

I would like to make items improve ability that my hero has and which is not hero ability, but unit ability.

ie. Combat Mastery (=Drunken Brawler) with 10% 1,50x crit chance and 10% dodge.
The hero acquires an item, which makes his dodge chance rise to 14% total.

With a hero ability I would do this simply via Technical upgrade, but it doesn't allow unit abilities.

I was thinking of a trigger, in which I would add the new upgraded ability to the hero when he gets the item (and in the same way remove it when he puts the item away), but I'm a bit lost with setting the variables in it.

Can someone please make and show me the trigger that would do the job?
 
Level 24
Joined
Jun 26, 2020
Messages
1,852
Its too simply
  • Trigger 1
    • Events
      • Unit - A unit acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to "Your item"
    • Actions
      • Unit - Remove "First ability" from (Triggering unit)
      • Unit - Add "Second ability" to (Triggering unit)
  • Trigger 2
    • Events
      • Unit - A unit loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to "Your item"
    • Actions
      • Unit - Remove "Second ability" from (Triggering unit)
      • Unit - Add "First ability" to (Triggering unit)
Or you can do it with the same ability giving it 2 levels with differents stats and do:
  • Trigger 1
    • Events
      • Unit - A unit acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to "Your item"
    • Actions
      • Unit - Increase level of "Your ability" for (Triggering unit)
  • Trigger 2
    • Events
      • Unit - A unit loses an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to "Your item"
    • Actions
      • Unit - Decrease level of "Your ability" for (Triggering unit)
 
Level 12
Joined
Mar 13, 2020
Messages
421
Set ability real level...

Example:

your Hero get the item

Event:
Unit Aquires Item

Condition:
Hero manipulating Item equal to
„your item“

Action:
Set Spellpower[Playernumber(ownerofunit(heromanipulatingitem)] to 1.00

( Spellpower is a Real[Array])

and if you listen to my advice about set ability real then you have a spell trigger like this example

Example:

Event:
Unit starts the Effect of a Ability

Condition:
Ability being Cast equal to „Lightning Chain“

Action:
Set Ability Real Level
Ability of Casting Unit / Level of Ability of Casting Unit - 1 / Htb1 / Lightning Chain / Intelligence of Casting Unit * Spellpower[PlayerNumber(Ownerof(CastingUnit)

what happens now?

first of all we set the level of ability - 1 because index happens like this

Level of Your spell is 1 = Index 0
Level of your spell is 2 = Index 1

second thing in my Example I use the real I wanna change Htb1

i don’t know the one from Lightning Chain while I write this on phone

Htb1 is the Damage Stats (Field) of Stormbolt
Firebolt
And all other based spells that fires a missle and stun

but it’s only a example so let’s go on how you find out the Real Field you need?

you go on your Object Editor to your spells and on your Spell then you press (Strg + D) and where before were Textes like Damage
Area of Effect
Hero Duration
Normal Duration
There will be now things like that
Htb1
Ovd2
Etc etc etc

so search the Field you wanna Change very time your hero cast The spell in my Example the damage of Lightning Chain

now to what I set the damage now...
In object editor there is 0 damage Because I left it to 0

so I want that the Lightning Chain That Hits 3 Targets with no Reduction per Target

do damage based on the Inetlligence of my hero * (Multiplicate) the Spellpower I got from my Real Variable

so my Real was 1.00 ( 1.00 = 100%)

im Ingame I got that item now
I cast Lightning Chain

and Boom
100 Intelligence I Have so my Spell does now + 100% More Spelldamage Item ( I set with the Real )

200 Damage on 3 Targets i think wow nice

and you can change

Ability Real level fields like I said
Ability String Level fields ( all Textes )
Or even Ability Integer Level fields

let’s get another Example let’s say I have a Talent tree

Me and my Shaman Hero are now picking the Talent ( Lightning Chain ) Hits 1 More Target..

i say ok that one I pick

how you do something in editor...

you Change the Ability Integer Level Field and Set it from 3 Targets with an trigger that adds then a real to 1
3 + my Real and Boom Ingame when I pick now this talent my hero Hits 4 Units now !!! Wtf

You can with this fields that was ne patched 2019 I think before reforged
Change on gui everything you don’t need to trigger damage by Damage Unit
Or Pick all in a Group and do Loop
Damage Picked Units.. for spells that are based on wc3 Ingame spells

if you fully trigger a spell without even a spell Ingame and you use Channel ( Spell )
So you have a button and everything what Happens happen only triggered then you can’t use this method but if your spell is base on or let’s say Copied out of an Original Wc3 Ability you can find in Object editor then yes you can change so now our shaman evry time he cast Lightning Chain now He only need in his tooltip
Deals Intelligence Amount to 3 Targets

Try it out and you will see you can manipulate even Passives while game let’s say The Armor Aura from Paladin you can set it to 1% of his Max Hp and because you can’t cast it you set the event to evry 5 sec so evry 5 sec now his Aura gives him Armor to 1% of his Current Max HP (Refresh)

so he start with 1000 hp ingame and learn the Aura
He get 10 Armor

and it refresh now evry 5 sec so if he levels up and has now 1100 hp 5 sec later he has 11 Armor...

and after an hour he has 55000 max hp and he has from the aura 550 Armor

just play around and have fun :)
I took the time for this whole text and I hope you read it with this triggers I set things in my map I working on all spells are based on attributes and even items have effects like 8% Heal Incrased
And my Talent Tress I will do next will be based to on Set Ability Real Field to give the Shaman let’s say a 2 Sec Reduce Cooldown on his Heal

or the Mage picks Fire Mastery and now his Fire spells do 20% more damage

Cheers
 
Last edited:
Level 2
Joined
Aug 22, 2020
Messages
18
@HerlySQR thank you so much, works just fine! :pcon:

@Pwnica Wow, thank you for such a long post. A lot of information to proccess. Will let you definitely know once I get through it. Where I can get your map you are reffering to? :psmile:
 
Status
Not open for further replies.
Top