Rolled Stats & Stamping

Roll stats onto an item a player already owns - an anvil ritual, a stamped quest reward, or anything else that hands back a better version of the thing you walked in with

Since 1.6.0

Gear Stats covers stats an item is authored with: every copy of that item id carries them, and a pack author decides the numbers up front. This page covers the other half - stats rolled onto one particular stack after a player already owns it. An anvil that upgrades the sword in your hand, a quest that hands back your own pickaxe with a luck roll on it, a rare drop that arrives already rolled.

Where the stats live
On the stack
Roll table
RollPools/
Stampers per server
Exactly 1
Re-stamping
Sums

The stamp paradigm: the item is the record

A stamped item is never a new item asset. The stats are written into that one stack's own metadata, which the game persists with the stack itself - so an enhanced sword survives a chest, a trade, a death, and a server restart with nothing tracking it anywhere else. There is no per-player enhancement table to keep in sync, and no ever-growing catalogue of one-off item ids.

Three consequences worth designing around:

  • Enhanced stacks never merge with plain ones. The game compares metadata when deciding whether two stacks combine, so a rolled item stays its own stack. Enhancing something players hold in quantity (arrows, throwables) splinters their inventory.
  • The item keeps its own name. Nothing renames a stamped item, and there is no tier or quality vocabulary bolted onto it. What changed shows up in the description, under an Enhancements heading.
  • Whoever holds the item holds the enhancement. Give it away and the stats go with it. That is usually the point; if a bonus should belong to the player rather than the object, it belongs in a skill tree node or a mastery track, not a stamp.

What a stamp writes

One record on the stack, holding a map of stat id to points, plus a count of how many times that exact stack has been stamped.

FieldTypeDefaultDescription
Entriesmap of stat id to numberoptionalThe stats the item carries, summed. A percent-family stat is stored in whole percent points - the same convention an authored StatModifiers block uses, so 10 means +10%, never 0.10. A flat stat stores its raw number.
StampCountnumberoptionalHow many completed stamps this stack has taken. A never-stamped item reads as 0. This is what repeat-cost scaling measures, and it only advances on a stamp that actually committed.
* required

Stamping is additive by default

A second stamp SUMS with what is already there: two points of crit chance stamped twice reads as four, one entry, one tooltip line. Nothing an enhancing system does silently deletes stats the item already carries. A wipe is always something a caller asks for explicitly.

How a stamped stat reaches the player

Stamped entries are not consulted at the moment of a swing. When the item is equipped, its entries are converted into modifiers on the same native MMO_* stat channels an authored gear stat writes to, and removed again when it is unequipped. There is one aggregation authority, so a stamped MMO_Lifesteal and an armour-authored one are the same number in the same place.

FieldTypeDefaultDescription
Armour slotsappliedoptionalEach worn piece contributes its own stamped entries.
Held itemappliedoptionalThe item currently in hand contributes its stamped entries, and swaps them out the moment you switch.
Offhand / utility slotappliedoptionalThe active utility-slot item contributes its stamped entries.
Anything in the bagnot appliedoptionalA stamped item sitting in the inventory grants nothing until it is worn or held.
* required

Because the channel is the same one everything else writes to, a stamped stat behaves exactly like the authored kind: it feeds plain weapon swings, ability damage that resolves to that skill, and damage over time. An enhanced weapon therefore strengthens the bleed it applies as well as the hit that applied it. A single damage-over-time step can opt out of that with GearEnhancement: false, which fixes that one tick at its authored value; it excludes per-stack enhancement only, and leaves an item's own authored stat modifiers untouched.

Which stat ids to roll

A stat id in a roll pool is the id of a real stat channel - the full MMO_* catalog is the vocabulary to draw from, and a vanilla stat like Mana works just as well. There is no separate list of enhanceable stats: if an item could be authored with it, a stamp can roll it.

A misspelled stat id rolls silently

The rolling engine treats a stat id as opaque - it rolls numbers and enforces budgets, and never checks that the id means anything. A typo produces a real entry with real points that simply never affects anything. Copy ids from the gear-stats catalog rather than typing them out.

Roll pools: the shared table a stamp draws from

Content pack assetServer/ZiggfreedCommon/RollPools/<Name>.jsonZiggfreedCommon/RollPools/

A shared-library asset type, so any mod on the server that stamps draws from the same named pools. The pool id is the filename, lower-cased. A pack file replaces a pool of the same id outright - Entries is a whole-table replace, never a per-entry merge.

Prefer a content pack: author one file per roll pool under Server/ZiggfreedCommon/RollPools/ inside a pack folder, zip it, and drop the .zip into your server Mods/ folder. Building the zip.

One candidate outcome is one entry:

FieldTypeDefaultDescription
StatstringoptionalThe stat id this entry awards.
Points{ Min, Max, Factors? }optionalThe rolled value: uniform between Min and Max, plus an optional weighted Factors sum so a roll can scale with something about the player. Rounded to a whole number, and a roll that rounds to nothing awards nothing.
WeightnumberoptionalThis entry's share of the lottery. Omitting Weight and writing 0 mean different things: omitted is an ordinary entry, a written 0 is never drawn, which is how a pool entry is parked without deleting it.
AlwaysbooleanoptionalGranted on every stamp, outside the lottery. It costs no pick and its weight is never consulted.
* required

Weight and Always are independent, and between them cover every shape anyone authors: all weights is a lottery, all Always is a fixed set, and mixing them is a guaranteed baseline plus a lucky extra.

Server/ZiggfreedCommon/RollPools/MyWeaponStats.json
{
  "Entries": [
    { "Stat": "MMO_CritChance",        "Points": { "Min": 2, "Max": 6 },  "Weight": 1 },
    { "Stat": "MMO_CritMultiplier",    "Points": { "Min": 5, "Max": 15 }, "Weight": 1 },
    { "Stat": "MMO_Lifesteal",         "Points": { "Min": 2, "Max": 5 },  "Weight": 1 },
    { "Stat": "MMO_CooldownReduction", "Points": { "Min": 2, "Max": 6 },  "Weight": 1 },
    { "Stat": "MMO_Bonus_Fire",        "Points": { "Min": 3, "Max": 10 }, "Weight": 0.5 },
    { "Stat": "Mana",                  "Points": { "Min": 5, "Max": 15 }, "Weight": 1 }
  ]
}

Picks, Unique, and the budget model

A stamp names its candidates (a shared Pool, inline Entries, or both at once - the entry shape is identical either way), how many it draws, and the ceilings the result is held under.

FieldTypeDefaultDescription
Poolroll pool idoptionalThe shared table to draw candidates from.
EntriesarrayoptionalInline candidates, same shape as a pool entry, for a one-off set not worth naming.
Picks{ Min, Max }optionalHow many weighted entries one stamp draws. Always entries are extra and never count toward this range.
UniquebooleanoptionalNever pick the same stat id twice in one stamp.
Caps.BudgetsarrayoptionalTotal-point ceilings. Each entry is either a flat { Points } or a factor-scaled { PointsPer, Factors }, never both. The lowest one binds, which is what lets a hard maximum sit beside an allowance that grows with a player's skill.
Caps.PerStatmap of stat id to numberoptionalA ceiling on one stat id, layered on top of the total budget.
* required

No Picks authored draws zero

Picks has no default. A spec built only from Always entries is then fully predictable, and a spec that simply forgot its Picks is visibly inert instead of quietly handing out free rolls.

Every ceiling is measured against what the item already carries, so budgets survive re-stamping: an item enhanced up to its budget cannot be pushed past it by going round again. When the ceilings cut away everything that was rolled, that is a denial, distinct from an ordinary miss - it is the signal to stop before charging the player, so a full item can never be farmed for nothing.

Where a stamp happens

A work station ritual

The richest route: a work station step that consumes reagents, can raise the item's maximum durability, and rolls the stats - the shape behind an anvil enhance ritual. The whole attempt is worked out before anything is touched and only then committed, so a failed stamp leaves the reagents and the item exactly as they were.

A Stamp step inside a station action
"Stamp": {
  "Reagents": [ { "ResourceTypeId": "Metal_Bars", "Quantity": 2 } ],
  "Durability": { "AddMax": 10 },
  "Stats": {
    "Pool": "myweaponstats",
    "Picks": { "Min": 1, "Max": 2 },
    "Unique": true,
    "Caps": {
      "Budgets": [
        { "Points": 30 },
        { "PointsPer": 0.5, "Factors": [ { "Factor": "hytale:stat", "Param": "MMO_Level_SMITHING" } ] }
      ],
      "PerStat": { "MMO_CritChance": 10 }
    }
  },
  "Economics": { "RepeatCostMultiplier": 0.5 }
}

Economics.RepeatCostMultiplier sits beside Stats, not inside Caps, and scales the reagent cost by how many times this stack has been stamped before: ceil(quantity * (1 + multiplier * priorStamps)). It never touches the point budget, so the tenth enhancement costs more, it does not roll smaller. Full field reference: the RPG Stations schema.

