Home
Start a new game
Explore games
Help
Log in or sign up
Log in
Username
Password (
Forgot it?
)
×
New to Playfic?
Full Name
Email
Username
Password
Password (confirm)
Are you sure about this?
Test
by
Dr. Ion Florescu
Played 143 times
View game source
(spoilers!)
Download the
.z8 file
Source Code
Here’s **Chapter 0 – General Systems** reprinted as one piece, with: * the **`provide-contextual-hint`** phrase fixed (no illegal `decide on;`) * the **Secret Passage journal hook** corrected to trigger when the player is actually in the Secret Passage * semicolons and periods cleaned up You can paste this straight into Inform 7. ```inform7 Chapter 0 – General Systems [==================================================================] [ SECTION 0.1 – Scoring System ] [==================================================================] Use scoring. The maximum score is 100. A treasure has a number called point value. The point value of a treasure is usually 10. [------------------------- SCORE Command -------------------------] Reporting score is an action applying to nothing. Understand "score" or "points" or "check score" or "status" or "progress" as reporting score. Carry out reporting score: say "A true dwarf counts his gold--10 additional coins per found treasure.[paragraph break]"; let recovered be the score / 10; let missing be (maximum score - score) / 10; say "[bold type]Your Current Score:[roman type] [score] of [maximum score] points.[paragraph break]"; say "You have recovered [recovered] of the 10 treasures."; if missing > 0: say " Only [missing] more to reclaim your full legacy!"; else: say " You have recovered every last treasure of your line. Destiny is fully paid up."; [------------------------- Wizard Scoring Events -------------------------] To congratulate normally: say "With a thunderous [italic type]BANG[roman type], the bearded wizard appears in a swirl of smoke."; say "'Marvelous! You found another treasure -- clearly by accident, but I'll pretend it was skill,' he declares."; say "Before you can reply, he vanishes again in a blinding flash of lightning."; To congratulate finally: say "With a colossal [italic type]BANG[roman type] that rattles the walls, the wizard erupts into existence once more."; say "'Well done, Red Dwarf! You've gathered all ten treasures — miraculously on purpose this time."; say "But a final task remains: return them to the Dream Castle, or all this triumph is just decorative clutter.'"; say "He disappears in a blinding flash of lightning, leaving the air crackling with expectation."; After taking a treasure for the first time: let recovered be the score / 10; if recovered < 9: increase the score by the point value of the noun; congratulate normally; try reporting score; otherwise: increase the score by the point value of the noun; congratulate finally; try reporting score; [No automatic victory here; final ending occurs later.] [==================================================================] [ SECTION 0.2 – Journal System ] [==================================================================] The adventure journal is a thing. The adventure journal is carried by the player. The printed name of the adventure journal is "Red Dwarf's Journal". The description of the adventure journal is "A battered leather-bound journal filled with your handwriting—small, angry, and only occasionally legible. Some pages are torn, others are scorched, and one is suspiciously sticky.". The adventure journal is not portable. Instead of dropping the adventure journal: say "No chance. A true dwarf never lets go of his grudges or his paperwork.". Instead of giving the adventure journal to someone: say "If anyone wants to read your journal, they can pry it from your metaphorically cold, metaphorically dead fingers.". [------------------------- Journal Menu -------------------------] Journaling is an action applying to nothing. Understand "journal" or "read journal" or "open journal" or "notes" or "log" as journaling. Awaiting-journal-choice is a truth state that varies. Awaiting-journal-choice is false. Carry out journaling: say "You flip open [printed name of the adventure journal]. The inside cover is covered in furious red scribbles pretending to be a table of contents:[paragraph break]"; say " [bold type]1[roman type] – What already happened[paragraph break]"; say " [bold type]2[roman type] – What I'm supposed to be doing[paragraph break]"; say " [bold type]3[roman type] – Shiny things reclaimed (treasures)[paragraph break]"; say " [bold type]4[roman type] – Clues I absolutely won't forget[paragraph break]"; say " [bold type]5[roman type] – Things the wizard won't shut up about[paragraph break]"; say " [bold type]6[roman type] – My very serious personal notes[paragraph break]"; say " [bold type]Q[roman type] – Slam the journal shut[paragraph break]"; now Awaiting-journal-choice is true; say "[paragraph break][italic type](Type 1–6 or Q and press ENTER.)[roman type]". [------------------------- Journal Section Actions -------------------------] Journal-story is an action applying to nothing. Journal-objective is an action applying to nothing. Journal-treasures is an action applying to nothing. Journal-clues is an action applying to nothing. Journal-wizard is an action applying to nothing. Journal-notes is an action applying to nothing. Carry out journal-story: say "[bold type]What already happened:[roman type][line break][Story-summary][paragraph break]". Carry out journal-objective: say "[bold type]What I'm supposed to be doing:[roman type][line break][Objective-text][paragraph break]". Carry out journal-treasures: say "[bold type]Shiny things reclaimed (treasures):[roman type][line break]"; show-treasure-entries; say "[paragraph break]". Carry out journal-clues: say "[bold type]Clues I absolutely won't forget:[roman type][line break]"; if Clue-list is "": say "(You haven't written down any clues yet. Bold faith in your memory.)[paragraph break]"; else: say "[Clue-list][paragraph break]". Carry out journal-wizard: say "[bold type]Things the wizard won't shut up about:[roman type][line break]"; if Wizard-log is "": say "(The wizard has not yet said anything you deemed quotable. This will not last.)[paragraph break]"; else: say "[Wizard-log][paragraph break]". Carry out journal-notes: say "[bold type]My very serious personal notes:[roman type][line break]"; if Personal-notes is "": say "(You haven't written anything yet. Future you will absolutely regret that.)[paragraph break]"; else: say "[Personal-notes][paragraph break]". [------------------------- Journal Menu Routing -------------------------] After reading a command when Awaiting-journal-choice is true: let T be the player's command; now Awaiting-journal-choice is false; if T matches "1": change the text of the player's command to "journal story"; else if T matches "2": change the text of the player's command to "journal objective"; else if T matches "3": change the text of the player's command to "journal treasures"; else if T matches "4": change the text of the player's command to "journal clues"; else if T matches "5": change the text of the player's command to "journal wizard"; else if T matches "6": change the text of the player's command to "journal notes"; else if T matches "q" or T matches "Q": say "You slam the journal shut with a decisive thump. Enough introspection for now.[paragraph break]"; change the text of the player's command to "look"; else: say "You jab a random squiggle on the page that isn't actually an option. The journal judges you silently and closes itself.[paragraph break]"; change the text of the player's command to "look". [------------------------- Journal Text Variables -------------------------] Story-summary is a text that varies. Story-summary is "You have a life, a cave, and a vague suspicion that none of this is going to be simple.". Objective-text is a text that varies. Objective-text is "Try not to die. Also, investigate why things feel wrong.". Clue-list is a text that varies. Clue-list is "". Wizard-log is a text that varies. Wizard-log is "". Personal-notes is a text that varies. Personal-notes is "- Reminder: stop trusting dreams.[line break] - Avoid touching obviously magical garden decorations.[line break] - Grow beard even longer. For authority.". [------------------------- Treasure Listing -------------------------] To show-treasure-entries: let found be 0; repeat with T running through treasures: if T is handled: increase found by 1; say "- [printed name of T][line break]"; if found is 0: say "(No treasures recovered yet. Try searching suspicious places.)"; else: say "(You have recovered [found] of the 10 ancestral treasures.)". [------------------------- Journal Event Flags -------------------------] Intro-journaled is a truth state that varies. Wake-journaled is a truth state that varies. Mirror-journaled is a truth state that varies. Wizardstory-journaled is a truth state that varies. Map-journaled is a truth state that varies. Door-opened-journaled is a truth state that varies. Gnome-secret-journaled is a truth state that varies. Passage-entered-journaled is a truth state that varies. Treasure-objective-journaled is a truth state that varies. All-treasures-journaled is a truth state that varies. [------------------------- Journal Event Hooks -------------------------] Every turn when Intro Scene is happening and Intro-journaled is false: now Story-summary is "You are living a perfect dream that you don’t entirely trust."; now Objective-text is "Enjoy the illusion or try waking up."; now Intro-journaled is true. Every turn when dreaming is false and Wake-journaled is false and the player is in the Cave Living Room: now Story-summary is "You fell out of a golden dream and back into your smoky, disappointing cave."; now Objective-text is "Look around and figure out what's going on."; now Wake-journaled is true. Every turn when remembering the past is true and Mirror-journaled is false: now Story-summary is "The cracked mirror returned to you the truth of betrayal and fire."; now Objective-text is "Talk to the raven or wizard."; now Clue-list is Clue-list + "[line break]- The mirror brought back the truth about the Green Dwarf."; now Mirror-journaled is true. Every turn when story-heard is true and Wizardstory-journaled is false: now Story-summary is "The wizard revealed that the Green Dwarf stole ten ancestral treasures."; now Objective-text is "Begin reclaiming what was stolen."; now Wizard-log is Wizard-log + "[line break]- The wizard told the story of the betrayal and the ten treasures."; now Clue-list is Clue-list + "[line break]- Ten treasures were stolen, and the first clue may be in your cave."; now Wizardstory-journaled is true. Every turn when map-studied is true and Map-journaled is false: now Story-summary is "The map points toward the Forge as the beginning of your revenge."; now Objective-text is "Follow the map toward the Forge."; now Clue-list is Clue-list + "[line break]- The map marks the Forge: 'Start here. Follow the rumbles.'"; now Map-journaled is true. Every turn when the heavy oak door is open and Door-opened-journaled is false: now Story-summary is "The door is open, and your problems are waiting outdoors."; now Objective-text is "Investigate the suspiciously tidy garden."; now Door-opened-journaled is true. Every turn when the arm-moved of the garden gnome is true and Gnome-secret-journaled is false: now Story-summary is "A suspiciously mobile gnome revealed a hidden passage beneath your garden."; now Objective-text is "Descend into the secret passage."; now Clue-list is Clue-list + "[line break]- The gnome's arm opened a hidden passage."; now Gnome-secret-journaled is true. Every turn when the player is in the Secret Passage and Passage-entered-journaled is false: now Story-summary is "You have descended into an ancient underground that judges your life choices."; now Objective-text is "Explore the secret passage."; now Passage-entered-journaled is true. Every turn when score > 0 and Treasure-objective-journaled is false: now Objective-text is "Continue recovering the ten stolen treasures."; now Treasure-objective-journaled is true. Every turn when score is 100 and All-treasures-journaled is false: now Story-summary is "All ten treasures are yours again — now return them to the Dream Castle."; now Objective-text is "Find a way back to the Dream Castle."; now Clue-list is Clue-list + "[line break]- All treasures recovered. Return them to the Dream Castle."; now All-treasures-journaled is true. [==================================================================] [ SECTION 0.3 – Hint System ] [==================================================================] Consulting the wizard is an action applying to nothing. Understand "ask wizard" as consulting the wizard. Understand "ask wizard [text]" as consulting the wizard. Understand "ask the wizard" as consulting the wizard. Understand "ask the wizard [text]" as consulting the wizard. Understand "ask wizard for help" as consulting the wizard. Understand "ask the wizard for help" as consulting the wizard. Understand "question wizard" as consulting the wizard. Understand "question the wizard" as consulting the wizard. Understand "beg wizard for help" as consulting the wizard. Understand "beg the wizard for help" as consulting the wizard. Understand "wizard help" as consulting the wizard. Understand "help wizard" as consulting the wizard. Carry out consulting the wizard: say "With a disgruntled [italic type]BANG[roman type], the bearded wizard appears in a puff of smoke right where there was definitely no wizard a moment ago."; provide-contextual-hint; say "Before you can argue with him, he vanishes again in a flash of lightning, leaving behind the faint smell of ozone and condescension.[paragraph break]". [------------------------- Hint Levels -------------------------] Wake-hint-level is a number that varies. Mirror-hint-level is a number that varies. Raven-hint-level is a number that varies. Bed-hint-level is a number that varies. Map-hint-level is a number that varies. Door-hint-level is a number that varies. Gnome-hint-level is a number that varies. Passage-hint-level is a number that varies. [------------------------- Hint Routing (fixed version) -------------------------] To provide-contextual-hint: if dreaming is true: give-wake-hint; else if the player is in the Cave Living Room and remembering the past is false: give-mirror-hint; else if the player is in the Cave Living Room and remembering the past is true and story-heard is false: give-raven-hint; else if the map of the world of good ideas is not handled: give-bed-hint; else if map-studied is false and the map of the world of good ideas is handled: give-map-hint; else if the player is in the Cave Living Room and the heavy oak door is locked: give-door-hint; else if the player is in the Garden and the arm-moved of the garden gnome is false: give-gnome-hint; else if the player is in the Garden and the secret passage door is open: give-passage-hint; else: say "'For once, I don't see a specific crisis to point at,' the wizard admits. 'Explore. Examine things. Trust your beard. Well, maybe not that last part.'[paragraph break]". [------------------------- Individual Puzzle Hint Blocks -------------------------] To give-wake-hint: if Wake-hint-level < 3: increase Wake-hint-level by 1; if Wake-hint-level is 1: say "'Does this feel a bit too perfect to you?' the wizard asks. 'Perfection is usually a side effect of magic, delusion, or both.'"; else if Wake-hint-level is 2: say "'If I were you,' the wizard says, 'I would try doing the opposite of sleeping.'"; else: say "'WAKE UP, Red Dwarf,' the wizard snaps. 'Actually type it.'". To give-mirror-hint: if Mirror-hint-level < 3: increase Mirror-hint-level by 1; if Mirror-hint-level is 1: say "'Your cave has many flaws,' the wizard says, 'but only one of them shows your face back at you.'"; else if Mirror-hint-level is 2: say "'That cracked mirror is more than decoration,' he adds."; else: say "'Type EXAMINE MIRROR,' the wizard sighs. 'I cannot make this subtler.'". To give-raven-hint: if Raven-hint-level < 3: increase Raven-hint-level by 1; if Raven-hint-level is 1: say "'That raven isn't just there for atmosphere,' the wizard remarks. 'It's practically vibrating with unsaid exposition.'"; else if Raven-hint-level is 2: say "'You might consider speaking to the bird,' he suggests."; else: say "'Type TALK TO RAVEN,' the wizard says flatly.". To give-bed-hint: if Bed-hint-level < 3: increase Bed-hint-level by 1; if Bed-hint-level is 1: say "'Your bed looks even more suspicious than usual,' the wizard muses."; else if Bed-hint-level is 2: say "'Try looking under things rather than just at them.'"; else: say "'Look under the bed. The map is under the straw.'". To give-map-hint: if Map-hint-level < 3: increase Map-hint-level by 1; if Map-hint-level is 1: say "'Finding a map is only half the effort,' the wizard notes."; else if Map-hint-level is 2: say "'Try reading that map instead of using it as a placemat.'"; else: say "'Type READ MAP. Pretend you understand cartography.'". To give-door-hint: if Door-hint-level < 3: increase Door-hint-level by 1; if Door-hint-level is 1: say "'The outside world is very keen to see you leave unprepared,' the wizard remarks."; else if Door-hint-level is 2: say "'There is still something important inside this cave.'"; else: say "'Before unlocking the door, make sure you've found and read the map and spoken to the raven.'". To give-gnome-hint: if Gnome-hint-level < 3: increase Gnome-hint-level by 1; if Gnome-hint-level is 1: say "'That garden is trying far too hard to look innocent,' the wizard observes. 'The gnome in particular.'"; else if Gnome-hint-level is 2: say "'If a statue has an arm that looks wrong, try interfering with it.'"; else: say "'Move the gnome's arm: TWIST ARM, MOVE GNOME'S ARM, take your pick.'". To give-passage-hint: if Passage-hint-level < 3: increase Passage-hint-level by 1; if Passage-hint-level is 1: say "'When the ground opens a hole for you,' the wizard says, 'it is either a trap or a shortcut.'"; else if Passage-hint-level is 2: say "'You might consider going down there.'"; else: say "'Type DOWN, Red Dwarf. Use the secret passage.'". ``` If Inform now complains about anything, paste the exact error message and I’ll debug that specific bit next.