Skip to content

Lua API Migration

Nicholas van de Walle edited this page Jun 21, 2026 · 1 revision

Lua API Migration

How to update existing Lua macros when a breaking change lands in the cl.* API. Pair this with the Lua API Changelog, which flags breaking changes with ⚠️.

A change is breaking if a macro that worked before can now error or behave differently:

  • a function is removed or renamed;
  • an argument is removed, reordered, made required, or its accepted type/values change;
  • a function's return shape changes (e.g. a string becomes a table);
  • an enumerated value is removed (a cl.my_item slot, cl.move direction, cl.bind_key modifier, or cl.on_text category);
  • a default behavior changes (what happens when an optional argument is omitted).

Each entry below is newest-first and shows the version, what changed, and a before → after macro snippet you can copy.

No breaking changes yet

Every cl.* change so far has been additive — new functions and arguments only — so existing macros keep working unchanged. The first breaking change will get an entry here.

Clone this wiki locally