Skip to content

Class

TerrainPalette

Generated GDScript class reference for GridPlacement.TerrainPalette.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Filters which terrains from a TileSet are exposed for painting. A lean whitelist: holds TilePlacementEntry resources that combine terrain names and optional icon into a single data structure. The TileSet remains the single source of truth for terrain IDs, colors, peering, and existence. Names are resolved against a TileMapLayer's TileSet at paint-time. Usage: var palette := TerrainPalette.new() palette.display_name = "Dungeon Pack" palette.entries = [ TilePlacementEntry.new(terrain_name="dungeon_floor", icon=preload("res://art/icon.png")), TilePlacementEntry.new(terrain_name="stone_wall") ]

Source: addons/grid_placement/placement/terrain/terrain_palette.gd

Syntax

class TerrainPalette extends Resource

Members

NameKindSummary
display_namePropertyDisplay name shown in the palette selector (e.g. "Dungeon Pack").
iconPropertyOptional icon for the palette folder in a multi-palette UI.
placement_rulesPropertyList of rules to validate for all terrains in this palette.
ignore_base_rulesPropertyIf true, base rules from PlacementSettings are ignored for this palette.
entriesPropertyTerrain entries to expose for painting. Each entry carries both a terrain name and optional icon. Each name must match [method TileSet.get_terrain_name] on the target TileSet.
default_target_layer_namePropertyOptional category-wide TileMapLayer name (e.g. &"Fences") that every entry in this palette paints onto unless the entry declares its own [member TilePlacementEntry.target_layer_name] — the entry is the final override when set. Empty = no palette routing; entries fall back to the default target map. Lets a whole category (fences, walls) share one layer without repeating the layer name on every entry resource.
get_editor_issuesMethod
get_entriesMethod