Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:SaveTacticsSet

From RoR Wiki
Revision as of 19:48, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · Tactics functions
Version: WAR 1.4.8

Stores a list of tactics in one of the player's saved tactic sets and sends the saved set to the server.

SaveTacticsSet(setIndex, tacticIds)

Arguments

setIndex
number – Index of the set, 0 to 4. Note that this is 0-based.
tacticIds
number-table – Array of tactic ability IDs, starting at index 1.

Returns

Nothing.

Details

  • The set is cleared, then filled with the IDs from tacticIds in table order. IDs equal to 0 are skipped. Only the first 7 non-zero IDs are kept.
  • The updated set is sent to the server. The stock tactics window reads saved sets with GetTacticsSet(setIndex).
  • This only saves the set. It does not change the active tactics; use ActivateTactics for that.
  • A setIndex of 5 or higher is ignored.
  • Does nothing if the player object does not exist yet.
  • The function needs at least two arguments and only reads the last two.

Errors

  • Error in function call 'SaveTacticsSet': Incorrect parameters

Example

From default/ea_tacticswindow/source/tacticswindow.lua:

if (self.currentSet < MAX_TACTICS_SETS) then             -- is this needed?
    SaveTacticsSet (self.currentSet, self.buttonManager:GetList ());
end

Overwriting set 0 with the active tactics, from the same file:

SaveTacticsSet (0, GetActiveTactics());

See also