Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TomeSetBestiarySpeciesImage

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

Loads the picture of a bestiary species into the texture bestiary_species_image.

TomeSetBestiarySpeciesImage(speciesId)

Arguments

speciesId
number – Species id. The species must be unlocked.

Returns

Nothing.

Details

  • The image file is taken from interface/InterfaceCore/Tome/Bestiary/Images/, using the file name stored for the species.
  • The texture bestiary_species_image is then updated, so every window that uses it shows the new picture. The stock bestiary page has a DynamicImage with texture="bestiary_species_image" in ea_tomeofknowledge/source/tomewindow_bestiary.xml.
  • If the species has no picture, or the file does not exist, the texture is cleared. The stock UI checks this with DynamicImageHasTexture.
  • If the id is unknown or the species is locked, the texture is cleared and an error is logged.

Errors

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

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

Example

From ea_tomeofknowledge/source/tomewindow_bestiary.lua:

TomeSetBestiarySpeciesImage( id )
...
if( DynamicImageHasTexture( "BestiarySpeciesInfoImage" ) ) then
   WindowAddAnchor( "BestiarySpeciesInfoText1", "bottom", "BestiarySpeciesInfoImage", "top", 0, 10 )
else
   WindowAddAnchor( "BestiarySpeciesInfoText1", "top", "BestiarySpeciesInfoImage", "top", 0, 0 )
end

See also