Production schema
The [production] section of a unit file (UNIT_SCHEMA.md):
what a builder builds. It is listed on the builder, where TA lists it on
each built unit's download TDF. Set capabilities.is_builder = true on the
same unit (FBI Builder). What the loader does with it, and what it does
not: ../README.md.
| Field | Type | Rule |
|---|---|---|
builds |
array of string | Fully qualified unit ids (<mod-id>.<unit-id>), each a unit in this pack, no repeats. Empty is allowed. |
build_group |
string | Free label grouping a builder's products. |
worker_time |
integer | Nonnegative construction work rate; positive for a standalone native producer. |
build_distance |
integer | Nonnegative build range in world units; positive for a standalone native producer. |
[production.menu]
The producer owns its layout. production.builds alone determines what it
can construct; menu entries only place those products. A unit may occupy a
different page and slot in each producer's menu. Runtime restrictions, caps and
research availability remain separate from authored production membership.
| Field | Type | Rule |
|---|---|---|
layout |
string | classic (2 columns, 3 rows), 2x4, 2x5 or 2x6. Omitted means classic. This is the authored source geometry, not a player preference lock. |
page_count |
integer | Optional minimum page count, 1–256. Retains intentionally empty pages. Must include all explicit entries. Omitted means infer the required pages. |
page |
integer | Optional first page for products without explicit entries, 1–256. Omitted means 1. |
slot |
integer | Optional first slot for products without explicit entries, 1 through the layout's capacity. Omitted means 1. |
group |
string | Free authoring label. It does not change runtime pagination or membership. |
entries |
array of tables | Explicit product placements, or [] for none. |
Each [[production.menu.entries]] requires:
| Field | Type | Rule |
|---|---|---|
unit |
string | A fully qualified unit ID already in this producer's production.builds. Each product may occur only once. |
page |
integer | Page from 1 through 256; no greater than page_count when set. |
slot |
integer | Slot from 1 through the authored layout's capacity: 6, 8, 10 or 12. No two products share a page and slot. |
Explicit entries reserve their cells first. Unplaced products fill free cells
in builds order starting at page and slot, opening pages as necessary.
An untouched native producer keeps the original six-cell sequential layout.
Existing page, slot and group fields alone remain inert authoring metadata,
matching their prior runtime behavior. Adding layout, page_count or entries
(including entries = []) explicitly opts into the placement contract and
activates the fallback start anchor. Studio writes the complete placement when
a menu is deliberately edited.
The loader rejects invalid, duplicate, unresolved and conflicting entries before
runtime. Construction dependencies may form cycles: a constructor building a
factory that builds that constructor is valid.
The runtime and Studio preview use the same build-menu registry and paginator. The Classic presentation preserves authored cells and empty pages. An expanded presentation with the same shape preserves them too; another shape reflows products in authored page/slot order. Player sorting, filtering and adaptive HUD sizing can change presentation. None of these changes production membership. TA GUI/download arrangements remain owned by their existing legacy loader; native menu authoring does not rewrite imported TA files.
Reserved names
[production.tech] and [production.queue] are errors.
Example
unit-pack/content/units/factory.toml:
id = "factory"
name = "Factory"
description = "A minimal example factory that produces greeter units."
side = "example"
category = "building"
max_health = 500
[footprint]
x = 4
z = 4
[cost]
metal = 300
energy = 500
build_time = 9000
[capabilities]
can_attack = false
can_move = false
is_builder = true
[production]
builds = ["unit-pack.greeter"]
build_group = "units"
[production.menu]
page = 1
group = "infantry"
slot = 1
layout = "2x4"
page_count = 2
[[production.menu.entries]]
unit = "unit-pack.greeter"
page = 2
slot = 3