1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. 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.

Attack System v1.1 [vJass | + GUI Support]

Submitted by AGD
This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
CUSTOM ATTACK SYSTEM

A custom attack system that aims to closely mimic the default Warcraft 3 attack system that is more dynamic and

provides full (almost) control over the launched attacks' behavior as well as events for the different phases in the
attacking process




THE SYSTEM CONTAINS:


AttackSystem
(Main)

- Allows you to do more attack-related operations than what is currently provided by Blizzard. It
does this primarily by using custom projectiles instead of the default game attack projectiles
(which are one of the most untouchable - meaning unreadable and non-modifiable, yet significant
things in the game). Unlike the game's default attack system, this one if very dynamic and does
not have much of a hard-coded limit.

Below are some cool things you can easily achieve using this system:

~ Switch a unit from being melee to a ranged attacker in an instant
~ Attach many special effects to ranged attacks
~ Make ranged attacks accelerate/decelerate
~ Destroy ranged attacks while in mid-air
~ Divert attacks to another target
~ Stop ranged attacks from moving (Especially in time-stop spells like Chronosphere, you must
stop projectiles as well!)
~ ... and the list goes on!

The things mentioned above are just the basic things you can achieve with this system. There are
so much more wonderful things that you can do with it. For more information, read the documentation
inside the test map.



EvasionSystem (Add-on library)

- Allows you to dynamically modify the evasion chance of units. Aside from that, you can also set the
accuracy of a unit, and of an attack.



AttackModifier (Add-on library)

- This library ensures the correct behavior when making an attack modifier. Use this for making
things like orb-effects, true-strikes, critical-strike, bash, etc. For more information on why you
should use this library and what are those issues it tries to solve, more documentation can be
found on this library's header inside the test map.



AttackMissileUtils (Add-on library)

- This library provides utility functions for enumerating ranged attacks' missiles with certain constraints.
This can be especially useful in creating spells (like chronosphere), force-fields, etc.



REQUIREMENTS:

JassHelper

Libraries

Optional Libraries



The complete documentation regarding the system can be found inside the map.
Feel free to report bugs and/or leave some feedback.



Version History

v1.0
- First Release

v1.0b
- Added a new add-on library 'AttackModifier'
- Fixed a bug affecting the enabling/disabling of attacks (as well as other bugs)
- Added a new event
EVENT_ATTACK_DESTROY

- Changed some event firing behavior
- Added more function APIs for completeness
- Fixed some documentation errors
- Greatly improved the test map to showcase more of what the system can do
- Other changes

v1.0c
- Added a GUI support
- Added a short demo for the GUI plugin
- Added the function
DestroyEventAttack()

- Fixed a number of bugs
- Other changes

v1.0d
- Not released

v1.0e
- Made compatible for patches 1.29+
- Fixed recursion problems on the GUI plugin
- Added an Evasion event callback handlers for the Evasion add-on lib
- Added a method for manual Attack allocation
- Added a boolean field for enabling an Attack missile's shadow
- Few API changes
- Bux fixes and other changes

v1.1
- Added a new add-on library named 'AttackMissileUtils'
- Fixed the bug regarding manual attack destruction
- Now truly compatible for patches 1.29.x
- Other changes

Previews
Contents

Attack System v1.1 (Map)

Reviews
IcemanBo
It's negliable, but maybe you could just cause 0 damage. In case the unit gets fully healed it stays at 100%, and extra trick removed here: call SetWidgetLife(target, GetWidgetLife(target) - attack.damage + 0.001) /*...
MyPad
Based from the inputs above, it would be safe to say that this should be set to Awaiting Update. Once all issues above are addressed in a sufficient manner or avoided entirely, another review will be released. Status: Awaiting Update
  1. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,324
    Resources:
    7
    Models:
    1
    Icons:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    7
    Based from the inputs above, it would be safe to say that this should be set to Awaiting Update.

    Once all issues above are addressed in a sufficient manner or avoided entirely, another review will be released.

    Status:


    • Awaiting Update
     
  2. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,182
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    I see.
    Ok, I probably falsly thought one can define like a max duration for the missile, so changing distance in large scale might have big efffect. In theory it would be probably a bit strange if a missile follows the unit though the whole map after a teleport and hits the enemy after 30 seconds.. or idk. :D

    Will you drop 1.29 support? ( dealing with Invulnerable)
     
  3. AGD

    AGD

    Joined:
    Mar 29, 2016
    Messages:
    399
    Resources:
    13
    Spells:
    7
    Tutorials:
    1
    JASS:
    5
    Resources:
    13
    Yeah I guess I don't have a choice but to drop support for 1.29.

    Regarding the attack with 0 damage, my problem right now is that there's no way to dynamically change the missile speed of a unit via natives. Which means that you need to predetermine all the unittypes that you want to register to the system since you have to edit their projectile speed at the object editor. I need think of a workaround to dynamically set the projectile speed between normal speed and being instant. Any help with this would be nice =).
     
  4. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    8,058
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    There's a thread for suggesting new natives to Blizzard. GetUnitArmor/DamageType (and hopefully Set) would be a huge plus. SetUnitProjectileSpeed would be cool, but an event which fires when a unit launches their projectile would be better, followed by the projectile being accessible as a Special Effect type (would probably need more complex natives for that though, such as start/stop projectile movement, set Target X/Y/widget)

    @MindWorX would be your only hope, but he's on Blizzard's payroll not ours, so we don't know what he's got time to implement.
     
  5. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,182
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    Not sure I understand how it is related, could you elaborate? Also, what do you mean with changing projectile speed is not possible - you do set its motion via
    call BlzSetSpecialEffectPosition(sfx, x, y, z)
    , don't you?
     
  6. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,324
    Resources:
    7
    Models:
    1
    Icons:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    7
    I think AGD meant that he can't automate the script such that the missile speed of every unit is 0.