Effect
Each equipped item that reaches a certain level (+level) adds stats to the character. Example: Bloodangel Sword +13 adds 200 damage, and at +15 it adds 500 damage (replacing the +13 amount). The stats of all equipment are added together, and recalculated when the character enters the game and each time equipment is equipped, unequipped or moved.
How to enable
- Remove the
--in front ofLoadModule("ItemOptionExpand\\ItemOptionExpand")inMain.lua. - Edit
Includes\ItemOptionExpand\Config.lua. - Press Reload LuaAPI.
No SQL is needed. The module attaches OnCharacterEntry, OnItemEquip, OnItemUnEquip, OnItemMove. Stats are put into the shared stat table (OptionBonus), so other modules can add stats at the same time.
Configuration (Config.lua, table ItemOptionExpandConfig)
| Key | Value | Meaning |
|---|---|---|
Enable | true / false | Enable / disable the module. |
ShowMessage | true / false | Tells the player which stats are in effect when they change. |
Items | table of rows | One row per item and level. |
The fields in one row of Items:
| Field | Meaning |
|---|---|
Item = { group, index } | The item, according to Data\Item\ItemList.xml. |
Level | The minimum item level for this row. |
Class | Optional: applies only to this character class (the CLASS_* constants); -1 or left empty = all classes. |
| the remaining fields | The added stats, named according to the character stat table, for example AddDamage, AddDefense, AddMaxHP, AddMaxMP, AddDamageDecrease, AddIgnoreDefenseRate, AddDoubleDamageRate, AddTripleDamageRate, MulDamage, ExpRate. |
An item uses the row with the highest Level that does not exceed its level: a +14 item uses the +13 row, a +15 item uses the +15 row.
ItemOptionExpandConfig.Items = {
{ Item = { 0, 42 }, Level = 13, AddDamage = 200 },
{ Item = { 0, 42 }, Level = 15, AddDamage = 500 },
{ Item = { 7, 98 }, Level = 15, AddMaxHP = 500, AddDamage = 20 },
}
Config.lua file has two rows pointing to item 0-156, which is not in ItemList.xml (marked NOT IN ItemList.xml). Edit the group / stats or delete those two rows.The names of the added stats (45 names, with the prefix Add / Mul, plus CombatPower and ExpRate) are listed in full under the function Player.GetOptionTable on the reference page "Player: reading basic information".