• 🏆 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] Talents/Glyphs

Status
Not open for further replies.
Level 9
Joined
Dec 16, 2017
Messages
367
Hello guys, i decided to make another step in my map, and i want to make talents/glyphs that can be researched for the heroes, and they improve the spells of the heroes in a certain way(or even the heroes with some stats).
First i have to mention that, each hero can be picked just once, after that is removed, and each hero has a Class Hall building where he can research them and each hero has his unique spells, spells are not shared between them.
My question is, what is the best way to trigger talents/glyphs?
-shall they be based of upgrades firsts?
-what is the best way to do them with triggers, make a separate trigger for the talent/glyph or for the spell you want to improve you make an If/Then/Else where you check if the research was researched and after that you apply the new effects to the spell?

Also i have this encounter, i am trying to give a talent to a spell that is based of feral spirits spell, and it summons by itself, how can i add the abbility to the summoned unit if he spawns by default from the spell and it's not triggered? I tried summoned unit, but it doesn't trigger it to the unit.
  • Feral Spirit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feral Spirit (AKAMA)
    • Actions
      • Player - Set the current research level of Feral Spirit STATS to (Level of Feral Spirit (AKAMA) for (Triggering unit)) for (Triggering player)
      • Player - Set the current research level of Feral Spirit STATS2 to (Level of Feral Spirit (AKAMA) for (Triggering unit)) for (Triggering player)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Researched tech-type) Equal to Ghost Wolf (Akama Talent)
        • Then - Actions
          • Unit - Add Feral Spirits Evasion (Akama-Talent) to (Triggering unit)
          • Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
        • Else - Actions
 
Level 13
Joined
Nov 4, 2006
Messages
1,239
your condition "(Researched tech-type) Equal to Ghost Wolf (Akama Talent)" does not trigger because your action refers to the ability usage


you can use the action "unit enters playable Map area" and then use an integer comparison to determine the research level and add the ability to the unit if applicable
 
Level 9
Joined
Dec 16, 2017
Messages
367
Ok, so i've made something like this.

  • Feral Spirit
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Feral Spirit (AKAMA)
    • Actions
      • Player - Set the current research level of Feral Spirit STATS to (Level of Feral Spirit (AKAMA) for (Triggering unit)) for (Triggering player)
      • Player - Set the current research level of Feral Spirit STATS2 to (Level of Feral Spirit (AKAMA) for (Triggering unit)) for (Triggering player)

and

  • Ghost Wolf Talent
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Entering unit)) Equal to Feral Spirit (Akama)
          • (Current research level of Ghost Wolf (Akama Talent) for (Owner of (Triggering unit))) Greater than or equal to 1
        • Then - Actions
          • Animation - Change (Triggering unit)'s vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
          • Unit - Add Feral Spirits Evasion (Akama-Talent) to (Triggering unit)
        • Else - Actions
 
Last edited:

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,677
You can also use the Berserk upgrade if you want to update new and existing wolves. That may end up being more of a pain though. Alternatively, you can Pick through every existing wolf and update them accordingly upon researching the upgrade.

Anyway, it sounds like you have the right idea. It really depends on the situation but you should take advantage of:

If Then Else --- Useful for most changes.

Turn off old trigger, Turn on new trigger --- Useful for big changes like a complete redesign of a spell.

Updating existing Variables --- Want more Area of Effect for your custom spell? Increase it's AoE variable which is used in it's Pick Every Unit function.

If you're on the newer versions you have access to the Ability fields which give you a lot of control as well. You can directly modify Mana Cost, Cooldown, Ability-specific fields like Damage, Cast Range, Area of Effect, etc...
 
Level 9
Joined
Dec 16, 2017
Messages
367
I use 1.28.5 patch, thanks for the infos!
Now i have another dilemma xD

My map has 5 players, i have some items that have % to give stats per attack/or when you ar attacked, how can i make them give stats to each player? like red has the item, to give the stats only to red, and so on, because now, with the triggers i have below, it still give's the stats to the last player that took the item(if 2 players have the item at the same time).

  • DASItem
    • Events
      • Unit - A unit Acquires an item
    • Conditions
      • (Item-type of (Item being manipulated)) Equal to |c0000FF00Damage|r |c00FF7F00Armor|r Set [|cffffcc00Level 2|r]
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Hero manipulating item)) Equal to Player 1 (Red)
        • Then - Actions
          • Set DAS_Owner[1] = (Hero manipulating item)
          • Set DAS_Player[1] = (Player(1))
          • Set DAS_Attacking[1] = (Attacking unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Hero manipulating item)) Equal to Player 2 (Blue)
        • Then - Actions
          • Set DAS_Owner[2] = (Hero manipulating item)
          • Set DAS_Player[2] = (Player(2))
          • Set DAS_Attacking[2] = (Attacking unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Hero manipulating item)) Equal to Player 3 (Teal)
        • Then - Actions
          • Set DAS_Owner[3] = (Hero manipulating item)
          • Set DAS_Player[3] = (Player(3))
          • Set DAS_Attacking[3] = (Attacking unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Hero manipulating item)) Equal to Player 4 (Purple)
        • Then - Actions
          • Set DAS_Owner[4] = (Hero manipulating item)
          • Set DAS_Player[4] = (Player(4))
          • Set DAS_Attacking[4] = (Attacking unit)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Hero manipulating item)) Equal to Player 5 (Yellow)
        • Then - Actions
          • Set DAS_Owner[5] = (Hero manipulating item)
          • Set DAS_Player[5] = (Player(5))
          • Set DAS_Attacking[5] = (Attacking unit)
        • Else - Actions
  • DASEffect
    • Events
      • Unit - A unit Is attacked
    • Conditions
    • Actions
      • Set DAS_Proc[(Player number of (Owner of (Attacking unit)))] = (Random integer number between 1 and 100)
      • Set DAS_Attacking[(Player number of (Owner of (Attacking unit)))] = (Attacking unit)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (DAS_Attacking[(Player number of (Owner of (Attacking unit)))] has an item of type |c0000FF00Damage|r |c00FF7F00Armor|r Set [|cffffcc00Level 2|r]) Equal to True
          • ((Attacked unit) belongs to an ally of DAS_Player[(Player number of (Owner of (Attacking unit)))]) Equal to False
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • DAS_Proc[(Player number of (Owner of (Attacking unit)))] Equal to 1
            • Then - Actions
              • Hero - Modify Agility of DAS_Owner[(Player number of (Owner of (Attacking unit)))]: Add 1
              • Special Effect - Create a special effect attached to the origin of DAS_Owner[(Player number of (Owner of (Attacking unit)))] using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
              • Special Effect - Destroy (Last created special effect)
            • Else - Actions
        • Else - Actions
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,677
So you can delete the DASItem trigger because that's not doing anything (also, why not use Player number there? You don't need to check each individual player). And you can make DAS_Proc and DAS_Attacking into non-array variables since that Array isn't doing anything either.

Anyway, this is all you really need to do:
  • DASEffect
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has an item of type YourItem) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacked unit) belongs to an enemy of (Owner of (Attacking unit)).) Equal to True
          • (Random integer number between 1 and 100) Equal to 1
        • Then - Actions
          • Hero - Modify Agility of (Attacking unit): Add 1.
          • Special Effect - Create a special effect attached to the origin of (Attacking unit) using Abilities\Spells\Items\AIlm\AIlmTarget.mdl
          • Special Effect - Destroy (Last created special effect)
        • Else - Actions
Note that using the "A unit is attacked" Event is easily exploitable. You can cancel the attack and the actions will still happen. You really need to use a Damage Engine for this sort of thing.
 
Last edited:
Level 9
Joined
Dec 16, 2017
Messages
367
And this way it will work for each player? Even if they don't have array variables?
I am not so good with the Damage Engine, and as i know, the last version is for reforged.
 

Uncle

Warcraft Moderator
Level 65
Joined
Aug 10, 2018
Messages
6,677
Yup, it's a very basic trigger. There's nothing you need to keep track of over time so everything can be handled with good old fashioned Events/Event Responses.

Arrays are meant for more complex stuff like Indexing (Unit Indexing, Dynamic Indexing, Looping over Arrays, etc) or keeping track of Player data using the Player Number as the Index-which you were doing but it was unnecessary in this case.
 
Last edited:
Status
Not open for further replies.
Top