Null Bolt
Studio
guides

Types, sub-types & templates

Three layers define what an item can be: a broad type, a sub-type that inherits and specializes it, and an optional template that pins names, icons, and forced affixes.

Item types — the broad categories

An ItemTypeDefinition (AssetsCreateItem GeneratorItem Type) carries the defaults for a whole category. The example content ships four: Weapon, Armor, Jewelry, Offhand.

FieldTypeDescription
Base Stat PoolStatPoolEntry[]Stats every item of this type rolls (each entry: stat + min–max range). All entries roll — this is not a weighted pick.
Implicit ModifiersStatPoolEntry[]Always-on bonus rolls, shown separately from affixes.
Allowed StatsStatDefinition[]Whitelist of stats affixes may grant on this type. Empty = anything.
Base Value / Base Durability / Default Max Stackfloat / int / intEconomy and durability baselines (defaults 10 / 100 / 1), scaled later by rarity.
Default Icon / Default PrefabSprite / GameObjectVisual fallbacks when neither sub-type nor template supplies one.

Sub-types — inheritance with four modes

An ItemSubTypeDefinition (13 ship — from Sword and Grimoire to Ring and Focus) points at a parent type and refines it. How its stat whitelist combines with the parent's is controlled by an InheritanceMode:

ModeDescription
InheritUse the parent’s allowed stats verbatim.
OverrideReplace them entirely with this sub-type’s list.
ExtendParent’s list plus this sub-type’s additions (deduplicated, order kept).
RestrictParent’s list minus the stats named here.

Everything else resolves predictably:

PropertyDescription
Base stat poolSub-type override replaces the parent’s pool when non-empty; otherwise the parent’s is used.
Implicit modifiersAdditive — the parent’s implicits roll first, then the sub-type’s extras.
Value / durability / stack / icon / prefabPer-field override toggles; anything not overridden falls through to the parent.
// tip
The sub-type inspector has a read-only Resolved Inheritance Preview foldout showing exactly what a generated item will use — resolved stats, implicits, value, durability — so you never have to trace the chain by hand.

Templates — pinned blueprints

An ItemTemplate fixes identity: base name, description, icon, prefab, item level, and optionally overridden stats, value, stack size, or durability. Templates are also where two powerful knobs live:

FieldTypeDescription
Forced AffixesAffixDefinition[]Always applied, rolled first, and excluded from random duplication — signature stats for signature items.
Allowed RaritiesRarityDefinition[]Which rarities this template may roll at (empty = all). The editor window enforces it; check IsRarityAllowed() in your own drop code.
Legendary EffectLegendaryEffectName + description + EffectId. Attached when the rolled rarity allows legendary effects — your gameplay code looks the EffectId up.
Item LevelintMetadata for your own systems — it does not scale any roll; rarity is the only power scalar.
The Templates tab with the template list and inspector
Templates tab — searchable list on the left, full inspector on the right, + New Template to add one.

The example set ships 14: ten standard (Iron_Sword, Battle_Axe, Mystic_Staff, Grimoire, Plate_Cuirass, Leather_Vest, Iron_Helm, Travelers_Boots, Gold_Ring, Tower_Shield) and four Unique-only legendaries — Doombringer, Skullsplitter, Stormcaller, Heartwarden — each locked to the Unique rarity with a pre-authored legendary effect.

Stats — the vocabulary

A StatDefinition names one stat (id, display name, value type Flat / Percentage / Multiplier, category). The example content covers 15 — attack, defense, the five attributes, crit chance/damage, attack speed, life on hit, resist, move speed, cooldown reduction, resource regen, and thorns. Rolled values format themselves via StatModifier.GetDisplayString() (e.g. +150 Attack, +12.5% Crit Chance).

Registering your own content
text
1. Create assets:  Assets ▸ Create ▸ Item Generator ▸ (Stat / Rarity / Item Type /
   Sub-Type / Affix / Template / Name Generation Config)
2. Open the window ▸ Configuration tab ▸ "Auto-Discover Content"
   — scans the whole project and registers everything into GeneratorSettings.
3. "Run Validation" lists anything misconfigured, clickable to ping the asset.