Old School Ops

Lua Modules on Age of Patron

What differs for a Lua module on Version 4.15. Items, effect codes, optional verbs and message categories.

updated 2026-11-06
On this page

The Lua Modules manual applies here. This page holds what is true of Version 4.15 alone.

Items

Every item has a uid that stays with it for as long as it exists, so m:item values follow the item through the bag, the trunk, the mail, a trade and the auction.

  • A monster's drop has uid = 0 while it lies on the ground, so item_dropped reports 0 for it. item_looted reports the real uid. A whole item a player throws down keeps its uid.
  • Splitting a stack makes a new item with no values, and part of a stack traded or thrown is new too.
  • A stack that merges into another is gone, along with its values. The stack it merged into keeps its own.
  • Values go when the item does: sold, used up, broken by an upgrade, expired, or lost on the ground.
  • rf.give_item returns the new item's uid. With more than one stack, it is the first stack's uid.

examples/item_history.lua and examples/item_property.lua both store values on items.

Effect Codes

rf.buff takes a skill, force or class skill's own code, or "skill:N", "force:N", "classskill:N" or "potion:N", where N is the effect's index in that content table.

Verb and Message Support

optional verbon this version
rf.announce_raceworks
rf.give_expworks
rf.itemsworks
rf.kickworks
rf.monstersworks
rf.pickupworks
rf.spawnworks

Module messages may use categories 0x71 to 0xFF.

Something here wrong?

Out of date, incomplete, or assuming something it should not. Documentation errors are bugs, and this one arrives tagged and pointed at this page.

Top xp sources

How xp works
Loading…

Open the full search page