Any ruleset, down to the last formula

Built to model any game's rules, from classic tabletop to modern RPGs. Write stats, dice, costs and triggers as numbers and formulas, without programming, and Truespeak Studio checks each rule against the rest.

How it's set up

Rules › Triggers

Action

Fireball

Costs

Level 3+ spell slot
1 from Slot 3 to Slot 9, tiers 3 to 9

Targeting

Area
Sphere
Radius
20
Max Range
150

Effects

Modify Currency
HP: TARGET_HP - (SLOTLEVEL + 5)d6, damage type Fire

Resistance check

Resistance Condition
DEXSAVE(SPELLDC)
On Successful Resistance
Amount Formula (%): 50
Level 3+ spell slot is a selection set: the caster picks one slot when casting, and formulas can read the picked slot's tier, its level. TARGET_HP is the HP of each creature the sphere catches, since a bare HP would be the caster's own. In this d20 example distances are in feet, and SLOTLEVEL and DEXSAVE are aliases the project defines once, for that tier and for every Dexterity save: a level 3 slot rolls 8d6, each level above adds 1d6, and a target that makes its save resists half.

Tested on rulesets you know

Sample projects built in Truespeak Studio show how far the rules model stretches, and the app's automated tests load and validate every one of them. Your own game takes only what it needs: start with one stat and a formula and grow from there, or leave the rules out entirely for a visual novel.

  • A d20 fantasy ruleset with advantage rolls, combat maneuvers and spell slots
  • A d20 fantasy ruleset with build points, saving throws and spell resistance
  • An open-world action RPG with starting spells, spell discounts and XP multipliers
  • A seven-attribute post-apocalyptic ruleset with critical-hit tables
  • A tactical RPG built on elemental surfaces, such as oil, fire, water, steam, ice and poison clouds
  • Mechanism demos, such as clouds that drift on the wind and fires that burn out

Tip

Rules › Parameters

Start with parameters alone

Parameters and features work on their own, with no triggers, classes or time system yet. While the Classes tab stays empty, no class check runs.

Formulas and conditions

One expression language runs through the whole project: arithmetic, MIN and MAX, dice, tag queries and logical conditions, evaluated against whatever it is attached to and checked for loops and contradictions.

  • Comparisons joined with && and ||, such as STR > 5 && DEX < 10
  • Dice with counts and sizes read from stats, such as (STR + 3)d6
  • Bell-curve dice, where 1g20 favors the middle of 1 to 20 and 1d20 rolls evenly
  • The better of two rolls as MAX(1d20, 1d20)

How it's set up

Rules › Triggers, Characters

Shove · Action

Success Condition
1d20 + STR >= 1d20 + TARGET_STR

Goblin · Character

Currency Overrides: HP
2d6 + 2
Both sides roll on every shove, so a stronger target is harder to move. Each goblin rolls its HP once, when the game creates it, and keeps it.

Parameters and derivatives

Parameters are the numbers a character carries from creation, set or bought on a cost scheme with prerequisites. Derivatives are values computed from them by formula, so they always follow what they read.

  • Formulas that build on a parameter's base value, written BV, such as BV + DEX + ARMOR
  • Cost schemes Flat, Linear, Inverse Triangular, Exponential, Custom (drawn point by point), or Free
  • A second cost in another currency, such as gold for the trainer on top of points for the level
  • Integer math by default, where 7 / 2 is 3; fractional math, up to six decimal places, makes it 3.5

How it's set up

Rules › Parameters

Alchemy · Parameter

Prerequisite
INT >= 10
Cost Schema
Flat, 1 per level
Cost Currency
Skill Points

Alchemy · Cost Prerequisites Table

Levels 6 to 10
INT >= 14
Levels 1 to 10
BV <= LEVEL + 3

Carry Capacity · Derivative

Formula
STR * 10
In the table, BV, the base value, is the level being bought, so no purchase goes past the character's level + 3. Carry Capacity has no base value to buy: raise STR and it follows.

Features

Features are traits a character holds, whether chosen, bought or acquired in play, such as talents, feats, perks or a curse. They can have levels, costs and prerequisites, and a group can be declared one choice between branches.

  • Features with no effect of their own, changing play wherever a formula or condition reads them
  • A Group Prerequisite for every feature in a group, such as level 20 for epic feats
  • Taken once or in ranks, such as a talent taken up to five times, each rank with its own price

How it's set up

Rules › Parameters

Fighting Styles · Feature group

Variant Family
On
Group Prerequisite
LEVEL >= 2

Dueling · Feature

Prerequisite
FENCING == 0
Max Level
1

Fencing · Feature

Prerequisite
DUELING == 0
Max Level
1
Each style's prerequisite rules out the other, so a character takes one. With Variant Family on, the checks also compare the branches by what they change.

Currencies

