data/items/
An item kind: what an item is. It gives the item’s name, the model a held or dropped item shows, what it grants while equipped (abilities, stat modifiers, damage hooks), and the block it is, for items that are also blocks. Loot entries, loadouts and the equipment component name item kinds.
| Registry | manifold:item-kind |
| Files | data/items/*.ron, *.update.ron, *.final.ron |
| Sides | both: the server and every client load it, and the handshake’s data hash covers it |
| Reads | manifold:predicate, manifold:stat |
| Contract | Gameplay framework, data stage |
Entry
A record, written ItemKind(..); the name before the parentheses is optional.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
id | string | yes | The item kind’s key, <mod-id>:<name>. | |
name | Key or None | no | <mod>.item.<id>.name | The name’s message key, written Key("<key>") or as a string; the mod’s catalog must define it, or the data stage reports DATA010. |
model | string or None | no | the drop archetype’s model | The model a held or dropped item shows (a model recipe: flagship:weapons/m14). |
grants | Grants | no | nothing | What it grants while equipped. |
block | string or None | no | none | The block key of an item that is also a block: what a pickup puts in a block inventory. |
Example
From game/flagship-game/data/items/creature_drops.ron:
ItemKind(id: "flagship-game:leather")
Types
Key
A message key.
Written Key(..) around string, or as the bare value.
Grants
What an item grants while equipped.
A record: Grants(..) or (..).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
abilities | list of string | no | none | Abilities (manifold:ability keys); unequipping cancels any that run. |
stat_modifiers | list of GrantedModifier | no | none | Constant stat modifiers. |
damage_hooks | list of DamageHook | no | none | Damage hooks, ordered after effects’ by slot. |
GrantedModifier
A stat modifier granted while its source lasts: an item while equipped, or an ability while granted.
A record: GrantedModifier(..) or (..).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
stat | string | yes | The stat (manifold:stat key). Not a resource: modify its maximum. | |
op | ModOp | yes | How it combines. | |
value | number | yes | The amount: a constant. A value that scales with its holder is a derived stat. | |
scope | condition or None | no | always counts | A condition in the damage context: the modifier counts only when the stat is read while a hit is resolved and the condition holds (“+100 against undead”). |
ModOp
How a stat modifier combines with the stat’s other modifiers. A stat’s value is (base + Σ Flat) × (1 + Σ Increased) × Π (1 + More) + Σ Final, then the last Override, then the stat’s clamp and rounding.
| Variant | Written | Description |
|---|---|---|
Flat | Flat | Added to the base. |
Increased | Increased | Summed with the other Increased modifiers, then multiplies. |
More | More | Multiplies on its own (0.5 is +50%, -0.5 is half). |
Final | Final | Added after the multipliers. |
Override | Override | Replaces the value; the last applied wins. |
DamageHook
A data hook on the damage pipeline, evaluated in the damage context (This is the victim; v.damage_amount is the stage’s amount). Within a stage, hooks run by priority, then side, then source, then list order.
A record: DamageHook(..) or (..).
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
stage | DamageStage | yes | The pipeline stage it runs at, which limits its actions. | |
side | HookSide | yes | Which participant carries it: an Attacker hook on a sword’s effect runs when its holder attacks, a Victim hook on a shield’s when its holder is hit. | |
priority | i16 | no | 0 | Higher runs first, -32768 to 32767. |
when | condition or None | no | always | A condition that must hold. |
action | DamageAction | yes | What it does. |
DamageStage
A stage of the damage pipeline.
| Variant | Written | Description |
|---|---|---|
Admit | Admit | Before anything: Cancel. |
Gather | Gather | The attacker’s part: Add, Multiply, Set, AddContextTag. |
Convert | Convert | Between elements: Convert. |
Mitigate | Mitigate | The victim’s part: Add, Multiply, Set. |
PreApply | PreApply | Last changes (blocks, parries, shields): all of the above and Cancel. |
PreDeath | PreDeath | A killing hit only: Cancel (the victim survives), ApplyEffect. |
PostHit | PostHit | After the hit: ApplyEffect, Reflect, Leech, Knockback, Cue. |
PostKill | PostKill | After a kill: as PostHit. |
HookSide
The participant a hook belongs to.
| Variant | Written | Description |
|---|---|---|
Attacker | Attacker | The attacker. |
Direct | Direct | The direct source (an arrow). |
Owner | Owner | The attacker’s owner. |
Victim | Victim | The victim. |
DamageAction
What a hook does. Actions may also be written positionally, in field order (Cancel("x:cancel.blocked")); Add, Multiply and Set take (<value>) or (<element>, <value>).
| Variant | Written | Description |
|---|---|---|
Add | Add(value: .., element: ..) | Adds to an element’s amount. |
Multiply | Multiply(value: .., element: ..) | Multiplies by 1 + value, on one element or all of them. |
Set | Set(value: .., element: ..) | Sets one element’s amount, or the total (rescaling the elements). |
Convert | Convert(from: .., to: .., fraction: ..) | Moves a fraction of one element’s amount into another. |
Cancel | Cancel(reason: ..) | Stops the hit, with a reason tag (manifold:cancel.* or the game’s). |
AddContextTag | AddContextTag(tag: ..) | Adds a tag to the hit’s context tags. |
ApplyEffect | ApplyEffect(to: .., effect: .., level: ..) | Applies an effect to a participant, with the hook’s holder as source. |
Reflect | Reflect(fraction: .., damage_type: ..) | Thorns: deals a fraction of the applied amount back to the attacker as a new hit (never more than two levels deep). |
Leech | Leech(fraction: .., resource: ..) | Lifesteal: heals the attacker by a fraction of the applied amount. |
Knockback | Knockback(add: ..) | Adds to the hit’s horizontal knockback, m/s. |
Cue | Cue(cue: ..) | Plays a cue at the hit. |
Add fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | number | yes | The amount, a number. | |
element | string or None | no | the hit’s primary element | The element (manifold:element key). |
Multiply fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | number | yes | The change (-0.5 halves). | |
element | string or None | no | every element | The element. |
Set fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
value | number | yes | The amount. | |
element | string or None | no | the total | The element. |
Convert fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
from | string | yes | The element taken from. | |
to | string | yes | The element given to. | |
fraction | number | yes | The fraction, clamped to 0..=1. |
Cancel fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
reason | string | yes | The reason tag. |
AddContextTag fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
tag | string | yes | The tag. |
ApplyEffect fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
to | subject | yes | The participant. | |
effect | string | yes | The effect (manifold:effect key). | |
level | number | no | the holding effect’s | The effect’s level. |
Reflect fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
fraction | number | yes | The fraction. | |
damage_type | string | yes | The reflected hit’s damage type. |
Leech fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
fraction | number | yes | The fraction. | |
resource | string | no | manifold:health | The resource healed (manifold:stat key). |
Knockback fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
add | number | yes | The speed added. |
Cue fields:
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
cue | string | yes | The cue (manifold:cue key). |