Cite as
Zork I ZIL source
Original
https://github.com/historicalsource/zork1
Pinned
historicalsource/zork1 @ 97b7b3d68c075dd9af7da499c3e9690ada3471fd
Accessed
2026-10-22
Licence
MIT License (LICENSE: “Copyright (c) 2025 Microsoft”), added by a Microsoft pull request merged on 2025-11-20 (commit 60aef2f, Scott Hanselman: “Microsoft along with our friends at Xbox and Activision is stoked to license Zork 1 under MIT.”). The ZIL file headers keep “(c) Copyright 1983 Infocom, Inc.”
Credit
Zork I by Marc Blank, Dave Lebling, Bruce Daniels, and Tim Anderson for Infocom (README). The files are a snapshot of Infocom's development directory, published by the Historical Source collection; the shared parser credits Marc Blank (gparser.zil: “started on 7/28/83 by MARC”).
Notes
The README says the files can't be matched to an official release. They are a 1983 or later revision, not the 1980 release: the headers carry 1983 copyrights and zork1.zil prints “Renovated ZORK I”. The repository also holds compiled story files (zork1.zip, COMPILED/zork1.z3; the former identifies as Release 119, Serial 880429), so the atlas fetches only the ZIL files, the license, and the README. Game rules are in 1actions.zil (light sources, the trophy case, combat), 1dungeon.zil (objects and the start), gverbs.zil (taking and scoring), gparser.zil (the parser), and gclock.zil (timed events).

Cited on

Claims (7)

Zork I's ZIL source (a 1983-headed revision) parses a command into one verb and up to two noun clauses, each of which a preposition can lead, and matches the result against the verb's syntaxes, such as PUT OBJECT IN OBJECT. A third noun clause draws “There were too many nouns in that sentence.” A clause can name several objects only where the syntax allows it, as TAKE's does. THEN or a period ends one command, and the parser keeps the rest of the line for the next.gparser.zil L90–99gparser.zil L326–333gsyntax.zil L384gsyntax.zil L469gparser.zil L1294–1302gparser.zil L267–275Code
In Zork I's ZIL source the brass lantern's timer starts at 200 and runs only while the lamp is on: turning it on enables the I-LANTERN event and turning it off disables it. The clock counts it down once per parsed command other than the verbs TELL, BRIEF, SUPER-BRIEF, VERBOSE, SAVE, VERSION, QUIT, RESTART, SCORE, SCRIPT, UNSCRIPT, and RESTORE. Each time it runs out, the lamp table sets the next wait, 100, then 70, then 15, and prints “The lamp appears a bit dimmer.”, “The lamp is definitely dimmer now.”, and “The lamp is nearly out.” if the lamp is held or in the room. After the 15 the lamp burns out for good, 385 lit turns in all (computed).1dungeon.zil L26421actions.zil L2238–22421actions.zil L2243–2248gmain.zil L169–172gclock.zil L52–581actions.zil L2220–22281actions.zil L2315–23191actions.zil L2328–2337Code
Zork I's ZIL source refuses a TAKE (“Your load is too heavy”) when the object's weight plus the player's would pass the load limit of 100, unless the object is inside something the player carries. A weight is an object's SIZE plus its contents' weights; worn items count 1 toward the player, and the player's own object sets no SIZE, so it takes the default of 5. A separate check makes a TAKE fail, “You're holding too many things already!”, when more than 7 objects not worn are in hand, at a chance of 8% per object held: 63% at 8 and certain from 13 (computed). In a fight, a light wound to the player lowers the limit by 10 and a serious wound by 20 while it's above 50; it recovers 10 every 30 turns and returns to 100 when the wounds heal.gglobals.zil L92–94gverbs.zil L1931–1940gverbs.zil L1988–1997zork1.zil L24gglobals.zil L267–272gverbs.zil L1896–1898gverbs.zil L1941–1945gverbs.zil L1979–19861actions.zil L3457–34661actions.zil L3593–36021actions.zil L3325Code
Zork I's ZIL source sets the maximum score at 350. An object or room with a VALUE pays it once, when first taken or entered, and the value is then cleared. A treasure's TVALUE counts while it lies in the trophy case: at the end of a turn in the living room in which the player takes anything or puts something in the case, the score is reset to the banked points plus the TVALUEs of what is in the case. Only objects directly in the case count, since the routine looks inside containers but discards what it finds there. Reaching 350 whispers “Look to your treasures for the final secret.”1dungeon.zil L7gverbs.zil L1867–1870gverbs.zil L1959–1961gverbs.zil L21221actions.zil L477–4841actions.zil L496–502gverbs.zil L1851–1862Code
Zork I's ZIL source sets the player's fighting strength at 2 + score ÷ 70, rounded down (computed from 2 + score ÷ (350 ÷ (7 − 2))), from 2 at no points to 7 at 350, plus a wound modifier that is 0 when unhurt. A villain's strength is its STRENGTH: 2 for the troll and 5 for the thief. Attacked with its bane, the sword for the troll and the nasty knife for the thief, a villain counts 1 less, but no less than 1; a thief engrossed in a treasure counts at most 2.1actions.zil L3323–33241actions.zil L3375–33811dungeon.zil L1036–10461dungeon.zil L968–9781actions.zil L3383–33971actions.zil L3801–3803Code
In Zork I's ZIL source each blow, by the player or a villain, reads 9 entries of a result table picked by the defender's strength, and a roll of 1–9 picks one. A defender of strength 1 uses DEF1, starting 0, 1, or 2 entries in for an attacker of strength 1, 2, or 3 and up. A defender of 2 uses DEF2A for an attacker of 1, or DEF2B starting 0, 1, or 2 entries in for 2, 3, or 4 and up. A defender of 3 or more uses the attacker's strength less the defender's, clamped to −2..2: DEF3A starting 0 or 1 entries in for −2 or −1, DEF3B likewise for 0 or 1, and DEF3C for 2. The results are miss, stagger, light wound, serious wound, knockout, and kill; the DEF3 tables hold no knockout or kill, and an unarmed or unconscious villain dies to the player's blow outright.1actions.zil L3246–32541actions.zil L3258–32991actions.zil L3301–33171dungeon.zil L2644–26491actions.zil L3427–34401actions.zil L3502–3521Code
Computed from Zork I's ZIL source: at 0 points the player's strength is 2. Swinging the sword at the unhurt troll (2, less 1 for the sword) reads DEF1 from its second entry, so a blow misses 3 times in 9, staggers 2, knocks out 2, and kills 2. Swinging the nasty knife at the thief when he isn't engrossed (5, less 1) reads DEF3A from its start: 5 misses, 2 staggers, and 2 light wounds, and no kill.1actions.zil L3258–32631actions.zil L3280–32851actions.zil L3491–34951actions.zil L3510–35211actions.zil L3375–33811actions.zil L3383–33971dungeon.zil L2644–2645Code