• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Buff mechanics

Status
Not open for further replies.
Level 3
Joined
Aug 8, 2022
Messages
29
A little question about how buffs/effects work. Let's say i want to make a skill that heal every ally in the radius with Holy Light, resurrect the dead and give them Stone Skin effect for 10 sec. Should i make an empty buff for triger that triggers heal and give buff, or there is an easier way to make this?
 

Uncle

Warcraft Moderator
Level 70
Joined
Aug 10, 2018
Messages
7,375
I don't fully understand the question but I'll try and answer anyway.

Buffs aren't very customizable so your options can be rather limited when using them. In this case it sounds like you want to apply a buff through your Stone Skin ability since that's the only effect that has a duration.

For the skill that you described I would trigger the heal/resurrect myself and then order a Dummy unit in that same trigger to cast "Stone Skin" on the healed/resurrected units. Something like this:

A unit casts your spell
Create a Dummy unit and Add the Stone Skin ability to it
Pick nearby dead/allied/non-hero/non-structure units and create a new copy of them / remove the old unit
Pick nearby alive/allied/non-structure units and heal them and order the Dummy to cast Stone Skin on them

This is assuming that Stone Skin is something like Inner Fire. Also, you can limit how many units are resurrected by using an Integer variable that starts out at 0 and increases by 1 each time you resurrect a unit. Then you use an If Then Else to prevent the resurrection from happening if the Integer is greater than the limit.
 
Last edited:
Level 3
Joined
Aug 8, 2022
Messages
29
The question is how to put effects that is not in buff/effect tabs like Holy Light, make an ability with a radius around the hero cast in targeted radius, and use buffing effects like stone skin, which also are not in buff/effect tab, as a common buffs.
And a new question, how to make a skill that use gold for cast and permanently gives non-hero unit stats like HP and dmg? I have a few ideas, but im sure u know much easier way 🙂
 

Uncle

Warcraft Moderator
Level 70
Joined
Aug 10, 2018
Messages
7,375
The question is how to put effects that is not in buff/effect tabs like Holy Light, make an ability with a radius around the hero cast in targeted radius, and use buffing effects like stone skin, which also are not in buff/effect tab, as a common buffs.
And a new question, how to make a skill that use gold for cast and permanently gives non-hero unit stats like HP and dmg? I have a few ideas, but im sure u know much easier way 🙂
Most things are hardcoded to the ability itself so you don't really have much room for customizing abilities in the object editor outside of what the ability is designed to do. Each Buff/Effect has been coded by the Blizzard devs to do a specific thing for a specific ability. What you're allowed to change is very limited and varies from ability to ability.

An Effect is basically just a visual thing. Don't confuse the effects of an ability with the Effect type, those are two different things.

A Buff is a visual thing as well but also carries the data from the ability so it can be referenced over time. It also allows for things like dispel which will end the effects of the ability early by removing the Buff.

There is no such thing as a Holy Light Buff/Effect. The effects of the Holy Light ability are: Heals an allied unit or Damages an Undead unit. You cannot access this effect outside of the Holy Light ability BUT you can trigger these effects yourself and customize them to your liking there. Also, there is no way to change an abilities Targeting Type. If for example you wanted Thunderclap to be a Point ability you'd need to trigger it. The ability Channel is an exception but that's because it acts like a template for custom triggered spells and doesn't actually have any effects.

So long story short: You need to use triggers if you want to customize an ability beyond the normal means.

Regarding your Gold ability, if it's an Instant cast ability you can use the Charge Gold/Lumber ability as it's template and trigger the effects yourself.
Otherwise, you'll have to trigger a normal ability to be interrupted if the Unit tries to cast it with insufficient Gold. The "begins Casting" Event helps here.
Giving permanent stat boosts to a Unit can be done by adding Item abilities to it or with the Unit modifying Actions like Set Unit Max HP:
  • Unit - Add Item Attack Bonus +5 to (Triggering unit)
  • Unit - Add Item Life Bonus to (Triggering unit)
 
Last edited:
Status
Not open for further replies.
Top