220.127.116.11 - Added the following clearer event names to make things less confusing for new users:
- PreDamageEvent - can be used in place of DamageModifierEvent pre-armor modification
- ArmorDamageEvent - can be used in place of DamageModifierEvent post-armor modification
- OnDamageEvent - can be used instead of a non-zero DamageEvent
- ZeroDamageEvent - can be used instead of a zero damage DamageEvent
- SourceDamageEvent - runs at the same time as AOEDamageEvent, but doesn't need to hit multiple units.
Added "DamageFilterRunChance" - odds for the trigger to BE run (works inversely to DamageFilterFailChance).
Shortened the Configuration trigger so that it focuses primarily on what the user can modify.
Organized all variables into categories to help users better understand what does what.
Installation or updating from a previous version will require re-copying the entire Damage Engine folder.
Updated the demo map's text tag production to include a new custom update for ArcingTextTag, thanks to @Ugabunda and @Kusanagi Kuro.
Side note - the Demo Map's triggers have been heavily cleaned up and will now no longer cause crashes when being imported into a new map.
- Added a new functionality to the AOEDamageEvent, which allows it to fire even when only one unit is hit, if the AOEDamageEvent is registered as "Not Equal" instead of "Equal to". This is useful in a very specific scenario where an AfterDamageEvent may not be able to be relied upon to properly deallocate data from a running instance that needs to be able to function when multiple units are hit, but also needs to not fail when only one unit is hit.
- Added additional filters for GUI users to avoid using trigger conditions in even more scenarios:
- DamageFilterSource/TargetI (has item)
- DamageFilterSource/TargetA (has ability)
- DamageFilterSource/TargetC (has a certain classification, like hero or Tauren)
- DamageFilterFailChance - odds for the trigger to not be run (ideal for critical strike or evasion)
- Provided a way for GUI to un-register a Damage Event by setting "RemoveDamageEvent" to true from within their trigger's actions.
- Moved the CreateTimer/CreateTrigger/CreateGroup calls that had been included in the globals block down to the onInit block as per request of @Ricola3D
- Minor performance improvements thanks to @BLOKKADE
18.104.22.168 - Fixed an issue with armor penetration sometimes bugging out.
22.214.171.124 - Fixed an issue with the eventFilter not retaining its value during an AOE event. Fixed an issue with eventFilter when USE_MELEE_RANGE was set to false. Both issues reported by @lolreported
I have fixed several potential points of failure reported by multiple users that stopped Damage Engine from working for the rest of the game. In any case there should no longer be ANY SITUATION where Damage Engine just "stops working", even in ways I can't predict. The most likely issue was with DamageScalingWC3/User having possible 0-division errors.
Fixed the "configured" issue reported by @lolreported where manual configuration didn't work unless the damage and attack type checks were initialized tto -1.
In addition to these fixed bugs, I have added several more static ifs so that advanced users have more control over getting rid of features they might not care about.
126.96.36.199 - Fixed the issue reported by @KitsuneTailsPrower wherein the DamageInterface extension wasn't working. This needed to be fixed both in the Damage Engine source as well as the DamageInterface plugin itself.
188.8.131.52 - Fixed the issue reported by @Wazzz where the armor reduction wasn't taken into consideration. Actually there was a much bigger flaw that I had overlooked that was prompting this.
184.108.40.206 - Improved the logic of the 0 damage event.
- Usage of the "DamageEvent becomes EQUAL to 1.00" now can be extrapolated further than ever before:
- EQUAL works as it always has.
- NOT EQUAL only runs for code damage.
- LESS THAN only runs for damage from attacks.
- LESS THAN OR EQUAL only runs for melee attacks.
- GREATER THAN OR EQUAL only runs for ranged attacks.
- GREATER THAN only runs for Spell damage.
- Fully adapted Damage Engine to work with every other major DDS
- Rewrote the internal script to use vJass structs: Damage and DamageTrigger.
- Changed some of the vJass API. You can find the API listed in the Damage Engine trigger. Notably:
- I removed UnitDamageTargetEx. You can replace this with Damage.apply.
- The reason for this change is because of cross-compatibility. Rising Dusk's IDDS uses a different set of parameters for this function, so I removed it from my library to allow this to work seamlessly.
- TriggerRegisterDamageEvent -> TriggerRegisterDamageEngine
- RegisterDamageEvent -> RegisterDamageEngine
- The reason for the above two changes is, like for UnitDamageTargetEx, because Rising Dusk's IDDS uses them. I don't want to make the same mistake I did with Table's API and preferred to walk back my API choices before things got out of hand again.
- Various performance tweaks, bug fixes and re-commenting of variables.
- Recursive damage is now processed more intelligently and possibly be more performance-friendly.
- Adapted the cross-compatibility libraries for Weep and LFH's systems to use textmacros to insert themselves into Damage Engine (this might have been in the 5.6 update, but these two updates were both tailored to achieve similar goals).
220.127.116.11 - Fixed a bug with Damage modification and laid groundwork for a bunch of optional vJass compatibility addons.
18.104.22.168 - Patchwork on Melee/Ranged detection, recursion tracking. Also added the ability to modify damage from a DamageEvent to make it easier on beginners.
22.214.171.124 - Fixed an issue where the DamageEventType for recursive damage that used NextDamageType would always default to DamageTypeCode.
Rewrote a significant amount of the internal code so that struct and GUI syntax both work - and are synchronized with each other. vJass-exclusive users can disable the GUI synchronization if they don't use any GUI damage events in their maps.
Four new variables must be added to your variable editor:
- boolean NextDamageIsAttack
- boolean NextDamageIsMelee
- boolean NextDamageIsRanged
- integer NextDamageWeaponT
Struct syntax should not need too much introduction - Damage.index is the triggering event ID, and the syntax is Damage.index.amount/source/target/etc. To initialize a JASS damage event, use:
function RegisterDamageEvent takes code c, string eventName, real value returns nothing
The string is simplified: "Modifier", "" (for simple DamageEvent), "After", "Lethal", "AOE"
Finally, a neat QOL improvement is that I have assigned weight to each of the events. When registering an event, you can include numbers different than 1, 2, 3 or 4 (for modification) or just the plain "1" for the others. Now you can set your own sequencing and use 1.5, 3.14 or even -1 to give an even more extreme priority to something. Lower numbers run first, higher ones last.
126.96.36.199 - Added support for the new native BlzGetEventIsAttack via "IsDamageAttack". Also updated the Config trigger to make importing a bit easier
188.8.131.52 - Fixed a mis-flag of the IsDamageSpell value when not being actual spell damage.
184.108.40.206 - Actually fixed the Cold Arrows issue (division by 0.00001 or something ...somehow... either way, it is fixed).
220.127.116.11 - A fix which should hopefully quell the recent reports of damage events failing in complex situations involving Cold Arrows.
18.104.22.168 - A ton of fixes to repair the issues plaguing Sunken City and anyone else who might be pushing this engine well beyond what I imagined it would be used for. Also added a couple of variables intended to be used to ricochet damage: CONVERTED_ATTACK_TYPE and CONVERTED_DAMAGE_TYPE. Check the demo map for how they can be used in a Unit - Damage Target action.
22.214.171.124 - The "Inception" update. Advanced users can interact with Damage Engine via custom script to set DamageEvent_inception = true to allow their damage to potentially go recursive (to a fixed extent).
126.96.36.199 - Hotfixed that modifiers 2 and 3 weren't running.
188.8.131.52 - By using an innovative approach of hooking TriggerRegisterVariableEvent, I've permanently eliminated all risks of recursion in the engine.
184.108.40.206 - Fixed unexpected behavior with DamageTypePure when it is affected by Anti-Magic Shell or Mana Shield. DamageTypePure now no longer ignores DamageScalingWC3.
220.127.116.11 - Fixed an issue with AfterDamageEvent sometimes being delayed. Added DamageScalingUser to track the ratio of user modified damage, as well as DamageEventArmorPierced which allows the user to define how much armor to ignore when working with DAMAGE_TYPE_NORMAL.
18.104.22.168 - Fixed an issue where with the final unit in a Spirit Link chain or the retaliating damage of Thorns/Carapace would not deploy an AfterDamageEvent. Also fixed an issue where AfterDamageEvent would still fire from DAMAGE_TYPE_UNKNOWN if it was greater than 0. Simply copy over the JASS from this post in order to update your own implementation.
- Now features DamageEventArmorT and DamageEventDefenseT, which pull from the target unit's Object Editor data in order to allow you more complete access to detect and even MODIFY those defenses. Changes must be made in a DamageModifierEvent, and they are reverted as soon as armor is calculated.
- Re-introduced AfterDamageEvent, which is the moment after the unit's life is changed, but before any recursive damage has run.
22.214.171.124 - Bug fixes and performance improvements. No, really. Fixed an issue with the DAMAGED event running even though it was turned off (who would've guessed that?)
126.96.36.199 - Engine re-tooling to improve accuracy and get Spirit Link/Defensive damage out of hardcoded mode - it will now work even in circumstances I haven't tested for (in case those weren't the only issues). Also fixed the Is Unit Moving resource.
188.8.131.52 - Fixed an issue with Spiked Carapace and Thorns Aura where the melee attacker would not get recorded correctly. This required the same fix as I needed to apply for the initial target in a spirit link chain.
184.108.40.206 - Tweaked recursion and fixed a few bugs. Re-introduced the zero damage event now that patch 1.31.1 brought it back.
220.127.116.11 - Minor tweak to Spirit Link in rare situation.
18.104.22.168 - Fixed issues related to Spirit Link. Now works intuitively as expected.
22.214.171.124 - Crazy improvements - check out the details in "How to upgrade from Damage Engine 4.0 or earlier" and "How to use Damage Engine 5.1"
126.96.36.199 - Oh man. Where do I even start?
- You can now set/compare DamageEventDamageT, DamageEventAttackT or DamageEventWeaponT
- No longer needs Unit Indexer nor any custom Object Editor data nor modifications.
- Requires WarCraft 3 1.31 or higher.
- Changed vanilla JASS code to vJass to clean up a lot of things such as making certain variables private.
- Look for more details in "How to upgrade from Damage Engine 4.0 or earlier"
188.8.131.52 - Never officially released, but was the first iteration which used SetEventDamage.
For 184.108.40.206 and prior, see: Damage Engine 220.127.116.11 | HIVE