API:SetGuildHeraldryScene
From RoR Wiki
UI Lua API · Guild functions
Version: WAR 1.4.8
Updates the guild heraldry preview, and optionally the guild standard preview, with a heraldry design.
SetGuildHeraldryScene(patternId, primaryColor, secondaryColor, emblemId, postNumber, updateStandard)
Arguments
- patternId
number– Pattern id. Stored as a 16-bit value.- primaryColor
number– Primary (base) colour id. Stored as an 8-bit value.- secondaryColor
number– Secondary (pattern) colour id. Stored as an 8-bit value.- emblemId
number– Emblem id. Stored as a 16-bit value.- postNumber
number– Banner post number. Stored as an 8-bit value.- updateStandard
boolean–trueto apply the design to the guild standard preview as well.
Returns
Nothing.
Details
- The heraldry preview is updated whenever it exists. The guild standard preview is updated only when it exists and
updateStandardistrue. - This only changes the client-side previews. To save a design, the stock heraldry editor uses SendHeraldryConfigurationData.
updateStandardmust be a real boolean.- The function needs at least six arguments and only reads the last six.
Errors
None besides the generic Invalid Parameters message when an argument has the wrong type.
Example
From default/ea_guildwindow/source/heraldryeditor.lua:
-- Pattern, Primary Color, Secondary Color, Emblem, bUpdateStandard
SetGuildHeraldryScene(
HeraldryEditor.CurrentPatternID,
HeraldryEditor.CustomColors[HeraldryEditor.COLOR_CHOICE_BASE],
HeraldryEditor.CustomColors[HeraldryEditor.COLOR_CHOICE_PATTERN],
HeraldryEditor.CurrentEmblemID,
GuildWindowTabBanner.CurrentPostNumber,
bUpdateStandard)
