Differences

This shows you the differences between two versions of the page.

Link to this comparison view

dcss:help:rltiles [2011-12-20 16:02]
XuaXua
dcss:help:rltiles [2019-10-14 18:59] (current)
aidanholm Add reusing image enum documentation
Line 67: Line 67:
 In both C++ and Lua, the full set of four images is referred to by ''TILE_DNGN_LAVA'', rather than all of the images being referred to individually.  Most often, variations are used interchangeably with each other.  For example, when drawing lava, Crawl will randomly choose one of the four lava tiles.  Variations are also used for things like butterfly colours, hydra heads, and enchanted items.  These are all commented in the individual rltiles input files. In both C++ and Lua, the full set of four images is referred to by ''TILE_DNGN_LAVA'', rather than all of the images being referred to individually.  Most often, variations are used interchangeably with each other.  For example, when drawing lava, Crawl will randomly choose one of the four lava tiles.  Variations are also used for things like butterfly colours, hydra heads, and enchanted items.  These are all commented in the individual rltiles input files.
  
 +====Reusing image enums====
 +
 +If you've already created a tile with a complex set of comands, and you find yourself wanting to make a variation on it, don't copy-paste! You can specify an already-built tile anywhere you can specify a filename:
 +
 +<code>
 +# compose a set of images into a complex tile: here, a sprite on the species selection screen
 +%start
 +%compose base/troll_f
 +%compose body/animal_skin
 +%compose hair/troll
 +%compose gloves/claws
 +%finish SP_RECOMMENDED_TROLL
 +%start
 +
 +# reuse the composed tile, and just add a mask
 +%texture disabled-fg
 +enum:SP_RECOMMENDED_TROLL SP_TROLL
 +</code>
 +
 +If a filename starts with ''enum:'', the remaining text is used as the enum name.
 +
 +This ensures that if the composition of the first tile changes, the second tile will change as well.
 =====Tile sheet commands===== =====Tile sheet commands=====
  
Logged in as: Anonymous (VIEWER)
dcss/help/rltiles.txt · Last modified: 2019-10-14 18:59 by aidanholm
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki