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

My Spell Request

Status
Not open for further replies.
Level 13
Joined
Aug 19, 2014
Messages
1,111
Hello guys I need a passive ability and spells for a unit.

Berserker Rage (Passive)

- For each nearby enemy, the unit will gain +1 bonus damage.
(+1 dmg x nearby enemy unit) When the enemy is in the ''Accquisition Range''
of the unit, only then will the unit gain bonus damage. When the enemy
leaves the ''Accquisition Range'' of the unit, the bonus damage will be gone.

- Also when the unit is low health, it will gain bonus attack speed. (So maybe a dummy will cast a bloodlust with no bonus damage on the unit when its low
health
 
Last edited:
Level 13
Joined
Aug 19, 2014
Messages
1,111
Tnx guys, I can wait and its not rush guys.

Edit: Its only a unit ability guys not a hero, so theres no need for lvls.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well... here you go.

The taunt is working... kinda

I used my Effect Over Time System and a snippet of delayed orders to make re-ordering.

You require 2 things to polish it.
1. Use a preload system:
I made an ability that gives armor for 1 for each level. The ability currently has 25 levels so it can increase armor by 25 at max (but will set it to 25 if requested higher) but you can increase it to whatever you want.

2. Create your own basic attack:
When ordering the taunted units to do something else, they reset their order, stopping their attack. This means that spamming other orders will not let the units attack but will not let them do that order either.

The first can simply be done by you if you use a preload unit.
The second one is really much harder and should only be done if you really want it.
 

Attachments

  • Taunt.w3x
    50.1 KB · Views: 63
Level 13
Joined
Aug 19, 2014
Messages
1,111
Well... here you go.

The taunt is working... kinda

I used my Effect Over Time System and a snippet of delayed orders to make re-ordering.

You require 2 things to polish it.
1. Use a preload system:
I made an ability that gives armor for 1 for each level. The ability currently has 25 levels so it can increase armor by 25 at max (but will set it to 25 if requested higher) but you can increase it to whatever you want.

2. Create your own basic attack:
When ordering the taunted units to do something else, they reset their order, stopping their attack. This means that spamming other orders will not let the units attack but will not let them do that order either.

The first can simply be done by you if you use a preload unit.
The second one is really much harder and should only be done if you really want it.

Tnx dude Ill check it out now.

Edit: It works ok but I noticed something, enemy units that are taunted keep chasing the hero everywhere he goes when the taunt effect is gone. Its like there really mad at the hero, they should go back to their position right or attack nearby enemies when the taunt effect is gone and the hero is far away. I tested it for neutrals and it goes well they go back or attack nearby units when the hero is far away, as for the player units I guess they'll just have to order their units not to keep chasing them. So its ok for me good job dude, tnx for doing my request :thumbs_up:
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
If you want to do that, you just have to order them to stop after the taunt has finished.
So you make a new trigger that runs when the effect has expired (destroyed because that one also catches dispells) and issue the target to stop.
The target ofcourse still has the buff when that event fires (unless it is dispelled) so you have to put a small wait in it:
  • Taunt Finish
    • Events
      • Game - EOT_Event_An_EOT_Is_Destroyed becomes Equal to 0.00
    • Conditions
    • Actions
      • Set TempAbility = Taunt
      • Custom script: set udg_TempInteger = udg_TempAbility
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EOT_Param_Type Equal to TempInteger
          • EOT_Param_Subtype Equal to 0
        • Then - Actions
          • Custom script: call IssueImmediateOrderDelayed(udg_EOT_Param_Target, "stop", 0.01)
        • Else - Actions
I found something stupid that I have done in the map that I uploaded:
I set all the order types to 0 which still works on target orders but on no other order.
Go to the Delayed Order Configuration trigger and make all the integers in that trigger to something else. Just make sure that none of them are the same any more.
  • Delayed Order Configuration
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set DelayedOrder_Hashtable = (Last created hashtable)
      • Set DelayedOrder_TypeNoTarget = 0
      • Set DelayedOrder_TypePointTarget = 1
      • Set DelayedOrder_TypeTarget = 2
      • Set DelayedOrder_TypeTrain = 3
 
Level 13
Joined
Aug 19, 2014
Messages
1,111
Hello guys I have another spell request, make it vjass and MUI if that is easy for you and if it is better :thumbs_up:

Note: This spell are for heroes that are trained in the altar, all of the spells have 3 lvl only.

Burrow Strike (like the 1st skill of sandking in dota)

- its like this spell http://www.hiveworkshop.com/forums/...9749/?prev=search=burrow%20strike&d=list&r=20 it said needs fix so I didn't use it.

- but I want my version a bit different, the hero actually burrows himself to the ground ( no part of the hero can be seen when he burrows ) After that he moves towards the target location in a normal speed and in straight direction. Enemies that he comes through will be implaled stunning and damaging them (like the 1st skill of the Crypt Lord and even when theres no enemy there should be spikes) The hero then unburrows himself from the ground upon reaching the target location.

Acid spit (target area aoe)

- the hero spits an acid (projectile like an artillery) when the acid projectile lands the ground, there will be an acidic explosion and the area will have an acid effect (like the flame strike there fires all over the place) Units in the area will take damage over time, slowed and have their armor reduced.

- Im going to use this spell for the spell slam of the hero ''Crypt Lord'' where he actually jumps. So in that case maybe make the projectile comes out on top of his head and it will be like he jumps and spit while on mid air.

No rush again tnx in advance......
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
Well... because the Berserker Rage hasn't been done yet, I think it wouldn't hurt to make it myself too ;)

