Skip to content

Tutorial Six Stats

johnjohto edited this page Jul 29, 2026 · 1 revision

Tutorial: The Six-Stat Vocabulary

Split Special into Special Attack and Special Defense — crystal's own model, as a declared vocabulary. One line in your ruleset chooses it; the engine's stat math, battle selection, EV economy, and the wire all follow.

Declare it

Two things, both in data/ruleset.json:

{
 "base": "gen1",
 "mon_wire": 3,
 "stats": ["hp", "atk", "def", "spd", "sat", "sdf"]
}

stats is the ordered stat vocabulary. The engine knows two: the gen-1 five (the absent default) and this six — spd is Speed, sat/sdf the special halves, in the cartridge's own stat order. Anything else refuses at --validate and boot. The six needs mon_wire: 3 — the wire whose ivs/evs bags carry the new columns.

Declare it at the root (the whole project runs six) or inside a named ruleset entry (a save chooses it in-story — see Per-Save Rulesets).

What your species data looks like

sat/sdf are additive in species stats (and ev_yield). Declare them where you have real numbers; leave them off and both halves derive from spc — partial data degrades honestly, the same shape as per-move category:

"stats": {"hp": 90, "atk": 85, "def": 100, "spd": 55, "spc": 80, "sat": 60, "sdf": 100}

bst sums the declared set — a spc-100 species with no declared halves counts 100 per half. If your stat_base_scale kernel bands by bst, six-wide numbers are what it sees.

What changes in play

  • Stat math: sat and sdf compute from the single spc DV and the spc stat-exp pool — crystal's CalcMonStatC, faithfully. DVs never widen; genetics stay five.
  • Battle: special moves attack with sat and defend with sdf. Gen-1's one "SPECIAL" — stage moves, X SPECIAL, the AI — resolves to sat. CALCIUM awards the attacking half through your ev_gain kernel.
  • Kernels: stat_calc2 runs once per declared stat; ev_gain sees ev_sat/yield_sat/base_sat rows. Your caps live in your kernel, as ever.
  • Natures: up/down accept sat/sdf; existing four-stat tables keep validating.
  • The wire and saves: mon/3 records stay minimal (deviations only); existing wire-2 saves widen at load by copying the spc column onto both halves. friendship and pokerus ride along inert — carried for the Johto era, never read today.
  • Linking: the declared vocabulary joins the handshake — a five-wide and a six-wide copy refuse to link instead of desyncing.

The four-row stat screens show sat on the SPECIAL row for now; the six-row screen arrives with the Johto era's UI work.

Pairs with Per-Save Rulesets and Modern Individuals. Gate: --sixstattest.

Clone this wiki locally