Layers
From OHRRPGCE-Wiki
This is a reference for the order in which different graphical things are drawn in-game.
Some of these layers are slices. For those that are, the lookup slice constants are given in bold.
- Normal map display -- sl:map root
- Map layers, NPCs & Heroes (order is defined in the Edit Layers menu) -- sl:map layer 0 to sl:map layer 7, and either sl:walkabout layer OR sl:hero layer and sl:npc layer. See below.
- Overhead tiles from map layer 0 (obsolete, for backcompat) -- sl:obsolete overhead
- Backdrop (both textbox and scripted) -- sl:backdrop
- Default layer for script-created slices such as sprites -- sl:script layer
- Text box -- sl:textbox layer and sl:textbox root
- Box & text -- sl:textbox box and sl:textbox text
- Portrait -- sl:textbox portrait box and sl:textbox portrait
- Choice box -- sl:textbox choice box
- Harm tile flash, if any
- Custom menus (including main menu)
- Output of showvalue or showstring
- "plotstrings" (using e.g. show string at; not to be confused with text slices or showstring!)*
- Note: these are not yet drawn to the 'string layer' slice, which has slice lookup code sl:string layer, but always has no children at the moment
- Map name
- Debug info
- NPC debug info
- Tag debug info
- Script watcher/debugger
- Built-in menus such as the Items menu
Regarding the NPC & Heroes Layer[edit]
If a map's NPC/Hero walkabout layering is set to Together (which is the default), then hero and walkabout slices are parented to the sl:walkabout layer, and are Y-sorted.
- NPCs & Heroes (children automatically Y-sorted)
- Hero walkabout slice
- NPC walkabout slice
- Hero walkabout slice
- NPC walkabout slice
The other two layering options cause the sl:hero layer and sl:npc layer container slices to be used, and NPCs are NOT Y-sorted. Instead, for backwards compatibility, the layering depends on NPC reference numbers. Heroes are still Y-sorted.
- NPCs & Heroes (container)
- NPC layer
- NPC walkabout slice
- NPC walkabout slice
- NPC walkabout slice
- NPC walkabout slice...
- Hero layer
- Hero walkabout slice
- Hero walkabout slice
- Hero walkabout slice
- Hero walkabout slice
- NPC layer