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

Mastering Spell

Status
Not open for further replies.
Level 5
Joined
Jul 31, 2011
Messages
103
Hi Hive, a user named DEE-BOO, created a system of mastering a spell by using it, every time you used it a dummy spell get a level, and when the dummy spell get the level limit the original spell gain a level.

Now i have this problem with the active spell work but:

* with the passive dont work how i can know when the passive ability is used and add the level to the dummy

* the dummy start in 0 but, when the original spell level up, the dummy set to 1

* the original spell dont get level up after lv 3

the map and the trigger:

  • Training
    • Acontecimientos
      • Unidad - A unit Inicia el efecto de una habilidad
    • Condiciones
    • Acciones
      • Set Spell = (Ability being cast)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • Si: Condiciones
          • Spell Igual a Abanico de cuchillas
        • Entonces: Acciones
          • Set Dummy_Spell = Dummy Abanico
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • (Level of Dummy_Spell for (Casting unit)) Igual a 0
            • Entonces: Acciones
              • Unidad - Add Dummy_Spell to (Casting unit)
            • Otros: Acciones
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • Si: Condiciones
                  • (Level of Dummy_Spell for (Casting unit)) Mayor que 0
                • Entonces: Acciones
                  • Unidad - Increase level of Dummy_Spell for (Casting unit)
                  • Partida - Display to (All players) the text: (String((Level of Dummy Abanico for (Casting unit))))
                • Otros: Acciones
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • Si: Condiciones
              • (Level of Dummy_Spell for (Casting unit)) Igual a Spell_Limit
            • Entonces: Acciones
              • Efecto especial - Create a special effect attached to the origin of (Casting unit) using Abilities\Spells\Other\Levelup\LevelupCaster.mdl
              • Efecto especial - Destroy (Last created special effect)
              • Unidad - Increase level of Spell for (Casting unit)
              • Unidad - Set level of Dummy Abanico for (Casting unit) to 1
            • Otros: Acciones
        • Otros: Acciones

In the other trigger is a variable name Spell_Limit, set as 5
 

Attachments

  • Master.w3x
    13.5 KB · Views: 44
Last edited:
Level 8
Joined
Jan 28, 2016
Messages
486
I had a go at this but if I misunderstood anything or if you want me to explain something I did, just ask. I'm not sure what you meant by "when the passive ability is used" part so I skipped it for now. As for the second problem, I made it so on the very first time you cast the spell it adds the dummy spell. Also I tried your map and it made it to lvl 5 so I don't know, maybe it was something else in your original map.

Anyway try the map and again, just let me know if you need anything.

  • Training
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fan of Knives
    • Actions
      • Set Spell = (Ability being cast)
      • Set Dummy_Spell = Evasion
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dummy_Spell for (Triggering unit)) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Dummy_Spell for (Triggering unit)) Equal to Spell_Limit
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Spell for (Triggering unit)) Less than Spell_Limit
                • Then - Actions
                  • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\Levelup\LevelupCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Increase level of Spell for (Triggering unit)
                  • Unit - Set level of Dummy_Spell for (Triggering unit) to 1
                  • Game - Display to (All players) the text: (String((Level of Dummy_Spell for (Triggering unit))))
                • Else - Actions
            • Else - Actions
              • Unit - Increase level of Dummy_Spell for (Triggering unit)
              • Game - Display to (All players) the text: (String((Level of Dummy_Spell for (Triggering unit))))
        • Else - Actions
          • Unit - Add Dummy_Spell to (Triggering unit)
          • Game - Display to (All players) the text: (String((Level of Dummy_Spell for (Triggering unit))))
 

Attachments

  • Master (Edit).w3x
    14 KB · Views: 42
Level 5
Joined
Jul 31, 2011
Messages
103
I had a go at this but if I misunderstood anything or if you want me to explain something I did, just ask. I'm not sure what you meant by "when the passive ability is used" part so I skipped it for now. As for the second problem, I made it so on the very first time you cast the spell it adds the dummy spell. Also I tried your map and it made it to lvl 5 so I don't know, maybe it was something else in your original map.

Anyway try the map and again, just let me know if you need anything.

  • Training
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fan of Knives
    • Actions
      • Set Spell = (Ability being cast)
      • Set Dummy_Spell = Evasion
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Dummy_Spell for (Triggering unit)) Greater than 0
        • Then - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Dummy_Spell for (Triggering unit)) Equal to Spell_Limit
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Level of Spell for (Triggering unit)) Less than Spell_Limit
                • Then - Actions
                  • Special Effect - Create a special effect attached to the origin of (Triggering unit) using Abilities\Spells\Other\Levelup\LevelupCaster.mdl
                  • Special Effect - Destroy (Last created special effect)
                  • Unit - Increase level of Spell for (Triggering unit)
                  • Unit - Set level of Dummy_Spell for (Triggering unit) to 1
                  • Game - Display to (All players) the text: (String((Level of Dummy_Spell for (Triggering unit))))
                • Else - Actions
            • Else - Actions
              • Unit - Increase level of Dummy_Spell for (Triggering unit)
              • Game - Display to (All players) the text: (String((Level of Dummy_Spell for (Triggering unit))))
        • Else - Actions
          • Unit - Add Dummy_Spell to (Triggering unit)
          • Game - Display to (All players) the text: (String((Level of Dummy_Spell for (Triggering unit))))


The system will work like this:

You use a spell for example blink you cast the spell and a dummy spell get a level, when you use 5 five times (spee_limit value) the blink spell get a level, but how you can get level up to a passive spell like thorn aura, critical strike, aura of regen, because you dont cast the spell, the spell is every time actived.

I see you map and happend this:

The first level up of the spell work by using the spell 6 times, and the next level work with 5 times used, i think is better do the system with integer variables, by other side evasion appaer when you use the fan knives, i want the passive spell upgrade alone,that's why i have the dumy for the original spell .

Something like this

https://kn3.net/60B4F37FA53PNG.html
A53.png]


to set posible return the dummy for 0 and start counting againg the spell_limit, this because i see that cant set the dummy 0 again.

i will add another system to get a spell by getting a level, something like this:

lv 10: first spell (active)
lv 30: Second spell (active)
lv 50 : Third Spell (active)

i have another idea and is: buy item to upgrade the level of the passive spell

I only want to level up the spell using it a number times, working this for active spell and passive spell
 
Last edited:
Level 8
Joined
Jan 28, 2016
Messages
486
The system will work like this:

You use a spell for example blink you cast the spell and a dummy spell get a level, when you use 5 five times (spee_limit value) the blink spell get a level, but how you can get level up to a passive spell like thorn aura, critical strike, aura of regen, because you dont cast the spell, the spell is every time actived.

As far as I know, it would be (almost) impossible to level up passive abilities like the ones you said because you can't detect when they go off. However if you use a DDS to trigger the effects of those abilities, then it should be possible. It might take a bit more work but it's possible. For example you could create a triggered crit with a DDS and every time you pull off a crit, you could increase the level.

I see you map and happend this:

The first level up of the spell work by using the spell 6 times, and the next level work with 5 times used, i think is better do the system with integer variables, by other side evasion appaer when you use the fan knives, i want the passive spell upgrade alone,that's why i have the dumy for the original spell .

Something like this

https://kn3.net/60B4F37FA53PNG.html
A53.png]


to set posible return the dummy for 0 and start counting againg the spell_limit, this because i see that cant set the dummy 0 again.

Yeah I just realised that I made it level up on the "6th" level instead of the 5th but that's an easy fix. Did you want it to go from 0 to 5 or from 1 to 5? It might be better to redo this with integer variables, as you said, but if you need that passive for some reason (i.e.: it gives bonus damage) then it might be better to stick to how it is. Up to you really. By the way, I used evasion to see and make sure the dummy spell was being leveled up. Unfortunately you can't set abilities to 0 but you can remove them and then add them again later.

i will add another system to get a spell by getting a level, something like this:

lv 10: first spell (active)
lv 30: Second spell (active)
lv 50 : Third Spell (active)

i have another idea and is: buy item to upgrade the level of the passive spell

I only want to level up the spell using it a number times, working this for active spell and passive spell

I see, fair enough. This might help.
 
Level 12
Joined
Nov 3, 2013
Messages
989
when you use 5 five times (spee_limit value) the blink spell get a level, but how you can get level up to a passive spell like thorn aura, critical strike, aura of regen, because you dont cast the spell, the spell is every time actived.

Trigger the critical strike with DDS, now you can increase the value every time you crit, same thing with thorns aura, but you'll also need to use unit groups, unit indexer, hashtable, or similar.

As for the regeneration aura make a unit group of unit's with the aura buff that don't have full health and simply calculate how much health it will regenerate per second

or even better if you're making the aura as a trigger, you'll know exactly how much it's healing so you don't have to take time into account.



And by the way, as a side note, what's the point of the dummy units and abilities? Shouldn't you just use a variable array or hashtable to store integer values? Different abilities have different casting time, mana cost, require unit targets, etc so they should have their "experience" gain tweaked per cast, attack, reflect, duration, etc.

A spell like blink which you can use anytime anywhere and usually has a pretty low cooldown and mana cost should get little exp each time you use it while let's say storm bolt which is expensive and require an enemy unit target to cast should get more exp for each use, right?
 
Level 5
Joined
Jul 31, 2011
Messages
103
hi i now get help for a friend and make me the system wish hashtables, thanks for the help anyway, and for the level up, is like you say y will create a system for set the exp requeriments acording the spell type
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,180
* with the passive dont work how i can know when the passive ability is used and add the level to the dummy
Passives never get used. By nature of their name they are passive and so continuously work.

You can try to detect when a conditional passive procs or try to measure how much work a passive is doing. For example with an attack damage detection system you may be able to reasonably reliably detect evasion procs which can be used to give ability experience. For auras one can use a product of number of units affected over time (eg an aura will need X unit seconds per level).

For passives you may also use more generic events which are not directly related to the working of the passive. For example critical strike could level up after 100 attack damage events are detected.

Instead of using dummy ability levels to track ability experience, hashtables can be used. Each ability experience value is mapped to the unit handle id at a unique key. If the hashtable is special purpose the unique key could be the ability id of the ability the experience is for. Experience could either be a real (easier calculations) or integer (more exact) value. Once enough experience has accumulated you could level up the ability 1 level. Experience could be an accumulator between levels or it could be a total with a conversion function to get ability level.
 
Status
Not open for further replies.
Top