It has a maximum of 24 damage (you can increase it in the object editor) and it increases attack speed by 50% when the hero falls below 25% health until 5 seconds after the hero regenerated to above 25%.
The attack speed can be changed in the object editor and the health percentage in the trigger "Berserker Rage Interval".

Burrow Strike needs more explaining... for me.
Acid Spit... is kinda a lot of work so I won't do that one :D
 

Attachments

  • jonbon29.w3x
    54.3 KB · Views: 62
Level 13
Joined
Aug 19, 2014
Messages
1,111
Well... because the Berserker Rage hasn't been done yet, I think it wouldn't hurt to make it myself too ;)

It has a maximum of 24 damage (you can increase it in the object editor) and it increases attack speed by 50% when the hero falls below 25% health until 5 seconds after the hero regenerated to above 25%.
The attack speed can be changed in the object editor and the health percentage in the trigger "Berserker Rage Interval".

Burrow Strike needs more explaining... for me.
Acid Spit... is kinda a lot of work so I won't do that one :D

Tnx wietol, I'll edit the burrow strike request.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
jonbon29 said:
ts a passive spell and I call it ''Natures Blessing''

Its a passive spell for a whole race and for units only, units are trainable in the buildings too (this is just an idea for where should I use the spell)

Ok now for the spell

- Whenever the unit with a ''Natures Blessing'' passive ability, drops his health to 25% he will be healed by 1% of his max health for 10 seconds.

-The ability also has cooldown of 1 minute, so the passive ability wont work even if the units health drop to 25%.

Could you make it vJass? But if it wont be easy for you GUI will do.

Edit: Wietlol told me these, maybe this might help.

Use a DDS.

When a unit takes damage (only way how you should lower their HP), check if that unit has ability (...).
If so, check if the health is lower than 0.25 X max health.

Then create the effect... you can use my EOT System to do that... you should know how to by now ;)

Also create a timer and save that timer in a hashtable under the key of the unit and 0.
(You can get the key of the unit by a custom script "Custom Script: set udg_MyIntegerVariable = GetHandleId(udg_MyUnitVariable)".)

before you start the effect, check if that timer exist.

When that timer expires, you will destroy it.
(You need JASS for that last one.)

Feel free to ask questions.

Damn, I thought it was 20% not 25%. Oh well just edit this part
JASS:
if (currentHP/maxHP < 0.2 and GetUnitAbilityLevel(u, passiveId) > 0) then

and make it
JASS:
if (currentHP/maxHP < 0.25 and GetUnitAbilityLevel(u, passiveId) > 0) then

Also, I don't know what is EOT system.
And I didn't use Hashtable but an Index System.
 

Attachments

  • Nature Blessing.w3x
    20.4 KB · Views: 55
