• 🏆 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!

Requesting help for combined passive spells

Status
Not open for further replies.
Level 9
Joined
Dec 12, 2021
Messages
71
Hello community of the hive, I am needing help to create combined passive spells (For example: Critical Hit + Life Steal, where the life steal attack will only activate when a critical attack results, and the latter will activate according to a chance of possibilities shown in percentage either 15%, 20%, etc.), I also want to emphasize that the level of both passive spells must be the same in this way:
Level 1: 15% chance of critical hit, with a damage multiplier of 2x, and 35% life steal.
Level 2: 25% chance of critical hit, with a damage multiplier of 3x, and a 45% life steal.
Level 3: 35% chance of critical hit, with a damage multiplier of 4x, and a 55% life steal.
Something like the values shown but that I can modify them later to my liking. If someone could send me a map with the detonators to combine passives it would be great, and I don't ask for it to be with a spellbook, because I've seen several use that for passive abilities but it doesn't help to level the levels of both spells.
 
Level 7
Joined
Dec 9, 2014
Messages
89
I don't think what you are asking for is possible without triggering them manually, and simply having a dummy ability icon. You could have Critical Strike and Life Steal separately but you can't simply combine the effects and have the life steal apply on critical strike without triggering that.

I would suggest learning about how to use the DamageSystem as you could trigger both critical strike and life steal manually in GUI using this system : Damage Engine 5.7.1.2
 
Last edited:

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
If you want to make a Hero Skill add extra abilities it's quite simple:
  • Learn Skill
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Critical Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned skill level) Equal to 1
        • Then - Actions
          • Unit - Add Lifesteal to (Triggering unit)
          • Set Variable AbilityCode = Lifesteal
          • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, udg_AbilityCode)
        • Else - Actions
          • Unit - Increase level of Lifesteal for (Triggering unit)
So your Hero would learn one of the abilities and upon doing so they'd be given the other abilities. These other abilities will always be the same level as the primary learned skill. A Spellbook has been unnecessary for this sort of thing for a while now (unless you're on an old patch), if you want to hide an ability you can set it's Art Button positions to x:0, y:-11 or you can trigger it using the Hide ability function.

However, what you described cannot be done so easily since it doesn't exist in Warcraft 3 already. Lifesteal ON Crit is a lot different than just having Lifesteal and Crit.

The solution: You need to trigger the effects of the Crit and Lifesteal in a Damage Event trigger so that you can be in full control of their mechanics. I'm doing exactly this in the map I attached using the Damage Engine that Civil linked.

Edit: Updated map, had wrong values for Lifesteal %.
 

Attachments

  • Lifesteal Crit.w3m
    57.7 KB · Views: 15
Last edited:
Level 9
Joined
Dec 12, 2021
Messages
71
I don't think what you are asking for is possible without triggering them manually, and simply having a dummy ability icon. You could have Critical Strike and Life Steal separately but you can't simply combine the effects and have the life steal apply on critical strike without triggering that.

I would suggest learning about how to use the DamageSystem as you could trigger both critical strike and life steal manually in GUI using this system : Damage Engine 5.7.1.2
That sounds very difficult, and now my main priority is to create a map with various abilities and not so much to learn to use the detonators that is why I asked someone if they could help me with it, but for the time I have I don't think I can learn that system : D.
 
Level 9
Joined
Dec 12, 2021
Messages
71
If you want to make a Hero Skill add extra abilities it's quite simple:
  • Learn Skill
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Critical Strike
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned skill level) Equal to 1
        • Then - Actions
          • Unit - Add Lifesteal to (Triggering unit)
          • Set Variable AbilityCode = Lifesteal
          • Custom script: call UnitMakeAbilityPermanent(GetTriggerUnit(), true, udg_AbilityCode)
        • Else - Actions
          • Unit - Increase level of Lifesteal for (Triggering unit)
So your Hero would learn one of the abilities and upon doing so they'd be given the other abilities. These other abilities will always be the same level as the primary learned skill. A Spellbook has been unnecessary for this sort of thing for a while now (unless you're on an old patch), if you want to hide an ability you can set it's Art Button positions to x:0, y:-11 or you can trigger it using the Hide ability function.

However, what you described cannot be done so easily since it doesn't exist in Warcraft 3 already. Lifesteal ON Crit is a lot different than just having Lifesteal and Crit.

The solution: You need to trigger the effects of the Crit and Lifesteal in a Damage Event trigger so that you can be in full control of their mechanics. I'm doing exactly this in the map I attached using the Damage Engine that Civil linked.

Edit: Updated map, had wrong values for Lifesteal %.
I've been trying to open the map but it can't, in fact I think my warcraft update is lower than yours, I use 1.27, well, I was doing it manually with the photo you sent but I don't see the option to "Learned skill level" in the triggers, I think it is for the same reason as the update that I use, it is too old or maybe I am not a good search engine that is why I got stuck in that.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
An alternative is to check the Level of the ability for the unit.
  • Conditions
  • Level of Critical Strike for (Triggering unit) Equal to 1
But remember, this won't do exactly what you asked for. This is simply Lifesteal and Critical Strike, nothing extra.


Here are the triggers from my map:
  • LC Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Variable LC_Chance[1] = 15.00
      • Set Variable LC_Chance[2] = 25.00
      • Set Variable LC_Chance[3] = 35.00
      • Set Variable LC_Multiplier[1] = 2.00
      • Set Variable LC_Multiplier[2] = 3.00
      • Set Variable LC_Multiplier[3] = 4.00
      • Set Variable LC_Lifesteal[1] = 0.35
      • Set Variable LC_Lifesteal[2] = 0.45
      • Set Variable LC_Lifesteal[3] = 0.55

This Event is a under the category Game - Value Of Real Variable. DamageModifierEvent is a Real variable that comes with the Damage Engine:
  • LC Damage Event
    • Events
      • Game - DamageModifierEvent becomes Equal to 1.00
    • Conditions
      • IsDamageCode Equal to False
      • IsDamageSpell Equal to False
    • Actions
      • Set Variable LC_Level = (Level of Lifesteal Crit for DamageEventSource)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • LC_Level Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Random real number between 1.00 and 100.00) Less than or equal to LC_Chance[LC_Level]
            • Then - Actions
              • -------- Multiply the damage dealt and restore life: --------
              • Set Variable DamageEventAmount = (DamageEventAmount x LC_Multiplier[LC_Level])
              • Unit - Set life of DamageEventSource to ((Life of DamageEventSource) + (DamageEventAmount x LC_Lifesteal[LC_Level]))
              • -------- --------
              • -------- Make it look nice with special effects: --------
              • Special Effect - Create a special effect attached to the origin of DamageEventSource using Abilities\Spells\Undead\VampiricAura\VampiricAuraTarget.mdl
              • Special Effect - Destroy (Last created special effect)
              • -------- --------
              • -------- Make it look nice with floating text: --------
              • Floating Text - Create floating text that reads (String(DamageEventAmount)) above DamageEventSource with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
              • Floating Text - Set the velocity of (Last created floating text) to 64.00 towards 90.00 degrees
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
            • Else - Actions
        • Else - Actions
And the other Damage related variables come with the Damage Engine as well.

Lifesteal Crit is the name of the ability that your Hero learns. Obviously you can change the name of it in your own map. I based this ability on Storm Hammers since it has no effects (the effects are triggered).

You only need to create four variables yourself:
LC_Level (integer)
LC_Chance (real - array)
LC_Multiplier (real - array)
LC_Lifesteal (real - array)
 
Last edited:
Status
Not open for further replies.
Top