Skip to content

Modifiers ​

A modifier changes a value when its conditions pass. Modifiers are how points, stats, names, availability, and limits react to what is in the list. Taking an upgrade might raise a unit's cost, grant +1 to a stat, or unlock another option; each of those is a modifier.

The parts of a modifier ​

  • Type: the operation to perform, such as set or increment.
  • Field: what it changes, such as a cost, a characteristic, the name, the hidden flag, a constraint's value, or the primary category.
  • Value: what to set, add, append, and so on.
  • Conditions: when it applies. A modifier with no conditions always applies; add conditions to gate it.

Operation types ​

Setting and counting:

  • set: set the field to the value.
  • increment / decrement: add to or subtract from a number. A position can pick which number to change inside a string value, for example the 3 in D6+3.

Arithmetic, for numeric fields:

  • multiply, divide, modulo, power, exponent
  • floor, ceil: clamp to a minimum or maximum; if the value falls below the floor or above the ceiling, it is set to that bound (not decimal rounding)
  • triangular: triangular scaling, for stepped tables

Text, for the name and other text fields:

  • append / prepend: add text after or before, with an optional separator. The unless present flag (skipIfPresent) skips the modifier when the text is already in the value.
  • replace: replace matched text, optionally only at a given position. If the text to find is empty, it applies only when the whole value is empty, so it can fill in an empty field.

Availability and structure:

  • set-primary / unset-primary: set or clear the primary category
  • add: add something, including an error, warning, or info message that surfaces on the roster for data-driven validation
  • remove

Cumulative, which combine across repeated applications:

  • cumulative-add, cumulative-multiply, cumulative-power

All of these are selectable from the modifier-type dropdown in the editor.

Fields ​

Which fields a modifier can target depends on what it sits on (an entry, a profile, a rule, a force). The full set:

  • costs: a price
  • characteristics: a stat on a profile; works on string stats like 4+ too
  • name: the displayed name
  • annotation: a parenthetical shown after the name, as Name (Annotation)
  • description: the body text of a rule or profile
  • page: the page reference
  • hidden: whether it shows in the builder
  • tracked: whether a category always shows its count and limits, the Show tracker checkbox v1.4.18
  • category: add or remove a category (use the set-primary / unset-primary operations to change the primary category)
  • constraints: a min, max, or limit value
  • defaultAmount: how many of an entry a unit starts with
  • defaultSelectionEntryId: which option a group starts on
  • error / warning / info: a validation message shown on the roster
  • Info Link: show an existing rule, profile, or info group on the target's datasheet (see Adding info to a datasheet)
  • readme: the readme text on a force

Hiding a cost type per display spot ​

Cost types themselves (in the game system, under Cost Types) can carry modifiers. Only the hidden field works there: a set hidden modifier hides the cost type conditionally.

The useful twist is where the conditions are evaluated: against each node about to display the cost, so "self" is the roster, force, or unit being rendered, not the entry the cost was paid on. An instanceOf condition on "self" therefore controls the spots where the cost shows:

  • "self is Roster" hides it from the roster total, while forces and units still show it.
  • "self is Force" (or a specific force entry) hides it on force totals only.
  • Inverted with notInstanceOf, the cost shows only in one spot.

Typical use: a bookkeeping currency such as a per-unit resource that would be noise summed at the roster level, or an army-wide tally that is meaningless on individual units.

Without conditions a modifier always applies. With conditions it applies only when they pass.

Modifiers run in the order they are listed, but first they are re-ordered by operation type into these steps:

  1. set, add, remove, set-primary, unset-primary
  2. append, prepend
  3. increment, decrement and the arithmetic operations (multiply, divide, modulo, power, exponent, triangular)
  4. floor, ceil
  5. the cumulative operations and replace

So a set always runs before an increment, no matter how the modifiers are arranged: the base value is set first, then adjusted, then clamped. Within the same step, the listed order is kept, so re-arranging modifiers (turn off sorting, see Sorting) only decides order between modifiers of the same step.

Repeats ​

A modifier can repeat, applying once for every N of something instead of a single time. A repeat has its own scope and query, for example "1 per model in parent", and the modifier runs that many times. This is what scales per-model costs and ratio limits: an increment-cost modifier that repeats once per model raises the price for each model. See Points that scale per model and the N per M limit.

A modifier can have more than one repeat; their counts add together, so the modifier applies the combined number of times. Each repeat counts down by its own value ("once per N") and rounds down unless set to round up.

Relative modifiers (affects) ​

A normal modifier changes the node it is written on. A relative modifier is written on one node but changes other nodes chosen relative to it. This is how most "this unit buffs that unit" rules are built: a modifier on an upgrade that adds +1 Attack to every model in the unit sits on the upgrade but changes the models.

A relative modifier has an Affects setting that says what it changes: a scope plus a target within it. That is the label to look for in the editor, a field in the modifier's query panel; "relative modifier" is this guide's name for the pattern, not something the UI displays.

  • self: the node itself, which is just a normal modifier
  • child selections: selections nested under the scope
  • child forces: nested forces
  • recursive: the whole subtree below the scope
  • associated nodes: follow an association to its target, with a set traversal depth
  • grouped associations: reach every member of the group

A useful way to hold it in your head: scope travels up to find a starting point, and affects travels down from there to the nodes that change. Add a condition and the change becomes conditional, without copying the modifier onto every affected entry.

Relative modifiers need "and all child selections" ticked to reach nested selections, even when the affected node has no children of its own.

Filter By ​

Affects says what kind of thing changes. Filter By, the third field in the same Query panel, says which nodes it reaches. Leave it on Anything and the modifier changes everything in range. Set it and the modifier skips everything that does not match.

Filter By takes one of these:

  • a category, so the modifier reaches every entry in that category
  • an entry, so it reaches that entry wherever it turns up
  • a built-in kind: Self, Unit, Model, Upgrade, Mount, Crew, Entry, Group

An entry matches when it carries that category or that id, which is the same test an instanceOf condition makes.

Filter By is what makes one modifier an army-wide rule. Say a sub-faction makes every Core unit count as a Regimental Unit. That is one modifier on the sub-faction entry:

  1. Set Scope to Force.
  2. Set Affects to Entries.
  3. Set Filter By to your Core category.
  4. Tick Affect child Selections and Recursive.
  5. Set the operation to Add and pick the Regimental Unit category.

Written the other way, that is one modifier on every Core unit, plus a condition on each one to work out whether the sub-faction is in play. The rule then lives in one place, and a new Core unit picks it up by having the category.

Two things to know before you lean on this:

  • A modifier changes a node, it does not create one. To set a constraint this way, the entries need that constraint already, with a base value.
  • The modifier only runs where it is written. One on a force entry applies when that force is in play, so it needs no condition saying which force this is.

The Info Link field adds an existing rule, profile, or info group to a datasheet while the modifier applies. Pick the target from the shared rules, profiles, and info groups of the catalogue and its imports; what kind of info it is gets worked out from the picked target, so there is nothing else to set.

Combined with Affects, this is the clean way to make an upgrade's rule appear on another unit. An enhancement carried by a character can put its rule on the unit the character leads: one modifier on the enhancement, with Affects following the association, instead of a hidden link on every unit that might receive it.

The added info behaves like a real info link to the target:

  • The target's own hidden flag is honored, so a hidden rule stays hidden.
  • The info disappears again when the modifier's conditions stop passing, when the option carrying it is deselected, or when the affected node leaves the Affects selection (a leader moving to another unit, for example).
  • Each applying modifier adds its own copy; two modifiers adding the same rule show it twice, which usually means one of them should be conditional.