• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Solved] Crucial issue with the Bribe's Damage Engine

Status
Not open for further replies.
Level 17
Joined
Jun 2, 2009
Messages
1,148
Hello everyone. If you know Bribe's Damage Engine, i have a serious problem with it.

  • Book of Knowledge damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • (DamageEventSource has an item of type Book of Knowledge) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ((Real((Intelligence of DamageEventSource (Include bonuses)))) x 0.50) damage of attack type Chaos and damage type Unknown
      • Trigger - Turn on (This trigger)
This item works with item abilities. Is there a way to detect abilities from items disable it or specific abilities?

Update: Currently i am thinking make it with "has buff" but sadly sometimes buffs removes from units. And alternatively i can use unit groups but best solution for me to detect "ability specific" because i want to make it does not work with specific abilities.

Example.
X spell can be cast by every 8 seconds and trigger works maximum 1 times in 8 seconds OK
Y spell burns the target for 3 seconds with 0.10 delay (trigger works 30 times NO)
Hero have the Cloak of Flames and deals damage around everyone every seconds NO
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
I believe you'll have to trigger the Cloak of Flames ability and other similar effects yourself so that you can control the damage yourself.

So for example you could do something like this:
  • Events
    • Time - Every 1.00 second
  • Conditions
  • Actions
    • Set Variable IgnoreThisDamage = True
    • Unit - Cause (Cloak of Flames unit) to damage (Nearby enemy units) dealing X damage
    • Set Variable IgnoreThisDamage = False
Of course this trigger isn't how a Cloak of Flames trigger would work, but the main idea is to use the IgnoreThisDamage boolean variable to make your Book of Knowledge damage trigger not run.

So you would check the IgnoreThisDamage variable in the Book of Knowledge damage trigger:
  • Book of Knowledge damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IgnoreThisDamage Equal to False
      • IsDamageSpell Equal to True
      • (DamageEventSource has an item of type Book of Knowledge) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ((Real((Intelligence of DamageEventSource (Include bonuses)))) x 0.50) damage of attack type Chaos and damage type Unknown
      • Trigger - Turn on (This trigger)
The same would be needed for your Damage over time ability (burn).

Alternatively, you could take a different approach and modify the 0.50 multiplier based on the source of the damage:
  • Events
    • Time - Every 1.00 second
  • Conditions
  • Actions
    • Set Variable BoK_DamageMultiplier = 0.10
    • Unit - Cause (Cloak of Flames unit) to damage (Nearby enemy units) dealing X damage
    • Set Variable BoK_DamageMultiplier = 0.50
  • Book of Knowledge damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • (DamageEventSource has an item of type Book of Knowledge) Equal to True
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ((Real((Intelligence of DamageEventSource (Include bonuses)))) x BoK_DamageMultiplier) damage of attack type Chaos and damage type Unknown
      • Trigger - Turn on (This trigger)
This way Book of Knowledge will work for Cloak of Flames/Damage over time effects but with a much smaller amount of damage dealt. Also, you'd want to give BoK_DamageMultiplier a default value of 0.50 or whatever you want it's default value to be.

This idea is very similar to what League of Legends does with it's Ability Power system. Spells that deal many instances of damage have a much smaller Ability Power Ratio so that they benefit from a smaller fraction of the user's total Ability Power. Spells that deal a single instance of damage have a larger Ability Power Ratio so that they benefit more from Ability Power. This allows both types of abilities to scale with Ability Power in a balanced way.
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
Uhm understood but. IgnoreThisDamage is a function by Damage Engine? Version is 3.8.0.0
 

Attachments

  • zz.png
    zz.png
    47.4 KB · Views: 9
Level 39
Joined
Feb 27, 2007
Messages
5,033
No… it’s a boolean variable you make yourself. Please think.

If something doesn’t exist already think about how it’s being used. Look for everywhere it’s used, set, referred to, etc.. Read the triggers. That should tell you what it is.
 
Level 17
Joined
Jun 2, 2009
Messages
1,148
No… it’s a boolean variable you make yourself. Please think.

If something doesn’t exist already think about how it’s being used. Look for everywhere it’s used, set, referred to, etc.. Read the triggers. That should tell you what it is.
This is why i have shared variables.
You mean when i create Boolean and name it as IgnoreThisDamage, system will detect damage and ignore?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
You need to create the variable yourself.

