Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

change attack type of abilities?

Discussion in 'World Editor Help Zone' started by 311, Jun 1, 2020.

  1. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0
    Is there a way to make abilities do normal (or any other type) of damage instead of always spell damage?

    For example I want Bladestorm to deal Hero or normal damage, as I want it to be effected by armor.


    Also is there a way to find a units base damage? I assume no from the searching I have done, without using the damage detection system (as I don't understand it and wouldn't know how to implement it into my map) I did try though :p.

    I did find one trigger that almost works for finding my damage as when I use books of intellect and stuff, the base damage goes up which is good, however for whatever reason if I had claws of attack, it doesn't that, so it kind of ruins it :(.
     
  2. pr114

    pr114

    Joined:
    Mar 26, 2017
    Messages:
    188
    Resources:
    0
    Resources:
    0
    1.
    It cannot be set in object editor, but there are 2 possible workarounds;

    -Create a custom ability based on channel that mimicks Bladestorm, giving magic immunity and disabling other attacks/abilities. Then add a loop timer that deals normal damage in an area around the casting unit's position.
    -Add a trigger on 'UNIT_DAMAGED' with the condition being the Damage Source is a unit that is currently using Bladestorm (which can be tracked by variables). Then change event damage into the desired Damage type.

    2.
    Indeed you can only find the base damage + bonus damage derived from stats. Not item damage such as claws.
    The only way to find a unit's damage including bonus from items is to register its damage when it is attacking another unit. This can be done in a 'UNIT_DAMAGED' event, although the result will also include damage from dice rolls.
     
  3. hemmedo

    hemmedo

    Joined:
    Jun 13, 2008
    Messages:
    333
    Resources:
    0
    Resources:
    0
    If you don't wanna get drown in many technical stuff, then just learn to use Bribe's spell system (especially if you wanna use multiple custom spells in your map). It should be very easy to re-create a spell like bladestorm and you will also guarantee that it won't leak, it will have the best performance possible and be MUI.
     
  4. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0
    Where do I get unit damaged event? Under events the closest I see is "unit is attacked" If I do specific unit event, I can find "takes damage" but I don't see how I could use that as its an RPG type map where I am going to be killing 100s of different units.
    I am ok with the including dice rolls as I plan on making it no dice anyway, as I never understood how to get a min-max damage to what I want with dice rolls, so I just make a char always do 50-50 dmg for example.


    As far as bribes spell system I did just DL that, but ya that is like way to complicated for me lol, I couldn't even almost figure it out.
     
  5. pr114

    pr114

    Joined:
    Mar 26, 2017
    Messages:
    188
    Resources:
    0
    Resources:
    0
    In GUI there is only a EVENT_UNIT_DAMAGED which is not what you want, as it fired after armor is taken into account for damage calculation.

    The only way to use a damage event is a Custom Script with EVENT_PLAYER_UNIT_DAMAGING (firing before armor modification) as explained by Bribe in his topic about the Damage System.

    If you'd rather not use custom script, you're going to have to learn how to use DDS.

    Otherwise you could still create a custom ability that mimicks Bladestorm and deals the desired damage type. This solution would also be least performance intensive.
     
  6. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0
    K ill try to open Bribes damage system again, and see if I can find a way to understand it
     
  7. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0
    Nope no luck :(. I did however forget that Bladestorm makes you magic immune, which I don't want no matter what. So what I tried to do now is base my spell off immolate, then trigger the damage that way its not magic. however I cant get the Bladestorm animation to play, and I am not sure why. I added attack walk stand spin to animation names on the Immolation spell but that does nothing at all :(. The fields for effect/caster none have bladestorm as an option, I did put bladestorm in the buffs section (also does nothing)
    I tried to add the animation in triggers by having it add "attack walk stand spin" this will technically work, however if I move the animation stops, if I stop it does come back, but I would of course need it to stay on.

    dmg
    Events
    Time - Every 0.40 seconds of game time
    Conditions
    Actions
    Animation - Play Blademaster 0001 <gen>'s attack walk stand spin animation
    Unit - Cause bladestormcaster to damage circular area after 0.00 seconds of radius 300.00 at (Position of bladestormcaster), dealing 50.00 damage of attack type Hero and damage type Normal

    Thats what I have for the damage, trigger which turns on when turning on immolate.

    Also I would need to make sure I cant attack during bladestorm
     
  8. pr114

    pr114

    Joined:
    Mar 26, 2017
    Messages:
    188
    Resources:
    0
    Resources:
    0
    Immolate is a toggle ability whereas Bladestorm has a fixed duration, if that is what you want.
    If the magic immunity is not such a big issue, you might just base your ability off Bladestorm itself and change damage to 0.

    Otherwise, you might put a trigger on the Bladestorming unit that is active as long as Bladestorm is active, and each time the unit is issued an order, an animation effect is applied to the unit.
    (you might want to put a 0.01 second wait time there, as I'm not 100% sure if the animation may be cancelled if it follows the order immediately)

    As for disabling attack, you may have a dummy unit that casts silence on your unit for the duration of Bladestorm. For this silence ability, set 'Attacks Prevented' accordingly.
     
  9. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0
    ya I really dont want magic immunity no matter what, I tried adding a trigger during bladestorm removing magic immunity classification but that don't work.
    as far as the bladestorm effect during immolation I tried that even with doing it every .2 seconds, but if you click move it stops :(
     
  10. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,394
    Resources:
    0
    Resources:
    0
    What you can do is create a new ability based on Channel or maybe an Instant ability like Berserk.

    Then create a trigger that runs when A unit starts the effect of an ability with the Condition Ability being cast equal to our new ability.

    In the Actions for this trigger you want to set your heroes transparency to 0%. This will make the Hero's model "invisible". Then create a Dummy unit (or a Special Effect) using the model of the Blademaster and have this Dummy/Sfx play the Spin animation.

    Then turn on a Timer, one that runs every 0.01 seconds would give you the best results.

    In the Timer trigger (Using the Event Timer has expired) you will use SetUnitX/Y or Set Special Effect Position to constantly position the Dummy/Sfx on top of your Hero. Using this method won't interrupt the Spin animation.
    SetUnitX / Y problem
    The Wonderful World of Special effect Modifications!

    If you wish to prevent your Hero from casting spells/attacking while spinning, you can disable it's abilities with the Disable Ability action and add the Orc Burrow (Cargo Hold) ability to it for a disarming effect. You could also have a Dummy cast Drunken Haze on your Hero that is modified to disable attacking/spell casting (this could be dispelled though so I don't like this option).

    After X seconds, or if the Hero dies, turn off the Timer, destroy the dummy/sfx (hide them first as to prevent the death animation), and reset anything else that was changed.
     
    Last edited: Jun 4, 2020
  11. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,381
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    In Damage Engine it's as simple as:

    • Bladestorm as Physical
      • Events
        • Game - DamageModifierEvent becomes Equal to 1.00
      • Conditions
        • IsDamageSpell Equal to True
        • Unit Type of DamageEventSource Equal to Blademaster
      • Actions
        • Set DamageEventAttackT = ATTACK_TYPE_HERO
        • Set DamageEventDamageT = DAMAGE_TYPE_NORMAL
     
  12. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0

    you are my hero this worked :)
    your damage system isn't going to have a way to remove the magic immunity though right?
     
  13. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,381
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    You can try this but it isn't tested so I can't be sure:

    • Remove Invulnerability
      • Events
        • Unit - A unit starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Bladestorm
      • Actions
        • Unit - Make (Triggering unit) vulnerable


    You can add a "Wait" if the above doesn't work (just to test it).
     
  14. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0

    nope didn't work :(, even removing magic immunity classification dont work during this time :(
     
  15. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,381
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Well that sucks. Like the others said it's possible to get away with "hiding" the Blademaster if you want to base the ability off of immolation. You can then use a Special Effect and animate it with the Bladestorm animation and set its position to that of the Blademaster's every 0.03 seconds.
     
  16. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0

    I thought I had a good work around, was just going to make all abilities either do normal damage or "what I call magic damage" then for items/skills in my games I would just do triggers to give magic resist to similate the "magic damage" in my map

    That way I can use the damage engine to just do damage x80% for example if somebody has 80% magic resist. That way it can be similar to an RPG, where I have my physical damage, and "magic damage" like I want. My bladestorm even though "magic immune" working perfectly fine and look normal (that immolation no matter what, never looked good) and I can make all abilities require level 6 that way they are target-able and work :) however I ran into one issue, aoe spells, like flamestrike/blizzard, I am not sure why, but they will NOT damage the Blademaster during magic immune no matter what.

    I tested stormbolt/shadowstrike/Bladestorm all these I can get to hurt the Blademaster when he is doing his bladestorm so this is good as I don't want magic immunity
    I got all these to work just by making them do hero damage with damage system... then making them req level 6 so I can target them(otherwise I still get the immune message)

    Even though Bladestorm is an aoe spell, and works fine when want it to damage another Blademaster,(Which is good this is want I want)
    I don't get why Flamestrike/blizzard don't work
    I know blizzard/flamestrike are technically doing hero damage, as when my magic immunity falls off I die instantly (I made hero damage do 10000x damage just for testing purposes to make it easy to see if trigger worked)
     
  17. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,394
    Resources:
    0
    Resources:
    0
    I can post an example of a triggered bladestorm effect if you'd like
     
  18. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0
    sure, it would help a lot
    where he isn't able to attack / cast other spells? and Actually look likes hes spinning(Even when moving)

    also stuns stop him(and the animation) as I feel like with the immolation just so many things went wrong with it :(
     
  19. Uncle

    Uncle

    Joined:
    Aug 10, 2018
    Messages:
    2,394
    Resources:
    0
    Resources:
    0
    Is this spell intended to work for multiple units at the same time? It makes it a lot easier if it's only for a single unit.
     
  20. 311

    311

    Joined:
    May 12, 2019
    Messages:
    61
    Resources:
    0
    Resources:
    0
    umm I rather have it have multiple.
    As I planned to be able to pick the same class as other people, so the most would be 4 units though.