Currencies are pools that are spent and refilled, such as health, mana or gold, held between a floor and a ceiling that can be formulas themselves.

  • Costs in several currencies at once, such as 2 Action Points and 10 Mana
  • Wards that soak damage before it reaches the pool, typed so a fire ward soaks fire and lets cold through
  • A ceiling a trigger raises while it lasts, such as more maximum HP for the length of a spell

How it's set up

Rules › Parameters

HP · Currency

Minimum Base Value
0
Maximum Base Value
(10 + CON) * LEVEL

Gold · Currency

Minimum Base Value
0
Maximum Base Value
Disabled: no ceiling
HP's ceiling follows CON and LEVEL, so it rises with the character. Gold has a floor and no ceiling.

Taxonomies

Taxonomies are catalogs of tags, such as damage types or creature types, that your rules test. Triggers can add, remove or temporarily overlay tags in play, and each taxonomy decides whether tags stack, replace or cancel.

  • Any formula or condition can ask whether something has a tag, with HASTAG, so one rule covers everything tagged alike
  • Tags on characters, items, places, areas and damage, each group offered only where it fits
  • Combinations as reactions, such as Wet and Chilled together making Frozen

How it's set up

Rules › Parameters

Damage Types · Taxonomy group

Entries
Slashing, Fire, Cold, Poison
Applicable Entities
Effects
Runtime Resolution
Static Only

Tempo · Taxonomy group

Entries
Hasted, Slowed
Applicable Entities
Character
Runtime Resolution
Runtime Cancel
Damage types describe what an effect deals, so they stay static. Hasted and Slowed land on characters in play: Runtime Cancel makes them wipe each other out, where Runtime Replace would let Slowed hide Hasted until it ends.

Classes

Classes package groups of rules into something a character takes, with single-parent inheritance, multiclassing, a baseline profile, and a class level your formulas can read.

  • A classless game uses the baseline profile alone, or leaves classes out
  • Class levels in any formula or prerequisite, such as a feat that needs three Fighter levels and one Wizard level
  • A preview of the whole package each class grants
  • Subclasses that exclude each other, and prestige classes behind a class level

How it's set up

Rules › Classes

Class

Knight

Parent Class
Fighter
Level Parameter
Knight Level
Prerequisite
STR >= 13
Group references
Mounted Combat, Oaths
Inherited Groups to Exclude
Archery Styles
The package preview shows what a Knight gets: the Fighter's groups, plus these, minus Archery Styles.

Triggers

Triggers are the rules that act in play: actions a character chooses, reactions that answer events, passives that hold while their condition holds, and timed triggers on the clock. A resistance check decides how much of an effect a target shrugs off.

  • 30+ effect types that modify a parameter or a currency, grant a feature, add a tag or an item, start a quest, set the chapter or create an area
  • Targeting from Self and Touch to Ranged, areas of six shapes and the whole Party
  • On a successful resistance, the effect is negated, cut by a percentage, or swapped for other effects
  • Durations, and an early end by an event, a condition or a newer claim on the same slot

How it's set up

Rules › Triggers

Reaction

Riposte

Listen Events
Taking damage, an event the engine sends
Targeting
Event Source: the attacker
Declinable
On: the player is asked first

Costs

Reaction
1

Effects

Modify Currency
HP: TARGET_HP - (1d8 + DEX)
The effect lands on the attacker: TARGET_HP is their HP, and DEX is yours.

Events and effect chains

Each trigger runs a chain of effects, each with its own condition and recipient, and can emit named events that other triggers react to. Event loops and events nothing raises are caught.

  • Effects apply in order, so a later effect's condition sees what the earlier ones did
  • Payloads with typed fields, such as who dealt the damage and how much
  • Events the engine sends too, such as damage taken or a chapter opening

How it's set up

Rules › Events, Rules › Triggers

Alarm Raised · Event

Payload Schema
Raiser: an Entity, marked as the source

Ring the Bell · Action

Emit Event
Alarm Raised

Answer the Bell · Reaction

Listen Events
Alarm Raised
Targeting
Self
Add Taxonomy Tag
Alert, Condition HASTAG(ASLEEP) == 0
Every guard that carries Answer the Bell hears the alarm, and each one awake turns Alert. The Raiser field tells them who rang.

World events

World events belong to the world, not to any one creature. Each fires when the state of the world meets its conditions, then applies its effects to every creature it concerns: a sunset, a storm rolling in, the end of a chapter. It can move the world clock forward as it runs.

  • Each creature checks the conditions for itself, so a storm soaks only the creatures outdoors
  • A time cost, so the event can move the world clock forward, such as a night passing
  • One announcement the whole world hears once, such as nightfall

How it's set up

Rules › Events

World event

Sunset

Activation Condition
TIMEOFDAY == 2

Effects

Set World State
Shops Open: Off
Add Taxonomy Tag
In Darkness
Emit Event
Night Fell
Time of Day is a world-state flag whose state 2 is Dusk, moved on by a timed trigger on the clock. At Dusk the shops close once for the whole world, every creature is marked In Darkness, and every listener hears Night Fell once.

