• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

Easy Ability Fields

Easy Ability Fields allows you to use the Get and Set Ability Field natives without headaches. It uses artificial intelligence a simple algorithm to convert fourCC codes to the correct field types and calls the appropriate function to retrieve the value.

Lua:
GetUnitAbilityField(whichUnit, fourCC, "adur")
is equivalent to:
Lua:
BlzGetAbilityRealLevelField(BlzGetUnitAbility(whichUnit, FourCC(fourCC), ABILITY_RLF_DURATION_NORMAL, GetUnitAbilityLevel(whichUnit, FourCC(fourCC)) - 1)
You can of course specify the level explicitly.

Features:
  • Call function with unit and abilityId instead of ability instance.
  • Interface that calls the appropriate native.
  • Pass fourCC code of ability field instead of common.j constant.
  • Convert level to 1-indexing.
  • Retrieve generic ability field value with GetAbilityField, which gives the ability temporarily to a dummy.
  • Omit level parameter to automatically use the unit's current level.
  • Cache result for faster execution.

Installation:
Copy the ListOfFields and EasyAbilityFields scripts into your map, then copy the Easy Ability Field Dummy unit and set the DUMMY_UNIT constant to its fourCC code.
Contents

EasyAbilityFields (Map)

EasyAbilityFields (Binary)

ListOfFields (Binary)

Reviews
Wrda
A resource that simplies modifying the ability fields of a unit in a breeze. Chuck Norris is here making our lives easier. Approved
Top