1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Seek unity between the elements in the 22nd Terraining Contest Poll.
    Dismiss Notice
  3. Seize the moment! The 18th Mini Mapping Contest has commenced.
    Dismiss Notice
  4. The heavens smile on the old faithful. The 16th Techtree Contest has begun.
    Dismiss Notice
  5. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Damage Engine v0.A.2

Submitted by aznricepuff
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.

Damage Engine



By: aznricepuff



Version: 0.A.2

Damage Engine is a damage detection and manipulation system. It also provides functionality for dealing triggered damage and using custom damage types.

As of v0.A.0 it also includes Heal Engine: an optional module for dealing with triggered
healing events.

Open the Demo Map in WE to view the system code and documentation.

Requires
  • jasshelper 0.9.Z.0+
  • Object Merger (by grimoire)
  • Table (by Vexorian)
  • TimerUtils (by Vexorian)
  • TreeMap

Changelog
For the full changelog refer to the demo map.

Keywords:
damage detection, damage manipulation, triggered damage, healing manipulation, triggered healing
Contents

Damage Engine v0.A.2 (Map)

Reviews
Moderator
18 October 2011 Bribe - This is deprecated. The code is superfluous compared to what it could be. GUI Damage Engine does this better, and vJass users can take advantage of our superior vJass damage modifying systems.
  1. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    I think you should stop bumping this :p
    Moderators will check it in time...
    Btw nice system you got here ^^
     
  2. WraithSeeker

    WraithSeeker

    Joined:
    Nov 10, 2006
    Messages:
    175
    Resources:
    0
    Resources:
    0
    It seems similar to Dusk's IDDS

    The other optional ones are here and here
     
  3. aznricepuff

    aznricepuff

    Joined:
    Feb 22, 2006
    Messages:
    749
    Resources:
    4
    Maps:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    4
    Never used IDDS and never even bothered to look at the code until now (same for the other two scripts). But from my 5 seconds of glancing at the code for IDDS (i.e. scrolling down while reading random lines), it doesn't seem very similar to my system. It's not very object oriented, and that's the main point of Damage Engine.
     
  4. bigapple90

    bigapple90

    Joined:
    Aug 2, 2008
    Messages:
    366
    Resources:
    65
    Icons:
    63
    Skins:
    1
    Spells:
    1
    Resources:
    65
    I noticed that when you enable the damage display; the unit who deals damage has the number float over its head. Is there a way I can change it to show over the head of the damaged unit? This code is too complex for me to edit :p

    Also, I know this system is awesome but what can I remove so that I just have the damage numbers appear when a unit is attacked?
     
    Last edited: Aug 2, 2009
  5. aznricepuff

    aznricepuff

    Joined:
    Feb 22, 2006
    Messages:
    749
    Resources:
    4
    Maps:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    4
    You just need the triggers in the folder titled 'System'. Anything that's in between a comment that says "Example code" and another one that says "End example code" you can remove.

    For the damage display thing, there's a line of code inside the static method DamageEntity.onUnitFinalDamaged that calls the function CreateTT(). One of the parameters passed is eventDamage.attacker.u. Just change that argument to eventDamage.target.u. For this to work you'll also need to keep the function declaration of CreateTT(), which is in the trigger named "Stuff". You can also create your own text tags instead of using CreateTT() if you want.
     
  6. bigapple90

    bigapple90

    Joined:
    Aug 2, 2008
    Messages:
    366
    Resources:
    65
    Icons:
    63
    Skins:
    1
    Spells:
    1
    Resources:
    65
    Cool thanks. I got the numbers to swap but how do I make it so that the system only generates damage text numbers? Now when I kill units its not getting registered(creeps dont give bounty, hero doesnt get experience). I am asking this because my previous damage text system used Vexorians CSCache and now that it will no longer work I need a new up to date system. Hope you understand

    edit: it appears that bounty/exp doesnt work for the test map either. is this intended?
     
    Last edited: Aug 3, 2009
  7. Deuterium

    Deuterium

    Joined:
    Mar 17, 2009
    Messages:
    1,301
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    Maybe now since this works on v1.24 and I updated warcraft, I'll check it 2moro :)
     
  8. Kricz

    Kricz

    Joined:
    Aug 2, 2008
    Messages:
    183
    Resources:
    6
    Spells:
    6
    Resources:
    6
    Hmmm, I think I will need your help agein later^^
    Will write you a PN if I need it XD
     
  9. light bolt30

    light bolt30

    Joined:
    Jan 31, 2009
    Messages:
    1,839
    Resources:
    1
    Maps:
    1
    Resources:
    1
    i cant seem to save it into my map
    it keeps saying syntax error
     
  10. Deuterium

    Deuterium

    Joined:
    Mar 17, 2009
    Messages:
    1,301
    Resources:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    2
    You need 1.24+ wc3 and JNGP... you've got both?
     
  11. aznricepuff

    aznricepuff

    Joined:
    Feb 22, 2006
    Messages:
    749
    Resources:
    4
    Maps:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    4
    Yea, make sure you have JNGP (or at least jasshelper). if you do and it still gives the error, what is it?
     
  12. bebop

    bebop

    Joined:
    Jun 25, 2009
    Messages:
    14
    Resources:
    0
    Resources:
    0
    I am also getting a syntax error.

    line 7725: Identifier redeclared: "Damager"
    Code (vJASS):
    function Damager_SetLifeSpan takes unit Damager, real lifespan returns nothing
     


    line 8296: ----(previously declared here)
    Code (vJASS):
    struct Damager


    Edit, nevermind this error is actually coming from the Caster System... I don't get it. It was working fine before...
    There seems to be some syntax confusion concerning the term "Damager" between the two systems. It's beyond me, /shrug.
     
    Last edited: Sep 16, 2009
  13. aznricepuff

    aznricepuff

    Joined:
    Feb 22, 2006
    Messages:
    749
    Resources:
    4
    Maps:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    4
    Ok, I'm basically ready to push this into v1.0.0. After this point, I would really like not to make any more functionality changes (I will definitely not make any changes that either significantly change the API or break backwards compatibility). Everything after v1.0.0 would be bug fixes, maybe some minor add-ons. So if anybody has any suggestions on features they would like to see added or features they think should be changed, speak up now please.

    Oh and as always bug reports are welcome.
     
  14. aznricepuff

    aznricepuff

    Joined:
    Feb 22, 2006
    Messages:
    749
    Resources:
    4
    Maps:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    4
    The demo map now uses TreeSet v0.6.0, which doesn't epic fail when you try to load more than about 5-10 listeners into it. So if you were getting TreeSet from the demo map and wondering why DamageListeners weren't working if you had a lot (and by a lot I mean more than about 5) of them, it's now fixed (I hope).

    O, and a quick bug fix to the heal engine module.
     
  15. cHeRoL

    cHeRoL

    Joined:
    Mar 30, 2008
    Messages:
    655
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Well done !
     
  16. Fanta-Freak

    Fanta-Freak

    Joined:
    Oct 18, 2008
    Messages:
    59
    Resources:
    0
    Resources:
    0
    seems fine dont know about it work but if it did it would be fine
     
  17. lobster

    lobster

    Joined:
    Jan 11, 2008
    Messages:
    51
    Resources:
    1
    Spells:
    1
    Resources:
    1
    I cant save my game, it says:
    method destroy takes nothing returns nothing
    member redeclared
     
  18. aznricepuff

    aznricepuff

    Joined:
    Feb 22, 2006
    Messages:
    749
    Resources:
    4
    Maps:
    2
    Spells:
    1
    Tutorials:
    1
    Resources:
    4
    Make sure you have jasshelper 0.9.Z.2+
     
  19. NoobMapmaker

    NoobMapmaker

    Joined:
    Oct 17, 2007
    Messages:
    550
    Resources:
    0
    Resources:
    0
    Is it possible to make it so that GUI users can make use of this system as well? Basiclaly a configuration option in GUI to adjust the damage detection to work when using GUI custom spells.

    I think Advance JASSers such as yourself can prob create a system like this customize to his or her map but people who only use GUI or very little JASS can't even make use of this system fully so it makes sense to make it customizable by GUI right?
     
  20. Arnadath

    Arnadath

    Joined:
    Oct 31, 2008
    Messages:
    227
    Resources:
    0
    Resources:
    0
    We have like 15 of this thing man, it may be jass, but still not innovative