UOSAGAS Scripting

Macro Variables

A macro variable is a named target — $forge, $secure, $healer — that you bind once by targeting something in game. Macros then refer to the name instead of a hard-coded serial, so one macro works across characters, houses and re-decorated rooms.

What they are

A recorded target action stores the exact object it was recorded on. That breaks as soon as the object changes — a new forge, a moved chest. Macro variables solve this: the macro stores the name, and the name resolves to whatever you last bound it to.

Managing variables

The list lives under Macros → Options → Macro Variables:

  • Add — prompts for a name, then gives you an in-game target cursor. Whatever you target is bound to the name.
  • Retarget — re-binds the selected variable to a new target.
  • Remove — deletes the variable (asks first).

Using them in macros

Select a variable, pick a mode in the dropdown and press Insert as… — the action is inserted after the selected line of the open macro:

  • Absolute Target — answers the next target cursor with the variable's object.
  • DoubleClick Target — double-clicks the variable's object (use an item, open a door…).
  • Set Macro Variable Action — the macro itself re-binds the variable at that point: when playback reaches the action, you get a target cursor and the choice is saved. Great for "ask once per session" macros.

Storage & compatibility

Variables are saved per profile (in the profile's macrovariables section) and follow the Razor CE format — profiles migrated from Razor CE keep their variables, and vice versa.