Also, it doesn't really have anything to do with the Damage Engine system itself.

You can create a Boolean variable and use it like that in ANY trigger. It's one of the many techniques available to prevent a trigger from running. In this case I'm using it to prevent your Book of Knowledge trigger from running.

For example, the variable could be an Integer with a random name:
  • Set Variable ICanCallThisVariableAnythingIWant = 1000
  • Events
    • Something happens...
  • Conditions
    • ICanCallThisVariableAnythingIWant Equal to 1000
  • Actions
    • Do stuff...
This trigger will run it's Actions as long as we have Set the variable to 1000. Setting it to something other than 1000 will prevent the trigger from running it's Actions. As a result we can now use the variable to decide whether or not the trigger should run.
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
That means i need to remove all item abilities and trigger it by myself? I don't understand it yet. You mean trigger all kind of damage first?
Ok let's just say i have decided to deal damage with triggers DONE

Second part is damage over time spells like aoe spells, life drain etc etc.
What should i do with these?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Yes, you would want to trigger everything yourself.

You could also use unique Dummy units since those can be checked in the Conditions as well:
  • Events
    • Game - DamageModifierEvent becomes Equal to 1.00
  • Conditions
    • (Unit-type of DamageEventSource) Equal to Storm Bolt Dummy
  • Actions
    • Do stuff...
If the Storm Bolt Dummy is the ONLY unit that can cast the Storm Bolt ability, and it has no other way of dealing damage, then you know that any damage it deals came from that ability. But this causes more problems because now you're relying on Dummy units to cast your spells and not the actual Hero (who has the Item in this case).

You can try to search for other solutions but I really don't think any good ones exist. Also, you're on an older version of Damage Engine so you're even more limited.
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
@Uncle @Pyrogasm Sorry for the late reply but i have to go to the hospital for a health issues and i will leave the house 30 minutes later. Before i go i wanted to let you know unexpected results.

Dummy solution looks nice but what can i do if the player has the items deals damage over time?

This item should be work for one time ability damage.

When the hero deals ability damage, deals additional damage based on it's intelligence.
Ability damage: When you click one of your abilities and deal damage to area or targeted unit

Hero has the item based on Orb of Venom: Should not work with this system
Hero has the ability based on Orb of Venom: Should not work with this system
Hero has the ability based on Blizzard: Should not work with this system
Hero has the ability based on Life Drain (or any ability deals damage over time): Should not work with this system
Any abilities like shockwave, war stomp, firebolt, thunder clap, chain lightning etc etc is ok

If the hero casts blizzard, life drain, flame strike, shadow strike etc etc this trigger works many times.
Or if the has the items based on immolation, orb of venom, any item that deals damage over time.

I have read your messages and solution is delete these items, units, hero abilities and create trigger for the damage for the each of them?
Should i remove all of these abilities from my map just for 1 item?

Sorry for misunderstand but i am totally confused. Can you give me 1 example for each ability if it is possible?

--- Conclusion ---

My map have a lots of area of effect, damage over time abilities, items and units. It sounds like "delete all of them and create triggers for each of them one by one" is it correct?

