Magic Systems in Interactive Fiction That Hold
Magic systems in interactive fiction collapse when nothing checks them. Why stated costs and a written record hold up better than atmosphere.
Magic systems in interactive fiction hold up when their limits are written down somewhere the story can check, and they collapse when the limits live only in the atmosphere. A coded game enforces its magic whether or not the author remembers the rule. A narrator writing live has no such floor, so every limit that matters has to exist as a recorded fact rather than a mood.
- A hard magic system gives you something to plan with; a soft one keeps the world larger than you are.
- The published ZIL source for Infocom’s Enchanter holds a maximum of four memorized spells and drops one when that cap is passed.
- In the same source, casting a spell decrements it out of memory and removes the scroll from your inventory.
- Ink’s documentation shows an author declaring a variable with
VARand gating later text on it, so the rule holds because code tests it.- A live narrator has no such test, so a magic rule survives only as long as it is recorded as a fact the story carries forward.
What makes magic systems in interactive fiction different from magic in novels?
The reader acts. In a novel the author is the only person who decides what magic is asked to do, and can steer every scene away from the questions the system cannot answer. Magic systems in interactive fiction are exposed to somebody who will ask those questions on turn three, in plain language, without warning.
That changes what a rule is for. In prose, a rule is a promise the author keeps privately. In a story you participate in, a rule is closer to an interface: you learn it, you test it, you plan around it, and you notice immediately when it bends. A magic system nobody can test is set dressing with a name.
It also changes the failure mode. A novel with vague magic reads as mysterious. An interactive story with vague magic reads as arbitrary, because you asked for something specific and the world’s answer had no visible reason behind it. Mystery requires that you believe a reason exists. Arbitrariness is what mystery becomes once you have poked it a few times and found nothing underneath.
Hard or soft magic: which one survives a reader who improvises?
Hard rules survive; soft atmosphere survives only around them. The craft distinction is familiar enough from fantasy novels: a hard system explains its costs and limits so that magic can solve problems fairly, and a soft one withholds the mechanism so that magic stays awful and large. Both work on the page because the author controls which questions get asked.
Improvisation removes that control, and this is the pressure most magic systems in interactive fiction are never designed for. Soft magic depends on the author never letting a character reach for the unexplained thing at the moment it would need explaining. Give a reader a text box and they will reach for it immediately, and then again, and each time the world answers vaguely the vagueness compounds.
The useful shape is a small hard core inside a soft world. Two or three rules with named costs, stated in the fiction, that never move. Everything else — where magic came from, what it is, who else can do it — stays unexplained, and stays interesting, because the parts you can test are solid enough to make you trust the parts you cannot.
Why a hard rule makes refusals feel like the world
A rule with a cost gives a narrator something to say no with. Without one, every refusal has to come from the author’s taste, and taste reads as the software declining. “Your hand closes on nothing; the word costs more than you have left today” is a refusal made of fiction. “Magic doesn’t work like that” is a referee talking over the scene.
How did coded interactive fiction enforce its magic?
By counting. Infocom’s Enchanter (1983) is the clean example, and its ZIL source is published on GitHub — with the caveat, noted in the repository itself, that these files are a shutdown-era snapshot that may not match the shipped game and cannot currently be compiled.
Read the file that implements the spells and the system is arithmetic. A SPELL-MAX of four bounds how much you can hold in memory. A FORGET-SPELL routine builds a table of what you have memorized and decrements one of them when the cap is passed. Casting a scroll removes the scroll and decrements the spell’s count. You do not memorize a fifth spell because the machine will not let you, not because the author remembered to stop you.
Modern authoring tools work the same way from a writer’s side. Ink’s own documentation introduces global state with VAR knowledge_of_the_cure = false and then gates later lines on it, so a rule established in chapter one is still true in chapter nine because a condition tests it every time. That is the underlying trade in parser and choice interactive fiction: the world is smaller than language, and in exchange it never forgets its own laws.
How do you write a magic rule a live narrator can keep?
Write it as a fact with a cost attached, not as a flavor. A generated scene is consistent with whatever the narrator has been handed on that turn, so the question is never whether the rule is good — it is whether the rule is in the material. This is why Fabledrift, an interactive fiction app for Android, keeps a structured record of facts, characters, places and promises and hands it to the narrator on every turn, and why readers can add their own notes to it.
The difference between a rule that travels and one that evaporates is usually just grammar.
| How the rule is written | What a narrator can do with it | Why it fails |
|---|---|---|
| “Magic here is ancient and unknowable” | Set a tone, describe a room | Nothing can contradict it, so nothing is constrained by it |
| “Every spell costs a memory you must name” | Charge you, and refuse when you have nothing left to spend | Only holds if the spent memories are written into the record |
| “The forest keeps every promise made beneath it” | Return an old promise at the worst possible moment | If the promise is never recorded, it never comes back |
Note what the second and third rows have in common. They are checkable, which is the same standard worldbuilding in interactive fiction has to meet before a setting can refuse anything. Somebody — the system, or you — can look at the story’s record and say whether the condition is met. The first row cannot be checked, which is exactly why it never says no. Detective stories run on the same requirement in a harsher form, since a mystery needs its answer fixed before the reader starts looking.
Where the cost has to be visible
Inside the prose, on the turn it is paid. A cost recorded only in the story’s bookkeeping is a cost you will forget, and a cost you forget is not a limit, it is a surprise. When your character spends a memory, the scene should show the memory going: the name of a sister that will not come back the next time you reach for it.
This also determines how a magic system fails well. When you reach past the rule, the answer should be a scene rather than an error, which is the general case of impossible actions becoming scenes instead of refusals. The wall does not fall. Your voice cracks on the second syllable, something in the dark hears you try, and the turn has cost you more than it bought.
Costs also want to be asymmetric, and this is where magic systems in interactive fiction earn their keep. A rule that charges the same price for a lit candle and a broken siege gate teaches you nothing about the world’s shape. A rule with steep, uneven prices makes you read the world for cheap routes, and reading the world for cheap routes is most of what makes a magic system fun to think inside.
A rule to carry into the Emberwood
Start your next fantasy story by deciding one hard thing and writing it down before the second scene: what magic costs, in a currency the story can count. Then leave everything else soft. Where the magic came from, who else has it, what it wants — those can stay unexplained for as long as you like, and the unexplained parts will feel deliberate rather than empty, because the part you can test holds.
That advice has a natural home in The Emberwood, a forest that remembers every promise made beneath its branches. A promise is already a hard rule with a stated cost. It is written down, it is owed, and the story can bring it back to you at the moment you would rather it did not.
Frequently asked questions
What is the difference between hard and soft magic?
A hard magic system states its rules and costs plainly, so a reader can predict what magic will and will not do. A soft system leaves the mechanism unexplained and uses magic for awe rather than for solving problems.
Which works better in interactive fiction, hard or soft magic?
Hard rules survive contact with a reader who improvises, because the reader can test them and the story can hold them. Soft atmosphere still belongs in the world around those rules, but it cannot carry the weight of a system readers will push against.
How did old text adventures enforce their magic?
In code, absolutely. The published source for Infocom's Enchanter caps how many spells you can hold in memory and drops one when the cap is passed, so the limit is arithmetic rather than a promise the author has to remember.
Why does an AI narrator contradict its own magic rules?
Because nothing outside the prose is checking. A generated scene is consistent only with what the narrator has been handed, so a rule that was never recorded as a fact has no way to come back and stop the next scene.
How do I keep a magic rule consistent while I read?
Write the rule down in the story's own record as a short factual sentence, including its cost. A rule stated as a fact travels with the story; a rule you only inferred from the prose does not.