Map Properties & Map Layers Guide
iAppsBeats uses Tiled to create maps for the game, in order to get some basic features such as collision, and water-animation, we use some custom properties in Tiled.
There are some features in Tiled we yet do not support, such as rotating tiles or flipping tiles around.
Custom Layer Properties
Each layer can have their own custom properties, we use these for basic features:
- drawover: boolean, if true the tile-layer or object will be rendered above the player
- water: boolean, if true, the player will use swim animation when touching tiles in the layer
- collision: boolean, if true, the player will be blocked from walking on the tiles
Custom Map Properties
If you put these properties on the map itself, you can control the overall effect on the map, such as music, or drawover color:
- music: string, filename in music/ folder (include extension but without path) for background music played on the map
- cutouthole: boolean, displays a dark map with only a circle around the player visible
- ambient: string, of format #RRGGBB for red, green, blue ambient color (day-night-effect)
- darkeffect: number, deprecated, makes the map darker, better use the ambient property
Custom Object Properties
These are some custom properties used for NPCs, In order for the game to understand these, you need to set the Property
NPC. These can only be placed on a Object-Layer, as any other type of layer in Tiled is not supported by the game.
- image: string, filename from npcs/ folder, without path.
- drawunder: boolean, should be rendered underneath the player, defaults false
- nonblocking: boolean, should not block the player, defaults true
- npcclass: string, non-sandboxed class npcs, for more advance functionality. Mostly used for things like Chairs, castleflag, etc. A list of classes can be obtained by asking server admin.
- scriptclasses: string, an comma separated list of scripted npcs in
scriptclasses/folder of the Script repository.
- tileHeight: int, sets the interactive height of the npc, multiplied by the
- tileWidth: int, sets the interactive width of the npc, multiplied by the
You can also provide other properties which can be used by npc-classes or script-classes, as
this. variable. e.g.
npcclass: destructable image: barrel.png buildingname: BlackOut tileHeight: 1 tileWidth: 1
where buildingname is this.buildingname inside the npcclass destructable.
Collection of images (Embed in map) layer
With the use of a tileset layer with the type
Collection of images, you can place images on the map inside an
Object Layer that can be used as NPCs in-game. You also need to set the type to
However putting custom properties on this tileset for objects (npcs) is not supported by the game, but can be used to easier manage the object properties, but needs to be copied over to the npc when placed on the map.