I was expected any condition like this

  • IsDamageItem Equal to False
  • IsDamageID A000 (any ability that i don't want to count for it) Equal to False
When i return to home i will test many abilities on dummy units in Damage Engine map and create dummy unit and test with it.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
There is no easy solution.

For each spell that uses the Item you need to either trigger the spell from scratch or trigger it to use Dummy units.

Triggering from scratch is the best option since you have full control over everything but it's also a pain in the ass and requires intermediate/advanced triggering knowledge.

The second option with the Dummy units is easier, but it creates a whole new set of issues since the (Killing unit) and (Damage source) will be your Dummy unit and not the Hero that created the Dummy unit. The solution here is to link your Hero unit to your Dummy unit, using either a Hashtable or a Unit Indexer, this way you can access the Hero whenever your Dummy unit does something. Then you need to adjust your (A unit Dies) and DamageEvent triggers to account for the fact that sometimes a Dummy unit will be killing/dealing damage.
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
@Uncle :( ok at least let us start with items. Here is the list of items and my solution

Firehand Gauntlets (immolation)
Cloak of Flames (immolation)
Devil's Cloak (immolation)
Orb of Flames (immolation)
Poison Sting (orb of venom)
Orb of Fire (splash)
Orb of Lightning (splash, it has chain lightning ability)
Blade of Lightning (splash, it has chain lightning ability)
Armor of Bladebane (spiked shell)

First 4 items have immolation ability, so i can use this and let the players know that.

--- Prevent items (not a good solution) ---

  • (DamageEventSource has buff Immolation (Caster)) Equal to False
  • --- I will put buffs of all 4 items ---
  • (DamageEventSource has an item of type Cloak of Flames) Equal to False
  • --- And in here i can put these items and it will prevent this trigger working---
But when i do that i will prevent them buying these items. But i don't want to do that.

And i have noticed that, spiked shell damage return feature counts as Spell.

--- Check buff (it has downsides) ---

  • Restrictions
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageSpell Equal to True
      • And - All (Conditions) are true
        • Conditions
          • (DamageEventTarget has buff Soul Burn) Equal to False
          • (DamageEventSource has buff Immolation (Caster)) Equal to False
          • (DamageEventTarget has buff Flame Strike) Equal to False
    • Actions
It looks like reliable but it has downside.
When you cast Flame Strike to the enemy, system detects buff and prevents running.
But it is also protects enemy as well against other spells :)

You and me are attacking Pyrogasm. You have a 250+ Intelligence and you are ready to cast your ultimate ability.
But i am casting Flame Strike, Soul Burn etc etc any ability that deals damage over time to Pyrogasm
Uncle: NOOOOO! YOUR SPELLS PROTECTED PYROGASM AGAINST MY BOOK OF KNOWLEDGE

Question: How to detect abilities without buff (Blizzard for example)
My version have this Event "Game - AOEDamageEvent becomes Equal to 1.00" and it detects AoE but i cannot prevent it deal damage. Or i don't know how to do that. Still working on this.
If i am able to detect ability effects without buff, it will solve my many problems.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
How to detect abilities without a buff:

Trigger the entire ability (spell) yourself, or use the Dummy method we explained before.

I'm not going to explain how to trigger all of these spells yourself, however, Hiveworkshop is full of custom spells, tutorials, and forum posts that explain what to do. I've definitely shown people how to trigger Cloak of Flames and other spells in the past.

Also, there may be alternative solutions out there. I recommend googling "Hiveworkshop Detect Spell Damage" or something along those lines.

Another solution I just thought of is to only activate Book of Knowledge if the Spell damage is > a certain amount:
  • Book of Knowledge damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has an item of type Book of Knowledge) Equal to True
      • IsDamageSpell Equal to True
      • DamageEventAmount Greater than or equal to 60.00
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ((Real((Intelligence of DamageEventSource (Include bonuses)))) x 0.50) damage of attack type Chaos and damage type Unknown
      • Trigger - Turn on (This trigger)
Now only spells that deal at least 60.00 damage will benefit from the Intelligence bonus.
 
Level 17
Joined
Jun 2, 2009
Messages
1,148
What the f...... MAN THIS SOLVES MY PROBLEMS! @Uncle THANK YOU!
DamageEventAmount i was tought it was the core things for the make this system works.
Is there anything should i know that just like this?

With this function i can set all of Damage Over Time items, abilities and spells damage maximum 100 and i can make Book of Knowledge trigger works for 100+

YOU SAVED ME MAN! I haven't tested it yet but i will flag topic as Solved if it works!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
What the f...... MAN THIS SOLVES MY PROBLEMS! @Uncle THANK YOU!
DamageEventAmount i was tought it was the core things for the make this system works.
Is there anything should i know that just like this?

With this function i can set all of Damage Over Time items, abilities and spells damage maximum 100 and i can make Book of Knowledge trigger works for 100+

YOU SAVED ME MAN! I haven't tested it yet but i will flag topic as Solved if it works!
DamageEventAmount is how much damage is going to be dealt. In most DamageEvents you're able to actually modify this value.

So for example, instead of dealing a separate instance of damage you could just increase the damage that the spell was going to deal:
  • Book of Knowledge damage
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has an item of type Book of Knowledge) Equal to True
      • IsDamageSpell Equal to True
      • DamageEventAmount Greater than or equal to 100.00
    • Actions
      • Set Variable DamageEventAmount = DamageEventAmount + ((Real((Intelligence of DamageEventSource (Include bonuses)))) x 0.50)
I probably should have mentioned this before but I thought you may have wanted the Chaos damage for a reason.
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
@Uncle Is that means i can store the exact damage amount for use it later?

I was experimenting on this system and i have changed abilites of 2 items but i need to ask this, then i will flag this topic as solved.

  • Events
    • Game - DamageModifierEvent becomes Equal to 1.00
  • Conditions
    • (DamageEventTarget has buff Shield of the Deathlord ) Equal to True
  • Actions
    • Set DamageEventAmount = (DamageEventAmount x 0.20)
    • Set DamageEventType = DamageTypeReduced
  • Events
    • Game - DamageModifierEvent becomes Equal to 1.00
  • Conditions
    • (DamageEventTarget has buff Divine Staff ) Equal to True
  • Actions
    • Set DamageEventAmount = (DamageEventAmount x 0.50)
    • Set DamageEventType = DamageTypeReduced
Divine Staff buff lasts 3 seconds
Shield of the Deathlord buff lasts 5 seconds
Both of the items are using the same function (DamageEventAmount)

What happens when you cast Divine Staff to me while i was under the effect of the Shield of the Deathlord?
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
I don't think you need that DamageEventType variable but I'm not too familiar with the older version of Damage Engine.

To answer your question, one of those Events will happen before the other, with the result either being:

Damage * 0.20 * 0.50
Or
Damage * 0.50 * 0.20

In this case the Damage result is the same, but this "random" execution order can cause problems.

The solution is to use a single DamageModiferEvent trigger and then have a bunch of other checks inside of it. This way you can order how things get calculated:
  • Events
    • Game - DamageModifierEvent becomes Equal to 1.00
  • Conditions
  • Actions
    • Trigger - Run Deathlord (checking conditions)
    • Trigger - Run DivineStaff (checking conditions)
Now Deathlord will ALWAYS happen before DivineStaff.

Then in those two triggers you would simply delete the Event since they're being Run from this one central trigger.

This can be made more efficient if you use If Then Else statements in the central trigger to avoid repeat Conditions but it's hard to avoid some repetition.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
Create a new trigger like this:
  • DamageModifierEvent
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Trigger - Run Deathlord (checking conditions)
      • Trigger - Run DivineStaff (checking conditions)
Then edit your existing two triggers (Deathlord/Divine Staff):
  • Deathlord
    • Events
    • Conditions
      • (DamageEventTarget has buff Shield of the Deathlord ) Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 0.20)
  • DivineStaff
    • Events
    • Conditions
      • (DamageEventTarget has buff Divine Staff ) Equal to True
    • Actions
      • Set DamageEventAmount = (DamageEventAmount x 0.50)
Notice how I got rid of the Event from your two triggers. That's because they are being run from our new trigger.

I'm currently running Deathlord before DivineStaff, however, you can change this order.

Simply swap the positions of the Actions to make one happen before the other.

For example, now DivineStaff is happening before DeathLord:
  • Actions
    • Trigger - Run DivineStaff (checking conditions)
    • Trigger - Run Deathlord (checking conditions)
Good luck with your surgery and I hope you get better :)
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
@Uncle Thank you so much. Currently i cannot breathe properly because of the surgery. It is so annoying to breath from mouth. It tooks few days.
Here is the quick question..

  • On AOE Copy
    • Events
      • Game - AOEDamageEvent becomes Equal to 1.00
    • Conditions
    • Actions
      • Game - Display to (All players) the text: 31
How this even works? Nothing happens when i cast thunder clap or blizzard. Am i missing something? It seems this works for pre-placed units.

If it works only targeted spells, i have already created system like this in my map.

  • MindStaffHasar
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • ((Casting unit) has an item of type Mind Staff) Equal to True
      • ((Target unit of ability being cast) belongs to an enemy of (Owner of (Casting unit))) Equal to True
      • ((Unit-type of (Target unit of ability being cast)) is A Hero) Equal to True
    • Actions
      • Unit - Cause (Casting unit) to damage (Target unit of ability being cast), dealing ((Life of (Target unit of ability being cast)) / 10.00) damage of attack type Chaos and damage type Unknown