Modifier layers

Temporary modifiers sit on layers you define, and each layer's stacking policy decides how they combine: stack, replace, cancel, highest, lowest, or in an explicit order. Conflict rules override that policy per parameter, and a layer can give bonuses and penalties separate policies.

  • Bonuses written as one line on their effect, such as BV + 2, the base value plus 2, on Armor Class in the Spells layer
  • Bonuses that hold while their source lasts and leave nothing behind
  • Buying caps that bonuses may pass, such as STR bought up to 20 and a belt that still takes it higher
  • Bonuses on costs too, such as healing that costs twice as much while a curse lasts

How it's set up

Rules › Conflicts

Modifier layer group

Defenses

Equipment
Highest Value
Spells
Stack
Blessings and curses
Cancel
The layers apply in this order, each to the result of the one before.

Selection sets

Selection sets let an effect or a cost choose from a pool instead of a fixed target: raise any two attributes, pay with one of several currencies, or spend one of several items.

  • Picks of exactly the set's size or up to it, with or without repeats
  • Tiers on pool entries, so the slot a spell is paid from can set its strength
  • A size that grows with a parameter or a class level

How it's set up

Rules › Triggers

Two Attributes · Selection set

Pool Type
Parameter
Pool Entries
The Attributes group
Size
2
Allow duplicates in selection
Off

Attribute Training · Action

Modify Parameter
Selection Set: Two Attributes, value BV + 1
The player picks two different attributes, and BV + 1 raises each one's base value by 1.

Pair accumulators

Pair accumulators keep a running tally between two entities, such as threat, enmity or a grudge, with bounds, decay and formulas that read them.

  • A hit that adds its damage, times the attacker's threat multiplier
  • Damage over time that keeps adding threat while it ticks
  • A taunt that makes an enemy attack the taunter while it lasts
  • Grudges that gate what comes later, such as an offer that closes at a grudge of 3

How it's set up

Rules › Triggers

Pair accumulator

Threat

Scope
Encounter: kept for the fight
Engine Role
Threat Table
Decay Interval
1
Decay Amount
BV * 0.1
BV is the pair's base value, its current threat, so each turn it fades by a tenth. With the Threat Table role, your engine reads it to choose whom each enemy attacks.

Time system

The time system sets how world time and combat time run, and timed triggers and durations are authored and checked against it.

World time has no clock, runs in real time at a scale you set, or moves only when something takes time, such as travel or a rest. Combat runs in real time, in turns, or both, and durations in combat count turns, so 1 lasts until your next turn.

  • A tick named for what it means to you, such as a second, a minute or a segment
  • A condition that stops the world clock, such as during the prologue
  • Timed triggers at a set time or on an interval, such as market day every seven days

How it's set up

Rules › Time System

Shared

Tick Label
second
Active When
PROLOGUE == 0

World Time

Mode
Event Based

Combat Time

Mode
Turn Based
Turn Length
6 ticks
While the prologue flag is set, the world clock stands still.

Aliases

Aliases rename the app's formula tokens to your game's vocabulary, and name a formula or a condition you reuse, with arguments if it needs them.

  • A shared rule changed in its alias reaches every formula that calls it
  • Conditions named once, such as awake and able to act
  • Point at an alias in a formula to see what it stands for, and rename it once to change it everywhere
  • Names checked against every parameter, tag and event in the project

How it's set up

Rules › Aliases

Token alias

IS
HASTAG, so IS(UNDEAD) asks about a tag

Formula alias

ADVANTAGE
MAX(1d20, 1d20)

Logical expression alias

CHECK(DC, BONUS)
1d20 >= MIN(20, MAX(2, DC - BONUS))
ADVANTAGE and CHECK are d20 examples: the first keeps the better of two rolls, and in the second a 1 always fails and a 20 always succeeds.

Not in the rules yet

The checks read the rules as you wrote them. Working out what they add up to in play, such as how hard a fight is or how much gold a player has by the third chapter, is planned work.

  • Combat, economy and probability analysis

    Planned

    Estimates of encounter difficulty, of the currency players can have at each stage of the game, and of the odds of passing the checks the main story depends on.

  • Auto-scaling and difficulty levels

    Planned

    Enemies, loot and encounters that scale with the player's progress wherever you opt in, and difficulty levels such as Easy, Normal and Hard that raise or lower the challenge without copying encounters.

  • Scenario playthrough simulation

    Planned

    Your whole game played through without graphics, automatically or step by step by you, to find what no run reaches and where a run gets stuck. Today, previews step through one conversation, quest or story at a time.

Tip

Keep the reasoning with the numbers

Parameter and trigger editors have Designer Notes under the description, for balance reasoning, sources and open questions. No formula or check reads it, and no game ever shows it.

Bring your own ruleset