Using Map Layers

From OHRRPGCE-Wiki

Jump to: navigation, search

OHRRPGCE release Ubersetzung introduces layers to maps. You have 3 layers to work with, and the old Overhead wallmap bit isn't needed anymore (mixing it with layers would be confusing and unneeded, so you should avoid it). Tiles in the 2nd and 3rd layers can be transparent on a pixel-by-pixel basis.

Here is the order in which things are drawn in-game:

Layer 0 (Bottom Layer)
Layer 1 (Middle Layer)
NPCs    *  Heroes are drawn before NPCs if NPCs over Heroes layering is set
Heroes  *
Layer 2 (Top Layer)
Textboxes
Map name
Strings
Debug screens

So layer 2 is for overhead graphics, like tree tops and branches. Notice that both layers 0 and 1 are drawn below everything else: this is so that you can use layer 0 for the ground, and layer 1 for anything overlaying or on the ground. For instance, you might have grass, sand, dirt, and pavement on a map. You don't need to redraw a stone tile for each different ground type that it may be on. Instead, draw it once with the stone on a transparent background.

Now lets suppose we want a large tree on our map, which the player can walk behind and in front of.

[edit] Drawing Transparent Tiles

Colour 0 is the transparent colour for tiles on layers 1 and 2. It will appear as black in the Maptiles Editor. Use a different black (there are several in the default Master Palette) if you want black on a tile intended for the transparent layers.

For our map, we might draw a simple grass tile, and the tree trunk and top on multiple tiles, surrounded by colour 0.

[edit] Editing Layers

Before editting layers, you must enable them. Press CTRL+L while in the Tilemap Editor to select layers to edit. Disabled layers appear as brown, enabled as grey. Select Middle and Top and press Enter to toggle them on, as they are disabled by default. This means they are Enabled for editting; a disabled layer can't be editted, and isn't drawn while editting the map, BUT it does appear ingame. Select a layer and press left/right to toggle Visibility: an Invisible layer is NOT drawn ingame (or while editting). The visibility of a layer can be toggled with a script command.

To select a layer, press Page Up and Page Down. At the bottom of the screen is the current layer number.

Place tiles on layers as normal. If you can't see what you're doing, make other layers invisible, or make the current layer jiggle about with CTRL+J

Getting back to our tree, suppose that we have a footoffset on this map, to draw NPCs and heroes not strictly aligned with the tile grid, but seeming to stand in the middle of a tile. So we want the player sprite on top of the tree trunk when standing in front of it. So we place the tree trunk tile on layer 1, and the rest of the tree on layer 2.

[edit] Layers and the Wallmap

Maps still have only a single layer wallmap. The default passibility settings of tiles in all layers at a spot is combined to set the wallmap.

To be written...

This article or section is not complete. If you wish, you may finish it, and remove this tag when you are done.

Keyboard Conventions | Getting Started | Making Maptiles | Making Walkabout Graphics | Importing BMP graphics | Moving on to Map Construction | Making a Hero | Battles | How to use NPCs and Tags | Adding, Removing, Swapping, Heroes | Animating Maptiles | Vehicle Use | Stun, Regen, Poison, and Mute | Bosses | Sound Effects

Personal tools