Level 24
Joined
Aug 1, 2013
Messages
4,657
JASS:
    if (GetUnitAbilityLevel(u, blessingBuffId) > 0) then  //IF unit has buff
        call SetWidgetLife(u, GetWidgetLife(u) + regen)
        //remove unit from group <<<<<<<<<<<<<<<<<<<<<<<
    endif

Replace the damage detection with one from the spell section or at least a plain damage detection initializer:
JASS:
globals
    hashtable           udg_DDS_Hashtable                       = InitHashtable()
    integer             udg_DDS_Ability_Cheat_Death             = 'A002'
    real                udg_DDS_Reset_Interval                  = 300
    trigger             udg_DDS_Trigger_On_Damage               = null
endglobals



function DDS_Remove_Standard_Damage takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local integer id = GetHandleId(t)
    local unit u = LoadUnitHandle(udg_DDS_Hashtable, id, 0)
    local real health = LoadReal(udg_DDS_Hashtable, id, 1)
    
    call UnitRemoveAbility(u, udg_DDS_Ability_Cheat_Death)
    call SetWidgetLife(u, health)
    
    call DestroyTimer(t)
    call FlushChildHashtable(udg_DDS_Hashtable, id)
    call FlushChildHashtable(udg_DDS_Hashtable, GetHandleId(u))
    set t = null
    set u = null
endfunction

function DDS_Taking_Damage takes nothing returns boolean
    local unit source = GetEventDamageSource()
    local unit target = GetTriggerUnit()
    local boolean timerNotExpired
    local integer id
    local real health
    local timer t
    
    if GetEventDamage() == 0. then
        return false
    endif
    
    //Place event here.
    
    set t = LoadTimerHandle(udg_DDS_Hashtable, GetHandleId(target), 0)
    if t != null then
        set timerNotExpired = true
        call UnitRemoveAbility(target, udg_DDS_Ability_Cheat_Death)
        set health = LoadReal(udg_DDS_Hashtable, GetHandleId(t), 1)
        call SetWidgetLife(target, health)
        call DestroyTimer(t)
        call FlushChildHashtable(udg_DDS_Hashtable, id)
        call FlushChildHashtable(udg_DDS_Hashtable, GetHandleId(target))
    endif
    
    set t = CreateTimer()
    call TimerStart(t, 0, false, function DDS_Remove_Standard_Damage)
    set id = GetHandleId(t)
    set health = GetWidgetLife(target)
    call SaveUnitHandle(udg_DDS_Hashtable, id, 0, target)
    call SaveReal(udg_DDS_Hashtable, id, 1, health)
    call SaveTimerHandle(udg_DDS_Hashtable, GetHandleId(target), 0, t)
    call UnitAddAbility(target, udg_DDS_Ability_Cheat_Death)
    
    set source = null
    set target = null
    set t = null
    return false
endfunction

function DDS_Add_Unit takes nothing returns boolean
    call TriggerRegisterUnitEvent(udg_DDS_Trigger_On_Damage, GetFilterUnit(), EVENT_UNIT_DAMAGED)
    return false
endfunction

function DDS_Init_Damage_System takes nothing returns boolean
    local group g = CreateGroup()
    
    call DestroyTrigger(udg_DDS_Trigger_On_Damage)
    set udg_DDS_Trigger_On_Damage = CreateTrigger()
    
    call GroupEnumUnitsInRect(g, GetWorldBounds(), Filter(function DDS_Add_Unit))
    call DestroyGroup(g)
    set g = null
    
    call TriggerAddCondition(udg_DDS_Trigger_On_Damage, Filter(function DDS_Taking_Damage))
    
    return false
endfunction

function DDS_System_Initialize takes nothing returns boolean
    local region rectRegion = CreateRegion()
    local trigger t = CreateTrigger()
    
    call TriggerRegisterTimerEvent(t, udg_DDS_Reset_Interval, true)
    call TriggerAddCondition(t, Filter(function DDS_Init_Damage_System))
    call DDS_Init_Damage_System()
    
    set t = CreateTrigger()
    call RegionAddRect(rectRegion, GetWorldBounds())
    call TriggerRegisterEnterRegion(t, rectRegion, Filter(function DDS_Add_Unit))
    
    set rectRegion = null
    set t = null
    call DestroyTrigger(gg_trg_ADE_DDS)
    return false