The scaled budget in that example reads a skill level off the same requirement factor vocabulary every gate uses, so the allowance grows with the smith rather than with the item.

The engine ships before the anvil does

Stamping is fully authorable today by any pack that installs RPG Stations. The MMO Skill Stations Pack ships the Sawmill only; its Anvil is finished and queued for a later release, so a pack author who wants an enhancement station builds one now rather than waiting.

A reward that hands over pre-stamped gear

Any reward the shared library pays out - a quest, an achievement, a shop offer, a bounty - can use the Stamped_Item kind to hand over an item with stats already on it. Name a Pool to roll them fresh, or write them out exactly with Stats.

json
{ "Type": "Stamped_Item", "Item": "Weapon_Sword_Steel", "Count": "1", "Pool": "myweaponstats", "Picks": "2" }

{ "Type": "Stamped_Item", "Item": "Weapon_Sword_Steel", "Stats": "MMO_CritChance:5,MMO_Lifesteal:2" }

Both routes write through the same stamper, so a rewarded item carries the identical format, and counts against the identical budgets, as one earned at a station. A reward that has to be replayed later (the player's bag was full when they earned it) hands over the bare item: the roll belonged to a moment that has passed, and re-rolling it days later would quietly award something other than what the player was shown.

The admin test lever

/mmoitemenhance rolls stats onto whatever you are holding, for checking that a stat, a tooltip, or an equip bonus behaves. It is a diagnostic command, not a gameplay feature: it draws from a built-in pool suited to the held item rather than from your own RollPools.

FieldTypeDefaultDescription
/mmoitemenhanceadminoptionalRoll stats onto the held item, merging with whatever it already carries.
/mmoitemenhance replaceadminoptionalWipe the existing enhancement first, then roll.
/mmoitemenhance refreshadminoptionalRe-draw the tooltip from the stats the item already has, with no roll and no stat change - the fix for a stamped item whose description has gone stale.
* required

What the player sees

A stamped item's description is rewritten on that stack: the item's own flavour prose, then an Enhancements heading, then one coloured line per stat - school colours for school damage, gold for luck, blue for bonus XP, red for crit, crimson for lifesteal, cyan for cooldown reduction, steel for defense. Duplicate stats are summed into one line, and every line is resolved in the reading player's own language.

This tooltip surface has no markup parser

Colour and line breaks work here; formatting tags do not. A <color> or <b> tag written into an item description renders as visible literal text on a stamped item. An item whose own description contains markup keeps that markup in its normal tooltip, and a stamp on it shows the Enhancements section alone rather than printing tags at the player.

Anything else that reports an enhancement - a station's end-of-session summary, for instance - asks the stamper for the same line rather than inventing its own wording, so the summary and the item agree word for word and colour for colour.

One stamper per server

Exactly one component decides how an item carries stamped stats, and MMO Skill Tree installs it. That is deliberate: two would mean two formats on the same items, and every budget check would then be reading half the history, so ceilings would quietly stop holding. Other mods stamping the same item is fine and expected; they all write through the one stamper, so a station, a reward, and a drop table each leave a record the others can read.

A pack author never registers anything for this. Authoring a pool and a stamp step is the whole job; where the numbers land is settled before your content loads.

Worked example: a tool enhancement

A pool that gives a pickaxe a guaranteed mining-luck baseline plus one lucky extra, held under a flat budget:

Server/ZiggfreedCommon/RollPools/MyToolStats.json
{
  "Entries": [
    { "Stat": "MMO_Luck_MINING",    "Points": { "Min": 2, "Max": 4 }, "Always": true },
    { "Stat": "MMO_BonusXp_MINING", "Points": { "Min": 3, "Max": 8 }, "Weight": 2 },
    { "Stat": "MMO_Luck",           "Points": { "Min": 1, "Max": 3 }, "Weight": 1 },
    { "Stat": "MMO_BonusXp",        "Points": { "Min": 2, "Max": 5 }, "Weight": 1 }
  ]
}
The stamp that draws from it
"Stats": {
  "Pool": "mytoolstats",
  "Picks": { "Min": 1, "Max": 1 },
  "Unique": true,
  "Caps": { "Budgets": [ { "Points": 24 } ], "PerStat": { "MMO_Luck_MINING": 12 } }
}

Every stamp grants the mining-luck baseline and exactly one of the three weighted extras. The item can be brought back until it holds 24 points in total, and never carries more than 12 points of mining luck however many times it is enhanced. Nothing about the pickaxe's item asset changes; the player's own pickaxe simply gets better.