Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

data/roles/

A role: a named job inside a squad, such as a charger or a watcher. A brain’s RequestRole task asks for one; the squad grants it within its style’s counts and the role’s max_per_group, while the member meets requirements. A held role scales the utility of matching activities and grants its tags. Loaded by the server only.

Registrymanifold-ai:role
Filesdata/roles/*.ron, *.update.ron, *.final.ron
Sidesserver: only the server loads it
Readsnothing
ContractPopulation, data stage

Entry

A record, written Role(..); the name before the parentheses is optional.

FieldTypeRequiredDefaultDescription
idstringyesThe role’s key, <mod-id>:<name>.
max_per_groupnumber or NonenounlimitedHow many members may hold it: a number over v.group_size, the squad’s member count ("math.max(1, math.floor(v.group_size * 0.34))").
biaslist of BiasnononeUtility multipliers for activities while the role is held.
requirementscondition or NonenoalwaysA condition in the squad context over the member (This) that must hold to get and keep the role.
grant_tagslist of stringnononeTags (manifold:tag keys) granted while it is held. An unknown key fails the data stage (DATA010).
release_after_idle_secsf32no10.0A requested role not asked for again within this many seconds is released.

Example

No bundled file declares one yet. From the reference’s test fixture, crates/manifold-server-state/tests/data-reference-fixture/data/roles/guard.ron, which the data stage loads in its tests:

RoleDef(id: "dataref-fixture:role/guard")

Types

Bias

A role’s utility multiplier for one activity.

A record: Bias(..) or (..).

FieldTypeRequiredDefaultDescription
activitystringyesThe activity’s id in the member’s brain.
multiplierf32yesThe multiplier, 0 to 16.

Value forms used here: condition, number.