Sigil

A small programming language for magic. Write a spell; its code draws its own circle.

Choose a tradition

Spells of the Weave

Sigil draws a circle from code. The Weave draws one from a spell. Every one of the 525 published spells of fifth edition is broken into its parts: level, school, casting time, range, area, components, duration, damage, dice, save, conditions, target and purpose. Each part has a fixed mark or measure, so you can read a sigil back into its spell.

Each class that casts spells draws those same parts in its own hand. A wizard measures them with compass and straightedge, a warlock chalks a ritual circle, a cleric sets them in a rose window. Once drawn, the sigil can be engraved on a ring or a pendant, pressed into wax, written on a scroll or laid out on a floor. Left alive, it moves as its class would make it: a druid’s outline puts out leaves that stir in the breeze, a wizard’s lines run with light, a sorcerer’s circle will not hold still.

Choose a hand

Fireball

Hover over the sigil or the breakdown to see which part of the spell drew what.

One spell, nine hands

Write your own spell

Choose a value for each part and the sigil is drawn as you go, in the hand and form chosen above. The name seeds the small variations, so two spells alike in every part but their names still differ.

The codex

Casting log

    Hover over any part of the circle to see the code that drew it. Scroll to zoom; right-drag to pan.

    The Grimoire

    In Sigil, magic is procedural. A spell is a program: values, names, branches and loops. Casting runs the program, and every primitive it calls spends mana. Compiling the same program instead of running it produces the circle. Each construct has one fixed shape, so you can learn to read a circle back into its code.

    The tradition only changes the drawing. The same spell can be drawn with Western sacred geometry (Metatron's Cube, star polygons, the golden ratio) or in the Taoist manner (bagua, taijitu, I Ching hexagrams, square seals). The language and what the spell does stay the same.

    1. SourceThe spell as you type it
    2. TokensNames, numbers, words, symbols
    3. TreeStatements nested inside spells, branches and loops
    4. GeometryEach node of the tree picks its shape and place
    5. CircleDrawn as vector lines you can hover over and copy

    The proportions

    Primitives and fundamentals

    Primitives are the opcodes of magic. They are the only way a spell touches the world, and the only things that cost mana. Everything else (arithmetic, names, loops, your own spells) is free. A cast that needs more than 1000 mana overloads the circle and stops.

    GlyphCallManaWhat it does

    Fundamentals

    Built-in values every spell can use. In the Western circle elements take their alchemical symbols; in the Taoist circle, their trigrams.

    The celestial script

    Syntax at a glance

    If you have written a little JavaScript, you can already read Sigil. Semicolons are optional.

    inscribe power = 7;Inscribe a name for a value (Sigil's let or var)
    power = power + 1;Change it
    spell name(a, b) { … }Define a spell (a function)
    manifest value;Give a value back from a spell
    if (x > 3) { … } else { … }Choose a branch
    repeat (6 as i) { … }Loop a fixed number of times; i counts 0 to 5
    sustain (x > 0) { … }Loop while something is true
    sever;Leave the innermost loop at once (Sigil's break)
    ward { … } breach (why) { … }Run a block that might fail; if it does, run the breach with the message in why
    [fire, 3] xs[0] xs[0] = 9;Lists: make one, read an item (from 0), change an item. count(xs) is its length.
    truth falsehoodSigil's true and false
    cast name(args);The activation: run this and seal the circle with it
    + - * / % == != < > <= >= && || !Operators, as in JavaScript
    // note /* note */Comments. The first // line is written on the outer ring.