Lua Mods¶
Inside the directory https://github.com/EQEmu/Server/tree/master/utils/mods you can find example scripts on how to override combat to a legacy eqemu formula. This page helps details the process to set up adding lua hooks, so you can customize this to your server's needs
In your eqemu server root directory (where zone, world, shared_memory etc exists) create a new folder called mods
On linux, ensure mods and scripts are chmod 755
Ensure load_order.txt exists under mods, and refers to any hooks that need to be loaded.
Most functions have a e.IgnoreDefault boolean that by default is false. If set to true, you can override all default logic and inject your own.
You can use #reload quest to reload the scripts in your zone to reflect your latest changes. Be sure to #reload world once you finalize your setup and want it to go across all zones.
Function List¶
Function | Description |
---|---|
ApplyDamageTable | Adjust damage based on a table, no example available. |
AvoidDamage | Check if an attacker avoided damage, no example available |
CalcSpellEffectValue_formula | Apply custom spell formulas to how a spell value is deduced. An example is found in utils |
CheckHitChance | Check if an attacker hit a defender. e.hit will have hit information. legacy combat example and jamfest example |
CommonDamage | Adjust damage done. jamfest example |
CommonOutgoingHitSuccess | This is the final value of an outgoing hit success. Note that if any critical hits occured, if this value is modified, the crit won't match up as the text for the crit would already be displayed. legacy combat example. |
GetExperienceForKill | Get experience earned for a kill, and modify the amount. classic wow example. Note for more granular control, you can use SetEXP and SetAAEXP. |
GetEXPForLevel | Get raw experience normally rewarded for leveling. classic wow example |
GetRequiredAAExperience | Get how much experience is needed for an AA gain. classic wow example |
HealDamage | Adjust healing done. jamfest example |
IsImmuneToSpell | Check if a target is immune to a spell, and inject custom logic and message on resist jamfest example |
MeleeMitigation | Process melee mitigation (damage reduction). legacy combat example. |
RegisterBug | When a /bug report occurs, this fires with info. githubeq uses this to reroute bugs to github issues. githubeq example |
SetAAEXP | Set AA experience earned for a kill. jamfest example |
SetEXP | Set experience earned for a kill. jamfest example |
TryCriticalHit | Try executing a critical hit. legacy combat example. |
UpdatePersonalFaction | Adjust faction gain. jamfest example |