Currently this damage detection system have no benefit in my map :D at least i have to add area of effect spells if it is possible.
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
I'm not sure how that Event works, but it sounds like either an issue with a Unit Indexer (make sure you don't have multiple copies of these in your map) or you haven't imported the Damage Engine into your map properly.

I imagine you can find information about it here: Damage Engine 5.9.0.0

Bribe can also explain it to you better than I could since he created the system and is very active. Make sure you tell him that you're using the older version.
 
Last edited:
Level 17
Joined
Jun 2, 2009
Messages
1,148
That means it is enough for the detect targeted or area spells right?

  • BoK
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • (DamageEventSource has an item of type Book of Knowledge) Equal to True
      • IsDamageSpell Equal to True
      • DamageEventAmount Greater than or equal to 100.00
    • Actions
      • Trigger - Turn off (This trigger)
      • Unit - Cause DamageEventSource to damage DamageEventTarget, dealing ((Real((Intelligence of DamageEventSource (Include bonuses)))) x 0.50) damage of attack type Spells and damage type Magic
      • Game - Display to (All players) for 1.00 seconds the text: ehehe
      • Trigger - Turn on (This trigger)
And it will not works if the player have the immolation, shadow strike etc etc (damage per seconds or damage overtime spells) below 100 damage right?

Currently i was testing it with one of my skills but it won't worked with this.

Skill base: Inferno
Deals: 120/150/190/250 damage to enemy units in area. As you know when you cast it, inferno falls down from the sky and damages on impact but somehow it won't worked.
Is there any exceptions like this or am i missing something?

By the way thank you for your time and amazing system.
 
Level 17
Joined
Jun 2, 2009
Messages
1,148
But there are no Inferno. I was just used this ability because of the some kind of Meteor effect. It deals damage and stuns units within area.
But it looks like i am going to change this spell because i have no knowledge about UnitIndexer and i don't want to change something about it.
Thank you for your help @Bribe and dear @Uncle
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,583
But there are no Inferno. I was just used this ability because of the some kind of Meteor effect. It deals damage and stuns units within area.
But it looks like i am going to change this spell because i have no knowledge about UnitIndexer and i don't want to change something about it.
Thank you for your help @Bribe and dear @Uncle
I'm pretty sure the only two systems you'd have in your map would be the Unit Indexer and Damage Engine seeing as how I suggested you to download both of these. The newer versions of Damage Engine don't come with a Unit Indexer, but the old ones like 3.8 still do as far as I know. So if you see a trigger called Unit Indexer Copy or two folders called Unit Indexer or variables ending in the word _Copy then you know that you have two of the same system in your map, which is not good and you should delete the copy.

Anyway, it's true that the Inferno is the (Damage source) as Bribe stated, which is pretty odd in my opinion but okay Blizzard.

So another thing you can do is trigger the spell yourself and make sure the damage comes from the caster:
  • Inferno New
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Inferno New
    • Actions
      • Custom script: local location udg_InfernoPoint = GetSpellTargetLoc()
      • Special Effect - Create a special effect at InfernoPoint using Units\Demon\Infernal\InfernalBirth.mdl
      • Special Effect - Destroy (Last created special effect)
      • Wait 1.00 game-time seconds
      • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at InfernoPoint facing Default building facing degrees
      • Set InfernoDummy = (Last created unit)
      • Unit - Add a 1.00 second Generic expiration timer to InfernoDummy
      • Unit - Add Storm Bolt to InfernoDummy
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units within 512.00 of InfernoPoint.) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • ((Picked unit) belongs to an enemy of (Owner of (Triggering unit)).) Equal to True
              • ((Picked unit) is A structure) Equal to False
            • Then - Actions
              • Unit - Cause (Triggering unit) to damage (Picked unit), dealing 120.00 damage of attack type Spells and damage type Normal
              • Unit - Order InfernoDummy to Human Mountain King - Storm Bolt (Picked unit)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_InfernoPoint)
      • Custom script: set udg_InfernoPoint = null
You'd need to create the two variables InfernoPoint and InfernoDummy. The Wait acts like the delay before the damage is dealt. Storm Bolt would be a custom version that Stuns and doesn't deal damage.
 
Last edited:
Status
Not open for further replies.
Top