Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeSetBestiarySubTypeImage

From RoR Wiki

UI Lua API · Tome functions
Version: WAR 1.4.8

Loads the picture of a bestiary subtype into the texture bestiary_subtype_image.

TomeSetBestiarySubTypeImage(subTypeId)

Arguments

subTypeId
number – Subtype id. At least one species of the subtype must be unlocked.

Returns

Nothing.

Details

  • The image file is taken from interface/InterfaceCore/Tome/Bestiary/Images/.
  • The texture bestiary_subtype_image is then updated, so every window that uses it shows the new picture. No stock window uses this texture.
  • If there is no picture or the file does not exist, the texture is cleared.
  • If the id is unknown or the subtype is still locked, the texture is cleared and an error is logged.
  • The stock UI never calls this function.

Errors

These are written to the UI log; the call returns normally.

  • Error in function call 'TomeSetBestiarySubTypeImage: You have not yet unlocked species of subtype # %d. (the quote after the function name is missing in the client's text)

Example

A minimal example built from the signature. The XML defines a DynamicImage with texture="bestiary_subtype_image":

if( TomeIsBestiarySubTypeUnlocked( subTypeId ) ) then
    TomeSetBestiarySubTypeImage( subTypeId )
end

See also