endfunction

function InitTrig_ADE_DDS takes nothing returns nothing
    set gg_trg_ADE_DDS = CreateTrigger()
    call TriggerAddCondition(gg_trg_ADE_DDS, Filter(function DDS_System_Initialize))
endfunction

Also note that all other spells based of (including the standard) rejuvenation do not work 100% any more because of buffs of the same parent ability bug.
That is why I suggested my EOT (Effect Over Time) System.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
JASS:
    if (GetUnitAbilityLevel(u, blessingBuffId) > 0) then  //IF unit has buff
        call SetWidgetLife(u, GetWidgetLife(u) + regen)
        //remove unit from group <<<<<<<<<<<<<<<<<<<<<<<
    endif

No you will not remove if from the group since it will still detect if that unit's spell is on cooldown.

Replace the damage detection with one from the spell section or at least a plain damage detection initializer:

Yeah jonbon, feel free to use your own Damage Detection System but what is not plain about my damage detection initializer?
Also note that all other spells based of (including the standard) rejuvenation do not work 100% any more because of buffs of the same parent ability bug.
That is why I suggested my EOT (Effect Over Time) System.

If those units will use another Rejuvenation Based spell, then use the EOT system. However I did not want to make it complicated and jonbon did not mention to not use the Rejevenation Ability so I used it.

Note, units having Nature's Blessing will also have conflict if it has Wind Walk. If there ever is a conflict, just change the base ability to another instant ability like Berserk or Fan of Knives.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
No you will not remove if from the group since it will still detect if that unit's spell is on cooldown.
But you dont check if the unit is in the group.
The group is only for regenerating health.
At least, that is how you use it.

Yeah jonbon, feel free to use your own Damage Detection System but what is not plain about my damage detection initializer?
The one I posted is the minimum requirement for every single DDS.
If there is anyone that does not have stuff similar to that, it cannot be approved because it has serious leaks.
Yours is specificly made for the units who have that ability.
That means that you have the event on that unit as well as the same event on a DDS if applied.
Having redundant things like that is really bad for the map.
Also, you leak dead units' events.
When a unit dies, the event still exist.

If those units will use another Rejuvenation Based spell, then use the EOT system. However I did not want to make it complicated and jonbon did not mention to not use the Rejevenation Ability so I used it.
Fair enough.
But it is not only if those units use Rejuvenation... it is if those units are the target of rejuvenation... where the caster doesnt matter.

Also, change all TriggerAddAction() into TriggerAddCondition().
Conditions are better than actions and do pretty much the same.
Between a Condition() and Filter()... I don't know the difference.
 
Level 13
Joined
Aug 19, 2014
Messages
1,111
Tnx for concerning on my spell request guys, as I have read you're comments I can say the spell could still be improve. Though I'm happy enough someone finished my spell, I might need some help in fixing it.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
@Weitlol
Check the trigger Add Passive Ability and the unit group is still used.
I still don't get it why the DDS is bad though beside from the Dead units still in Events. I did not focused much on the DDS because I assumed jonbon has a better one.

Can you prove the TriggerAddCondition part?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Actually... where do you call that trigger?

TriggerAddCondition() is tested with performance checks... by someone else.
I don't know where that thread was but this one might have the same information.

I'll be taking a better look at the triggers this afternoon...
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
Actually... conditions also make a new thread...
Threads never run simultaneously... except for TriggerSleepAction()... if you call that running.
Executing a condition is just faster than an action.
The difference is definately noticable when having a huge map.
 
Level 22
Joined
Feb 6, 2014
Messages
2,466
Yep.

It took me some time to understand... and even now I don't.
However. People who use JASS years longer than I have said it is... and everyone that uses JASS that long sais it so I believe them.

Ok. Hey Weitlol you looked like the kind of guy that could answer my question so here goes, Do you know a System that measures the time it takes for a Trigger or Function to run?
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
:/

I do know what actions you need but never used them before...
call Preload()
All actions that start with Preload are meant for stuff like that.
However you should ask someone who is more experienced with that.

(That is how the efficiency tests are done.)
 
Status
Not open for further replies.
Top