Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:DyeMerchantPreviewAll

From RoR Wiki
Revision as of 19:42, 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 · Dye functions
Version: WAR 1.4.8

Shows on the character how all equipped armour would look with dye merchant colours.

result = DyeMerchantPreviewAll(primaryColor, secondaryColor)

Arguments

primaryColor
number – Palette index for the primary colour (paletteIndex from GetDyeMerchantData), or a negative number to keep each item's current primary dye.
secondaryColor
number – Palette index for the secondary colour, or a negative number to keep each item's current secondary dye.

Returns

result
number – Always 0.

Details

  • Every equipped armour piece that the client treats as dyeable is updated.
  • For each channel the starting colour is:
    • the item's current dye, when the argument is negative and the item has a dye on that channel;
    • otherwise the item's undyed colour.
A non-zero colour then replaces the starting colour, but only on channels the item's model supports (see GetDyeTintMasks). So passing 0 previews the item without dye on that channel.
  • The colour values are rounded toward zero.
  • This is a preview in the client. Use RevertAllDyePreview to undo it.
  • If there is no player object, the Lua state is not available or the argument check fails, nothing is returned.
  • The function needs at least two arguments and only reads the last two.

Errors

None besides the generic Invalid Parameters message when an argument is not a number.

Example

From default/ea_characterwindow/source/characterwindowdyes.lua:

if( CharacterWindow.dyeAll )
then
    DyeMerchantPreviewAll( CharacterWindow.primaryColor, CharacterWindow.secondaryColor )

See also