Pages

Identifier rules

Every id a creator writes (a mod's in mod.toml, and every unit, weapon, map, theme and armor category in a content pack) has the same shape:

^[a-z][a-z0-9-]*$

Lowercase letters, digits and hyphens, starting with a letter. The loader rejects anything else.

Identifier Valid Why
hello-world-mod yes
greeter yes
arm-commander-v2 yes digits after the first character
Hello-World no uppercase
hello_world no underscore
hello world no space
1st-mod no starts with a digit
-mod no starts with a hyphen
mod.v2 no . separates namespace and id

Namespaces

A mod's id is its namespace and must be unique among the registered mods. A content item's id is unique among items of its kind in its mod; two mods may both have a unit greeter.

The fully qualified form is <mod-id>.<content-id>, for example unit-pack.greeter. References between items always use it, even inside one mod: a unit's weapons and a builder's production.builds list fully qualified ids, and both must name items in the same pack. The one exception is the keys of a weapon's [damage_profile.overrides], which are bare armor category ids (ARMOR_TARGET_CATEGORY_SCHEMA.md).

Stability

Other content and the menus' saved choice refer to an item by its id, so renaming one breaks them. Keep ids unchanged between releases.