Skip to content

Feature Addition Guides

Andrew Hernandez edited this page Jul 22, 2026 · 10 revisions

Adding Objects

All objects are stored in TileSet.tres, where they are given an ID and data depending on their type.

image

Additionally, object IDs are stored as enum values in Global.gd.

image

To add an object, create a new "tile" in the tile set, and ensure its ID is unique from other objects. (READ BELOW FOR ID RULES ON SPECIFIC OBJECT TYPES)

Adding Tiles

  • Tiles have IDs between 0 and 500.
  • Tiles must be added using an atlas source, which is a simple image of the tile. Images of tiles should be in res://Assets/Defaults/Assets/Sprites/Tiles.
  • Tiles must have a single alternative variant with a dark/red modulate. This will take effect when hovering on an invalid slot using the tile.
  • Tiles must have a hitbox, created using Physics Layer 0, as well as a custom data layer called "name" which is simply the name of the tile. This can be used to add unique behavior when the player is standing on a certain tile.
image image

Adding Entities

  • Entities have IDs between 500 and 600.

  • Entities must be added using a scene collection source. This allows entire scenes to function as tiles in the tile map.

  • Entities always have animations rather than static images. Store images for entities in res://Assets/Sprites/Entities, create a folder for a new entity, and create subfolders for each of the entity's animations. All images pertaining to an animation should be in that respective animation's subfolder.

  • Entities should have a "preview" variant in Scenes/Preview that's a script-less image of the entity. This prevents the preview from interacting with the main tile map via collision.

  • Preview variants of entities should be added as alternative tiles to the main entity with an ID of 2.

Adding Props

  • Props have IDs of at least 600.
  • Props must be added using an atlas source, similarly to tiles. Images of props should be in res://Assets/Defaults/Assets/Sprites/Props.
  • Props will have 7 alternative tiles, with 8 total variants.
    • Props with IDs 0 to 3 will have a z-index of 1, being in the foreground.
    • Props with IDs 4 to 7 will have a z-index of -1, being in the background.
    • The 4 variants of props act as rotations in the clockwise direction.
image
  • IDs 1 and 5 will be rotated 90° clockwise. Enable "Flip H" and "Transpose."
  • IDs 2 and 6 will be rotated 180°. Enable "Flip H" and "Flip V."
  • IDs 3 and 7 will be rotated 270° clockwise. Enable "Flip V" and "Transpose."

Adding Object Buttons

In the editor state, objects have respective buttons to allow the user to select them.

image

These buttons are stored in TileSwitch.tscn and divided into sections based on the object type.

image

Each section contains a list of buttons, based on the template scene TilebarButton.tscn. To add a new button, add an instance of this scene to the appropriate section, and fill all the exported variables using the inspector.

image
  • This Item ID: Set this to the ID of the object this button pertains to.
  • Tilebar: Drag the root Control node into this field.
  • Is Texture Updating: Enable to ensure this button's texture updates with custom assets (MORE INFO BELOW)
  • Entity Name: Fill in to make this compatible with swapping animations (MORE INFO BELOW)
  • Button Type: Set to Tile, Entity or Prop appropriately.
  • Button Image: Automatically set to this object's child TextureRect. Do not modify.

Hotkey Compatibility

Miscellaneous Behavior

Asset Swapping

To add compatibility with the asset manager (and allow an object to have its asset swappable,) different steps are taken for each object type.

Tile & Prop Image Swapping

To make a tile or prop compatible with image swapping, simply add it to the appropriate string array in ImageSwapping.gd.

image

Entity Animation Swapping

Clone this wiki locally