Skip to main content
Docs
›
Frameworks

Frameworks

Updated Oct 27, 2026

3 min read

A framework is a reusable template for a kind of game object. It says what fields exist, what they mean, and how the derived values fall out of the raw inputs. The official D&D 5e framework knows about ability scores, classes, levels, the proficiency bonus, the saving-throw matrix, and the spell slot tables. None of those values belong to a specific character; they belong to the framework, which knows how to compute them once you fill in the inputs.

If you are coming from a programming background, a framework is the type definition; an element is the value. If you are not, the easier picture is a printed character sheet: the blank sheet itself is the framework, and the filled-in copy on the table is the element.

The Forge home, where your Games live. The frameworks, elements, and frames you build sit inside them.

What a framework defines

Three kinds of thing live inside a framework:

  • Inputs. The raw values an element will hold. For a 5e character: race, class choices, ability scores, equipment, prepared spells.
  • Derived values. Computed from the inputs. AC, hit points, attack bonuses, save DCs, spell slot counts. These never need to be entered by hand because the framework knows how to produce them.
  • Action functions. Buttons the player or GM can press: take damage, cast a spell, take a short rest. Each action bundles a few smaller writes into one labelled change.
Inside the framework editor: each card is one function, and the lines between them carry values onward.

Frameworks are made of functions

Inside the framework editor, the rules are wired together as a graph of functions. A function is one small piece of logic: if x then y, sum these numbers, look up this row in a table. You connect functions by dragging from one output handle to another function's input handle.

The 5e ability modifier, for example, is a small graph: subtract 10 from the ability score, halve the result, then round down. You build the graph visually. You can also switch a function to TypeScript source when you want to write the logic as code.

Every function you can wire into a graph is listed in the Functions reference in the docs sidebar. A framework is a graph of these small pieces, and graph editing is incremental: change one function and the rest of the graph keeps working.

A function card up close. Inputs come in on the left, outputs leave on the right.

Frameworks are reusable

The same D&D 5e framework powers every D&D 5e character on the platform. Edit the framework once and every character built from it picks up the change next time it loads. There is no per-character copy of the rules to migrate. If a framework is shared with other campaigns, its structure can't be changed from inside one campaign. Fork it into your campaign to edit your own copy.

Frameworks can also be forked. Forking takes a copy that drifts independently from its source. Useful when a homebrew table wants to start from the official 5e rules and tweak a handful of things without losing the base.

Where to go from here

  • Read Elements next. An element is what a framework produces; the two concepts are easier to hold together than apart.
  • If you are about to build a framework, the Functions reference (docs sidebar, under Functions) covers every function you can wire into a framework graph.
  • For the layout side, jump to Frames.