Module:Buildables/doc

From Dune: Awakening Community Wiki
Jump to navigation Jump to search

This is the documentation page for Module:Buildables

Module:Buildables

Renders listing tables and infoboxes for buildable 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=Lost Harvest}}

Get a single piece

Renders the infobox for one piece, resolved by its display name.

{{#invoke:Buildables|get|structures|CHOAM Facility|Observer Foundation}}

Parameters

list

1
string
The scope. One of placeables, structures, or decorations.
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 specified, the Source column is hidden, since every row would show the same value.
scopeHeading (optional)
boolean
If true, the section heading shows the scope name and the set name moves to the subtitle. Used when several sets are listed under one scope heading.
Defaults to false.
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.

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 is 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. The section auto-collapses by default once the item count exceeds 6; pass expanded=yes to override.
  • Generic column headers (Icon, Name, Category, Health, Cost, Source, Version) resolve via MessageBundle:Labels. Scope and set titles resolve via MessageBundle:Buildables; piece and category names resolve via the scope's own bundle.
  • Displayed columns vary by scope: the Health column is hidden for decorations, and the Source and Version columns are hidden for placeables.
  • Sets embedded within another set in-game declare a parentSet, which renders a "Found under" link to the parent's section in the subtitle.
  • Dataset errors (duplicate piece IDs, unrecognised category keys) throw rather than degrade, since a corrupt set has nothing left to render.