Module:Buildables/data/doc
Jump to navigation
Jump to search
This is the documentation page for Module:Buildables/data
Module:Buildables/data/...
Dataset for a single Buildables set.
Subpage title
The subpage title is the slug of the set's English name, derived via common.slugify() from Module:Common. It must exactly match the subpage used for MessageBundle:Buildables/<SET_SLUG>.
Examples:
dune_manchoam_facility
Schema
The dataset is a two-level table, first keyed by category slug, then containing an array of piece records.
For translation-compatibility, display strings are stored exclusively in MessageBundle:Buildables and MessageBundle:Buildables/<SET_SLUG>.
First key
Category (slugified). Valid categories:
structuralwallwedge_wallroofinclinespecial
Record fields
Each record is a table with the following fields:
- id
- string
- Unique slug identifying the piece within this set. Used to resolve
<ID>-nameagainst MessageBundle:Buildables for generic shared names (e.g.wall,floor), with automatic fallback to MessageBundle:Buildables/<SET_SLUG> for set-specific names.
- image
- string
- Filename of the piece icon image.
- source
- string
- A
Bundle:slugtoken identifying where the piece's source label is registered. The prefix is the exact case-sensitive MessageBundle name to resolve against. - Examples:
DLC:lost_harvestDLC:raiders_of_the_broken_lands
- health
- number
- Health points of the piece.
- costs
- table
- A table of building material costs, keyed by material name with integer values representing the required quantity.
- Examples:
{ ["Granite Stone"] = 10 }{ ["Granite Stone"] = 10, ["Iron Ingot"] = 20 }