Module:Buildables/doc
This is the documentation page for Module:Buildables
Module:Buildables
Renders listing tables and infoboxes for buildable sets and pieces, across three scopes: structures, decorations, and placeables.
Datasets live at Module:Buildables/data/<SCOPE>/<SET_SLUG> - see Module:Buildables/data/doc for the schema.
Usage
List all pieces in a set
Renders a sortable wikitable of every piece in the specified set, wrapped in a collapsible section.
{{#invoke:Buildables|list|Structures|CHOAM Facility}}
Filter to pieces from a single source:
{{#invoke:Buildables|list|Decorations|Miscellaneous|source=Shaddam IV Portraits}}
Usage on a Buildable Set page:
{{#invoke:Buildables|list|Decorations|Miscellaneous|expanded=yes}}
Usage on a DLC page:
{{#invoke:Buildables|list|Structures|Water Shipper|scopeHeading=yes|source={{BASEPAGENAME}}}}
List all sets in a scope
Renders a grid of set infoboxes for every set discovered under the specified scope.
{{#invoke:Buildables|listSets|Structures}}
Get a single piece
Renders the infobox for one piece, resolved by its display name.
{{#invoke:Buildables|get|Structures|CHOAM Facility|Foundation}}
Parameters
list
- 1
- string
- The scope. One of
placeables,structures, ordecorations.
- 2
- string
- The set name. Slugified to locate both the dataset and its MessageBundle subpage.
- source (optional)
- string
- Restricts the table to pieces matching this source. Matching ignores the bundle prefix, so the plain source name is sufficient. When applied, the Source column is hidden unless at least one remaining piece has multiple sources.
- scopeHeading (optional)
- boolean
- If true, the section heading shows the scope name (e.g. "Structures"), and the set name moves to the subtitle.
- Defaults to false. The heading displays the set name and links to the corresponding set page.
- heading (optional)
- number
- Heading level for the section title, 1 to 6. Specify 0 to omit the heading entirely.
- Defaults to 3.
- expanded (optional)
- boolean
- Overrides the automatic collapse behaviour. Pass
expanded=yesto keep the table open regardless of piece count, orexpanded=noto force collapse.
listSets
- 1
- string
- The scope. One of
placeables,structures, ordecorations.
Set discovery is automatic via DPL — every subpage of Module:Buildables/data/<SCOPE>/ is treated as a set. Each set is rendered as an infobox showing its name, representative image, scope label, total piece count, and parent set link (if applicable).
get
- 1
- string
- The scope, as above.
- 2
- string
- The set name, as above.
- 3
- string
- The piece name. Slugified and matched against the piece IDs in the dataset.
Notes
- Output from
listis wrapped in a shared collapsible section (see Module:Common). A count marker (Total: <n>) appears between the heading and the content and stays visible regardless of collapse state. - Set infoboxes (in
listSets) are rendered directly via Module:InfoboxLite in Lua, bypassing template expansion for performance. - Scope and set titles resolve via MessageBundle:Buildables; piece and category names resolve via the scope's own bundle.
- For the
placeablesscope, the Name column links each piece to its own page. Structures and Decorations pieces are not individually linked in the list view. - The section heading's label and link target ordinarily come from the set's own key in MessageBundle:Buildables, but a dataset may override this via
setNameand/orpageLink. See Module:Buildables/data/doc for specifics. - Sets embedded within another set in-game declare a
parentSet, which renders a "Found under" link in the subtitle. For thestructuresscope, sets without a parent still render a blank subtitle row to maintain consistent infobox height across the grid.