Skip to content

Change Tileset Image

Change Tileset Image

Replaces the image used by a tileset or an individual tileset slot at runtime.

Properties

System

Name Explanation Type
Image Source The path to the new image file to use for the tileset slot. Variable or Value
Index The index of the tileset or tileset slot to change. Variable or Value
Slot Type The type of tileset slot to change: Flat, Terraforming, or Structure. Tileset Slot Type
Tileset Whether to replace the entire tileset's images. Toggle
Tileset Slot Whether to replace a single slot's image in the tileset. Toggle

Tileset Slot Type

Name Explanation
Animated An animated tileset slot that cycles through frames over time.
Terraforming A terraforming tileset slot that supports auto-tiling based on neighboring tiles.
Structure A structure tileset slot that represents multi-tile objects like buildings or trees.
Normal A standard tileset slot for single, static tiles.

Examples

Change Tileset Image at Index 0

This changes the tileset at index 0 to use the image source specified by Global Variable 0.

change_tileset_image(0, $gv[0]);
{"Data":{"Index":{"IsGlobalVariable":false,"IsLocalVariable":false,"IsValue":true,"Value":"0","VariableIndex":0,"Metadata":null},"IsTilesetSlot":true,"SlotSource":{"IsGlobalVariable":true,"IsLocalVariable":false,"IsValue":false,"Value":"","VariableIndex":0,"Metadata":null},"SlotType":0,"Metadata":null},"TypeName":"MAR.Game.RPGCore.Models.Scripts.Commands.Map.MapTilesetImageChangeCommand"}