A set of terrains players can paint, such as "Dungeon Pack". Only terrains listed in entries are offered. Everything else about a terrain (its tiles, color, and connections) still comes from the TileSet, matched by name when painting. var floor_entry := TilePlacementEntry.new() floor_entry.terrain_name = &"dungeon_floor" var wall_entry := TilePlacementEntry.new() wall_entry.terrain_name = &"stone_wall" var palette := TerrainPalette.new() palette.display_name = &"Dungeon Pack" palette.entries = [floor_entry, wall_entry]
Source: addons/grid_placement/placement/terrain/terrain_palette.gd
Syntax
class TerrainPalette extends ResourceMembers
| Name | Kind | Summary |
|---|---|---|
display_name | Property | Name shown in the UI. |
icon | Property | Optional icon shown in the UI. |
placement_rules | Property | Rules checked when painting any terrain in this palette. |
ignore_base_rules | Property | When on, PlacementSettings.base_tile_paint_rules are skipped for this palette. |
entries | Property | The terrains players can paint. Each name must match a terrain in the target map's TileSet. |
default_target_layer_name | Property | Optional TileMapLayer name, such as &"Fences", that every terrain in this palette paints on. An entry's own TilePlacementEntry.target_layer_name takes priority. Leave empty to paint on the level's target map. |
get_editor_issues | Method | |
get_entries | Method |
Tutorials built on Grid Placement
- Godot multiplayer grid placement: one host, four sessions
- Godot 2D grid building system: paint, place, save
- Godot 3D grid building system: the runtime loop
- Godot 4 grid-building plugins: build mode vs editor tools
- 3D room placement in Godot: build rooms and stack storeys
- 3D grid placement in Godot 4: full setup tutorial
- Snap to a TileMap in Godot: 2D grid placement
- How to make a farming system in Godot
- How to snap objects to a 3D grid in Godot