├── .gitignore ├── LICENSE ├── README.md └── docs ├── catalogue.txt ├── headings.txt ├── index-linux.html ├── index-macos.html ├── index-windows.html ├── index.html ├── pl404-linux.html ├── pl404-macos.html ├── pl404-windows.html ├── pl404.html ├── resources └── Extensions │ ├── Aaron Reed │ ├── Commonly Unimplemented.i7x │ ├── Dynamic Rooms.i7x │ ├── Extended Grammar.i7x │ ├── Numbered Disambiguation Choices.i7x │ ├── Poor Man's Mistype.i7x │ ├── Response Assistant.i7x │ ├── Small Kindnesses.i7x │ └── Smarter Parser.i7x │ ├── Alice Grove │ └── Simple Spelling.i7x │ ├── Andrew Plotkin │ └── Disappearing Doors.i7x │ ├── Bart Massey │ └── Basic Literacy.i7x │ ├── Brian Rushton │ └── Clues and Conversation.i7x │ ├── Chris Conley │ └── Threaded Conversation.i7x │ ├── Emily Short │ ├── Approaches.i7x │ ├── Assorted Text Generation.i7x │ ├── Automated Drawers.i7x │ ├── Computers.i7x │ ├── Deluxe Doors.i7x │ ├── Dishes.i7x │ ├── Facing.i7x │ ├── Glulx Entry Points.i7x │ ├── Introductions.i7x │ ├── Measured Liquid.i7x │ ├── Modern Conveniences.i7x │ ├── Modified Exit.i7x │ ├── Mood Variations.i7x │ ├── Ordinary Room Description.i7x │ ├── Postures.i7x │ ├── Power Sources.i7x │ ├── Property Checking.i7x │ ├── Recorded Endings.i7x │ ├── Room Description Control.i7x │ ├── Simple Followers.i7x │ ├── Single Paragraph Description.i7x │ ├── Tailored Room Description.i7x │ ├── Transit System.i7x │ └── Tutorial Mode.i7x │ ├── Eric Eve │ ├── Adaptive Hints.i7x │ ├── Alternatives.i7x │ ├── Bulk Limiter.i7x │ ├── Conversation Framework.i7x │ ├── Conversation Nodes.i7x │ ├── Conversation Package.i7x │ ├── Conversation Responses.i7x │ ├── Conversation Suggestions.i7x │ ├── Conversational Defaults.i7x │ ├── Exit Lister.i7x │ ├── Hiding Under.i7x │ ├── Implicit Actions.i7x │ ├── Limited Implicit Actions.i7x │ ├── List Control.i7x │ ├── List Controller.i7x │ ├── Text Capture.i7x │ ├── Underside.i7x │ └── Variable Time Control.i7x │ ├── Gavin Lambert │ ├── Exit Lister.i7x │ └── Secret Doors.i7x │ ├── Hanon Ondricek │ └── Easy Doors.i7x │ ├── Jesse McGrew │ └── Hypothetical Questions.i7x │ ├── Jim Aikin │ └── Notepad.i7x │ ├── Juhana Leinonen │ ├── Achievements.i7x │ ├── Bulky Items.i7x │ ├── Debug Files.i7x │ ├── Object Response Tests.i7x │ ├── Regional Travel.i7x │ └── Reversed Persuasion Correction.i7x │ ├── Michael Kielstra │ └── Debug Tags.i7x │ ├── Ron Newcomb │ ├── After Not Doing Something.i7x │ ├── Editable Stored Actions.i7x │ ├── Permission to Visit.i7x │ ├── Phrases for Tables with Topics.i7x │ ├── Scope Control.i7x │ └── Unsuccessful PC Attempt.i7x │ ├── Sean Turner │ └── Plugs and Sockets.i7x │ ├── Stephen Granade │ └── Footnotes.i7x │ └── Wade Clarke │ ├── Basic Help Menu.i7x │ └── Menus.i7x ├── roster.json ├── source ├── catalogue.txt ├── headings.txt ├── include │ ├── description.html │ ├── description404.html │ ├── filters.html │ ├── mass_download_buttons.html │ ├── public_library.css │ ├── resource.html │ ├── section_buttons.js │ ├── section_heading.html │ ├── structure.js │ └── subsection_heading.html ├── index-linux.html ├── index-macos.html ├── index-windows.html ├── index.html ├── pl404-linux.html ├── pl404-macos.html ├── pl404-windows.html └── pl404.html └── v11 ├── catalogue.txt ├── headings.txt ├── index-linux.html ├── index-macos.html ├── index-windows.html ├── index.html ├── pl404-linux.html ├── pl404-macos.html ├── pl404-windows.html ├── pl404.html ├── resources └── Extensions │ ├── Emily Short │ ├── Complex Listing-v10.zip │ ├── Inanimate Listeners-v3.zip │ ├── Locksmith-v15.zip │ ├── Punctuation Removal-v7.zip │ └── Skeleton Keys-v2.zip │ ├── Eric Eve │ └── Epistemology-v9.zip │ └── Graham Nelson │ ├── Approximate Metric Units-v2.zip │ ├── Metric Units-v3.zip │ └── Rideable Vehicles-v4.zip ├── roster.json └── source ├── catalogue.txt ├── headings.txt ├── include ├── description.html ├── description404.html ├── filters.html ├── mass_download_buttons.html ├── public_library.css ├── resource.html ├── section_buttons.js ├── section_heading.html ├── structure.js └── subsection_heading.html ├── index-linux.html ├── index-macos.html ├── index-windows.html ├── index.html ├── pl404-linux.html ├── pl404-macos.html ├── pl404-windows.html └── pl404.html /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | proposals/.DS_Store 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # inform-public-library 2 | The server side for the Inform Public Library. 3 | 4 | ## How this works 5 | 6 | The Public Library is presented in the GUI Inform apps as a source for 7 | downloading commonly needed extensions which aren't bundled with the apps. 8 | 9 | In versions of Inform up to 9.3, the PL was housed at `emshort.com/pl`), where 10 | the crucial index file was at `emshort.com/pl/index.html`. That server remains 11 | in place for the benefit of users of copies of the apps released before 2022. 12 | 13 | From version 10.1, however, the Inform apps for Linux, MacOS and Windows 14 | use the Github Pages-served form of this repository, at the address: 15 | 16 | https://ganelson.github.io/inform-public-library/ 17 | 18 | Moreover, there are three different forms of the index page: 19 | 20 | https://ganelson.github.io/inform-public-library/index-linux.html 21 | https://ganelson.github.io/inform-public-library/index-macos.html 22 | https://ganelson.github.io/inform-public-library/index-windows.html 23 | 24 | These differ only in the CSS used, which is tweaked to look right on each 25 | platform (and in particular so that Dark Mode works well on the Mac). 26 | 27 | ## Changing and updating the contents of the Library 28 | 29 | The index pages are generated by `inbuild` from the metadata file `docs/roster.json`: 30 | so to update the contents of the Public Library, rewrite that file, put new 31 | extensions (or change old ones) in `docs/resources/Extensions`, and then 32 | rebuild the index pages. 33 | 34 | This is done as follows: 35 | 36 | - 1. Pull and make the contents of the `inform` repository, so that you 37 | have a working copy of `inbuild`. 38 | - 2. Pull this repository alongside `inform`. 39 | - 3. Change directory to `inform`. Run the command: 40 | ``` 41 | inbuild/Tangled/inbuild -build-registry ../inform-public-library/docs 42 | ``` 43 | What this does is to build (currently) ten indexing files from templates 44 | in `docs/source` to produce the indexes into `docs` itself. Specifically, 45 | it turns: 46 | 47 | - `docs/source/index.html` into `docs/index.html` 48 | - `docs/source/index-linux.html` into `docs/index-linux.html` 49 | - `docs/source/index-macos.html` into `docs/index-macos.html` 50 | - `docs/source/index-windows.html` into `docs/index-windows.html` 51 | - `docs/source/pl404.html` into `docs/pl404.html` 52 | - `docs/source/pl404-linux.html` into `docs/pl404-linux.html` 53 | - `docs/source/pl404-macos.html` into `docs/pl404-macos.html` 54 | - `docs/source/pl404-windows.html` into `docs/pl404-windows.html` 55 | - `docs/source/catalogue.txt` into `docs/catalogue.txt` 56 | - `docs/source/headings.txt` into `docs/headings.txt` 57 | 58 | The `pl404.html` page is not actually needed on the server, but instead is 59 | used in the apps, to be displayed if the Internet (or the server) is down. 60 | 61 | There are different versions for each app in order to customise the CSS. 62 | Windows needs different font choices, MacOS does idiosyncratic things to 63 | make Dark Mode work with the app. The versions with no platform indicated 64 | are generic in the same way that the v9 Inform Public Library page was generic: 65 | i.e., looking sort of okay but not ideal across the board. 66 | 67 | The `catalogue.txt` and `headings.txt` files are purely for human convenience, 68 | and aren't needed by either the server or the apps. 69 | 70 | ## Current state of the Library 71 | 72 | The resources in this registry are the final state of the version 9.3 Public 73 | Library as curated by Mark Musante - thus, the content has been migrated but 74 | not really changed. (Though the HTML and CSS are all different, and there is 75 | explanatory text on the Public Library index page about the status of things.) 76 | -------------------------------------------------------------------------------- /docs/catalogue.txt: -------------------------------------------------------------------------------- 1 | Adaptive Prose 2 | Responses 3 | Response Assistant by Aaron Reed v1 4 | Varying What is Written 5 | Assorted Text Generation by Emily Short v5 6 | Complex Listing by Emily Short v9 7 | List Control by Eric Eve v4 8 | List Controller by Eric Eve v4 9 | Text Capture by Eric Eve v8.1 10 | Varying What is Read 11 | Punctuation Removal by Emily Short v5 12 | Using the Player's Input 13 | Phrases for Tables with Topics by Ron Newcomb v3 14 | Place 15 | Map 16 | Dynamic Rooms by Aaron Reed v3 17 | Continuous Spaces and the Outdoors 18 | Facing by Emily Short v11.2 19 | Doors, Staircases, and Bridges 20 | Disappearing Doors by Andrew Plotkin v1 21 | Deluxe Doors by Emily Short v4 22 | Secret Doors by Gavin Lambert v2 23 | Easy Doors by Hanon Ondricek v3.2 24 | Time and Plot 25 | The Passage of Time 26 | Variable Time Control by Eric Eve v4 27 | The Viewpoint Character 28 | Characterization 29 | Unsuccessful PC Attempt by Ron Newcomb v2 30 | Background, Memory, and Knowledge 31 | Epistemology by Eric Eve v6 32 | Commands 33 | Looking 34 | Simple Spelling by Alice Grove v2.2 35 | Exit Lister by Gavin Lambert v4 36 | Introductions by Emily Short v2 37 | Ordinary Room Description by Emily Short v4.0.220524 38 | Room Description Control by Emily Short v14.1.220524 39 | Single Paragraph Description by Emily Short v7.0.220525 40 | Tailored Room Description by Emily Short v13.2.220524 41 | Looking Under and Hiding 42 | Underside by Eric Eve v6.1 43 | Hiding Under by Eric Eve v4 44 | Going, Pushing things in Directions 45 | Approaches by Emily Short v8 46 | Permission to Visit by Ron Newcomb v7 47 | Regional Travel by Juhana Leinonen v2 48 | Entering and Exiting, Sitting and Standing 49 | Modified Exit by Emily Short v6 50 | Opening, Closing, Locking and Unlocking 51 | Locksmith by Emily Short v12 52 | Skeleton Keys by Emily Short v1 53 | Additional Command Sets 54 | Extended Grammar by Aaron Reed v8.2 55 | Remembering, Converting and Combining Actions 56 | Editable Stored Actions by Ron Newcomb v10 57 | Implicit Actions by Eric Eve v13.1 58 | Limited Implicit Actions by Eric Eve v3.0.1 59 | Small Kindnesses by Aaron Reed v13.2 60 | After Not Doing Something by Ron Newcomb v2.1 61 | Action at a Distance 62 | Scope Control by Ron Newcomb v2 63 | Clarification and Correction 64 | Numbered Disambiguation Choices by Aaron Reed v10.2 65 | Reversed Persuasion Correction by Juhana Leinonen v2 66 | Other Characters 67 | Getting Started with Conversation 68 | Clues and Conversation by Brian Rushton v5 69 | Conversation Framework by Eric Eve v12 70 | Threaded Conversation by Chris Conley v9.1 71 | Inanimate Listeners by Emily Short v1 72 | Saying Complicated Things 73 | Conversation Nodes by Eric Eve v7 74 | Conversation Package by Eric Eve v3 75 | Conversation Responses by Eric Eve v7 76 | Conversation Suggestions by Eric Eve v6.2 77 | Conversational Defaults by Eric Eve v3 78 | Character Emotion 79 | Mood Variations by Emily Short v3.1 80 | Traveling Characters 81 | Simple Followers by Emily Short v7 82 | Vehicles, Animals, and Furniture 83 | Bicycles, Cars, and Boats 84 | Rideable Vehicles by Graham Nelson v3 85 | Ships, Trains, and Elevators 86 | Transit System by Emily Short v6 87 | Furniture 88 | Automated Drawers by Emily Short v6 89 | Postures by Emily Short v2.2 90 | Kitchen and Bathroom 91 | Modern Conveniences by Emily Short v5 92 | Props: Food, Clothing, Money, Toys, Books, Electronics 93 | Bags, Bottles, Boxes and Safes 94 | Dishes by Emily Short v2 95 | Computers 96 | Computers by Emily Short v8.2 97 | Reading and Writing 98 | Basic Literacy by Bart Massey v2.3 99 | Physics: Substances, Ropes, Energy and Weight 100 | Liquids 101 | Measured Liquid by Emily Short v6.3 102 | Volume, Height, Weight 103 | Metric Units by Graham Nelson v2 104 | Approximate Metric Units by Graham Nelson v1 105 | Bulk Limiter by Eric Eve v9 106 | Bulky Items by Juhana Leinonen v3 107 | Journals and Notebooks 108 | Notepad by Jim Aikin v3 109 | Connections and Attachments 110 | Plugs and Sockets by Sean Turner v4.2 111 | Power Sources by Emily Short v2 112 | Numerical Effects and Programming Tools 113 | Conditionals 114 | Alternatives by Eric Eve v3 115 | Hypothetical Questions by Jesse McGrew v5.1.0 116 | Out of World Actions and Effects 117 | Helping and Hinting 118 | Adaptive Hints by Eric Eve v7 119 | Basic Help Menu by Emily Short v1 120 | Basic Help Menu by Wade Clarke v4 121 | Menus by Wade Clarke v5 122 | Commonly Unimplemented by Aaron Reed v2 123 | Poor Man's Mistype by Aaron Reed v8 124 | Smarter Parser by Aaron Reed v16.1 125 | Tutorial Mode by Emily Short v5 126 | Scoring 127 | Achievements by Juhana Leinonen v1.2 128 | Ending 129 | Recorded Endings by Emily Short v5 130 | Typography, Layout, and Multimedia Effects 131 | Screen Effects (General) 132 | Basic Screen Effects by Emily Short v7/140425 133 | Typography 134 | Glulx Text Effects by Emily Short v4/140425 135 | Unicode Character Names by Graham Nelson v1 136 | Unicode Full Character Names by Graham Nelson v1 137 | The Status Line 138 | Exit Lister by Eric Eve v11 139 | Footnotes 140 | Footnotes by Stephen Granade v2 141 | Menus 142 | Menus by Emily Short v3 143 | Glulx Multimedia Effects (General) 144 | Glulx Entry Points by Emily Short v10/150101 145 | Glulx Graphics 146 | Glulx Image Centering by Emily Short v4 147 | Testing and Publishing 148 | Testing and Debugging 149 | Debug Tags by Michael Kielstra v1 150 | Debug Files by Juhana Leinonen v2 151 | Object Response Tests by Juhana Leinonen v7 152 | Property Checking by Emily Short v4 153 | 154 | -------------------------------------------------------------------------------- /docs/headings.txt: -------------------------------------------------------------------------------- 1 | Adaptive Prose 2 | Responses 3 | Varying What is Written 4 | Varying What is Read 5 | Using the Player's Input 6 | Place 7 | Map 8 | Continuous Spaces and the Outdoors 9 | Doors, Staircases, and Bridges 10 | Time and Plot 11 | The Passage of Time 12 | The Viewpoint Character 13 | Characterization 14 | Background, Memory, and Knowledge 15 | Commands 16 | Looking 17 | Looking Under and Hiding 18 | Going, Pushing things in Directions 19 | Entering and Exiting, Sitting and Standing 20 | Opening, Closing, Locking and Unlocking 21 | Additional Command Sets 22 | Remembering, Converting and Combining Actions 23 | Action at a Distance 24 | Clarification and Correction 25 | Other Characters 26 | Getting Started with Conversation 27 | Saying Complicated Things 28 | Character Emotion 29 | Traveling Characters 30 | Vehicles, Animals, and Furniture 31 | Bicycles, Cars, and Boats 32 | Ships, Trains, and Elevators 33 | Furniture 34 | Kitchen and Bathroom 35 | Props: Food, Clothing, Money, Toys, Books, Electronics 36 | Bags, Bottles, Boxes and Safes 37 | Computers 38 | Reading and Writing 39 | Physics: Substances, Ropes, Energy and Weight 40 | Liquids 41 | Volume, Height, Weight 42 | Journals and Notebooks 43 | Connections and Attachments 44 | Numerical Effects and Programming Tools 45 | Conditionals 46 | Out of World Actions and Effects 47 | Helping and Hinting 48 | Scoring 49 | Ending 50 | Typography, Layout, and Multimedia Effects 51 | Screen Effects (General) 52 | Typography 53 | The Status Line 54 | Footnotes 55 | Menus 56 | Glulx Multimedia Effects (General) 57 | Glulx Graphics 58 | Testing and Publishing 59 | Testing and Debugging 60 | 61 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Aaron Reed/Extended Grammar.i7x: -------------------------------------------------------------------------------- 1 | Version 8.2 of Extended Grammar by Aaron Reed begins here. 2 | 3 | "Adds some of the most commonly attempted verb synonyms and alternate grammar lines. Based on the Inform 6 extension ExpertGrammar.h by Emily Short." 4 | 5 | [Changelog: 6 | -- V8: Updated to newest build. 7 | -- V7: Removed swear words in anticipation of I7 doing so soon also. 8 | -- V6: Added "put x on ground" and variants as synonym for drop. 9 | -- Version 5: Added useful section breaks; Added a few more things from intfiction.org newbie threads. 10 | -- Version 4: Absorbed a few prepositionless alternatives formerly in Small Kindnesses. 11 | -- Version 3: Added some new vocabulary as a result of newbie Sand-dancer transcripts. 12 | -- Version 2: Clarified climbing something enterable versus something not enterable; added a few new preposition forms to some commands. 13 | ] 14 | 15 | [Concerns: Should "lift" be pull or take? Has been seen used in both cases. Also "raise."] 16 | 17 | Section - Extended Grammar for Attack 18 | 19 | Understand the command "injure" or "kick" or "strike" or "smack" as "attack". 20 | 21 | Understand "break in/into/down/through [something]" as attacking. 22 | Understand "break [something] in/down" as attacking. 23 | 24 | Section - Extended Grammar for Burn 25 | 26 | Understand the command "melt" or "ignite" or "incinerate" or "kindle" or "bake" or "toast" as "burn". 27 | 28 | Section - Extended Grammar for Cut 29 | 30 | Understand the command "carve" as "cut". 31 | 32 | Section - Extended Grammar for Climb 33 | 34 | Understand "climb on/in/into/onto [something]" as climbing. 35 | 36 | Understand "throw [something preferably held] away" as dropping. 37 | Understand "throw away [something preferably held]" as dropping. 38 | 39 | Section - Extended Grammar for Drop 40 | 41 | Understand the command "toss" or "fling" or "hurl" as "drop". 42 | 43 | Understand "put [something preferably held] on floor/ground" as dropping. 44 | 45 | Section - Extended Grammar for Examine 46 | 47 | Understand the command "view" or "observe" or "inspect" as "examine". 48 | 49 | Section - Extended Grammar for Enter 50 | 51 | Understand the command "board" as "enter". 52 | Understand "climb on/onto/in/into [something enterable]" as entering. 53 | Understand "exit through/using/by/out/-- [a door]" as entering. 54 | Understand "sit [something]" as entering. [Note: This breaks I7 [recap of command] / I6 PrintCommand, which expects the player has typed a grammatical command. Thus we might get messages like "What do you want to sit?"] 55 | Understand "sit down on/in [something]" as entering. 56 | Understand "jump on/in/into/onto [something]" as entering. 57 | Understand "sit down" as entering. 58 | 59 | Section - Extended Grammar for Exit 60 | 61 | Understand the command "escape" or "depart" as "exit". 62 | 63 | Section - Extended Grammar for Give 64 | 65 | Understand the command "hand" or "deliver" as "give". 66 | 67 | Section - Extended Grammar for Go 68 | 69 | Understand the command "proceed" or "wander" or "explore" as "go". 70 | Understand "upstairs/ascend" as up. 71 | Understand "downstairs/descend" as down. 72 | 73 | Understand "go to [direction]" as going. 74 | Understand "climb [a direction]" as going. 75 | 76 | Section - Extended Grammar for Listen 77 | 78 | Understand "listen [something]" as listening to. 79 | 80 | Section - Extended Grammar for Look 81 | 82 | Understand the command "see" as "look". 83 | Understand "look around/about" as looking. 84 | 85 | Section - Extended Grammar for Pull 86 | 87 | Understand the command "raise" or "lift" as "pull". 88 | 89 | Section - Extended Grammar for Push 90 | 91 | Understand the command "lower" as "push". 92 | 93 | Section - Extended Grammar for Put 94 | 95 | Understand the command "place" or "stick" or "shove" or "stuff" as "put". 96 | 97 | Section - Extended Grammar for Switch 98 | 99 | Understand the command "activate" or "start" as "switch". 100 | Understand the command "deactivate" or "stop" as "switch". 101 | 102 | Section - Extended Grammar for Take 103 | 104 | Understand the command "steal" or "grab" or "acquire" or "snatch" or "bring" as "take". 105 | 106 | Section - Extended Grammar for Turn 107 | 108 | Understand the command "spin" as "turn". 109 | 110 | Section - Extended Grammar for Saying Yes 111 | 112 | Understand "okay" or "ok" as saying yes. 113 | 114 | Section - Extended Grammar for Throw 115 | 116 | Understand "throw [something preferably held] into/through/to [something]" as throwing it at. 117 | 118 | Extended Grammar ends here. 119 | 120 | ---- DOCUMENTATION ---- 121 | 122 | Including this extension adds about sixty new verbs to a story's vocabulary, including words like GRAB, INSPECT, DESCEND, and KICK. Note that no new actions are created: these are all simply synonyms for existing commands. 123 | 124 | A few new command forms are also understood as well: for instance, CLIMB UP is understood as going, CLIMB INTO THE CHAIR as entering, and CLIMB ON WALL as climbing, all three of which are normally unrecognized. 125 | 126 | The functionality is similar to that provided by the old Inform 6 extension ExpertGrammar.h by Emily Short, minus some of the features since incorporated by default into Inform's grammar, and plus a few words and command forms I observed new IF players try to use during the testing of various projects. Emily's comments in the original extension note that many of these words are either standard in other IF languages, or were observed in the command logs of an online version of Zork. 127 | 128 | Example: * Look Around You - 129 | 130 | *: "Give My Creation Life" 131 | 132 | Include Extended Grammar by Aaron Reed. 133 | 134 | The Laboratory is above the Operating Room. A slab is an enterable supporter in the Operating Room. A man called the Creature is on the slab. The player carries a raw steak. The oscillitron is a device in Operating Room. Instead of attacking the creature, say "It's alive!" 135 | 136 | Test me with "descend / look around / observe the creature / activate oscillitron / sit down on the slab / hand steak to Creature / place steak on slab / kick Creature / upstairs" 137 | 138 | 139 | 140 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Aaron Reed/Poor Man's Mistype.i7x: -------------------------------------------------------------------------------- 1 | Version 8 of Poor Man's Mistype by Aaron Reed begins here. 2 | 3 | "Adds basic typo correction by checking the first few letters of misunderstood input against the printed names of nearby objects. Requires version 15 of Smarter Parser by Aaron Reed. Supports Scope Caching by Mike Ciul for faster performance." 4 | 5 | [Versions: 6 | -- Version 8: Added support for Scope Caching for faster speed; moved position of first bad word check into Smarter Parser, so this now requires v15 of that. 7 | -- Version 7: Fixed a bug in GetFirstNonDictWord that was leaving the word counter in an unexpected place. 8 | -- Version 6: Doesn't try to correct one or two character words; catches misspelled articles and a few common misspelled verbs. 9 | -- Version 5: Documentation updates. 10 | -- Version 4: Updated for compatibility with Version 6 of Smarter Parser; fixed a bug where upper-case letters would break matches; fixed a bug where a comma in the command could lead to mistaken matches. 11 | -- Version 3: Fixed a documentation error. 12 | -- Version 2: Removed checking for misspelled verbs, since this has caused problems for some people; simplified removal of Smarter Parser rules. 13 | ] 14 | 15 | 16 | Chapter - Compatibility 17 | 18 | Section - Inclusions 19 | 20 | Include Version 16 of Smarter Parser by Aaron Reed. 21 | 22 | Chapter - Sequence 23 | 24 | The Poor Man's Mistype rule is listed before the stripping unnecessary addendum rule in the Smarter Parser rules. The strip misspelled articles rule is listed before the Poor Man's Mistype rule in the Smarter Parser rules. 25 | 26 | Chapter - Rules 27 | 28 | A smarter parser rule (this is the strip misspelled articles rule): 29 | if stripping "(teh|th)" is fruitful: 30 | identify error as strip misspelled articles rule; 31 | reparse the command. 32 | 33 | A smarter parser rule (this is the Poor Man's Mistype rule): 34 | let wnum be the position of first bad word; 35 | if wnum > 0: 36 | let badword be indexed text; 37 | now badword is word number wnum in reborn command; 38 | if the number of characters in badword < 3, no match; 39 | let first3 be indexed text; 40 | now first3 is "[character number 1 in badword][character number 2 in badword][character number 3 in badword]"; 41 | let candidate be indexed text; 42 | repeat with item running through things enclosed by location: 43 | if item is visible: 44 | now candidate is printed name of item in lower case; 45 | if candidate matches the regular expression "\b[first3]": 46 | repeat with wordcounter running from 1 to the number of words in candidate: 47 | if word number wordcounter in candidate matches the regular expression "\b[first3]": 48 | replace the regular expression "\b[badword]\b" in the reborn command with "[word number wordcounter in candidate]"; 49 | identify error as the Poor Man's Mistype rule; 50 | reparse the command. 51 | 52 | A smarter parser rule (this is the most common verb misspellings rule): 53 | if the latest parser error is the not a verb I recognise error: 54 | if input contains "^(lok|loook|ook)": 55 | identify error as most common verb misspellings rule; 56 | replace the regular expression text matching subexpression 1 in the reborn command with "look"; 57 | reparse the command; 58 | if input contains "^(tkae)": 59 | identify error as most common verb misspellings rule; 60 | replace the regular expression text matching subexpression 1 in the reborn command with "take"; 61 | reparse the command. 62 | 63 | Chapter - Faster Mistype (for use with Scope Caching by Mike Ciul) 64 | 65 | The faster Poor Man's Mistype rule is listed instead of the Poor Man's Mistype rule in the smarter parser rules. 66 | 67 | This is the faster Poor Man's Mistype rule: 68 | let wnum be the position of first bad word; 69 | if wnum > 0: 70 | let badword be indexed text; 71 | now badword is word number wnum in reborn command; 72 | if the number of characters in badword < 3, no match; 73 | let first3 be indexed text; 74 | now first3 is "[character number 1 in badword][character number 2 in badword][character number 3 in badword]"; 75 | let candidate be indexed text; 76 | repeat with item running through marked visible things: 77 | now candidate is printed name of item in lower case; 78 | if candidate matches the regular expression "\b[first3]": 79 | repeat with wordcounter running from 1 to the number of words in candidate: 80 | if word number wordcounter in candidate matches the regular expression "\b[first3]": 81 | replace the regular expression "\b[badword]\b" in the reborn command with "[word number wordcounter in candidate]"; 82 | identify error as the Poor Man's Mistype rule; 83 | reparse the command. 84 | 85 | 86 | Poor Man's Mistype ends here. 87 | 88 | ---- DOCUMENTATION ---- 89 | 90 | This extension tries to fix spelling errors in misunderstood input by looking for words in the "printed name" of nearby objects that start with the first three letters of the first misunderstood word in the player's input. While a simple approach, this still catches about 40% of IF typos, including common cases where the player uses an abbreviated form or a unimplemented plural or singular form of a noun. 91 | 92 | The extension requires version 12 or higher of Smarter Parser by Aaron Reed, which includes much more functionality for recognizing misunderstood input. If you want to disable this and use mistype correction alone, simply add the following line to your source: 93 | 94 | Use empty Smarter Parser rulebook. 95 | 96 | Example: * Potatoe Farm 97 | 98 | *: "Potatoe Farm" 99 | 100 | Include Poor Man's Mistype by Aaron Reed. 101 | 102 | There is a room called On The Ol' Potato Farm. "Efforts to turn this place into a trendy retreat for artists have not been fruitful." A vegetable garden and a cemetery are fixed in place in Farm. A minuscule potato, a squash daiquiri, and an exhilarating questionnaire are in Farm. A maintenance worker named Katelynn and a committed playwright are people in Farm. 103 | 104 | Test me with "x potatoe / x potatos / x cemetary / tkae questionare / give potatoe to playright / hug katelyn / drop teh questionnaire / lok / drink daquiri". 105 | 106 | Note that since at least the first three letters must be correct for a match, the last command fails to be recognized -- perhaps a blessing in disguise in this case. 107 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Aaron Reed/Response Assistant.i7x: -------------------------------------------------------------------------------- 1 | Version 1 of Response Assistant by Aaron Reed begins here. 2 | 3 | "Adds some helpful testing commands for changing default responses." 4 | 5 | Part - Response Assistant (not for release) 6 | 7 | Chapter - Actions 8 | 9 | Section - Response Tracking 10 | 11 | Response tracking is an action out of world applying to nothing. Understand "track responses" as response tracking. Carry out response tracking: say "Now tracking responses. Type 'track off' to disable."; now tracking responses is true. 12 | 13 | Section - Disabling Response Tracking 14 | 15 | Disabling response tracking is an action out of world applying to nothing. Understand "track off" as disabling response tracking. Carry out disabling response tracking: say "Response tracking off."; now tracking responses is false. 16 | 17 | Section - Requesting Response Info 18 | 19 | Requesting response info is an action out of world applying to one number. Understand "response [number]" as requesting response info. 20 | 21 | Carry out requesting response info: 22 | let x be the number understood; 23 | let resp be entry x of recent responses; 24 | say "[bold type][resp][roman type]"; 25 | say "[paragraph break]Currently:[line break]"; 26 | suppress_text_substitution; 27 | say "[text of resp]"; 28 | reinstate_text_substitution; 29 | say "[paragraph break]To change, copy and pase the following line into your source:[line break]The [resp] is 'New response text.'[first time][line break]* Note: if this response was defined in your own source text, of course, it's easier to change it by searching for the text in your project and updating the original.[only]"; 30 | 31 | Chapter - Variables 32 | 33 | Tracking responses is initially false. 34 | 35 | Recent responses is a list of responses variable. 36 | 37 | [Note: the below won't work for commands that are interrupt the normal parsing sequence, like OOPS, but it's not really a big deal.] 38 | After reading a command when the player's command does not include "response" (this is the Response Assistant reset responses list rule): 39 | truncate recent responses to 0 entries. 40 | 41 | Chapter - Reporting 42 | 43 | Before issuing the response text of a response (called R) when tracking responses is true and we are not requesting response info (this is the Response Assistant before showing response text rule): 44 | say "[bracket]". 45 | 46 | After issuing the response text of a response (called R) when tracking responses is true and we are not requesting response info (this is the Respose Assistant after showing response text rule): 47 | add R to recent responses; 48 | let N be the number of entries in recent responses; 49 | say " - [italic type]"; 50 | if N is 1: 51 | say "type 'response [N]' for details"; 52 | else: 53 | say "response [N]"; 54 | say "[roman type][close bracket]". 55 | 56 | Chapter - Inform 6 Hooks 57 | 58 | To suppress_text_substitution: (- SuppressTextSub(); -). 59 | To reinstate_text_substitution: (- ReinstateTextSub(); -). 60 | 61 | Include (- [SuppressTextSub; suppress_text_substitution = true; ]; -) after "Tests.i6t". 62 | Include (- [ReinstateTextSub; suppress_text_substitution = false; ]; -) after "Tests.i6t". 63 | 64 | Response Assistant ends here. 65 | 66 | ---- DOCUMENTATION ---- 67 | 68 | This extension makes it easier to adjust responses from the Standard Rules or extensions. Type "track responses" to append each response seen with a numbered tag. You can then type "response 1" (and so on) to see details about the current form of the message, and a template you can copy and paste in your source text to change it. Type "track off" to stop tracking responses. 69 | 70 | The entire extension is marked "not for release", so it can safely be left in a released project without affecting its functionality or file size. 71 | 72 | More information about responses can be found in the "Adapative Text and Responses" chapter on the "Documentation" pane. As a reminder, you can list all the responses associated with the Standard Rules or a particular extension via the testing command RESPONSES, or see all responses associated with a particular action on the Index pane, Actions tab, by clicking a specific action and then clicking the speech bubble icon at the bottom of the action listing. 73 | 74 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Alice Grove/Simple Spelling.i7x: -------------------------------------------------------------------------------- 1 | Version 2.2 of Simple Spelling by Alice Grove begins here. 2 | 3 | "Simple Spelling aims to make stories more screen-reader-friendly by allowing players to request the spelling of any visible thing. This extension adds two actions: 'listing visible items for spelling' and 'spelling the numbered word.'" 4 | 5 | 6 | Section - Introduction 7 | 8 | introduce simple spelling features is a truth state that varies. introduce simple spelling features is usually true. 9 | 10 | When play begins (this is the introduce the simple spelling features rule): 11 | if introduce simple spelling features is true: 12 | say "Are you using a screen reader? (Y/N)>[run paragraph on]" (A); 13 | if player consents: 14 | say "[line break]This story allows you to request the spelling of nearby things. For a list of nearby items that can be spelled, please type the word SPELL. Each time you do this, a new numbered list will be generated.[paragraph break]To request the spelling of an item, please type the word SPELL followed by the item's number on the list." (B); 15 | say line break. 16 | 17 | 18 | Section - Spelling Reference Number Property 19 | 20 | A thing has a number called a spelling reference number. 21 | 22 | 23 | Section - Phrases for Making a New Spelling List 24 | 25 | To clear all spelling reference numbers: 26 | repeat with item running through things: 27 | now the spelling reference number of the item is 0. 28 | 29 | 30 | inspect simple spelling list for duplicates is a truth state that varies. Inspect simple spelling list for duplicates is usually true. 31 | 32 | To decide which list of things is the new spelling list: 33 | let brand-new spelling list be a list of things; 34 | if inspect simple spelling list for duplicates is true: 35 | let unique item names be a list of texts; 36 | repeat with current item running through visible things: 37 | let current name be the printed name of the current item; 38 | if the current name is not listed in the unique item names: 39 | add the current item to the brand-new spelling list; 40 | add the current name to the unique item names; 41 | otherwise: 42 | repeat with current item running through visible things: 43 | add the current item to the brand-new spelling list; 44 | decide on the brand-new spelling list. 45 | 46 | 47 | Section - Listing Visible Items 48 | 49 | Listing visible items for spelling is an action out of world. 50 | Understand "spell" as listing visible items for spelling. 51 | 52 | Check listing visible items for spelling (this is the make sure there is at least one visible item to put on the spelling list rule): 53 | if there is a visible thing: 54 | continue the action; 55 | otherwise: 56 | say "There are no nearby items to spell." (A) instead. 57 | 58 | Carry out listing visible items for spelling (this is the list the visible items and their spelling reference numbers rule): 59 | clear all spelling reference numbers; 60 | let spelling list be the new spelling list; 61 | let total spelling entries be the number of entries in the spelling list; 62 | if the total spelling entries > 1: 63 | say "To spell the name of something, please type the word SPELL followed by a number from 1 to [total spelling entries]." (A); 64 | let N be 0; 65 | repeat with item running through spelling list: 66 | increment N; 67 | now the spelling reference number of item is N; 68 | let current name be the printed name of item; 69 | say "To spell [current name in upper case], type [spelling reference number of item]." (B); 70 | otherwise if the total spelling entries is 1: 71 | let lone item be entry 1 in the spelling list; 72 | now the spelling reference number of the lone item is 1; 73 | say "You can see only [printed name of lone item]." (C); 74 | try spelling the numbered word 1. 75 | 76 | 77 | Section - Spelling a Word 78 | 79 | Spelling the numbered word is an action out of world applying to one number. 80 | Understand "spell [number]" as spelling the numbered word. 81 | 82 | [When the player generates a numbered list of nearby things, that list will always begin with the number 1. The number 0 is used internally only; it designates items that are not on the list. So the command SPELL 0 would likely only be entered by mistake. Rather than confusing the player by spelling a series of items assigned the number 0, we block the action.] 83 | Check spelling the numbered word when the number understood is 0 (this is the can't spell words with a spelling number of zero rule): 84 | say "The number 0 is not one of the options on the list of nearby things. To list nearby things and their numbers, please type the word SPELL." (A) instead. 85 | 86 | Check spelling the numbered word (this is the make sure there is a visible item with the given spelling number rule): 87 | repeat with visible item running through visible things: 88 | if the spelling reference number of the visible item is the number understood: 89 | continue the action; 90 | say "There are no nearby things assigned the number [number understood]. To list nearby things and their numbers, please type the word SPELL." (A) instead. 91 | 92 | Carry out spelling the numbered word (this is the spell the word that has the given spelling number rule): 93 | repeat with visible item running through visible things: 94 | if the spelling reference number of the visible item is the number understood: 95 | let current name be the printed name of the visible item; 96 | say "[Current name in upper case] is spelled[run paragraph on]" (A); 97 | repeat with N running from 1 to the number of characters in current name: 98 | say " " (B); 99 | let current letter be character number N in current name; 100 | if the current letter is " ": 101 | say "space" (C); 102 | otherwise if the current letter is "-": 103 | say "hyphen" (D); 104 | otherwise if the current letter is "[']": 105 | say "apostrophe" (E); 106 | otherwise if the current letter is ".": 107 | say "[if American dialect option is active]period[otherwise]full stop[end if]" (F); 108 | otherwise: 109 | say the current letter in upper case; 110 | say "." (G). 111 | 112 | 113 | Section - Command List (for use with Common Commands Sidebar by Alice Grove) 114 | 115 | Table of Extension-Provided Sidebar Commands (continued) 116 | Displayed Command 117 | "Spell" 118 | "Spell (number)" 119 | 120 | 121 | Simple Spelling ends here. 122 | 123 | 124 | ---- DOCUMENTATION ---- 125 | 126 | Thanks to Neil Butters for the code feedback! 127 | 128 | Section: Basic Use 129 | 130 | Punctuation, words that sound like other words, and made-up words aren't always clear when spoken by a screen reader. Nevertheless, parser IF requires players to spell the names of things in order to refer to them. This extension aims to make stories more screen-reader-friendly by allowing players to request the spelling of any visible thing. 131 | 132 | This extension adds two actions: "listing visible items for spelling" and "spelling the numbered word." 133 | 134 | The command SPELL leads to the "listing visible items for spelling" action. This action will automatically display a list of visible things, numbering them for the player's reference. This list is made only after clearing any numbers that have previously been assigned to things in the story. 135 | 136 | To request the spelling of an item, the player can then type SPELL followed by the item's number on the list. 137 | 138 | 139 | Section: Options 140 | 141 | By default, players will be asked at the start of play if they are using a screen reader. Then if the player answers YES, the spelling features will be briefly explained. To turn off this opening question and introduction (for instance, if we want to introduce the spelling features elsewhere) we can set "introduce simple spelling features" to "false": 142 | 143 | *: introduce simple spelling features is false. 144 | 145 | If we do want the question and introduction, but only in a released version of the story, we can put the above code in a section marked "Not for release": 146 | 147 | *: 148 | Section - Introducing spelling features - Not for release 149 | 150 | introduce simple spelling features is false. 151 | 152 | By default, this extension will check for duplicates when making a spelling list so as not to include the same entry twice. This is helpful if we have duplicate items in our story and want to avoid, for instance, listing twenty identical coins as twenty separate items on the list. If we want to skip the check-for-duplicates step, we can set "inspect simple spelling list for duplicates" to "false": 153 | 154 | *: inspect simple spelling list for duplicates is false. 155 | 156 | 157 | Example: * Simple Spelling Lab - A room with some spellable items and characters. 158 | 159 | *: "Simple Spelling Lab" 160 | 161 | Include Simple Spelling by Alice Grove. 162 | 163 | 164 | A dictionary is a kind of thing. 165 | 166 | Spelling Lab is a room. 167 | 168 | Donna Hopkins-Brown is a woman in Spelling Lab. Donna Hopkins-Brown carries 4 dictionaries. 169 | 170 | An inspection table is a supporter in Spelling Lab. A perse purse is on the inspection table. A pale pail is on the inspection table. A piece of Pete's pizza is on the inspection table. 171 | 172 | The player carries a xyzzifier. 173 | 174 | 175 | Test me with "spell / spell 1 / spell 2 / spell 3 / spell 4 / spell 5 / spell 6 / spell 7 / spell 8". -------------------------------------------------------------------------------- /docs/resources/Extensions/Andrew Plotkin/Disappearing Doors.i7x: -------------------------------------------------------------------------------- 1 | Version 1 of Disappearing Doors by Andrew Plotkin begins here. 2 | 3 | "The ability to remove doors from the world and put them back." 4 | 5 | Definition: a door is absent rather than present if I6 routine "AssertDoorAbsent" makes it so (it is out of scope and untraversible). 6 | 7 | Include (- 8 | [ AssertDoorAbsent door flag 9 | addr rm1 rm2 dir1 dir2 off1 off2; 10 | 11 | if (flag == -1) { 12 | return (door has absent); 13 | } 14 | 15 | ! door.found_in should be a list of two rooms, which is I7's normal arrangement 16 | addr = door.&found_in; 17 | if (addr == 0 || door.#found_in ~= 2*WORDSIZE) 18 | print_ret "(BUG) Cannot activate/deactivate door: malformed found_in: ", (name) door; 19 | rm1 = addr-->0; 20 | rm2 = addr-->1; 21 | 22 | @push location; 23 | location = rm1; 24 | dir1 = door.door_dir(); 25 | location = rm2; 26 | dir2 = door.door_dir(); 27 | @pull location; 28 | 29 | if (~~(dir1 ofclass (+ direction +) && dir2 ofclass (+ direction +) )) 30 | print_ret "(BUG) Cannot activate/deactivate door: directions not found: ", (name) door; 31 | 32 | off1 = ((rm1.IK1_Count)*No_Directions + dir1.IK3_Count); 33 | off2 = ((rm2.IK1_Count)*No_Directions + dir2.IK3_Count); 34 | 35 | if (flag) { 36 | if (door hasnt absent) { 37 | SignalMapChange(); 38 | 39 | if (Map_Storage-->off1 == door) 40 | Map_Storage-->off1 = 0; 41 | else 42 | print "(BUG) Map_Storage from door does not match^"; 43 | if (Map_Storage-->off2 == door) 44 | Map_Storage-->off2 = 0; 45 | else 46 | print "(BUG) Map_Storage from door does not match^"; 47 | 48 | give door absent; 49 | remove door; 50 | } 51 | } 52 | else { 53 | if (door has absent) { 54 | SignalMapChange(); 55 | 56 | if (Map_Storage-->off1 == 0) 57 | Map_Storage-->off1 = door; 58 | else 59 | print "(BUG) Map_Storage from door does not match^"; 60 | if (Map_Storage-->off2 == 0) 61 | Map_Storage-->off2 = door; 62 | else 63 | print "(BUG) Map_Storage from door does not match^"; 64 | 65 | give door ~absent; 66 | if (rm1 == real_location || rm2 == real_location) 67 | move door to real_location; 68 | else 69 | remove door; 70 | } 71 | } 72 | ]; 73 | -) after "Map Connections" in "WorldModel.i6t". 74 | 75 | Disappearing Doors ends here. 76 | 77 | ---- DOCUMENTATION ---- 78 | 79 | The Standard Rules let you "change the (direction) exit of (room) to (room)", but doors are fixed in place on the map. This extension does not allow you to move doors around, but it does let you make a door disappear and then reappear in the same place. 80 | 81 | This is done through a "present" (or "absent") property of doors. So you can write: 82 | 83 | now the magic door is absent; 84 | now the magic door is present; 85 | 86 | if the magic door is absent: ... 87 | if the magic door is present: ... 88 | 89 | Doors always start as "present". If you want an initially hidden door to be revealed (a common case) then you must say: 90 | 91 | When play begins: 92 | now the secret door is absent. 93 | 94 | When a door disappears, it leaves no exit where it was previously connected. You can reconnect those directions to other rooms, but you must disconnect them before you make the door present again. 95 | 96 | Making a door disappear or reappear does not affect whether it is open, closed, locked, or unlocked. 97 | 98 | A one-sided door cannot be made absent. This extension only works on two-sided doors. 99 | 100 | (This extension has been tested with Inform 6G60 and 6L38.) 101 | 102 | Example: * The Prisoner of La-Z-enda - A simple demonstration of an appearing door. 103 | 104 | *: "The Prisoner of La-Z-enda" 105 | 106 | Include Disappearing Doors by Andrew Plotkin. 107 | 108 | The Prison Cell is a room. "These four stone walls are all you have seen of the world for thirty-five interminable minutes. [if the steel door is absent]There is no way in or out. Except for the[else]There's an[end if] escape tunnel to the northeast[if the Tunnel is not visited], but that looks terribly uncomfortable, so you've never tried it[end if]." 109 | 110 | Instead of going nowhere in the Prison Cell: 111 | say "The walls are obdurate." 112 | 113 | The steel door is a door. The steel door is north of the Prison Cell. "A door beckons in the [direction of steel door from location] wall!" 114 | 115 | The Tunnel is a room. "The tunnel is less uncomfortable than you'd been led to believe. Your cell is southwest, and sweet freedom is northwest." 116 | The Tunnel is southeast of the Hallway. 117 | The Tunnel is northeast of the Prison Cell. 118 | 119 | The Hallway is north of the steel door. "Many's the time you've imagined this corridor. It lives up to your expectations. The rest of your life is to the west." 120 | 121 | Instead of going west in the Hallway: 122 | end the story finally saying "Freedom". 123 | 124 | When play begins: 125 | now the steel door is absent. 126 | 127 | The doorbell is carried by the player. 128 | Understand "button", "bell", "device" as the doorbell. 129 | 130 | The doorbell can be ever-tried. 131 | 132 | The description of the doorbell is "It's a little bell-shaped device with a button on it. You once heard that pushing the button would make a door appear or disappear. [if the doorbell is not ever-tried]You've never bothered to try it.[else]Guess it works.[end if]" 133 | 134 | Instead of pushing the doorbell: 135 | now the doorbell is ever-tried; 136 | if the steel door is present: 137 | if the steel door is in the location: 138 | say "The steel door disappears."; 139 | else: 140 | say "Click. Nothing seems to happen."; 141 | now the steel door is absent; 142 | else: 143 | now the steel door is present; 144 | if the steel door is in the location: 145 | say "A steel door appears!"; 146 | else: 147 | say "Click. Nothing seems to happen." 148 | 149 | Test me with "north / push button / look / north / examine door / push button / look / examine door / west". 150 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Emily Short/Mood Variations.i7x: -------------------------------------------------------------------------------- 1 | Version 3.1 of Mood Variations by Emily Short begins here. 2 | 3 | "Allows the author to define a mood value for characters and then use text substitutions such as '[when bored]The king fidgets on his throne[or sleepy]The king snores[at other times]The king grins[end when].' Moods will be interpreted in 'writing a paragraph' and similar contexts as the mood of the person described in the paragraph, but at other times according to the mood of the person to whom the player is currently speaking." 4 | 5 | Section - Mood kind 6 | 7 | Mood is a kind of value. 8 | 9 | [Note that the story writer will have to define the moods.] 10 | 11 | Section - Mood properties 12 | 13 | A person has a mood called the current mood. 14 | A person has a mood called the previous mood. 15 | 16 | Section - Set mood phrases 17 | 18 | [Note that the story writer will have to define the current interlocutor.] 19 | 20 | To say set (attitude - a mood): 21 | now the previous mood of the current interlocutor is the current mood of the current interlocutor; 22 | now the current mood of the current interlocutor is attitude. 23 | 24 | To set (attitude - a mood): 25 | now the previous mood of the current interlocutor is the current mood of the current interlocutor; 26 | now the current mood of the current interlocutor is attitude. 27 | 28 | Section - Mood rule 29 | 30 | Before reading a command (this is the mood record-keeping rule): 31 | repeat with target running through people: 32 | now the previous mood of the target is the current mood of the target. 33 | 34 | Section - Active mood phrase 35 | 36 | to decide which mood is the active mood: 37 | if the item described is a person: 38 | decide on the current mood of the item described; 39 | otherwise: 40 | decide on the current mood of the current interlocutor. 41 | 42 | Section - Implementation in Inter 43 | 44 | To say when (N - a mood) -- beginning say_by_mood: 45 | (- 46 | switch( (+ the active mood +) ) 47 | {-open-brace} 48 | {N}: 49 | -). 50 | 51 | To say or (N - a mood) -- continuing say_by_mood: 52 | (- 53 | {N}: 54 | -). 55 | 56 | To say at other times -- continuing say_by_mood: 57 | (- 58 | default: 59 | -). 60 | 61 | To say end when -- ending say_by_mood: 62 | (- 63 | {-close-brace} 64 | -). 65 | 66 | Mood Variations ends here. 67 | 68 | ---- Documentation ---- 69 | 70 | This is quite a light-weight extension, designed to be used with a larger conversation library of your choice. It makes certain assumptions -- namely, that there is some character known as "current interlocutor" (defined as in "current interlocutor is an object that varies"). The current interlocutor might sometimes be nothing. Some of Eric Eve's conversation extensions use this convention, for example. 71 | 72 | We must also define our own spectrum of moods appropriate to the game we're currently writing. If we are using a simple model in which characters can only like, be neutral toward, or dislike the player, we might write: 73 | 74 | The moods are friendly, neutral, and hostile. 75 | 76 | ...though in a more complicated game we could equally give a much richer range of options. 77 | 78 | Mood Variations tracks two moods for each person: the current mood and the previous mood. This allows for situations where we change the mood, then want to provide some text or some other effect for the transition. ("Alabaster", for instance, uses mood changes as a trigger to modify the accompanying graphics.) 79 | 80 | We might want to set everyone's moods to start with: 81 | 82 | The current mood of a person is usually neutral. 83 | The previous mood of a person is usually netural. 84 | 85 | At the end of each turn sequence, the "previous mood" is updated to match the current one. This is done by the "mood record-keeping rule". 86 | 87 | The chief purpose of all this is to allow us to write text alternatives that are keyed to the mood of the person to whom we are speaking. So for instance: 88 | 89 | Instead of asking Pam about "love": 90 | say "'It's all right for some,' says Pam[when friendly], winking[or hostile], with a bit of a snarl in her voice. Clearly you've gotten on her bad side[at other times] blandly[end when]." 91 | 92 | will select our first option if Pam is friendly; the second if her mood is hostile; and the third if her mood is neutral. The order in which we defined our moods the first time determines the order in which they may be invoked by the textual substitution. 93 | 94 | We will probably also want the ability to set the mood of the current interlocutor in response to what is being said. We may do this with the "set..." token, as in 95 | 96 | Instead of asking Pam about "chicken": 97 | say "Pam sighs heavily[set hostile].". 98 | 99 | As long as "set..." is followed by the name of a mood, the current interlocutor will be given that mood. We can also do this outside a say phrase, as in: 100 | 101 | Carry out attacking the current interlocutor with something: 102 | set furious. 103 | 104 | A restriction of this system is that it does not offer phrases for setting or checking moods for NPCs other than the current interlocutor. This is because the extension is designed as a fairly streamlined solution for games in which the player is usually talking to one person at a time. It would be more complicated syntactically (to the point of not offering a useful shortcut) if we were to require the author to say *whose* moods were being checked during print options. 105 | 106 | Changelog: 107 | 108 | Version 3.1 was adapted to Inform 10 by Nathanael Nerode, by replacing I6 code with I7 code (how clean!), fixing whitespace issues, and adding sections. Because of the change in version number format, this will only work with Inform 10, but if you change the version number back to old-style, it would probably still work with older versions. The interface for the story writer is unchanged. 109 | 110 | Example: * Don't Mention The Chicken - A character who has moody reactions to certain conversation triggers, and displays her mood changes in her speech and behavior. 111 | 112 | *: "Don't Mention The Chicken" 113 | 114 | Include Mood Variations by Emily Short. 115 | 116 | The current interlocutor is an object that varies. The current interlocutor is Pam. 117 | 118 | The moods are friendly, neutral, and hostile. The current mood of a person is usually neutral. 119 | 120 | The House is a room. Pam is a woman in the House. The current mood of Pam is friendly. 121 | 122 | Instead of asking Pam about "love": 123 | say "'It's all right for some,' says Pam[when friendly], winking[or hostile], with a bit of a snarl in her voice. Clearly you've gotten on her bad side[at other times] blandly[end when]." 124 | 125 | Instead of asking Pam about "chicken": 126 | say "Pam sighs heavily[set hostile]. 'I hate poultry!'". 127 | 128 | Carry out waiting: 129 | set neutral. 130 | 131 | Every turn (this is the show mood-shifts rule): 132 | if the current mood of Pam is not the previous mood of Pam: 133 | repeat through the Table of Mood Changes: 134 | if the last entry is the previous mood of Pam and the new entry is the current mood of Pam: 135 | say "[description entry][paragraph break]"; 136 | break. 137 | 138 | Table of Mood Changes 139 | last new description 140 | neutral hostile "Pam is looking a lot less friendly now." 141 | neutral friendly "Pam seems to have relaxed a bit and is warming towards you." 142 | hostile friendly "You've completely turned around Pam's attitude." 143 | friendly hostile "Whoa, you clearly said the wrong thing there!" 144 | hostile neutral "Pam doesn't look really friendly, but she's no longer red with anger." 145 | friendly neutral "Pam crosses her arms, looking more guarded." 146 | 147 | Test me with "ask pam about love / wait / ask pam about love / ask pam about chicken / ask pam about love / wait / ask pam about love". 148 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Emily Short/Ordinary Room Description.i7x: -------------------------------------------------------------------------------- 1 | Version 4.0.220524 of Ordinary Room Description by Emily Short begins here. 2 | 3 | "An extension to go with Room Description Control, which emulates as closely as possible the behavior of Inform defaults, but allows the intervention of Room Description Control." 4 | 5 | Include Room Description Control by Emily Short. 6 | 7 | Section 1 - Use writing a paragraph rules to create initial descriptions 8 | 9 | Rule for writing a paragraph about an initially-describable thing (called target) (this is the listing initial appearances of things rule): 10 | now the target is mentioned; 11 | say "[initial appearance of the target][paragraph break]" (A). 12 | 13 | Rule for writing a paragraph about an initially-describable supporter (called target) which supports something (this is the listing initial appearances of supporters rule): 14 | now the target is mentioned; 15 | say "[initial appearance of the target] [paragraph break]" (A); 16 | carry out the disclosing supported contents activity with the target. 17 | 18 | Rule for writing a paragraph about something which is on a scenery supporter (called target) (this is the listing things on supporters rule): 19 | carry out the disclosing supported contents activity with the target. 20 | 21 | Rule for writing a paragraph about something which is on a supporter (called target) which supports the player (this is the listing things on the player's supporter rule): 22 | carry out the disclosing supported contents activity with the target. 23 | 24 | Disclosing supported contents of something is an activity. 25 | 26 | 27 | Rule for disclosing supported contents of something (called the target) which encloses the player (this is the default shared contents description rule): 28 | say "On [the target] [we] [can] see " (A); 29 | list the contents of the target, giving brief inventory information, as a sentence, including contents, tersely, not listing concealed items; 30 | say ".[paragraph break]" (B). 31 | 32 | Rule for disclosing supported contents of something (called the target) (this is the default contents description rule): 33 | say "On [the target] " (A); 34 | list the contents of the target, giving brief inventory information, as a sentence, including contents, tersely, prefacing with is/are, not listing concealed items; 35 | say ".[paragraph break]" (B). 36 | 37 | Definition: a thing is initially-describable if it is initially-described and it is not handled. 38 | 39 | Definition: a thing is initially-described if it provides the property initial appearance and its initial appearance is not "". 40 | 41 | Section 2 - List Nondescript items 42 | 43 | A last description-priority rule (this is the nondescript items preparation rule): 44 | now every thing is not marked for listing; 45 | repeat through the Table of Seen things: 46 | if the output subject entry is unmentioned: 47 | now the output subject entry is marked for listing; 48 | if a marked for listing thing is in the location: 49 | carry out the listing nondescript items activity with the location. 50 | 51 | Rule for listing nondescript items of a room (called target) (this is the nondescript items listing rule): 52 | say "[We] [can] [if something is mentioned]also [end if]see [a list of marked for listing things] here." (A) 53 | 54 | Definition: a container is see-through if it is open or it is transparent. 55 | 56 | After printing the name of a see-through container (called target) while listing nondescript items of a room (this is the disclose see-through container contents rule): 57 | if the target does not contain a marked for listing thing: 58 | make no decision; 59 | otherwise: 60 | say " (in which [is-are a list of marked for listing things in the target])" (A); 61 | 62 | After printing the name of a supporter (called target) while listing nondescript items of a room (this is the disclose supporter contents rule): 63 | if the target does not support a marked for listing thing: 64 | make no decision; 65 | otherwise: 66 | say " (on which [is-are a list of marked for listing things on the target])" (A); 67 | 68 | Section 3 - Entering and Leaving 69 | 70 | A description-concealing rule when entering something (called target) (this is the silence unnecessary description while entering rule): 71 | repeat with item running through marked for listing things: 72 | if the item is not enclosed by the target: 73 | now the item is not marked for listing. 74 | 75 | Ordinary Room Description ends here. 76 | 77 | ---- Documentation ---- 78 | 79 | The purpose of Ordinary Room Description is to replicate as closely as possible the default room description behavior of Inform while relying on the framework provided by Room Description Control. 80 | 81 | This means that including Ordinary Room Description should, by itself, change nothing about the way descriptions are presented in our game. 82 | 83 | The advantage of including it is that we can then make use of Room Description Control to make slight tweaks to Inform's default behavior, as for instance by writing description-concealing rules or changing the priority of items so that they are listed in a different order from the usual within a room. 84 | 85 | For more detail on these abilities, see the documentation for Room Description Control. 86 | 87 | Changelog: 88 | 89 | Version 4.0.220524 updated to Inform v10.1 version numbering. (Modified by Nathanael Nerode.) 90 | Version 4/210333 added the missing space in "On the dresser are[ ]a set of sheets." 91 | Version 4/210332 stopped trying to print initial descriptions when the initial description was "". 92 | Version 4/210322 is updated to work with version 14 of Room Description Control, which renamed the "output" column of the Table of Seen Things to "output subject" to reduce namespace conflicts with games. (Modified by Nathanael Nerode.) 93 | 94 | Example: * Quiet Shelf - A scenery supporter which does not list its contents in the room description. 95 | 96 | *: "Quiet Shelf" 97 | 98 | Include Ordinary Room Description by Emily Short. 99 | 100 | Sample Chamber is a room. The shelf is scenery in Sample Chamber. On the shelf is a gold coin. 101 | 102 | A description-concealing rule: 103 | now every thing on the shelf is not marked for listing. 104 | 105 | Test me with "look / get coin / look / drop coin / look". 106 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Emily Short/Property Checking.i7x: -------------------------------------------------------------------------------- 1 | Version 4 of Property Checking by Emily Short begins here. 2 | 3 | "A light testing extension to identify rooms and game items that may still be lacking descriptions or other properties." 4 | 5 | Section 1 - Testing Properties - Not for release 6 | 7 | When play begins (this is the run property checks at the start of play rule): 8 | if the description of the player is "As good-looking as ever.": 9 | say "The player has the default description."; 10 | repeat with item running through rooms: 11 | follow the property-check rules for item; 12 | repeat with item running through things: 13 | follow the property-check rules for item. 14 | 15 | Section 2 - The Property-check Rules 16 | 17 | The property-check rules are an object-based rulebook. 18 | 19 | A property-check rule for a thing (called the target) (this is the things must have description rule): 20 | unless target provides the property description: 21 | do nothing; 22 | if the description of target is non-empty: 23 | do nothing; 24 | otherwise: 25 | say "[target] has no description.". 26 | 27 | A property-check rule for a room (called the target) (this is the rooms must have descriptions rule): 28 | if description of target is empty, say "[target] has no description." 29 | 30 | Property Checking ends here. 31 | 32 | ---- Documentation ---- 33 | 34 | To use Property Checking, we simply include the extension and compile; before the first move, the game will produce a list of those things that are not yet described, and those rooms that do not yet have an initial appearance. 35 | 36 | The section that writes out content occurs only in a "not for release" segment of Property Checking, so it is safe to include Property Checking in a game for release, as the messages will not appear in the final build. 37 | 38 | To add additional checks to Property Checking, we may add our own rules to the property-check rulebook. If, for instance, we wanted to guarantee that all people in the game had an initial appearance: 39 | 40 | A property-check rule for a person (called the target) (this is the people must have initial appearances rule): 41 | if the initial appearance of the target is empty: 42 | say "[target] has no initial appearance.". 43 | 44 | Example: * Underdescribed - A minimal sort of game which will produce output with Property Checking 45 | 46 | *: "Underdescribed" 47 | 48 | Include Property Checking by Emily Short. 49 | 50 | The Lab is a room. 51 | 52 | The player carries an apple and an orange. The description of the apple is "Juicy and red." 53 | 54 | This will generate the output 55 | 56 | Lab has no description. 57 | orange has no description. 58 | 59 | at the start of play. -------------------------------------------------------------------------------- /docs/resources/Extensions/Emily Short/Recorded Endings.i7x: -------------------------------------------------------------------------------- 1 | Version 5 of Recorded Endings (for Glulx only) by Emily Short begins here. 2 | 3 | "Records the endings the player encounters in multiple play-throughs to an external file; then adds an ENDINGS option to the final question to allow the player to review which endings he has seen so far." 4 | 5 | [The File of Conclusions is called "conclusions". ] 6 | 7 | When play begins (this is the load conclusions when starting rule): 8 | read the endings. 9 | 10 | Last carry out restoring the game (this is the load conclusions when restoring rule): 11 | read the endings. 12 | 13 | To read the endings: 14 | if the File of Conclusions exists: 15 | read File of Conclusions into the Table of Possible Endings. 16 | 17 | To record (slug - some text) as an ending: 18 | read the endings; 19 | let N be "[slug]"; 20 | unless N is a description listed in the Table of Possible Endings: 21 | choose a blank row in the Table of Possible Endings; 22 | now the description entry is N; 23 | write File of Conclusions from the Table of Possible Endings. 24 | 25 | Table of Possible Endings 26 | description (indexed text) 27 | indexed text 28 | with 20 blank rows. 29 | 30 | Table of Final Question Options (continued) 31 | final question wording only if victorious topic final response rule final response activity 32 | "review the ENDINGS you've seen so far" false "review/endings" list endings rule -- 33 | 34 | This is the list endings rule: 35 | read the endings; 36 | say "The endings you have encountered so far include: [paragraph break]"; 37 | repeat through the Table of Possible Endings: 38 | say " [description entry][line break]". 39 | 40 | To decide whether (chosen ending - some text) is a used ending: 41 | let N be "[chosen ending]"; 42 | if N is a description listed in the Table of Possible Endings: 43 | yes; 44 | no. 45 | 46 | Recorded Endings ends here. 47 | 48 | ---- DOCUMENTATION ---- 49 | 50 | Recorded Endings is intended for use with Glulx works that can end in multiple ways. It records short text descriptions of the various endings to an external file, then allows the player an ENDINGS option when the game is over, so that he can review all of the endings he has encountered so far whether in this playthrough or in an earlier one. 51 | 52 | To use Recorded Endings, we need only to: 53 | 54 | 1) include a line naming the file in which conclusions will be written, thus: 55 | 56 | The File of Conclusions is called "recconclusions". 57 | 58 | Everything about this line should be exactly as written *except* the name within the quotation marks, which should be something that the game author chooses. 59 | 60 | Originally Recorded Endings declared this file itself, but the result is that if one game is played in the same directory as another that also uses Recorded Endings, the identical file names will cause bugs in whichever game is played second. Therefore we should pick a name that will be unique to this particular game, perhaps using the initials of the title or the game author in some way. 61 | 62 | It does not matter whether the File of Conclusions is named before or after the "Include Recorded Endings" line is added. 63 | 64 | 2) tell the game what to record before each ending. So for instance if we have a sequence leading to death, we might write 65 | 66 | record "Martyrdom among the lions" as an ending; 67 | end the game in death. 68 | 69 | Or again we might write 70 | 71 | record "Abduction by aliens" as an ending; 72 | end the game saying "You spend the rest of your life orbiting Alpha Centauri". 73 | 74 | By default, Recorded Endings offers the player the ENDINGS option regardless of whether the game ended in victory. If we wish to change this so that the ENDINGS are shown only after "end the game in victory", then we might write 75 | 76 | When play begins: 77 | choose a row with a final response rule of list endings rule in the Table of Final Question Options; 78 | change the only if victorious entry to true. 79 | 80 | If there are more than twenty possible endings in the game, we may need to extend the table that records them, the Table of Possible Endings. To do this, we might write 81 | 82 | Table of Possible Endings (continued) 83 | description 84 | -- 85 | with 10 blank rows. 86 | 87 | (This will actually append a total of 11 rows to the table, but that -- entry cannot be omitted or Inform will become confused about appending more blank rows to the table.) 88 | 89 | Finally, we may want elsewhere in the game to find out whether the player has already experienced a specific ending. (Perhaps the game subtly changes descriptions after multiple playings.) For this case, we would write 90 | 91 | if "Turning into a pumpkin" is a used ending: ... 92 | 93 | where "Turning into a pumpkin" is the exact text that we record when that ending occurs. 94 | 95 | Example: * Reincarnation - We have a vial of poison that the player recognizes only on the second playthrough. 96 | 97 | *: "Reincarnation" 98 | 99 | Include Recorded Endings by Emily Short. 100 | 101 | The File of Conclusions is called "examplecon". 102 | 103 | The Cloudy Chamber is a room. It contains a wooden table. On the wooden table is a vial. 104 | 105 | The description of the vial is "It is full of a delicious-looking golden liquid." 106 | 107 | Instead of smelling the vial: 108 | say "It smells like honey wine." 109 | 110 | Rule for printing the name of the vial when "Death by poison" is a used ending: 111 | say "vial of poison". 112 | 113 | Understand "poison" or "of poison" as the vial when "Death by poison" is a used ending. 114 | 115 | Instead of drinking the vial: 116 | if "Death by poison" is a used ending: 117 | say "A chill comes over you as you consider it, as though you were being warned by a previous incarnation from another lifetime: this is foul poison."; 118 | otherwise: 119 | say "You lift the vial to your lips and throw it back. The flavor is sweet on your tongue, but the effects are nearly instant..."; 120 | record "Death by poison" as an ending; 121 | end the story saying "You have died by poison". 122 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Emily Short/Simple Followers.i7x: -------------------------------------------------------------------------------- 1 | Version 7 of Simple Followers by Emily Short begins here. 2 | 3 | "Allows non-player characters to follow the player (or one another); adds a FOLLOW command and a corresponding STOP FOLLOWING command so that the player can issue these orders to non-player characters. Adds adaptive text features." 4 | 5 | Section 1 - The shadowing relation 6 | 7 | Shadowing relates various people to one person (called the goal). The verb to shadow (he shadows, they shadow, he shadowed, he is shadowed, he is shadowing) implies the shadowing relation. 8 | 9 | Every turn: 10 | repeat with pursuer running through people who are shadowing someone: 11 | let starting-space be the location of the pursuer; 12 | let ending-space be the location of the goal of the pursuer; 13 | if the starting-space is not the ending-space: 14 | let next-way be the best route from the starting-space to the ending-space, using doors; 15 | if next-way is a direction: 16 | try the pursuer trying going next-way; 17 | 18 | Section 2 - The FOLLOW action 19 | 20 | To prefer is a verb. To realize is a verb. To begin is a verb. To redouble is a verb. 21 | 22 | Understand "follow [something]" as following. Following is an action applying to one thing. Understand the commands "pursue" and "chase" as "follow". Understand "start following/pursuing/chasing [something]" as following. Understand the commands "begin" and "commence" as "start". 23 | 24 | Check following something (this is the block following rule): 25 | say "[We] [prefer] to keep [our] options open." (A) instead. 26 | 27 | Check someone trying following (this is the following only people rule): 28 | if the noun is not a person, stop the action. 29 | 30 | Check someone trying following (this is the following people already followed rule): 31 | if the person asked is shadowing the noun, stop the action. 32 | 33 | Carry out someone trying following (this is the standard shadowing rule): 34 | now the person asked shadows the noun. 35 | 36 | Report someone trying following (this is the standard report someone trying following rule): 37 | say "[The person asked] [begin] to follow [if the noun is the player]you[otherwise][the noun][end if]." (A) 38 | 39 | Unsuccessful attempt by someone trying following (this is the excuses for not following rule): 40 | if the reason the action failed is the following only people rule: 41 | say "[The person asked] [realize] [they] [cannot] follow anything inanimate." (A); 42 | if the reason the action failed is the following people already followed rule: 43 | say "[The person asked] [redouble] the effort to follow [if the noun is the player][us][otherwise][the noun][end if]." (B) 44 | 45 | 46 | Section 3 - The STOP FOLLOWING action 47 | 48 | To cease is a verb. To look is a verb. 49 | 50 | Understand "stop following/chasing/pursuing [something]" as ceasing to follow. Ceasing to follow is an action applying to one thing. Understand the commands "cease" and "desist" as "stop". Understand "quit following/chasing/pursuing [something]" as ceasing to follow. 51 | 52 | Check ceasing to follow something (this is the block ceasing to follow rule): 53 | say "[We] [aren't] [if the player is plural-named]followers[else]a follower[end if] anyhow." (A) instead. 54 | 55 | Check someone trying ceasing to follow (this is the can't stop following what isn't followed rule): 56 | if the person asked is not shadowing the noun, stop the action. 57 | 58 | Carry out someone trying ceasing to follow (this is the standard stop-shadowing rule): 59 | now the person asked is not shadowing the noun. 60 | 61 | Report someone trying ceasing to follow (this is the standard report someone trying ceasing to follow rule): 62 | say "[The person asked] [cease] to pursue [if the noun is the player]you[otherwise][the noun][end if]." (A) 63 | 64 | Unsuccessful attempt by someone trying ceasing to follow (this is the excuses for not ceasing to follow rule): 65 | say "[The person asked] [look] blank, since [they] [are] "; 66 | if the person asked is shadowing someone: 67 | say "following [the random person shadowed by the person asked], not [the noun]." (A); 68 | otherwise: 69 | say "already not following anyone." (B) 70 | 71 | 72 | Section 4 - Another meaning for WAIT 73 | 74 | Understand "wait here/still/put" as waiting. Understand the command "stay" as "wait". 75 | 76 | Instead of asking someone who is shadowing someone to try waiting (this is the waiting cancels following rule): 77 | try asking the person asked to try ceasing to follow the goal of the person asked. 78 | 79 | Simple Followers ends here. 80 | 81 | ---- Documentation ---- 82 | 83 | Simple Followers creates a mechanism so that characters will follow other characters who are not in the room. As long as a character is shadowing someone, that character will move once per turn in the direction of its goal. We can change this manually with 84 | 85 | now Fred is shadowing Ginger; 86 | now John is not shadowing George. 87 | 88 | For obvious reasons, no one may shadow more than one target at a time. 89 | 90 | Simple Followers also provides a FOLLOW command and a corresponding STOP FOLLOWING command so that the player can command other characters to follow the player character or one another. PURSUE and CHASE are accepted as synonyms of FOLLOW. 91 | 92 | Moreover, if we command a character who is shadowing someone to WAIT (or variants such as STAY HERE, STAY PUT, WAIT HERE, etc.), that character will cease to shadow anyone. 93 | 94 | In order to allow the player to give these orders, we will need to include appropriate persuasion rules. At their most permissive, these persuasion rules might look like this: 95 | 96 | Persuasion rule for asking people to try following something: persuasion succeeds. Persuasion rule for asking people to try ceasing to follow something: persuasion succeeds. 97 | 98 | Two rules prevent the player from following or ceasing to follow someone else: 99 | 100 | Check following something (this is the block following rule): 101 | say "You prefer to keep your options open." instead. 102 | 103 | Check ceasing to follow something (this is the block ceasing to follow rule): 104 | say "You aren't a follower anyhow." instead. 105 | 106 | We may ignore or substitute these two rules if we would prefer some other behavior. 107 | 108 | Note also that this extension does not provide for the case where the player wants to follow another character who has just left the scene. 109 | 110 | Version 4 lifts the arbitrary restriction that people do not follow through doors; if we want characters to be clever about opening doors in order to pass through them, we can use this extension in combination with Locksmith by Emily Short. 111 | 112 | Example: * Farmyard Chase - In which we amass a small procession. 113 | 114 | *: "Farmyard Chase" 115 | 116 | Include Simple Followers by Emily Short. 117 | 118 | Persuasion rule for asking people to try following something: persuasion succeeds. Persuasion rule for asking people to try ceasing to follow something: persuasion succeeds. 119 | 120 | The Farmhouse is a room. The Attic is above the Farmhouse. The Kitchen is north of the Farmhouse. The Yard is north of the Kitchen. The Chicken Coop is west of the Yard. The Barn is north of the Yard. 121 | 122 | The cow is an animal in the Barn. The cat is an animal in the Yard. The mouse is an animal in the Attic. The yellow chicken is an animal in the Chicken Coop. Farmer John is a man in the Farmhouse. 123 | 124 | Test me with "John, follow me / up / mouse, follow john / d / n / n / cat, follow mouse / s / cat, stop following mouse". 125 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Emily Short/Single Paragraph Description.i7x: -------------------------------------------------------------------------------- 1 | Version 7.0.220525 of Single Paragraph Description by Emily Short begins here. 2 | 3 | "A room description extension based on Room Description Control (which is required). All contents of a room are summarized in a single paragraph, starting with the regular room description." 4 | 5 | Include Room Description Control by Emily Short. 6 | 7 | The room description body text rule is not listed in any rulebook. 8 | 9 | Definition: a thing is initially-described if the initial appearance of it is not "" and it is not handled. 10 | 11 | The new reporting descriptions rule is listed instead of the reporting descriptions rule in the description-priority rulebook. 12 | 13 | The reporting items rule is listed after the new reporting descriptions rule in the description-priority rulebook. 14 | 15 | A ranking rule for an initially-described thing (called special-target): 16 | increase description-rank of the special-target by 5. 17 | 18 | A ranking rule for a container (called special-target): 19 | increase description-rank of the special-target by the number of mentionable things in the special-target. 20 | 21 | A ranking rule for a supporter (called special-target): 22 | increase description-rank of the special-target by the number of mentionable things on the special-target. 23 | 24 | A ranking rule for something (called special-target) which is not in the location: 25 | increase description-rank of the special-target by 1. 26 | 27 | 28 | Printed a room description is a truth state that varies. Printed a room description is false. 29 | 30 | This is the new reporting descriptions rule: 31 | if the description of the location is not "": 32 | if set to abbreviated room descriptions: 33 | make no decision; 34 | otherwise if set to sometimes abbreviated room descriptions and abbreviated form allowed is true and the location is visited: 35 | make no decision; 36 | otherwise: 37 | say "[description of the location] [run paragraph on]" (A); [Need rpo because end of rule] 38 | now printed a room description is true; 39 | 40 | This is the reporting items rule: 41 | if the Table of Seen Things is empty: 42 | if printed a room description is true: 43 | now printed a room description is false; 44 | say "[line break]" (A); 45 | otherwise: 46 | say "[conditional paragraph break]" (B); 47 | make no decision; 48 | now printed a room description is false; 49 | repeat through the Table of Seen things: 50 | if the output subject entry is mentionable: 51 | if the output subject entry is initially-described: 52 | say "[initial appearance of output subject entry] " (C); 53 | now output subject entry is mentioned; 54 | otherwise if output subject entry is in something (called special-vase): 55 | say "In [the special-vase] [regarding mentionable things in the special-vase][are] [list of mentionable things in the special-vase]. " (D); 56 | otherwise if output subject entry is on something (called special-vase): 57 | say "On [the special-vase] [regarding mentionable things on the special-vase][are] [list of mentionable things on the special-vase]. " (F); 58 | otherwise if output subject entry supports something mentionable: 59 | say "On [a output subject entry] [regarding mentionable things on the output subject entry][are] [list of mentionable things on the output subject entry]. " (G); 60 | otherwise if output subject entry contains something mentionable: 61 | say "In [a output subject entry] [regarding mentionable things in the output subject entry][are] [list of mentionable things in the output subject entry]. " (H); 62 | otherwise: 63 | say "[We] also [see] here [a list of mentionable things]. " (I); 64 | say "[paragraph break]" (J). 65 | 66 | After printing the name of something (called special-target): 67 | now the special-target is not marked for listing; 68 | now the special-target is mentioned. 69 | 70 | The new describe contents rule is not listed in the report entering rulebook. 71 | 72 | Single Paragraph Description ends here. 73 | 74 | ---- Documentation ---- 75 | 76 | Single Paragraph Description is an extension built on Room Description Control. It produces single paragraphs of output, like this: 77 | 78 | The amphitheater is currently empty of spectators, though you can see a magnificent view of the valley beyond the orchestra. On the ground is a mask. You can also see a play script and a ball of wax here. 79 | 80 | and when the mask is taken 81 | 82 | The amphitheater is currently empty of spectators, though you can see a magnificent view of the valley beyond the orchestra. You can also see a mask, a play script and a ball of wax here. 83 | 84 | Unlike previous versions, starting in version 7, you should not end room descriptions and initial appearances with a space. This extension will add the spaces between sentences. 85 | 86 | The exact text patterns can be changed with the responses system, specifically responses for 87 | the reporting items rule 88 | the new reporting descriptions rules 89 | The responses *do* need the space at the end; this is how the extension adds the spaces. 90 | 91 | As long as you deal strictly with texts, this should work. If you do something more complicated -- like making a new say-phrase definition for "to say the initial description of", or intervening in the "issuing the response text of something activity" -- be careful. This is not advised. If you invoke 'say', make sure you do so with '[no line break]'. If you add another action rule, be sure to terminate it with '[run paragraph on]'; normally every action rule triggers a paragraph break (though activity rules do not). 92 | 93 | Because these single-paragraph descriptions can grow quite long and hard to read, it is likely that this technique will work best in small games or those with few portable objects. 94 | 95 | If the game in question is set to BRIEF or SUPERBRIEF mode, Single Paragraph Description will omit the initial room description either when visiting the room for the second time (for brief) or always (for superbrief). Items in the room will still be mentioned. 96 | 97 | Changelog: 98 | 99 | Version 7.0.220525 adds scenery to the example to verify that recent changes to Room Description Control work correctly. (Modified by Nathanael Nerode.) Changelog is reordered. 100 | Version 7.0.220524 updates for Inform v10.1. (Modified by Nathanael Nerode.) 101 | Version 7/210331 auto-inserts the spaces after room descriptions and initial descriptions. This actually works. The example now replaces a response in order to match the sample text. (Modified by Nathanael Nerode.) 102 | Version 6/210322 is updated to work with version 14 of Room Description Control, which renamed the "output" column of the Table of Seen Things to "output subject" to reduce namespace conflicts with games. (Modified by Nathanael Nerode.) 103 | Version 3 removes a bug in which rooms with no description could crash the game. 104 | 105 | Example: * Scene Setting - The Amphitheater in full 106 | 107 | *: "Scene Setting" 108 | 109 | Include Single Paragraph Description by Emily Short. 110 | 111 | Amphitheater is a room. "The amphitheater [regarding nothing][are] currently empty of spectators, though [we] [can] see a magnificent view of the valley beyond the orchestra." 112 | 113 | A play script and a ball of wax are here. 114 | 115 | A mask is here. "On the floor [regarding the mask][are] a mask." 116 | 117 | The valley is scenery in Amphitheater. Understand "view" as the valley. 118 | The description of the valley is "The valley spreads out, green and lush, into the far distance." 119 | 120 | The reporting items rule response (I) is "[We] can also [see] [a list of mentionable things] here. "; 121 | 122 | Test me with "look / get all / look / drop all / look". 123 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Eric Eve/Bulk Limiter.i7x: -------------------------------------------------------------------------------- 1 | Version 9 of Bulk Limiter by Eric Eve begins here. 2 | 3 | "Containers and actors that limit their contents by bulk" 4 | 5 | A container has a number called bulk capacity. 6 | The bulk capacity of a container is normally 10. 7 | 8 | A person has a number called bulk capacity. 9 | The bulk capacity of a person is normally 100. 10 | 11 | A thing has a number called bulk. 12 | The bulk of a thing is normally 1. 13 | 14 | Check an actor inserting into when the second noun provides the property bulk capacity (this is the bulk test rule): 15 | if the bulk of the noun is greater than the bulk capacity of the second noun, 16 | say "[The noun] [are] too big to fit in [the second noun]." (A) instead; 17 | if the bulk of the noun is greater than the free capacity of the second noun, 18 | say "[There] [are not] enough room left in [the second noun] for [the noun]." (B) instead; 19 | 20 | Check an actor taking when the actor provides the property bulk capacity 21 | (this is the person bulk test rule): 22 | if the bulk of the noun is greater than the bulk capacity of the actor, 23 | say "[The noun] [are] too big for [if the actor is the player][us][otherwise][the actor][end if] to pick up." (A) instead; 24 | if the bulk of the noun is greater than the free capacity of the actor, 25 | say "[If the player is the actor][We] [don't][otherwise][The actor] [don't][end if] have enough room left to carry [the noun]." (B) instead; 26 | 27 | To decide what number is the free capacity of (targetbox - a container): 28 | let sum be the total bulk of the things in the targetbox; 29 | now sum is the bulk capacity of the targetbox minus sum; 30 | decide on the sum. 31 | 32 | To decide what number is the free capacity of (targetperson - a person): 33 | let sum be the total bulk of the things carried by targetperson; 34 | now sum is the bulk capacity of the targetperson minus sum; 35 | decide on the sum. 36 | 37 | 38 | Bulk Limiter ends here. 39 | 40 | ---- DOCUMENTATION ---- 41 | 42 | 43 | This extension adds a bulk property to all things, and a bulk capacity property to all containers and people. The implementation is deliberately quite basic, in order to provide an 44 | extension with a relatively small footprint to deal with simple cases such as preventing boulders being put in purses or carried. In order to keep things simple this extension deliberately doesn't deal with bulk capacities of supporters, or weights, or take into account the maximum dimension of long, thin objects or the like. It is intended to provide a simple solution to a common problem, not a full simulation. 45 | 46 | The default bulk of a thing is 1. The default bulk capacity of a container is 10. The default bulk capacity of a person is 100. 47 | 48 | The extension performs a check on attempting to insert something into a container that the total bulk of the objects inside the container does not exceed its capacity. If an actor (not necessarily the player) attempts to insert an object whose bulk is larger than the bulk capacity of the container or to take an object whose bulk is larger than their own bulk capacity, the attempt will fail with a message saying that the object is too large for the container. Otherwise, if we attempt to insert an object into a container when there's not enough room left for it or take an object we can no longer carry, we'll get a message saying that there's not enough room left. 49 | 50 | Note that this extension complements rather than replaces Inform's built in capacity check for containers. 51 | 52 | With thanks to Kevin Riggle whose suggestions have been incorporated into this extension. 53 | 54 | 55 | Example: * The Basket, the Bricks and the Spoon - Putting things in a container with not quite enough room for them all, and carrying things without quite enough arms for them all. 56 | 57 | *: "Basket" 58 | 59 | Include Bulk Limiter by Eric Eve 60 | 61 | The bulk capacity of a person is normally 10. 62 | 63 | The Kitchen is a room. "The only furniture of interest is the table." 64 | A table is a scenery supporter in the kitchen. 65 | A small spoon is on the table. 66 | 67 | A large hamper is in the kitchen. The bulk is 100. 68 | 69 | On the table is a container called the wicker basket. 70 | 71 | A brick is a kind of thing. The bulk of a brick is normally 5. Two bricks are here. 72 | 73 | Understand "put [things] in [something]" as inserting it into. 74 | 75 | Test me with "Put bricks in basket/put spoon in basket/take brick/put spoon in basket/put brick in basket/put spoon in basket/take brick/take spoon/take hamper". 76 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Gavin Lambert/Secret Doors.i7x: -------------------------------------------------------------------------------- 1 | Version 2 of Secret Doors by Gavin Lambert begins here. 2 | 3 | "Doors and switches that cannot be acted upon until they are discovered." 4 | 5 | "updated from Andrew Owen's original work" 6 | 7 | A secret door is a kind of door. 8 | A secret door can be revealed or unrevealed. 9 | A secret door is unrevealed. 10 | A secret door is scenery. 11 | A secret door is closed. 12 | 13 | A secret switch is a kind of thing. 14 | A secret switch can be revealed or unrevealed. 15 | A secret switch is unrevealed. 16 | A secret switch is scenery. 17 | 18 | To print the you can't go message: 19 | say "[text of can't go that way rule response (A)][line break]". 20 | 21 | To print the you can't see message: 22 | say "[text of parser error internal rule response (E)][line break]". 23 | 24 | Before going through a secret door which is unrevealed: 25 | print the you can't go message instead. 26 | 27 | Rule for setting action variables for going (this is the going through secret doors rule): 28 | if the door gone through is an unrevealed secret door: 29 | now the door gone through is nothing; 30 | now the room gone to is nothing. 31 | 32 | The going through secret doors rule is listed after the standard set going variables rule in the setting action variables rulebook. 33 | The determine map connection rule is not listed in any rulebook. 34 | 35 | Before doing something to a secret door which is unrevealed: 36 | print the you can't see message instead. 37 | 38 | Before doing something when a secret door is the second noun and the second noun is unrevealed: 39 | print the you can't see message instead. 40 | 41 | Before doing something to a secret switch which is unrevealed: 42 | print the you can't see message instead. 43 | 44 | Before doing something when a secret switch is the second noun and the second noun is unrevealed: 45 | print the you can't see message instead. 46 | 47 | Secret Doors ends here. 48 | 49 | ---- DOCUMENTATION ---- 50 | 51 | Secret Doors is an extension which provides robust support for hidden 52 | doors and hidden switches. It was originally written by Andrew Owen, 53 | but has had minor changes in order to make it compatible with Inform 7 build 6L02. 54 | 55 | Version 2 adds a fix that allows "going nowhere" rules to apply to unrevealed secret doors as well. 56 | 57 | It creates two new kinds: "secret door" (a 58 | kind of door) and "secret switch" (a kind of thing) with the properties 59 | "revealed" or "unrevealed". 60 | 61 | The passage door is a secret door. 62 | The passage door is west of the Big Cave and east of the Secret 63 | Passage. 64 | 65 | The hidden lever is a secret switch in the Big Cave. 66 | 67 | If the player attempts to walk through a secret door, the same response 68 | to attempting to travel in a non-existent direction is given: 69 | 70 | >west 71 | You can't go that way. 72 | 73 | If the player attempts to interact with a secret switch, the same 74 | response to attempting to interact with a non-existent object is given: 75 | 76 | >pull lever 77 | You can't see any such thing! 78 | 79 | >throw rock at lever 80 | You can't see any such thing! 81 | 82 | It might be that we want the switch to be in plain sight. In that case 83 | it should be defined as a normal object rather than a secret switch: 84 | 85 | The lever is fixed in place in the Big Cave. 86 | 87 | Instead of pulling the lever for the first time: 88 | now the passage door is revealed; 89 | now the passage door is open; 90 | say "As you pull the lever, a secret door opens, revealing a secret 91 | passage!" 92 | 93 | If on the other hand we want the switch to be hidden as well, then we 94 | need a way of revealing it so that it can be used. For example: 95 | 96 | The lever is a secret switch in the Big Cave. 97 | 98 | The cave wall is scenery in the Big Cave. 99 | 100 | Instead of searching or examining the cave wall: 101 | now the lever is revealed; 102 | say "In a gap between two rocks you discover a lever." 103 | 104 | Instead of pulling the revealed lever for the first time: 105 | now the passage door is revealed; 106 | now the passage door is open; 107 | say "As you pull the lever, a secret door opens, revealing a secret 108 | passage!" 109 | 110 | WARNING: it's important to say "the revealed lever", not simply "the lever". 111 | Otherwise attempts to pull the lever when it is not yet revealed will be counted, 112 | and "the first time" will no longer be true, resulting in a broken story. 113 | 114 | Note that secret doors and switches are defined as scenery by default (which is 115 | why it's not necessary to define a secret switch as fixed in place). You can override 116 | this on a case-by-case basis if you wish. 117 | 118 | Also note that by default secret doors behave like regular doors once revealed, 119 | which means that the player can open and close them as normal. 120 | If you want to have the door open exclusively through some story-provided 121 | mechanism, then remember to define them as "unopenable" -- this doesn't 122 | stop the story from opening the door, but it stops the player from doing so. 123 | 124 | Example: * Simple Cave with Secret Door and Lever - This defines a simple two-room example similar to the above. 125 | 126 | *: "Secret Cave Passage" by Gavin Lambert 127 | 128 | Include Secret Doors by Gavin Lambert. 129 | 130 | Big Cave is a room. "You're not sure how you ended up here, but you're surrounded on all sides by slightly damp rock. Fortunately the walls seem to contain faintly glowing moss, so there's enough light to see by." 131 | The faintly glowing moss is scenery in the Big Cave. "It glows just barely enough to make out your surroundings." 132 | 133 | Secret Passage is a room. "For being so close to a cave, this passage is surprisingly well built and is lit by standard electrical bulbs. Unfortunately it also appears to be blocked by rubble not too far from the entrance; you can't seem to proceed any further." 134 | The rubble is scenery in the Secret Passage. "It looks completely impassable." 135 | 136 | The passage door is an unopenable secret door. "It's fairly unassuming. You'd never have known it was there until it opened." 137 | It is west of the Big Cave and east of the Secret Passage. 138 | 139 | The hidden lever is a secret switch in the Big Cave. "Nestled almost invisibly between two rocks in the cave wall. [if the passage door is revealed]It has been pulled downwards.[otherwise]It points invitingly upwards.[end if]" 140 | 141 | The cave wall is scenery in the Big Cave. "Nothing else more interesting presents itself. Just more glowing moss." 142 | Understand "damp rock" or "rock" as the cave wall. 143 | 144 | Instead of going nowhere from the Big Cave: 145 | say "The cave walls seem completely intact in that direction." 146 | 147 | Instead of searching or examining the cave wall for the first time: 148 | now the lever is revealed; 149 | say "As you examine the cave wall, in a gap between two rocks you discover a lever." 150 | 151 | Instead of pulling or pushing the revealed lever: 152 | if the passage door is revealed: 153 | say "You don't have any desire to close the passage again."; 154 | otherwise: 155 | now the passage door is revealed; 156 | now the passage door is open; 157 | say "A secret door opens with a rumble, revealing a secret passage in the west wall!" 158 | 159 | Test me with "w / open door / pull lever / x wall / x lever / pull lever / x lever / w" 160 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Jesse McGrew/Hypothetical Questions.i7x: -------------------------------------------------------------------------------- 1 | Version 5.1.0 of Hypothetical Questions (for Glulx only) by Jesse McGrew begins here. 2 | 3 | "Allows us to test the consequences of a phrase or action without permanently changing the game state." 4 | 5 | [At one point, I7 did some weird things with curly braces in the generated source when we use phrases as parameters, so we had to work around that here. Specifically, I7 added an opening brace before {ph} and a closing brace after the end of our code.] 6 | 7 | To hypothetically (ph - a phrase) and consider (R - a rule): (- 8 | {-my:1} = Hypo_Start({phrase options}); 9 | if ({-my:1} == 1) {ph} 10 | Hypo_Middle({R}); 11 | if ({-my:1} == 2) Hypo_End(); 12 | -) 13 | 14 | 15 | [To hypothetically (ph - a phrase) and consider (R - a rule): (- switch (Hypo_Start({phrase options})) { 1: do { {ph} } until (1); Hypo_Middle({R}); 2: } -).] 16 | 17 | To say the/-- hypothetical output: (- Hypo_Capture_Print(); -). 18 | 19 | Use hypothetical output length of at least 256 translates as (- Constant HYPO_CAPTURE_BYTES = {N}; -). 20 | 21 | Include (- 22 | Constant HYPO_RESULT_WORDS = 2; 23 | ! hypo_result-->0 = rule success flag 24 | ! hypo_result-->1 = rule result 25 | Array hypo_result --> HYPO_RESULT_WORDS; 26 | 27 | #ifndef HYPO_CAPTURE_BYTES; 28 | Constant HYPO_CAPTURE_BYTES = 256; 29 | #endif; 30 | Array hypo_capture -> HYPO_CAPTURE_BYTES; 31 | Global hypo_capture_len; 32 | Global hypo_capture_previous; 33 | 34 | ! returns 1 when entering the hypothetical universe, 2 when returning to reality, 0 if entering failed in the first place 35 | [ Hypo_Start flags rv seed strtbl iosys iorock; 36 | do { @random 0 seed; } until (seed ~= 0); 37 | @getstringtbl strtbl; 38 | @getiosys iosys iorock; 39 | 40 | @saveundo rv; 41 | 42 | @setrandom seed; 43 | @setstringtbl strtbl; 44 | @setiosys iosys iorock; 45 | 46 | switch (rv) { 47 | 0: Hypo_Capture_Start(); return 1; ! saveundo succeeded 48 | 1: print "[This game requires an interpreter with undo support.]^"; return 0; ! saveundo failed 49 | -1: return 2; ! restoreundo 50 | } 51 | ]; 52 | 53 | ! consider a rule, protect its result, and restore the state saved by Hypo_Start 54 | [ Hypo_Middle rule a b save_sp hypo_size; 55 | Hypo_Capture_End(); 56 | save_sp = say__p; say__p = 0; 57 | FollowRulebook(rule); 58 | if (say__p == false) say__p = save_sp; 59 | hypo_result-->0 = RulebookOutcome(); 60 | if (hypo_result-->0 == RS_FAILS or RS_SUCCEEDS) 61 | hypo_result-->1 = ResultOfRule(); 62 | hypo_size = (HYPO_RESULT_WORDS * WORDSIZE); 63 | @protect hypo_result hypo_size; 64 | @restoreundo rule; ! never returns if successful 65 | print "[What happened to my undo state? --hypo]^"; 66 | ]; 67 | 68 | ! load the rule result from Hypo_Middle back onto the rulebook stack 69 | [ Hypo_End; 70 | switch (hypo_result-->0) { 71 | RS_FAILS: RulebookFails(1, hypo_result-->1); 72 | RS_SUCCEEDS: RulebookSucceeds(1, hypo_result-->1); 73 | default: RuleHasNoOutcome(); 74 | } 75 | ]; 76 | 77 | ! start capturing output 78 | [ Hypo_Capture_Start; 79 | #ifdef is_fyrevm; 80 | if (is_fyrevm) { 81 | ! use the filter I/O system 82 | OpenOutputBuffer(hypo_capture, HYPO_CAPTURE_BYTES); 83 | return; 84 | } 85 | #endif; 86 | 87 | ! use a Glk memory stream 88 | hypo_capture_previous = glk_stream_get_current(); 89 | glk_stream_set_current(glk_stream_open_memory(hypo_capture, HYPO_CAPTURE_BYTES, filemode_Write, 0)); 90 | ]; 91 | 92 | ! stop capturing output 93 | [ Hypo_Capture_End f; 94 | #ifdef is_fyrevm; 95 | if (is_fyrevm) { 96 | hypo_capture_len = CloseOutputBuffer(0); 97 | return; 98 | } 99 | #endif; 100 | 101 | glk_stream_close(glk_stream_get_current(), gg_arguments); 102 | hypo_capture_len = gg_arguments-->1; 103 | glk_stream_set_current(hypo_capture_previous); 104 | hypo_capture_previous = 0; 105 | ]; 106 | 107 | ! print the capture buffer 108 | [ Hypo_Capture_Print i; 109 | for (i=0: ii; 111 | ]; 112 | -). 113 | 114 | Hypothetical Questions ends here. 115 | 116 | ---- DOCUMENTATION ---- 117 | 118 | The basic operation of this extension is to run a phrase, then consider a rule or rulebook, and finally undo the phrase while preserving the outcome of the rule. For example: 119 | 120 | This is the check player's pulse rule: 121 | if the game ended in death, rule fails; otherwise rule succeeds. 122 | 123 | ... 124 | 125 | hypothetically try drinking the poison and consider the check player's pulse rule; 126 | if the rule failed, say "Drinking the poison would be a bad idea."; 127 | 128 | Here, the phrase we're hypothetically running is "try drinking the poison". The "check player's pulse" rule tests whether the player has died after drinking the poison. The extension then undoes the drinking action, but remembers the decision made by the check player's pulse rule. 129 | 130 | In fact, we can hypothetically run any phrase, not just an action: 131 | 132 | To drink everything: 133 | repeat with X running through things that can be touched by the player: 134 | try drinking X. 135 | 136 | ... 137 | 138 | hypothetically drink everything and consider the check player's pulse rule; 139 | 140 | The player won't see any messages about things that happened hypothetically, because this extension captures the text printed during hypothetical execution. Our rule can check "[the hypothetical output]" to see what was printed. (If the rule itself prints anything, though, the player will see it.) For example: 141 | 142 | This is the check for interesting events rule: 143 | if "[the hypothetical output]" exactly matches the regular expression "\s*Time passes\.\s*", rule fails; 144 | otherwise rule succeeds. 145 | 146 | ... 147 | 148 | hypothetically try waiting and consider the check for interesting events rule; 149 | 150 | The maximum length of captured text is 256 characters by default; anything more will be thrown away. We can change this with a use option: 151 | 152 | Use hypothetical output length of at least 1024. 153 | 154 | Section: Caveats 155 | 156 | This extension requires an interpreter that supports undo. To the best of the author's knowledge, every Glulx interpreter supports undo, so this isn't much of an issue. 157 | 158 | Avoid hypothetically running any code that uses undo, or that hypothetically runs some other code in turn. 159 | 160 | If the hypothetical code changes the Glk library state (opening windows, closing streams, moving the cursor, etc.) -- or the FyreVM channel state, when running on FyreVM -- these changes will not be rolled back when hypothetical execution is finished. 161 | 162 | Section: Change Log 163 | 164 | Version 2 fixes a paragraph spacing issue where multiple hypotheticals would cause extra line breaks; and prevents hypothetical changes to the random number generator, I/O system, and string decoding table from leaking back into reality. 165 | 166 | Version 3 was updated for compatibility with 6L38 by Emily Short. 167 | 168 | Version 4 was updated for compatibility with 6M62. 169 | 170 | Example: * A Sense of Adventure - Letting the player know what will happen if he picks up nearby objects. 171 | 172 | Here we use the extension to the give the player a bit of clairvoyance. After moving to another room, we hypothetically try picking up every object in the location, then test whether the player would have died, won the game, or gained points. If so, we print an appropriate message. 173 | 174 | *: "A Sense of Adventure" 175 | 176 | Include Hypothetical Questions by Jesse McGrew. 177 | 178 | Use scoring. 179 | 180 | The maximum score is 5. 181 | 182 | Hallway is a room. "This hall leads east and west. There's also a door to the south." 183 | 184 | Trophy Room is east of the hallway. "This room is absolutely jam-packed with trophies. The exit is to the west." 185 | 186 | A golden idol is in the trophy room. After taking the golden idol for the first time, increase score by 5. 187 | 188 | Danger Zone is west of the hallway. "This room is full of various hazards. If you know what's good for you, you'll leave to the east." 189 | 190 | A cursed idol is in the danger zone. After taking the cursed idol: say "As you pick up the idol, you feel an evil presence sucking the life force out of your body."; end the story. 191 | 192 | Winners' Lounge is south of the hallway. "This is where winners hang out. A door to the north leads back to the hallway." 193 | 194 | The Mask of Victory is here. "A strange mask is hanging on the wall here. A sign beneath it simply states: 'The Mask of Victory'." After taking the Mask of Victory, end the story finally. 195 | 196 | Report going: 197 | hypothetically take everything and consider the player's fate rulebook; 198 | if the outcome of the rulebook is: 199 | -- the player dies outcome: say "You sense an ominous presence. Better be careful picking things up in here!"; 200 | -- the player wins outcome: say "You sense your victory is at hand!"; 201 | -- the player scores outcome: say "You sense a potential profit. Better grab everything you can!". 202 | 203 | To take everything: 204 | repeat with X running through things in the location: 205 | try taking X. 206 | 207 | Player's fate is a rulebook. The player's fate rulebook has outcomes player dies, player wins, player scores, and nothing noteworthy (success - the default). 208 | 209 | A player's fate rule when the story has ended finally: player wins. 210 | 211 | A player's fate rule when the story has ended: player dies. 212 | 213 | A player's fate rule when the score is greater than the last notified score: player scores. 214 | 215 | Test me with "w / e / e / get idol / w / s / get mask". 216 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Juhana Leinonen/Bulky Items.i7x: -------------------------------------------------------------------------------- 1 | Version 3 of Bulky Items by Juhana Leinonen begins here. 2 | 3 | "Bulky items that can be carried only if the player is not carrying anything else." 4 | 5 | 6 | Chapter Definitions 7 | 8 | A thing can be bulky. A thing is usually not bulky. 9 | A thing can be insubstantial. A thing is usually not insubstantial. 10 | 11 | Definition: a thing is substantial if it is not insubstantial. 12 | 13 | 14 | Chapter Taking bulky items 15 | 16 | Before taking a bulky thing when the player is carrying something substantial and the player is not carrying the noun (this is the making room before taking a bulky item rule): 17 | say "(first dropping [the list of substantial things carried by the player] to make room)[command clarification break]" (A); 18 | repeat with x running through substantial things carried by the player: 19 | silently try dropping x. 20 | 21 | Before taking something not bulky when the player is carrying a bulky thing (this is the dropping a bulky item before taking something else rule): 22 | say "(first dropping [the random bulky thing carried by the player] to make room)[command clarification break]" (A); 23 | repeat with x running through substantial things carried by the player: 24 | silently try dropping x. 25 | 26 | To lift is a verb. 27 | 28 | Report taking a bulky thing (this is the bulky item taken rule): 29 | say "[We] [lift] [the noun] to [our] arms." (A) instead. 30 | 31 | Before of taking a bulky thing while multiple taking (this is the can't lift bulky things during take all rule): 32 | if the player is carrying a substantial thing: 33 | say "[Our] hands [are] already full." (A); 34 | stop the action. 35 | 36 | The can't lift bulky things during take all rule is listed first in the before rules. 37 | 38 | 39 | Chapter Multiple taking 40 | 41 | To decide whether multiple taking: 42 | if the player's command includes "all", decide yes; 43 | if the player's command includes "everything", decide yes; 44 | decide no. 45 | 46 | Does the player mean taking a bulky thing while multiple taking: it is very unlikely. 47 | 48 | 49 | 50 | Bulky Items ends here. 51 | 52 | 53 | 54 | ---- DOCUMENTATION ---- 55 | 56 | 57 | Chapter: Usage 58 | 59 | This extension introduces two new properties: "bulky" and "insubstantial". 60 | 61 | "Bulky" means the player can carry the item, but may not carry anything else at the same time. Picking up such item will make the player automatically drop everything else they are carrying. Picking up something when the player is carrying a bulky item will make them drop the bulky item first. 62 | 63 | "Insubstantial" means the thing is so small or carried in such location that it doesn't have to be dropped to carry a bulky item. Worn items are never dropped so they don't need to be marked insubstantial manually. 64 | 65 | To illustrate, if the story contains the following items: 66 | 67 | The huge boulder is a thing. It is bulky. 68 | The pocket lint is a thing. It is insubstantial. 69 | The walking stick is a thing. 70 | 71 | If the player carries the walking stick and the pocket lint when they pick up the boulder, they would drop the walking stick but not the pocket lint. Likewise they could pick up the pocket lint while carrying the boulder, but if they picked up the walking stick they would drop the boulder before doing so. 72 | 73 | Note that by default inserting bulky items in containers (or on supporters) does not make the containers bulky; thus you could insert a boulder into a matchbox and circumvent the mechanics. See below for examples of containers that either change their bulkiness based on their contents or reject inserting bulky items. 74 | 75 | 76 | By default, if the player is carrying something when they try to pick up a bulky item, they will automatically drop everything they have before picking it up. If we wish to block the action instead, the following code accomplishes this: 77 | 78 | The making room before taking a bulky item rule is not listed in any rulebook. 79 | The dropping a bulky item before taking something else rule is not listed in any rulebook. 80 | 81 | Instead of taking a bulky thing when the player is carrying something not bulky: 82 | say "[The noun] [are] too big to carry with your hands full." 83 | 84 | Instead of taking something when the player is carrying a bulky thing: 85 | say "You can't carry anything else as long as you're hauling [the random bulky thing carried by the player] with you." 86 | 87 | 88 | Chapter: Release history 89 | 90 | Version 3 (released April 2014) adds compatibility with the new release of Inform. 91 | 92 | Version 2 fixed a bug where you would drop and lift again a bulky item you were already carrying when you tried to pick it up and added the example for a smarter TAKE ALL. 93 | 94 | 95 | Example: * Going Camping - A small game where you have to carry all the items in the room in order to win. 96 | 97 | 98 | The example includes three bulky items (a tent, a sleeping bag and an inflated raft), some matches that are so small they are not dropped when a bulky item is picked up and a backpack that can be worn so it won't be dropped. Bulky items can't be inserted into the backpack. Note that the inflated raft is a container that can hold bulky things, so the player can pick up the raft regardless of how many bulky items it holds. 99 | 100 | 101 | *: "Going Camping" 102 | 103 | Include Bulky Items by Juhana Leinonen 104 | 105 | Garage is a room. "This is the garage where you keep your wandering gear." 106 | 107 | The tent is in the garage. It is bulky. 108 | The sleeping bag is in the garage. It is bulky. 109 | The map is in the garage. 110 | The compass is in the garage. 111 | The matches are in the garage. They are plural-named and insubstantial. 112 | 113 | Report taking the matches: 114 | say "You put the matches in your pocket." instead. 115 | 116 | A backpack is in the garage. It is a wearable container. 117 | 118 | After taking the backpack: try wearing the backpack. 119 | After taking off the backpack: try dropping the backpack. 120 | 121 | Instead of inserting something bulky into the backpack: 122 | say "[The noun] is just too big to fit inside the backpack." 123 | 124 | 125 | An deflated raft is in the garage. The description is "It's a self-inflating raft: Just push the button on its side to fill it with air." 126 | 127 | The button is a part of the deflated raft. The description is "It's a button reading 'push to inflate'". 128 | 129 | Instead of pushing the button: 130 | if the deflated raft is in the backpack: 131 | say "The backpack would probably explode if you inflated the raft inside it."; 132 | otherwise: 133 | say "The mechanism starts to emit a hissing sound and the raft is soon fully inflated."; 134 | remove the deflated raft from play; 135 | now the inflated raft is in the garage. 136 | 137 | The inflated raft is a bulky container. 138 | 139 | When play begins: 140 | say "Almost ready to go camping - all you need to do now is to pick up your gear from the garage." 141 | 142 | Before going or exiting: 143 | say "You can't leave until you are carrying with you everything you need!"; 144 | stop the action. 145 | 146 | Every turn when the number of portable things in the garage is 1: [the player counts as one] 147 | say "Having everything you need for the camping trip with you, you're ready to set off!"; 148 | end the story finally. 149 | 150 | Before inserting something into when the player is not carrying the noun: 151 | say "(first taking [the noun])[command clarification break]"; 152 | silently try taking the noun. 153 | 154 | 155 | Test me with "get all/i/get tent/i/put map in backpack/push button/put tent in raft/put sleeping bag in raft/put compass in backpack/get backpack/get raft". 156 | 157 | 158 | Example: ** Bulky Containers - Containers that become bulky when a bulky thing is inserted into them. 159 | 160 | *: "Bulky Containers" 161 | 162 | Include Bulky Items by Juhana Leinonen 163 | 164 | Living room is a room. 165 | 166 | The sack is a container. The player carries the sack. 167 | 168 | A television is in the living room. It is bulky. 169 | A coffee table is in the living room. It is bulky. 170 | A remote control is in the living room. 171 | A tv guide is in the living room. 172 | 173 | Check inserting something bulky into the sack when a bulky thing (called the previous occupant) is in the sack: 174 | say "There's no room for [the noun] anymore when [the previous occupant] [are] in the sack." instead. 175 | 176 | After inserting something bulky into the sack: 177 | now the sack is bulky; 178 | continue the action. 179 | 180 | After taking something: 181 | if the number of bulky things enclosed by the sack is 0: 182 | now the sack is not bulky; 183 | continue the action. 184 | 185 | 186 | Test me with "get remote/i/put remote in sack/get tv guide/i/get television/i/put television in sack/get coffee table/put coffee table in sack/get tv guide/i". 187 | 188 | 189 | Example: ** Smarter TAKE ALL - Excluding bulky items from TAKE ALL and informing the player about it. 190 | 191 | *: "Smarter TAKE ALL" 192 | 193 | Include Bulky Items by Juhana Leinonen. 194 | 195 | Living room is a room. A television is in the living room. It is bulky. A remote control is in the living room. 196 | 197 | Rule for deciding whether all includes bulky things: 198 | it does not. 199 | 200 | Every turn when multiple taking: 201 | if a bulky handled thing is in the location and the current action is taking: 202 | say "(bulky items, i.e. [the list of bulky handled things in the location], were ignored)[line break]"; 203 | 204 | Test me with "take all/take television/drop all/take all". -------------------------------------------------------------------------------- /docs/resources/Extensions/Juhana Leinonen/Debug Files.i7x: -------------------------------------------------------------------------------- 1 | Version 2 of Debug Files (for Glulx only) by Juhana Leinonen begins here. 2 | 3 | "A development tool for saving debugging information to an external text file during beta testing." 4 | 5 | The file of debug information is called "debug". 6 | 7 | The prompt count is a number that varies. The PSIN is a number that varies. 8 | 9 | Use debug files translates as (- Constant USE_FILE_DEBUGGING; -). 10 | 11 | When play begins (this is the initialize the Debug Files extension rule): 12 | if the debug files option is active: 13 | now PSIN is a random number from 10000 to 99999; 14 | now the command prompt is "[bracket][the advanced prompt count][close bracket] >"; 15 | append "[paragraph break]---[paragraph break][banner text][paragraph break]" to the file of debug information. 16 | 17 | After printing the banner text when the debug files option is active (this is the print PSIN after the banner rule): 18 | say "Play session identifier number: [PSIN][line break]" (A). 19 | 20 | To say the advanced prompt count: 21 | increase the prompt count by 1; 22 | say prompt count. 23 | 24 | To debug (txt - indexed text): 25 | if the debug files option is active: 26 | append "[bracket][prompt count][close bracket]: [txt][paragraph break]" to the file of debug information. 27 | 28 | Debug Files ends here. 29 | 30 | ---- DOCUMENTATION ---- 31 | 32 | Chapter: Overview 33 | 34 | The purpose of the Debug Files extension is to provide a way to record debugging information to a text file while beta testers play the game. This information can then help the author to locate problems found during the testing. 35 | 36 | The usual convention is that the beta testers save a transcript of their playthroughs for the author to read. When using this extension the game creates another file, called "debug.glkdata" (the actual extension depends on the interpreter used). The author can have the game output information to this file at any point. The text is not displayed to the player so beta testers can play the game without debug information cluttering the view. 37 | 38 | Z-machine can't save external files. Therefore this extension is Glulx-only. 39 | 40 | 41 | Chapter: How to use it 42 | 43 | To use this extension you have to declare "Use debug files" in addition to including the extension. 44 | 45 | * : Include Debug Files by Juhana Leinonen. 46 | Use debug files. 47 | 48 | The purpose of the use option is that you can remove that line when you release the game, so that the final version will not save any debugging information. (I7 has a built-in system that could disable the extension in released games, but the use option is there because the author might not want to give debug builds to beta testers.) 49 | 50 | There will be two changes in the game itself: firstly, a "play session identifier number" is displayed after the banner text. This random 5-digit number is shown in both the transcripts (if not, the testers should type VERSION after starting the transcript to have it shown) and debug files. The purpose is to facilitate matching debug files to the corresponding transcripts. 51 | 52 | Secondly, there is an incrementing number printed before the prompt (the prompt counter). The number helps matching the debug information to the corresponding action in the transcript. Note that this number is not the same as turn count: the prompt counter advances every time the player issues a command, regardless of whether the action advances the turn count. 53 | 54 | To save information to the file, use the command 'debug': 55 | 56 | After burning a match: 57 | say "The match burns quickly out."; 58 | remove the noun from play; 59 | debug "There are [number of matches in the matchbox] matches remaining." 60 | 61 | The debug text is saved to the file with the prompt counter automatically added. Nothing is printed to the player. If you remove the "Use debug files" option, the debug commands do nothing. 62 | 63 | The author might use this functionality to, for example, track a wandering NPC: 64 | 65 | Every turn: 66 | debug "Bob is now in [the location of Bob]." 67 | 68 | The debug file would then read: 69 | 70 | <2>: Bob is now in the gym. 71 | <3>: Bob is now in women's dressing room. 72 | <4>: Bob is now in the police lockup. 73 | 74 | (numbers would be in square brackets.) The numbers would correspond to the prompt counter shown in the transcript. 75 | 76 | 77 | Chapter: About the saved file 78 | 79 | The location where the debug file is saved will depend on the interpreter. This is probably the same directory where the game file is. The Inform 7 IDE saves the file to the same location where the project file is. 80 | 81 | If the interpreter can't save the debug file for some reason, the game will probably crash. 82 | 83 | If the debug file already exists, new information will be appended to the old data. 84 | 85 | 86 | Chapter: Version history 87 | 88 | Version 2 (April 2014): Modified the extension for compatibility with the new release of Inform. 89 | 90 | 91 | Example: * Bear Hunter - An example where some information of the game mechanics is saved to the debug file. 92 | 93 | * : Include Debug Files by Juhana Leinonen. 94 | 95 | Use debug files. 96 | 97 | The glacier is a room. A bipolar bear is a male animal in the glacier. The bipolar bear can be manical or depressed. The description of the bear is "The bipolar bear looks [if manical]like he's full of life[otherwise]quite depressed[end if]." 98 | 99 | A person has a number called hit points. The hit points of a person is usually 10. 100 | 101 | Every turn when a random chance of 1 in 3 succeeds: 102 | if the bear is depressed: 103 | now the bear is manical; 104 | debug "The bear has a manic episode."; 105 | otherwise: 106 | now the bear is depressed; 107 | debug "The bear is now depressed." 108 | 109 | Instead of attacking the depressed bear: 110 | say "You strike the bear with all your strength."; 111 | decrease the hit points of the bear by a random number between 1 and 5; 112 | debug "Bear's hit points reduced to [hit points of the bear]."; 113 | if the hit points of the bear is less than 1: 114 | say "[line break]The mighty bipolar bear falls and you get another victory."; 115 | end the game in victory; 116 | otherwise: 117 | say "[line break]'Go ahead. Life's not worth it anyways,' the bear says." 118 | 119 | Instead of attacking the manical bear: 120 | say "'Oh no you don't!' the bear roars and slams you with his mighty white paw. 'There's nothing that could stop me today!'"; 121 | decrease the hit points of the player by a random number between 1 and 5; 122 | debug "Player's hit points reduced to [hit points of the player]."; 123 | if the hit points of the player is less than 1: 124 | say "[line break]The Great Bipolar Bear of the North proves to be stronger than you."; 125 | end the game in death. 126 | 127 | Test me with "x bear/attack bear/g/g/g/g/g". 128 | 129 | After a test run the debug file might look something like this (except with brackets around the prompt numbers): 130 | 131 | <3>: Bear's hit points reduced to 6. 132 | 133 | <4>: Bear's hit points reduced to 3. 134 | 135 | <5>: Bear's hit points reduced to 1. 136 | 137 | <5>: The bear has a manic episode. 138 | 139 | <6>: Player's hit points reduced to 6. 140 | 141 | <6>: The bear is now depressed. 142 | 143 | <7>: Bear's hit points reduced to -3. 144 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Juhana Leinonen/Reversed Persuasion Correction.i7x: -------------------------------------------------------------------------------- 1 | Version 2 of Reversed Persuasion Correction by Juhana Leinonen begins here. 2 | 3 | "Automatically corrects commands given to NPCs where the order is reversed, for example HELLO, ALICE instead of ALICE, HELLO." 4 | 5 | Use silent persuasion correction translates as (- Constant SILENT_REVERSING; -). 6 | Definition: a person is commandable if it can be seen by the player. 7 | The looping-failsafe is a truth state that varies. Looping-failsafe is false. 8 | 9 | After reading a command (this is the correct reversed persuasion rule): 10 | [chained commands are too complex to handle, so we'll skip the rule altogether if they turn up.] 11 | if the player's command matches the regular expression "\..+": 12 | continue the action; 13 | [If the player types in an ambiguous name (for example there are two Bobs in the room and the player commands BOB, HELLO), the parser jumps to asking the disambiguation question right in the middle of this rule. When the player answers, this rule fires again, so we'll have to handle that.] 14 | if the player's command includes "xxzzyyzzxx": 15 | continue the action; 16 | let T be indexed text; 17 | let T be the player's command; 18 | let original command be indexed text; 19 | let original command be the player's command; 20 | if the original command matches the regular expression ",": 21 | replace the regular expression "\s*,\s*" in T with " xxzzyyzzxx "; 22 | change the text of the player's command to T; 23 | now looping-failsafe is true; 24 | if the player's command includes "[a commandable person] xxzzyyzzxx": [the command was correct] 25 | if looping-failsafe is false: 26 | continue the action; [if we have already parsed the command successfully we don't need to go on] 27 | change the text of the player's command to the original command; 28 | otherwise: 29 | if looping-failsafe is false: 30 | continue the action; 31 | let T be the player's command; 32 | replace the regular expression "(.*) xxzzyyzzxx (\P*)" in T with "\2 xxzzyyzzxx \1"; [the \P takes only non-punctuation characters so commands like "how's it going, bob?" won't confuse the system] 33 | change the text of the player's command to T; 34 | now looping-failsafe is true; 35 | if the player's command includes "[a commandable person] xxzzyyzzxx": [retrying to see whether switching the order makes it better] 36 | if looping-failsafe is false: 37 | continue the action; 38 | replace the regular expression " xxzzyyzzxx" in T with ","; 39 | change the text of the player's command to T; 40 | if the silent persuasion correction option is not active: 41 | let the correct-command be the original command; 42 | replace the regular expression "(.*), *(\P*)" in correct-command with "\2, \1"; 43 | say "([the correct-command])[command clarification break]"; 44 | otherwise: 45 | if looping-failsafe is false: 46 | continue the action; 47 | let T be the player's command; 48 | replace the regular expression "(.*) xxzzyyzzxx (.*)" in T with "\2, \1"; 49 | change the text of the player's command to T; 50 | now looping-failsafe is false. 51 | 52 | 53 | Reversed Persuasion Correction ends here. 54 | 55 | 56 | ---- DOCUMENTATION ---- 57 | 58 | Chapter: Functionality 59 | 60 | In English it's grammatically acceptable to say either ALICE, GO WEST or GO WEST, ALICE. The latter might even sound more natural in some cases (HELLO, BOB) but Inform accepts only the former NPC, COMMAND syntax. This is unfortunate especially to people new to IF because commanding something like HELLO, BOB always gives the "you seem to want to talk to someone, but I can't see whom" response, which is misleading at best if Bob is standing right there. 61 | 62 | This extension allows the player to give the NPC's name in any order, before or after the comma. Including this extension is all that's needed. 63 | 64 | For the benefit of teaching players the usual IF conventions the extension notifies the player of the correction that was made. If the player types OPEN DOOR, CHARLES the game says (charles, open door). If you don't like this feature you can disable it by adding "Use silent persuasion correction." to your source code. 65 | 66 | 67 | Chapter: Limitations 68 | 69 | Multiple commands given at once are too complex to correct using this extension, so commands like "SIT, BOB. TAKE A CUP OF TEA, BOB" are unfortunately left uncorrected. On the bright side it's probable that a player who knows how to give multiple commands like this already knows the correct syntax for commanding NPCs. 70 | 71 | If the player misspells the name of the NPC the game thinks the player has given two regular commands: 72 | 73 | >JUMP, BOBB 74 | 75 | You jump on the spot, fruitlessly. 76 | 77 | That's not a verb I recognise. 78 | 79 | This is unfortunate but unavoidable without disabling the player's ability to give multiple commands at the same time separated by commas (e.g. GO NORTH, OPEN DOOR, IN.) 80 | 81 | 82 | Chapter: Change log 83 | 84 | Version 2 (2010-07-08) 85 | 86 | - Updated the extension to work with deprecated features from I7 build 6E59 onwards 87 | 88 | - Fixed a bug where NPC disambiguation would mess up the reversal (e.g. if there were two Alices in the room HI, ALICE would give the "you seem to want to talk to someone" reply regardless of the player's answer to the disambiguation question.) 89 | 90 | - Added the ability to strip punctuation from the end of the command so that question marks won't confuse the parser (HOW GOES, BOB? is now parsed correctly.) 91 | 92 | - Minor fix to the chained command detection so that commands that just end in a full stop aren't considered chained 93 | 94 | - Added an example to facilitate testing with the future Inform builds 95 | 96 | 97 | Version 1 (2009-11-14) 98 | 99 | Initial release. 100 | 101 | 102 | Example: * In the Army - A demonstration of the extension's functionality. 103 | 104 | *: "In the Army" 105 | 106 | Include Reversed Persuasion Correction by Juhana Leinonen. 107 | 108 | The Training camp is a room. Private Johnson, Private Smith, Private Stevens and Private Miller are men in the training camp. 109 | 110 | Persuasion rule for asking people to try doing something: persuasion succeeds. 111 | 112 | Instead of an actor jumping: 113 | say "[The person asked] jumps."; 114 | rule succeeds. 115 | 116 | Test me with "johnson, jump/jump, johnson/private, jump/stevens/jump, private/miller". 117 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Ron Newcomb/After Not Doing Something.i7x: -------------------------------------------------------------------------------- 1 | Version 2.1 of After Not Doing Something by Ron Newcomb begins here. 2 | 3 | "Allows us to write rules that happen after an action fails, such as 'After not examining or searching something'. 'After Not Doing Something' is short for 'After Failing To Do Something'" 4 | 5 | The after not rules are an action based rulebook. 6 | The after not rules have default success. 7 | 8 | Section BeginAction v10+ (for use with Basic Inform by Graham Nelson) 9 | 10 | Include (- 11 | [ BeginAction a n s moi notrack rv previous_actor; 12 | ChronologyPoint(); 13 | 14 | @push action; @push noun; @push second; @push self; @push multiple_object_item; 15 | 16 | action = a; noun = n; second = s; self = noun; multiple_object_item = moi; 17 | if (action < 4096) { 18 | previous_actor = actor; 19 | rv = ActionPrimitive(); 20 | if (rv == false && RulebookFailed()) { 21 | actor = previous_actor; 22 | FollowRulebook((+ the after not rules +)); 23 | } 24 | } 25 | 26 | @pull multiple_object_item; @pull self; @pull second; @pull noun; @pull action; 27 | 28 | if (notrack == false) TrackActions(true, meta); 29 | return rv; 30 | ]; 31 | -) replacing "BeginAction". 32 | 33 | Section BeginAction (for use without Basic Inform by Graham Nelson) 34 | 35 | Include (- 36 | [ BeginAction a n s moi notrack rv previous_actor; 37 | ChronologyPoint(); 38 | 39 | @push action; @push noun; @push second; @push self; @push multiple_object_item; 40 | 41 | action = a; noun = n; second = s; self = noun; multiple_object_item = moi; 42 | if (action < 4096) { 43 | previous_actor = actor; 44 | rv = ActionPrimitive(); 45 | if (rv == false && RulebookFailed()) { 46 | actor = previous_actor; 47 | FollowRulebook((+ the after not rules +)); 48 | } 49 | } 50 | 51 | @pull multiple_object_item; @pull self; @pull second; @pull noun; @pull action; 52 | 53 | if (notrack == false) TrackActions(true, meta); 54 | return rv; 55 | ]; 56 | -). 57 | 58 | Include (- -) instead of "Begin Action" in "Actions.i6t". [ rulechange_sp isn't declared until later ] 59 | 60 | After Not Doing Something ends here. 61 | 62 | ---- DOCUMENTATION ---- 63 | 64 | Inform has always allowed us to write rules which take place after a character has done something. 65 | 66 | After doing something to the fragile wineglass, say "Careful, that's real crystal." 67 | 68 | But Inform doesn't allow us the same flexibility if whatever action we were attempting failed. This extension addresses this by allowing us to write "after not" rules. 69 | 70 | After not taking or climbing something, say "Maybe if you washed the butter off your fingers?" 71 | 72 | Just like the After and Instead rules, the After Not rules will only run the single most applicable rule, unless of course that rule ends with "make no decision". 73 | 74 | Section: Changelog 75 | 76 | 2/220518 Modified by Zed Lopez for v10 compatibility 77 | 78 | Example: * I Try, and I Try - Some people are never happy. 79 | 80 | *: "I Try, and I Try" 81 | 82 | Include after not doing something by Ron Newcomb. 83 | 84 | Your parent's house is a room. Your disapproving mother is a woman, here. A TV is fixed in place, here. 85 | 86 | After not doing something, say "In the background, you hear your mother sigh. 'Oh if you'd only worked harder, [the current action] wouldn't be a problem now, would it?'" 87 | 88 | After not pushing or rubbing something, say "Your mother sighs. 'Here, *I'll* get it for you.'" 89 | 90 | Test me with "go outside / turn on TV / dust TV / push TV / nap". 91 | 92 | 93 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Ron Newcomb/Phrases for Tables with Topics.i7x: -------------------------------------------------------------------------------- 1 | Version 3 of Phrases for Tables with Topics by Ron Newcomb begins here. 2 | 3 | "This grants five new phrases regarding the player's command, the matched text, and the topic understood: if one is a topic listed in a table, if one includes or matches a topic listed in a table, what corresponds to one within a table, and the last phrase corrects a bug so the topic understood may be used within an understand-as-mistake line." 4 | 5 | 6 | [There's 3 snippets: the player's command, the topic understood ("[text]"), and the matched text ("matches/includes") ] 7 | 8 | To decide whether (player's topic - a snippet) is a/the/any/-- topic listed in (tab - a table name): 9 | repeat through tab: 10 | if the player's topic includes the topic entry, decide yes; 11 | decide no. 12 | 13 | To decide whether (snip - a snippet) includes (col - a table column) listed in (tab - a table name): 14 | (- (IfSnippetIncludesTableColumn({snip}, {col}, {tab})) -). 15 | 16 | Include (- 17 | [ IfSnippetIncludesTableColumn snip col tab row; 18 | if (snip < 101) rfalse; 19 | for (row=1 : row<=TableRows(tab) : row++) 20 | if ((TableRowIsBlank(tab, row)==false) && (( (matched_text=SnippetIncludes(TableLookUpEntry(tab, col, row), snip)) )) ) 21 | rtrue; 22 | rfalse; 23 | ]; 24 | -). 25 | 26 | To decide whether (snip - a snippet) matches (col - a table column) listed in (tab - a table name): 27 | (- (IfSnippetMatchesTableColumn({snip}, {col}, {tab})) -). 28 | 29 | Include (- 30 | [ IfSnippetMatchesTableColumn snip col tab row; 31 | if (snip < 101) rfalse; 32 | for (row=1 : row<=TableRows(tab) : row++) 33 | if ((TableRowIsBlank(tab, row)==false) && (( (matched_text=SnippetMatches(snip, TableLookUpEntry(tab, col, row))) )) ) 34 | rtrue; 35 | rfalse; 36 | ]; 37 | -). 38 | 39 | To decide which K is (col - a value of kind K valued table column) corresponding to a/the/-- topic of (player's topic - a snippet) in/from (tab - a table name): 40 | repeat through tab: 41 | if the player's topic includes the topic entry, decide on the contents of col; 42 | decide on the default value of K. 43 | 44 | To decide which K is the contents of (col - a value of kind K valued table column): (- (TableLookUpEntry(ct_0, {col}, ct_1)) -). 45 | 46 | Include (- 47 | [ CorrespondingTopic snip col tab row foo; 48 | if (snip < 101) rfalse; 49 | for (row=1 : row<=TableRows(tab) : row++) 50 | if (TableRowIsBlank(tab, row)==false) 51 | { 52 | foo = TableLookUpEntry(tab, col, row); 53 | if (matched_text=SnippetIncludes(foo, snip)) return foo; 54 | } 55 | rfalse; 56 | ]; 57 | -). 58 | 59 | To decide which K is (col - a value of kind K valued table column) corresponding to row (N - a number) in/from/of (tab - a table name): 60 | choose row N in tab; 61 | decide on the contents of col. 62 | 63 | 64 | 65 | To say fix the/-- topic understood: now the parsed number is (consult_from multiplied by 100) + consult_words. 66 | [use like: 67 | Understand "[text]" as a mistake ("[fix the topic understood]About [the topic understood]..."). 68 | ] 69 | 70 | Section - exposing I6 - unindexed 71 | 72 | Parsed number is a number that varies. Parsed number variable translates into I6 as "parsed_number". 73 | consult_from is a number that varies. consult_from variable translates into I6 as "consult_from". 74 | consult_words is a number that varies. consult_words variable translates into I6 as "consult_words". 75 | 76 | 77 | Phrases for Tables with Topics ends here. 78 | 79 | ---- DOCUMENTATION ---- 80 | 81 | The player's command, the topic understood (known as "[text]" in an Understand line), and the matched text (usually used in an After Reading A Command rule) are all of a kind called a "snippet". This extension grants four new phrases to be used with them, and one phrase that corrects a bug in Inform. 82 | 83 | First: 84 | *: if (a snippet) is a topic listed in (a table) 85 | 86 | For use like: 87 | Understand "[text]" as a mistake ("(No, that's not quite right.)") when the player's command is not a topic listed in the table of magic words. 88 | 89 | Second: 90 | *: if (a snippet) includes (a 'topic' column) listed in (a table) 91 | 92 | For use like: 93 | The Spanish Inquisition ends when the player's command includes a topic listed in the table of magic words. 94 | 95 | Third: 96 | *: if (a snippet) matches (a 'topic' column) listed in (a table) 97 | 98 | For use like: 99 | After reading a command when the player's command matches a topic listed in the table of magic words: ... 100 | 101 | Fourth: 102 | *: which K is (a K-valued table column) corresponding to a topic of (a snippet) in (a table) 103 | 104 | For use like: 105 | When the Spanish Inquisition ends, say the response corresponding to a topic of the player's command from the table of magic words. 106 | 107 | And finally: 108 | *: "[fix the topic understood]" 109 | 110 | For use like: 111 | Understand "[text]" as a mistake ("'[fix topic understood]We know that [topic understood] is not a magic word! You cannot fool us, witch!'"). 112 | 113 | JUST ADDED: 114 | *: which K is (a K valued table column) corresponding to row (a number) in (a table) 115 | 116 | For use like: 117 | say the response corresponding to row 2 in the table of magic words. 118 | 119 | 120 | Example: * Fear and Surprise - A brief demonstration of power. 121 | 122 | *: "Fear and Surprise" 123 | 124 | Include Phrases for Tables with Topics by Ron Newcomb. 125 | 126 | The cathedral is a room. There is a woman called witch. The player is a witch. 127 | 128 | The Spanish Inquisition is a scene. "'All witches know magic words! Tell us, witch, what they are!'" 129 | The Spanish Inquisition begins when play begins. 130 | The Spanish Inquisition ends when the player's command includes a topic listed in the table of magic words. 131 | When the Spanish Inquisition ends, say the response corresponding to a topic of the player's command from the table of magic words. 132 | 133 | Table of magic words 134 | topic response 135 | "xyzzy" "Suddenly you pop out of existence!" 136 | "plugh" "In a swirl of feathers, you disappear!" 137 | 138 | Understand "[text]" as a mistake ("'[fix topic understood]We know that [topic understood] is not a magic word! You cannot fool us, witch!'") when the Spanish Inquisition is happening and the player's command is not a topic listed in the table of magic words. 139 | 140 | After reading a command when the player's command matches a topic listed in the table of magic words: 141 | follow the scene changing rules; 142 | replace the player's command with "x me"; 143 | move the player to the forest. 144 | 145 | The forest is a room. 146 | 147 | Test me with "no / foo / plugh / foo". 148 | 149 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Ron Newcomb/Scope Control.i7x: -------------------------------------------------------------------------------- 1 | Version 2 of Scope Control by Ron Newcomb begins here. 2 | 3 | "Allows us to ask why the Deciding the Scope For Something activity is running, so we can modify the scope only when we absolutely need to. Highly useful for giving NPCs commands over telephones or while in darkness, creating 'can hear' relations, or modifying how Inform parses the command line." 4 | 5 | To decide if parsing the/a/an/some/any/-- nouns: (- (scope_reason == 0) -). 6 | To decide if parsing for/-- persuasion: (- (scope_reason == 1) -). 7 | To decide if looping over scope: (- (scope_reason == 5) -). 8 | To decide if testing scope: (- (scope_reason == 6) -). 9 | 10 | Section - really only useful for testing scope control - not for release - unindexed 11 | 12 | The reason for deciding scope is a number that varies. 13 | The reason for deciding scope variable translates into I6 as "scope_reason". 14 | 15 | To say the/-- reason for deciding scope: 16 | if the reason for deciding scope is: 17 | -- 0: say "parsing nouns"; 18 | -- 1: say "parsing for persuasion"; 19 | -- 5: say "looping over scope"; 20 | -- 6: say "testing scope"; 21 | -- otherwise: say "other". 22 | 23 | Scope Control ends here. 24 | 25 | 26 | ---- DOCUMENTATION ---- 27 | 28 | Deciding what a character can interact with at any given moment is determined by her senses and the physical reality of her universe. The complicated reasoning to enforce all this is collectively called "scope". Chapter 12 of Writing with Inform talks of this at length under the rubrics of reachability and visibility. 29 | 30 | However, both technology and magic can overcome such obstacles. Clairvoyance and cell phones exist in many universes, so player commands such as BOB, REACH OUT AND TOUCH SOMEONE should be possible without undue difficulty. 31 | 32 | While the Deciding the Scope of Something activity can naïvely modify scope this way: 33 | 34 | *: After deciding the scope of the player while the player calls someone: 35 | place the other party of the player in scope. 36 | 37 | ...it causes certain problems, such as the player being able to see, hear, and touch what he should only be able to hear: 38 | 39 | > JESSE, LOOK 40 | "I'm still across town. I'll call you back when I get close." 41 | 42 | > EXAMINE JESSE 43 | She looks exhausted from the confusing drive. 44 | 45 | This extension allows four conditions that can be attached to rules in the Deciding the Scope of Something activity. They are: 46 | while parsing the nouns 47 | while parsing for persuasion 48 | while looping over scope 49 | while testing scope 50 | 51 | Hence, we can modify scope correctly: 52 | 53 | *: After deciding the scope of the player while parsing for persuasion and while the player calls someone: 54 | place the other party of the player in scope. 55 | 56 | 57 | Example: * "Asking for Directions" - A new internet acquaintance needs our help. 58 | 59 | Try the following test both with and without including this extension and its purpose becomes clear. 60 | 61 | *: "Asking for Directions" 62 | 63 | Include Scope Control by Ron Newcomb. 64 | 65 | Chapter 1 - The Emerald City 66 | 67 | The smell of coffee is a backdrop. A person can be lost in it. Persuasion rule when the actor is lost in it: persuasion succeeds. 68 | 69 | Pike Place Market is west of Bauhaus Coffeeshop. Bauhaus Coffeeshop is south of your apartment. Yourself is in your apartment. 70 | 71 | Some salmon is in Pike Place Market. A salmon dinner is in your apartment. 72 | 73 | Coffee is everywhere. 74 | 75 | Jesse is a woman in Pike Place Market. Jesse is lost in it. 76 | 77 | After looking for the first time: say "Your phone rings. 'Hey, it's Jesse. How do I get to your place?'". 78 | 79 | Chapter 2 - scope changes while we're on the phone 80 | 81 | Section 1 - the old way (for use without Scope Control by Ron Newcomb) 82 | 83 | After deciding the scope of the player when Jesse is lost in it: 84 | place Jesse in scope. 85 | 86 | Section 2 - the new way (for use with Scope Control by Ron Newcomb) 87 | 88 | After deciding the scope of the player while parsing for persuasion and Jesse is lost in it: 89 | place Jesse in scope. 90 | 91 | Chapter 3 - Maze of Streets 92 | 93 | After anyone going: say "'OK.'". 94 | 95 | Instead of Jesse going nowhere: say "'I think I'm lost. Are you sure you gave me good directions?'"; now Jesse is in Pike Place Market; rule succeeds. 96 | 97 | After Jesse looking: say "'I think I'm at [the location of Jesse].'" 98 | 99 | A description of Jesse is "A brunette in a pullover hoodie and jeans, with legs made for striding up hills, Jesse has finally made it out to visit." 100 | 101 | Test me with "jesse, look / jesse, e / jesse, s / examine jesse / * She's not in front of me, so I shouldn't be able to examine her right now. / jesse, look / jesse, e / jesse, n / jesse, look / examine jesse ". 102 | 103 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Ron Newcomb/Unsuccessful PC Attempt.i7x: -------------------------------------------------------------------------------- 1 | Version 2 of Unsuccessful PC Attempt by Ron Newcomb begins here. 2 | 3 | "Will run the Unsuccessful Attempt By rules for all characters, including the player. Also silences the library messages printed by the built-in Check rules." 4 | 5 | Silent checks is a truth state that varies. Silent checks is usually true. 6 | 7 | This is the modified check stage rule: 8 | anonymously follow the specific check rulebook; 9 | if [that] rule succeeded, [this] rule succeeds; [if a check rule succeeds, it ends action processing but does not call the Unsuccessful Attempt By rules. We mimic that here because it's useful: we can write a Check rule to both say a one-liner and end the action in a single line, and, we can still tell Unsuccessful Attempt to narrate a failed action without needing to ensure a one-line was said by checking The Reason The Action Failed against a list of rules that have one-liners. ] 10 | if the rule failed begin; 11 | if the actor is the player, follow the unsuccessful attempt by rules; [ ..will be called for NPCs from the usual place] 12 | rule fails; 13 | end if. 14 | 15 | To anonymously follow (R - a rule): (- anon_follow({R}); -). 16 | 17 | Include (- 18 | [ anon_follow R; 19 | @push untouchable_silence; 20 | untouchable_silence = (+ silent checks +); ! checked by L__M() and related library functions 21 | if (reason_the_action_failed = FollowRulebook(R)) ! this sets, then tests, that variable 22 | { 23 | if (RulebookSucceeded()) ActRulebookSucceeds(reason_the_action_failed); 24 | else ActRulebookFails(reason_the_action_failed); 25 | } 26 | @pull untouchable_silence; 27 | ]; 28 | -). 29 | 30 | The modified check stage rule is listed instead of the check stage rule in the specific action-processing rules. 31 | 32 | Unsuccessful PC Attempt ends here. 33 | 34 | 35 | ---- DOCUMENTATION ---- 36 | 37 | Behavior in interactive fiction is not pre-determined but instead chosen moment to moment. There are three instances where we may wish to comment on a kind of behavior: before the behavior is tried, after the behavior is done, and after the behavior was attempted but wasn't able to be done. For example, 38 | 39 | Before an actor behaving ill-bred in the presence of the governess: 40 | say "'Don't you dare do that. Please remember what happened to poor Lydia!'". 41 | 42 | After an actor behaving ill-bred in the presence of the governess: 43 | say "'You should be ashamed of yourself. What if you had been seen?'". 44 | 45 | Unsuccessful attempt by an actor behaving ill-bred in the presence of the governess: 46 | say "'Well I suppose you feel very foolish now. Jane and Elizabeth would never have tried such a thing.'". 47 | 48 | Typically in Inform, our player's character has their failed attempts narrated by the Check rules, and our non-player characters' failed attempts are narrated by the Unsuccessful Attempt By rules. However, this presents two problems. First, how do we comment on our player failing to achieve a general kind of behavior, since we cannot write "Check behaving ill-bred"? And secondly, in games with multiple possible player-characters, where do we put the failure messages for each of them? In our example, neither Kitty's or Mary's messages are always approprate for the Check rules, because we don't know ahead of time if the player wishes to be the studious Mary or sociable Kitty. We don't wish to be prejudiced. 49 | 50 | This small extension runs the Unsuccessful Attempt By rules for the player's character, treating him or her no differently than anyone else. So when we write a rule beginning with "Unsuccessful attempt by an actor", we really mean it. 51 | 52 | By default, this extension silences the built-in library messages that Inform uses for check rules. (Extensions will still print their messages, but most extensions are ready to have said messages replaced.) The built-in library messages may be restored by: 53 | 54 | *: When play begins: change silent checks to false. 55 | 56 | 57 | Example: * "Road Test" - Success and failure on the road to nowhere. 58 | 59 | *: "Road Test" 60 | 61 | Include Unsuccessful Pc Attempt by Ron Newcomb. 62 | 63 | Unsuccessful attempt by an actor doing something: say "Oomph! [Actor] can't because of the [reason the action failed]." 64 | 65 | The block sleeping rule is not listed in any rulebook. 66 | 67 | Check an actor sleeping (this is the gravel road rule): say "(Can't sleep here!)" instead. 68 | Check an actor waiting (this is the kinda already doing rule): say "(Waiting is a little too easy.)"; rule succeeds. 69 | 70 | Carry out an actor sleeping: say "[Actor] sleeps quietly." 71 | Carry out an actor waiting: say "[Actor] waits quietly." 72 | 73 | Sleeping is being silly. 74 | 75 | A gravel road is a room. Bob is a man in a gravel road. A stop sign is fixed in place in a gravel road. Persuasion: rule succeeds. 76 | 77 | Test me with "sleep / bob, sleep / wait / bob, wait / take stop sign / bob, take stop sign ". 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /docs/resources/Extensions/Stephen Granade/Footnotes.i7x: -------------------------------------------------------------------------------- 1 | Version 2 of Footnotes by Stephen Granade begins here. 2 | 3 | "Provides a framework for organizing and displaying footnotes in a game. Version 2 makes Footnotes responsive and 6L38-compatible." 4 | 5 | Section 1 - Implementing Footnotes 6 | 7 | Footnote-name is a kind of value. The footnote-names are defined by the Table of Footnotes 8 | 9 | Current footnote is a number that varies. The current footnote is 1. 10 | 11 | Footnotes are a thing. Footnotes can be on or off. Footnotes can be given repeatedly or given only once. 12 | 13 | A footnote-name has a number called the footnote-index. The footnote-index of a footnote-name is usually 0. 14 | A footnote-name has a truth state called the footnote-read. The footnote-read of a footnote-name is usually false. 15 | 16 | Table of Footnotes 17 | Name Note 18 | footnote-placeholder "" 19 | 20 | [A forced-note is printed whether or not it's been shown before. A regular note is only printed if it's not been shown befeore.] 21 | To say a/the/-- forced-note (fn - a footnote-name): 22 | if footnotes are on: 23 | if footnote-index of fn is 0: 24 | now the footnote-index of fn is the current footnote; 25 | increment the current footnote; 26 | say "[bracket][footnote-index of fn][close bracket]". 27 | 28 | To say a/the/-- note (fn - a footnote-name): 29 | if footnotes are on: 30 | if footnotes are given only once: 31 | if footnote-read of fn is false, say forced-note fn; 32 | otherwise: 33 | say forced-note fn. 34 | 35 | 36 | Section 2 - Player Controls 37 | 38 | Giving a footnote is an action out of world applying to one number. Understand "footnote [number]" or "note [number]" as giving a footnote. 39 | 40 | Check giving a footnote (this is the there are no footnotes less than one rule): 41 | if the number understood is less than 1, instead say "There is no footnote with a number less than 1." (A) 42 | 43 | Carry out giving a footnote (this is the standard giving a footnote rule): 44 | repeat with item running through footnote-names: 45 | if number understood is the footnote-index of item: 46 | if item is a name listed in the Table of Footnotes: 47 | say "[note entry][line break]" (A); 48 | now footnote-read of item is true; 49 | continue the action; 50 | else: 51 | say "BUG: no content for this footnote." (B); 52 | continue the action; 53 | say "There is no footnote with that number." (C). 54 | 55 | Turning on footnotes is an action out of world applying to nothing. Understand "footnotes on" or "notes on" as turning on footnotes. 56 | 57 | Check turning on footnotes (this is the can't turn on footnotes if they're already on rule): 58 | if footnotes are on, instead say "Footnotes are already being given." (A). 59 | 60 | Carry out turning on footnotes (this is the standard turning on footnotes rule): now footnotes are on. 61 | 62 | Report turning on footnotes (this is the standard report turning on footnotes rule): say "Footnotes will now be given. Type NOTE # to read a footnote." (A). 63 | 64 | Turning off footnotes is an action out of world applying to nothing. Understand "footnotes off" or "notes off" as turning off footnotes. 65 | 66 | Check turning off footnotes (this is the can't turn off footnotes if they're already off rule): 67 | if footnotes are off, instead say "Footnotes are already not being given." (A). 68 | 69 | Carry out turning off footnotes (this is the standard turning off footnotes rule): now footnotes are off. 70 | 71 | Report turning off footnotes (this is the standard report turning off footnotes rule): say "Footnotes will no longer be given." (A). 72 | 73 | Giving the footnote state is an action out of world applying to nothing. Understand "footnotes" or "notes" as giving the footnote state. 74 | 75 | Report giving the footnote state (this is the standard report giving the footnote state rule): say "Footnotes are currently [if footnotes are off]not[end if] being given." (A). 76 | 77 | Footnotes ends here. 78 | 79 | ---- DOCUMENTATION ---- 80 | 81 | This extension lets you add footnotes to your game, similar to those in the Infocom game Hitchhiker's Guide to the Galaxy. Footnotes are numbered beginning with 1, and are only assigned numbers as they are referenced. 82 | 83 | Footnotes are stored in the Table of Footnotes. This extension defines the table; you merely need to continue it: 84 | 85 | Table of Footnotes (continued) 86 | Name Note 87 | hdtv-footnote "The TV is actually HDTV-ready, not fully HDTV capable." 88 | 89 | "Name" is the name of the footnote, while "Note" is the text of the footnote. 90 | 91 | This extension adds the to say phrase 92 | 93 | note NAME 94 | 95 | to give a footnote number. Here NAME is the name of the footnote as given in the Table of Footnotes. 96 | 97 | Footnotes can be given only once or given repeatedly. By default, the footnotes are given only until that note has been read. 98 | 99 | >x laser 100 | It utilizes a flowing gas approach rather than a closed tube and is specially designed to be extremely stable(1). 101 | 102 | >note 1 103 | K. M. O'Hara, S. R. Granade, M. E. Gehm, T. A. Savard, S. Bali, C. Freed, and J.E. Thomas, Ultrastable CO2 laser trapping of lithium fermions, Phys. Rev. Lett., vol. 82 (1999), pp. 4204. 104 | 105 | >x laser 106 | It utilizes a flowing gas approach rather than a closed tube and is specially designed to be extremely stable. 107 | 108 | (Note that footnote numbers are printed inside square brackets rather than parentheses. They are given as parentheses here due to a limitation of extension documentation.) To change this behavior so that footnotes are given over and over, add the line 109 | 110 | Footnotes are given repeatedly. 111 | 112 | to your game. Also by default, the game begins with footnotes turned off. To have them displayed from the beginning of the game, add the line 113 | 114 | Footnotes are on. 115 | 116 | to your game. 117 | 118 | This extension adds four player commands. FOOTNOTES ON or NOTES ON turns on the display of footnotes, while FOOTNOTES OFF or NOTES OFF turns them off again. FOOTNOTE # or NOTE # reads a numbered footnote, while FOOTNOTES or NOTES reports whether or not footnotes are being displayed. 119 | 120 | Example: * Shameless Plug - Adds a footnote to the description of one object in the game. 121 | 122 | *: "Shameless Plug" 123 | 124 | Include Footnotes by Stephen Granade. Footnotes are on. 125 | 126 | The Lab is a room. "Filled with all of the equipment that you need to trap neutral lithium atoms and cool them to just above absolute zero." 127 | 128 | The carbon dioxide laser is in the Lab. "On one side of the lab is a carbon dioxide laser." The description is "It utilizes a flowing gas approach rather than a closed tube and is specially designed to be extremely stable[note laser-ref]." It is fixed in place. Understand "co2" as the laser. 129 | 130 | Table of Footnotes (continued) 131 | Name Note 132 | laser-ref "K. M. O’Hara, S. R. Granade, M. E. Gehm, T. A. Savard, S. Bali, C. Freed, and J.E. Thomas, Ultrastable CO2 laser trapping of lithium fermions, Phys. Rev. Lett., vol. 82 (1999), pp. 4204." 133 | 134 | Test me with "x laser / note 1". 135 | -------------------------------------------------------------------------------- /docs/source/catalogue.txt: -------------------------------------------------------------------------------- 1 | {sections} 2 | {section-title of: {SECTIONID}} 3 | {subsections in: {SECTIONID}} 4 | {subsection-title of: {SUBSECTIONID}} 5 | {resources in: {SUBSECTIONID}} 6 | {title of: {ID}} by {author of: {ID}} v{version of: {ID}} 7 | {end-resources} 8 | {end-subsections} 9 | {end-sections} 10 | -------------------------------------------------------------------------------- /docs/source/headings.txt: -------------------------------------------------------------------------------- 1 | {sections} 2 | {section-title of: {SECTIONID}} 3 | {subsections in: {SECTIONID}} 4 | {subsection-title of: {SUBSECTIONID}} 5 | {end-subsections} 6 | {end-sections} 7 | -------------------------------------------------------------------------------- /docs/source/include/description.html: -------------------------------------------------------------------------------- 1 |
2 |
The Public Library
3 |
Extensions shared by Inform users
4 |
5 |

This is a public library of extensions shared by Inform authors. They're all published under a 6 | Creative Commons Attribution licence, which means you can use them for free in any project of your own. 7 | (Inform will automatically take care of crediting the authors.)

8 |

This version of the library is intended for projects using version 10 9 | of Inform. More extensions and newer versions of some extensions here may 10 | be found at the Friends of I7 Extensions 10.1 branch. 11 | Extensions compatible with Inform version 9.3 (6M62) can be found at the 12 | Friends of I7 13 | Extensions 9.3 branch. Most of these will also work with 9.1 (6L02) 14 | or 9.2 (6L38), but if you need an older version of an extension, consult 15 | the git history of the 16 | Friends of I7 Extensions master branch.

17 |

At some point we hope to replace this form of the library with 18 | a more version-aware one, able to install multiple versions as needed. 19 | In the mean time, if you need a different version of an extension just 20 | for one project, you can install it in that project's X.materials/Extensions 21 | directory. Or if you need to uninstall a version of an extension you've 22 | installed with the buttons below, your app should provide a menu item 23 | to bring up the directory in your file-system Finder or Explorer.

24 |

You can review or discuss extensions (other than the built-in ones) at the 25 | Interactive Fiction Forum using the links provided. If you'd like to suggest future 26 | extensions, or talk about general questions to do with extensions, please 27 | click here instead 28 | to get to the topic provided for that.

29 | -------------------------------------------------------------------------------- /docs/source/include/description404.html: -------------------------------------------------------------------------------- 1 |
2 |
The Public Library: Disconnected
3 |
Extensions shared by Inform users
4 |
5 |

This tab normally holds a public library of extensions shared by 6 | Inform authors, but right now it's disconnected.

7 |

It's possible that the Inform website is down, and if so then our 8 | apologies: please try again later.

9 |

It's possible that your computer is not currently connected to the 10 | Internet, and if so, please try again when you're back online.

11 |

Though this is less likely, it's also possible that you're behind 12 | a firewall which is for some reason blocking the traffic. But since 13 | Inform is only making a regular Internet connection, not using an 14 | unusual port, it's more likely to be for one of the reasons above.

15 |
16 | -------------------------------------------------------------------------------- /docs/source/include/filters.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | Show: 4 |   5 | 6 | JUST HEADINGS 7 |   8 | 9 | HEADINGS AND SUBHEADINGS 10 |   11 | 12 | EVERYTHING 13 | 14 |

15 |
16 | -------------------------------------------------------------------------------- /docs/source/include/mass_download_buttons.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | getall-buttontext 5 | 6 |  This button downloads every extension you haven't got, but doesn't 7 | change the version of any extension you already have. This may take a few minutes. 8 | 9 |

10 |

11 | 12 | 13 | updateall-buttontext 14 |  This button replaces every extension you have for which the Library 15 | has a newer version. (If you need to get an earlier version back again, 16 | go to the Inform website.) 17 | 18 |

19 |
20 | -------------------------------------------------------------------------------- /docs/source/include/public_library.css: -------------------------------------------------------------------------------- 1 | .headingpanellayout { 2 | position: relative; 3 | height: 56px; 4 | padding: 0px; 5 | white-space:nowrap; 6 | } 7 | .headingpanelalt { 8 | background: #808080; 9 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 10 | -webkit-font-smoothing: antialiased; 11 | } 12 | .headingtext { 13 | position: absolute; 14 | top: -4px; 15 | left: -1px; 16 | width: 100%; 17 | padding: 14px 10px 0px 10px; 18 | } 19 | span.headingpaneltextalt { 20 | color: #ffffff; 21 | font-size: 20px; 22 | font-weight: bold; 23 | } 24 | .headingrubric { 25 | position: absolute; 26 | top: 36px; 27 | width: 100%; 28 | padding: 0px 10px 0px 10px; 29 | } 30 | span.headingpanelrubricalt { 31 | color: #ffffff; 32 | font-size: 11px; 33 | font-weight: bold; 34 | } 35 | span.registrybuttons { 36 | height: 20px; 37 | padding: 2px 8px 2px 8px; 38 | margin: 2px; 39 | border:1px solid; 40 | border-radius: 5px; 41 | } 42 | span.registrybuttontext { 43 | font-size: 11px; 44 | border-color: #000000; 45 | } 46 | span.registryminibuttons { 47 | height: 14px; 48 | padding: 2px 5px 2px 5px; 49 | margin: 2px; 50 | border:1px solid; 51 | border-radius: 4px; 52 | } 53 | span.registryminibuttontext { 54 | font-size: 10px; 55 | border-color: #000000; 56 | } 57 | 58 | 59 | span.registrybuttonuninstalled { 60 | color: #000000; 61 | background: #ffffdd; 62 | } 63 | span.registrybuttoninstalled { 64 | color: #000000; 65 | background: #ffffff; 66 | pointer-events: none; 67 | } 68 | span.registrybuttonbuiltin { 69 | color: #888888; 70 | background: #ffffff; 71 | pointer-events: none; 72 | } 73 | span.registrybuttonupdate { 74 | color: #000000; 75 | background: #aaddff; 76 | } 77 | span.registrybuttonrevert { 78 | color: #000000; 79 | background: #ddaaff; 80 | } 81 | span.registrybuttonrevealer { 82 | color: #ffffff; 83 | background: #444444; 84 | } 85 | 86 | p { 87 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 88 | -webkit-font-smoothing: antialiased; 89 | font-size: 12px; 90 | } 91 | div.registrysectionitemsopen { 92 | display: block; 93 | } 94 | div.registrysectionitemsclosed { 95 | display: none; 96 | } 97 | span.registrysectionname { 98 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 99 | -webkit-font-smoothing: antialiased; 100 | font-size: 16px; 101 | line-height: 18px; 102 | } 103 | span.registrysubsectionname { 104 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 105 | -webkit-font-smoothing: antialiased; 106 | font-size: 14px; 107 | line-height: 16px; 108 | } 109 | span.registrysectionmark { 110 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 111 | -webkit-font-smoothing: antialiased; 112 | font-size: 16px; 113 | line-height: 18px; 114 | color: #666; 115 | } 116 | span.registrysubsectionmark { 117 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 118 | -webkit-font-smoothing: antialiased; 119 | font-size: 14px; 120 | line-height: 16px; 121 | color: #666; 122 | } 123 | span.registryitemtext { 124 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 125 | -webkit-font-smoothing: antialiased; 126 | font-size: 12px; 127 | line-height: 16px; 128 | } 129 | p.registryitem { 130 | padding-left: 80px; 131 | text-indent: -40px; 132 | } 133 | p.registryaddition { 134 | padding-left: 40px; 135 | text-indent: -40px; 136 | } 137 | 138 | a.registrysilentlink { 139 | text-decoration: none; 140 | color: #000; 141 | } 142 | a.registrybuttonlink { 143 | text-decoration: none; 144 | } 145 | a.registrycontentslink:link { 146 | text-decoration: none; 147 | color: #202020; 148 | } 149 | a.registrycontentslink:visited { 150 | text-decoration: none; 151 | color: #202020; 152 | } 153 | a.registrycontentslink:hover { 154 | text-decoration: none; 155 | color: #D00000; 156 | } 157 | a.registrycontentslink:active { 158 | text-decoration: none; 159 | color: #D00000; 160 | } 161 | -------------------------------------------------------------------------------- /docs/source/include/resource.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | buttontext 5 | 6 |   7 | {title of: {ID} escape: neither} by {author of: {ID} escape: neither} (Version {version of: {ID}}). 8 | {summary of: {ID}} 9 | {if-forum-thread for: {ID}} 10 |
11 | (Click here 12 | to review or discuss {title of: {ID} escape: neither} at the IFF) 13 | {end-if-forum-thread} 14 |
15 |

16 | -------------------------------------------------------------------------------- /docs/source/include/section_buttons.js: -------------------------------------------------------------------------------- 1 | window.getAllList = []; 2 | window.getAllLength = 0; 3 | window.updateList = []; 4 | window.updateListLength = 0; 5 | window.sectionExtentD = new Array(); 6 | window.sectionExtentI = new Array(); 7 | window.sectionExtentU = new Array(); 8 | window.sectionExtentR = new Array(); 9 | window.subsectionExtentD = new Array(); 10 | window.subsectionExtentI = new Array(); 11 | window.subsectionExtentU = new Array(); 12 | window.subsectionExtentR = new Array(); 13 | function query(itemid, sid, ssid, author, title, available, url) { 14 | var myProject = window.Project; 15 | var imid = 'button' + itemid; 16 | var res = myProject.askInterfaceForLocalVersion(author, title, available); 17 | var buttontext = 'DOWNLOAD'; 18 | var buttonclass = 'registrybuttons registrybuttonuninstalled'; 19 | if (res == '!') { 20 | buttontext = 'BUILT IN'; buttonclass = 'registrybuttons registrybuttonbuiltin'; 21 | window.sectionExtentI[sid]++; 22 | window.subsectionExtentI[ssid]++; 23 | } 24 | if (res == '=') { 25 | buttontext = 'INSTALLED'; buttonclass = 'registrybuttons registrybuttoninstalled'; 26 | window.sectionExtentI[sid]++; 27 | window.subsectionExtentI[ssid]++; 28 | } 29 | if (res == '<') { 30 | var loc = myProject.askInterfaceForLocalVersionText(author, title); 31 | buttontext = 'UPDATE ' + loc + ' ▶ ' + available; 32 | buttonclass = 'registrybuttons registrybuttonupdate'; 33 | window.updateList.push(itemid); 34 | window.updateList.push(url); 35 | window.updateList.push(title + ' by ' + author); 36 | window.updateListLength = window.updateListLength + 1; 37 | window.sectionExtentU[sid]++; 38 | window.subsectionExtentU[ssid]++; 39 | } 40 | if (res == '>') { 41 | var loc = myProject.askInterfaceForLocalVersionText(author, title); 42 | buttontext = 'REVERT TO LIBRARY VERSION (' + loc + ' ▶ ' + available + ')'; 43 | buttonclass = 'registrybuttons registrybuttonrevert'; 44 | window.sectionExtentR[sid]++; 45 | window.subsectionExtentR[ssid]++; 46 | } 47 | if (buttontext == 'DOWNLOAD') { 48 | window.getAllList.push(itemid); 49 | window.getAllList.push(url); 50 | window.getAllList.push(title + ' by ' + author); 51 | window.getAllLength = window.getAllLength + 1; 52 | window.sectionExtentD[sid]++; 53 | window.subsectionExtentD[ssid]++; 54 | } 55 | document.getElementById(imid).innerHTML = buttontext; 56 | document.getElementById(imid).className = buttonclass; 57 | } 58 | function onLoaded() { 59 | resetCounts(0); 60 | } 61 | window.onload=onLoaded; 62 | function addToIndicator(existing, count, className) { 63 | if (count == 0) return existing; 64 | if (existing != '') existing = existing + '+'; 65 | return existing + '' + count + ''; 66 | } 67 | function setIndicatorForSection(sid) { 68 | var temp = addToIndicator('', window.sectionExtentI[sid], 'registrybuttoninstalled'); 69 | temp = addToIndicator(temp, window.sectionExtentD[sid], 'registrybuttonuninstalled'); 70 | temp = addToIndicator(temp, window.sectionExtentU[sid], 'registrybuttonupdate'); 71 | temp = addToIndicator(temp, window.sectionExtentR[sid], 'registrybuttonrevert'); 72 | document.getElementById('sectionindicator'+sid).innerHTML = temp; 73 | } 74 | function setIndicatorForSubsection(sid) { 75 | var temp = addToIndicator('', window.subsectionExtentI[sid], 'registrybuttoninstalled'); 76 | temp = addToIndicator(temp, window.subsectionExtentD[sid], 'registrybuttonuninstalled'); 77 | temp = addToIndicator(temp, window.subsectionExtentU[sid], 'registrybuttonupdate'); 78 | temp = addToIndicator(temp, window.subsectionExtentR[sid], 'registrybuttonrevert'); 79 | document.getElementById('subsectionindicator'+sid).innerHTML = temp; 80 | } 81 | function openSection(sid) { 82 | document.getElementById('sectionitems'+sid).className = 'registrysectionitemsopen'; 83 | document.getElementById('sectionindicator'+sid).innerHTML = ''; 84 | } 85 | function closeSection(sid) { 86 | document.getElementById('sectionitems'+sid).className = 'registrysectionitemsclosed'; 87 | setIndicatorForSection(sid); 88 | } 89 | function maybeCloseSection(sid, updating) { 90 | if ((updating == 1) && (document.getElementById('sectionitems'+sid).className != 'registrysectionitemsclosed')) { 91 | return; 92 | } 93 | document.getElementById('sectionitems'+sid).className = 'registrysectionitemsclosed'; 94 | setIndicatorForSection(sid); 95 | } 96 | function toggleSection(sid) { 97 | if (document.getElementById('sectionitems'+sid).className == 'registrysectionitemsclosed') { 98 | openSection(sid); 99 | } else { 100 | closeSection(sid); 101 | } 102 | } 103 | function openSubsection(ssid) { 104 | document.getElementById('subsectionitems'+ssid).className = 'registrysectionitemsopen'; 105 | document.getElementById('subsectionindicator'+ssid).innerHTML = ''; 106 | } 107 | function closeSubsection(ssid) { 108 | document.getElementById('subsectionitems'+ssid).className = 'registrysectionitemsclosed'; 109 | setIndicatorForSubsection(ssid); 110 | } 111 | function maybeCloseSubsection(ssid, updating) { 112 | if ((updating == 1) && (document.getElementById('subsectionitems'+ssid).className != 'registrysectionitemsclosed')) { 113 | return; 114 | } 115 | document.getElementById('subsectionitems'+ssid).className = 'registrysectionitemsclosed'; 116 | setIndicatorForSubsection(ssid); 117 | } 118 | function toggleSubsection(ssid) { 119 | if (document.getElementById('subsectionitems'+ssid).className == 'registrysectionitemsclosed') { 120 | openSubsection(ssid); 121 | } else { 122 | closeSubsection(ssid); 123 | } 124 | } 125 | function updateButtonLabels() { 126 | if (window.getAllLength == 0) { 127 | document.getElementById('getall').innerHTML = 'ALL DOWNLOADED'; 128 | document.getElementById('getall').className = 'registrybuttons registrybuttoninstalled'; 129 | } else { 130 | if (window.getAllLength == 1) { 131 | document.getElementById('getall').innerHTML = 'DOWNLOAD 1 EXTENSION'; 132 | } else { 133 | document.getElementById('getall').innerHTML = 'DOWNLOAD ' + window.getAllLength + ' EXTENSIONS'; 134 | } 135 | document.getElementById('getall').className = 'registrybuttons registrybuttonuninstalled'; 136 | } 137 | if (window.updateListLength == 0) { 138 | document.getElementById('updateall').innerHTML = 'ALL UP TO DATE'; 139 | document.getElementById('updateall').className = 'registrybuttons registrybuttoninstalled'; 140 | } else { 141 | if (window.updateListLength == 1) { 142 | document.getElementById('updateall').innerHTML = 'UPDATE 1 EXTENSION'; 143 | } else { 144 | document.getElementById('updateall').innerHTML = 'UPDATE ' + window.updateListLength + ' EXTENSIONS'; 145 | } 146 | document.getElementById('updateall').className = 'registrybuttons registrybuttonupdate'; 147 | } 148 | } 149 | function clearSectionExtents(sid) { 150 | window.sectionExtentI[sid] = 0; 151 | window.sectionExtentD[sid] = 0; 152 | window.sectionExtentU[sid] = 0; 153 | window.sectionExtentR[sid] = 0; 154 | } 155 | function clearSubsectionExtents(ssid) { 156 | window.subsectionExtentI[ssid] = 0; 157 | window.subsectionExtentD[ssid] = 0; 158 | window.subsectionExtentU[ssid] = 0; 159 | window.subsectionExtentR[ssid] = 0; 160 | } 161 | function resetCounts(updating) { 162 | clearExtents(); 163 | setupResources(); 164 | maybeCloseSubsections(updating); 165 | updateButtonLabels(); 166 | } 167 | -------------------------------------------------------------------------------- /docs/source/include/section_heading.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 13 | 19 | 20 |
4 | §{section-mark of: {SECTIONID}}.  5 | 7 | 8 | 9 | {section-title of: {SECTIONID}} 10 | 11 | 12 | 14 |      15 | 16 | 17 | 18 |
21 | -------------------------------------------------------------------------------- /docs/source/include/structure.js: -------------------------------------------------------------------------------- 1 | function setupResources() \{ 2 | {resources in: ALL} 3 | query({ID}, 4 | {section of: {ID}}, 5 | {subsection of: {ID}}, 6 | '{author of: {ID} escape: quotes}', 7 | '{title of: {ID} escape: quotes}', 8 | 'Version {version of: {ID}}', 9 | 'library:/resources/Extensions/{author of: {ID} escape: both}/{title of: {ID} escape: both}.i7x?id={ID}'); 10 | {end-resources} 11 | \} 12 | function downloadSucceeded(itemid) \{ 13 | {resources in: ALL} 14 | if (itemid == {ID}) \{ openSection({section of: {ID}}); openSubsection({subsection of: {ID}}); \} 15 | {end-resources} 16 | resetCounts(1); 17 | \} 18 | function clearExtents() \{ 19 | {sections} 20 | clearSectionExtents({SECTIONID}); 21 | {subsections in: {SECTIONID}} 22 | clearSubsectionExtents({SUBSECTIONID}); 23 | {end-subsections} 24 | {end-sections} 25 | \} 26 | function maybeCloseSubsections(updating) \{ 27 | {sections} 28 | maybeCloseSection({SECTIONID}, updating); 29 | {subsections in: {SECTIONID}} 30 | maybeCloseSubsection({SUBSECTIONID}, updating); 31 | {end-subsections} 32 | {end-sections} 33 | \} 34 | function showJustHeadings() \{ 35 | {sections} 36 | closeSection({SECTIONID}); 37 | {end-sections} 38 | \} 39 | function showHeadingsAndSubheadings() \{ 40 | {sections} 41 | openSection({SECTIONID}); 42 | {subsections in: {SECTIONID}} 43 | closeSubsection({SUBSECTIONID}); 44 | {end-subsections} 45 | {end-sections} 46 | \} 47 | function showEverything() \{ 48 | {sections} 49 | openSection({SECTIONID}); 50 | {subsections in: {SECTIONID}} 51 | openSubsection({SUBSECTIONID}); 52 | {end-subsections} 53 | {end-sections} 54 | \} 55 | -------------------------------------------------------------------------------- /docs/source/include/subsection_heading.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 13 | 19 | 20 |
4 | §{subsection-mark of: {SUBSECTIONID}}.  5 | 7 | 8 | 9 | {subsection-title of: {SUBSECTIONID}} 10 | 11 | 12 | 14 |      15 | 16 | 17 | 18 |
21 | -------------------------------------------------------------------------------- /docs/source/index-linux.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css platform: linux} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/source/index-macos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css platform: macos} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/source/index-windows.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css platform: windows} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/source/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/source/pl404-linux.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css platform: linux} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/source/pl404-macos.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css platform: macos} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/source/pl404-windows.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css platform: windows} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/source/pl404.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/v11/catalogue.txt: -------------------------------------------------------------------------------- 1 | Testing 2 | Testing only 3 | Complex Listing by Emily Short v10 4 | Inanimate Listeners by Emily Short v3 5 | Locksmith by Emily Short v15 6 | Skeleton Keys by Emily Short v2 7 | Punctuation Removal by Emily Short v7 8 | Epistemology by Eric Eve v9 9 | Metric Units by Graham Nelson v3 10 | Approximate Metric Units by Graham Nelson v2 11 | Rideable Vehicles by Graham Nelson v4 12 | 13 | -------------------------------------------------------------------------------- /docs/v11/headings.txt: -------------------------------------------------------------------------------- 1 | Testing 2 | Testing only 3 | 4 | -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Emily Short/Complex Listing-v10.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Emily Short/Complex Listing-v10.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Emily Short/Inanimate Listeners-v3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Emily Short/Inanimate Listeners-v3.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Emily Short/Locksmith-v15.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Emily Short/Locksmith-v15.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Emily Short/Punctuation Removal-v7.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Emily Short/Punctuation Removal-v7.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Emily Short/Skeleton Keys-v2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Emily Short/Skeleton Keys-v2.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Eric Eve/Epistemology-v9.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Eric Eve/Epistemology-v9.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Graham Nelson/Approximate Metric Units-v2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Graham Nelson/Approximate Metric Units-v2.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Graham Nelson/Metric Units-v3.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Graham Nelson/Metric Units-v3.zip -------------------------------------------------------------------------------- /docs/v11/resources/Extensions/Graham Nelson/Rideable Vehicles-v4.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/resources/Extensions/Graham Nelson/Rideable Vehicles-v4.zip -------------------------------------------------------------------------------- /docs/v11/roster.json: -------------------------------------------------------------------------------- 1 | { 2 | "sections": [ 3 | { 4 | "title": "Testing", 5 | "leafname": "testing", 6 | "subsections": [ 7 | { 8 | "title": "Testing only", 9 | "holdings": [ 10 | { 11 | "author": "Emily Short", 12 | "title": "Complex Listing", 13 | "standard-installation": false, 14 | "directory-format": true, 15 | "visible": true, 16 | "version": "10", 17 | "summary": "Complex Listing provides more sophisticated listing options: the ability to impose special ordering instructions on a list, and also the ability to change the delimiters of the list to produce different styles and effects.", 18 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 19 | }, 20 | { 21 | "author": "Emily Short", 22 | "title": "Inanimate Listeners", 23 | "standard-installation": false, 24 | "directory-format": true, 25 | "visible": true, 26 | "version": "3", 27 | "summary": "Allows the player to address inanimate objects such as a talking computer, microphone, or telephone in a form such as ASK COMPUTER ABOUT COORDINATES.", 28 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 29 | }, 30 | { 31 | "author": "Emily Short", 32 | "title": "Locksmith", 33 | "standard-installation": false, 34 | "directory-format": true, 35 | "visible": true, 36 | "version": "15", 37 | "summary": "Implicit handling of doors and containers so that lock manipulation is automatic if the player has the necessary keys.", 38 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 39 | }, 40 | { 41 | "author": "Emily Short", 42 | "title": "Skeleton Keys", 43 | "standard-installation": false, 44 | "directory-format": true, 45 | "visible": true, 46 | "version": "2", 47 | "summary": "Allows for locks which can be opened by more than one key.", 48 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 49 | }, 50 | { 51 | "author": "Emily Short", 52 | "title": "Punctuation Removal", 53 | "standard-installation": false, 54 | "directory-format": true, 55 | "visible": true, 56 | "version": "7", 57 | "summary": "Offers specialized commands to strip troublesome punctuation such as periods, commas, question marks, and quote marks out of the player's typed commands; provides a converter to especially interpret titles that contain full stops, such as \"Mrs.\" or \"Dr.\".", 58 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 59 | }, 60 | { 61 | "author": "Eric Eve", 62 | "title": "Epistemology", 63 | "standard-installation": false, 64 | "directory-format": true, 65 | "visible": true, 66 | "version": "9", 67 | "summary": "Keeping track of what the player character knows and sees.", 68 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 69 | }, 70 | { 71 | "author": "Graham Nelson", 72 | "title": "Metric Units", 73 | "standard-installation": false, 74 | "directory-format": true, 75 | "visible": true, 76 | "version": "3", 77 | "summary": "Scientific kinds of value for simulations, using real number arithmetic. Uses SI units for mass, elapsed time, electric current, temperature, luminosity, frequency, force, energy, pressure, power, electric charge, voltage, luminance, area, volume, velocity, acceleration, momentum, density, heat capacity.", 78 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 79 | }, 80 | { 81 | "author": "Graham Nelson", 82 | "title": "Approximate Metric Units", 83 | "standard-installation": false, 84 | "directory-format": true, 85 | "visible": true, 86 | "version": "2", 87 | "summary": "Scientific kinds of value for simulations, using scaled integer arithmetic: really only useful for Z-machine projects.", 88 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 89 | }, 90 | { 91 | "author": "Graham Nelson", 92 | "title": "Rideable Vehicles", 93 | "standard-installation": false, 94 | "directory-format": true, 95 | "visible": true, 96 | "version": "4", 97 | "summary": "Vehicles which one sits on top of, rather than inside, such as elephants or motorcycles.", 98 | "time": "Time: Thu, 18 Jan 2024 21:07:12 GMT" 99 | } 100 | ] 101 | } 102 | ] 103 | } 104 | ] 105 | } 106 | -------------------------------------------------------------------------------- /docs/v11/source/catalogue.txt: -------------------------------------------------------------------------------- 1 | {sections} 2 | {section-title of: {SECTIONID}} 3 | {subsections in: {SECTIONID}} 4 | {subsection-title of: {SUBSECTIONID}} 5 | {resources in: {SUBSECTIONID}} 6 | {title of: {ID}} by {author of: {ID}} v{version of: {ID}} 7 | {end-resources} 8 | {end-subsections} 9 | {end-sections} 10 | -------------------------------------------------------------------------------- /docs/v11/source/headings.txt: -------------------------------------------------------------------------------- 1 | {sections} 2 | {section-title of: {SECTIONID}} 3 | {subsections in: {SECTIONID}} 4 | {subsection-title of: {SUBSECTIONID}} 5 | {end-subsections} 6 | {end-sections} 7 | -------------------------------------------------------------------------------- /docs/v11/source/include/description.html: -------------------------------------------------------------------------------- 1 |
2 |
The Public Library
3 |
Extensions shared by Inform users
4 |
5 |

This is a public library of extensions shared by Inform authors. They're all published under a 6 | Creative Commons Attribution licence, which means you can use them for free in any project of your own. 7 | (Inform will automatically take care of crediting the authors.)

8 |

This version of the library is intended for projects using version 11 9 | of Inform. It is experimental and for now exists only for testing the Inform apps ahead of the v11 release. 10 | As such, it contains only a handful of extensions, but in their modernised file format.

11 | -------------------------------------------------------------------------------- /docs/v11/source/include/description404.html: -------------------------------------------------------------------------------- 1 |
2 |
The Public Library: Disconnected
3 |
Extensions shared by Inform users
4 |
5 |

This tab normally holds a public library of extensions shared by 6 | Inform authors, but right now it's disconnected.

7 |

It's possible that the Inform website is down, and if so then our 8 | apologies: please try again later.

9 |

It's possible that your computer is not currently connected to the 10 | Internet, and if so, please try again when you're back online.

11 |

Though this is less likely, it's also possible that you're behind 12 | a firewall which is for some reason blocking the traffic. But since 13 | Inform is only making a regular Internet connection, not using an 14 | unusual port, it's more likely to be for one of the reasons above.

15 |
16 | -------------------------------------------------------------------------------- /docs/v11/source/include/filters.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | Show: 4 |   5 | 6 | JUST HEADINGS 7 |   8 | 9 | HEADINGS AND SUBHEADINGS 10 |   11 | 12 | EVERYTHING 13 | 14 |

15 |
16 | -------------------------------------------------------------------------------- /docs/v11/source/include/mass_download_buttons.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ganelson/inform-public-library/e50a788e9c2566b2b0b6736269d82360baf1b5ae/docs/v11/source/include/mass_download_buttons.html -------------------------------------------------------------------------------- /docs/v11/source/include/public_library.css: -------------------------------------------------------------------------------- 1 | .headingpanellayout { 2 | position: relative; 3 | height: 56px; 4 | padding: 0px; 5 | white-space:nowrap; 6 | } 7 | .headingpanelalt { 8 | background: #808080; 9 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 10 | -webkit-font-smoothing: antialiased; 11 | } 12 | .headingtext { 13 | position: absolute; 14 | top: -4px; 15 | left: -1px; 16 | width: 100%; 17 | padding: 14px 10px 0px 10px; 18 | } 19 | span.headingpaneltextalt { 20 | color: #ffffff; 21 | font-size: 20px; 22 | font-weight: bold; 23 | } 24 | .headingrubric { 25 | position: absolute; 26 | top: 36px; 27 | width: 100%; 28 | padding: 0px 10px 0px 10px; 29 | } 30 | span.headingpanelrubricalt { 31 | color: #ffffff; 32 | font-size: 11px; 33 | font-weight: bold; 34 | } 35 | span.registrybuttons { 36 | height: 20px; 37 | padding: 2px 8px 2px 8px; 38 | margin: 2px; 39 | border:1px solid; 40 | border-radius: 5px; 41 | } 42 | span.registrybuttontext { 43 | font-size: 11px; 44 | border-color: #000000; 45 | } 46 | span.registryminibuttons { 47 | height: 14px; 48 | padding: 2px 5px 2px 5px; 49 | margin: 2px; 50 | border:1px solid; 51 | border-radius: 4px; 52 | } 53 | span.registryminibuttontext { 54 | font-size: 10px; 55 | border-color: #000000; 56 | } 57 | 58 | 59 | span.registrybuttonuninstalled { 60 | color: #000000; 61 | background: #ffffdd; 62 | } 63 | span.registrybuttoninstalled { 64 | color: #000000; 65 | background: #ffffff; 66 | pointer-events: none; 67 | } 68 | span.registrybuttonbuiltin { 69 | color: #888888; 70 | background: #ffffff; 71 | pointer-events: none; 72 | } 73 | span.registrybuttonupdate { 74 | color: #000000; 75 | background: #aaddff; 76 | } 77 | span.registrybuttonrevert { 78 | color: #000000; 79 | background: #ddaaff; 80 | } 81 | span.registrybuttonrevealer { 82 | color: #ffffff; 83 | background: #444444; 84 | } 85 | 86 | p { 87 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 88 | -webkit-font-smoothing: antialiased; 89 | font-size: 12px; 90 | } 91 | div.registrysectionitemsopen { 92 | display: block; 93 | } 94 | div.registrysectionitemsclosed { 95 | display: none; 96 | } 97 | span.registrysectionname { 98 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 99 | -webkit-font-smoothing: antialiased; 100 | font-size: 16px; 101 | line-height: 18px; 102 | } 103 | span.registrysubsectionname { 104 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 105 | -webkit-font-smoothing: antialiased; 106 | font-size: 14px; 107 | line-height: 16px; 108 | } 109 | span.registrysectionmark { 110 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 111 | -webkit-font-smoothing: antialiased; 112 | font-size: 16px; 113 | line-height: 18px; 114 | color: #666; 115 | } 116 | span.registrysubsectionmark { 117 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 118 | -webkit-font-smoothing: antialiased; 119 | font-size: 14px; 120 | line-height: 16px; 121 | color: #666; 122 | } 123 | span.registryitemtext { 124 | font-family: "Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; 125 | -webkit-font-smoothing: antialiased; 126 | font-size: 12px; 127 | line-height: 16px; 128 | } 129 | p.registryitem { 130 | padding-left: 80px; 131 | text-indent: -40px; 132 | } 133 | p.registryaddition { 134 | padding-left: 40px; 135 | text-indent: -40px; 136 | } 137 | 138 | a.registrysilentlink { 139 | text-decoration: none; 140 | color: #000; 141 | } 142 | a.registrybuttonlink { 143 | text-decoration: none; 144 | } 145 | a.registrycontentslink:link { 146 | text-decoration: none; 147 | color: #202020; 148 | } 149 | a.registrycontentslink:visited { 150 | text-decoration: none; 151 | color: #202020; 152 | } 153 | a.registrycontentslink:hover { 154 | text-decoration: none; 155 | color: #D00000; 156 | } 157 | a.registrycontentslink:active { 158 | text-decoration: none; 159 | color: #D00000; 160 | } 161 | -------------------------------------------------------------------------------- /docs/v11/source/include/resource.html: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | buttontext 5 | 6 |   7 | {title of: {ID} escape: neither} by {author of: {ID} escape: neither} (Version {version of: {ID}}). 8 | {summary of: {ID}} 9 | {if-forum-thread for: {ID}} 10 |
11 | (Click here 12 | to review or discuss {title of: {ID} escape: neither} at the IFF) 13 | {end-if-forum-thread} 14 |
15 |

16 | -------------------------------------------------------------------------------- /docs/v11/source/include/section_buttons.js: -------------------------------------------------------------------------------- 1 | window.getAllList = []; 2 | window.getAllLength = 0; 3 | window.updateList = []; 4 | window.updateListLength = 0; 5 | window.sectionExtentD = new Array(); 6 | window.sectionExtentI = new Array(); 7 | window.sectionExtentU = new Array(); 8 | window.sectionExtentR = new Array(); 9 | window.subsectionExtentD = new Array(); 10 | window.subsectionExtentI = new Array(); 11 | window.subsectionExtentU = new Array(); 12 | window.subsectionExtentR = new Array(); 13 | function query(itemid, sid, ssid, author, title, available, url) { 14 | var myProject = window.Project; 15 | var imid = 'button' + itemid; 16 | var res = myProject.askInterfaceForLocalVersion(author, title, available); 17 | var buttontext = 'DOWNLOAD'; 18 | var buttonclass = 'registrybuttons registrybuttonuninstalled'; 19 | if (res == '!') { 20 | buttontext = 'BUILT IN'; buttonclass = 'registrybuttons registrybuttonbuiltin'; 21 | window.sectionExtentI[sid]++; 22 | window.subsectionExtentI[ssid]++; 23 | } 24 | if (res == '=') { 25 | buttontext = 'INSTALLED'; buttonclass = 'registrybuttons registrybuttoninstalled'; 26 | window.sectionExtentI[sid]++; 27 | window.subsectionExtentI[ssid]++; 28 | } 29 | if (res == '<') { 30 | var loc = myProject.askInterfaceForLocalVersionText(author, title); 31 | buttontext = 'UPDATE ' + loc + ' ▶ ' + available; 32 | buttonclass = 'registrybuttons registrybuttonupdate'; 33 | window.updateList.push(itemid); 34 | window.updateList.push(url); 35 | window.updateList.push(title + ' by ' + author); 36 | window.updateListLength = window.updateListLength + 1; 37 | window.sectionExtentU[sid]++; 38 | window.subsectionExtentU[ssid]++; 39 | } 40 | if (res == '>') { 41 | var loc = myProject.askInterfaceForLocalVersionText(author, title); 42 | buttontext = 'REVERT TO LIBRARY VERSION (' + loc + ' ▶ ' + available + ')'; 43 | buttonclass = 'registrybuttons registrybuttonrevert'; 44 | window.sectionExtentR[sid]++; 45 | window.subsectionExtentR[ssid]++; 46 | } 47 | if (buttontext == 'DOWNLOAD') { 48 | window.getAllList.push(itemid); 49 | window.getAllList.push(url); 50 | window.getAllList.push(title + ' by ' + author); 51 | window.getAllLength = window.getAllLength + 1; 52 | window.sectionExtentD[sid]++; 53 | window.subsectionExtentD[ssid]++; 54 | } 55 | document.getElementById(imid).innerHTML = buttontext; 56 | document.getElementById(imid).className = buttonclass; 57 | } 58 | function onLoaded() { 59 | resetCounts(0); 60 | } 61 | window.onload=onLoaded; 62 | function addToIndicator(existing, count, className) { 63 | if (count == 0) return existing; 64 | if (existing != '') existing = existing + '+'; 65 | return existing + '' + count + ''; 66 | } 67 | function setIndicatorForSection(sid) { 68 | var temp = addToIndicator('', window.sectionExtentI[sid], 'registrybuttoninstalled'); 69 | temp = addToIndicator(temp, window.sectionExtentD[sid], 'registrybuttonuninstalled'); 70 | temp = addToIndicator(temp, window.sectionExtentU[sid], 'registrybuttonupdate'); 71 | temp = addToIndicator(temp, window.sectionExtentR[sid], 'registrybuttonrevert'); 72 | document.getElementById('sectionindicator'+sid).innerHTML = temp; 73 | } 74 | function setIndicatorForSubsection(sid) { 75 | var temp = addToIndicator('', window.subsectionExtentI[sid], 'registrybuttoninstalled'); 76 | temp = addToIndicator(temp, window.subsectionExtentD[sid], 'registrybuttonuninstalled'); 77 | temp = addToIndicator(temp, window.subsectionExtentU[sid], 'registrybuttonupdate'); 78 | temp = addToIndicator(temp, window.subsectionExtentR[sid], 'registrybuttonrevert'); 79 | document.getElementById('subsectionindicator'+sid).innerHTML = temp; 80 | } 81 | function openSection(sid) { 82 | document.getElementById('sectionitems'+sid).className = 'registrysectionitemsopen'; 83 | document.getElementById('sectionindicator'+sid).innerHTML = ''; 84 | } 85 | function closeSection(sid) { 86 | document.getElementById('sectionitems'+sid).className = 'registrysectionitemsclosed'; 87 | setIndicatorForSection(sid); 88 | } 89 | function maybeCloseSection(sid, updating) { 90 | if ((updating == 1) && (document.getElementById('sectionitems'+sid).className != 'registrysectionitemsclosed')) { 91 | return; 92 | } 93 | document.getElementById('sectionitems'+sid).className = 'registrysectionitemsclosed'; 94 | setIndicatorForSection(sid); 95 | } 96 | function toggleSection(sid) { 97 | if (document.getElementById('sectionitems'+sid).className == 'registrysectionitemsclosed') { 98 | openSection(sid); 99 | } else { 100 | closeSection(sid); 101 | } 102 | } 103 | function openSubsection(ssid) { 104 | document.getElementById('subsectionitems'+ssid).className = 'registrysectionitemsopen'; 105 | document.getElementById('subsectionindicator'+ssid).innerHTML = ''; 106 | } 107 | function closeSubsection(ssid) { 108 | document.getElementById('subsectionitems'+ssid).className = 'registrysectionitemsclosed'; 109 | setIndicatorForSubsection(ssid); 110 | } 111 | function maybeCloseSubsection(ssid, updating) { 112 | if ((updating == 1) && (document.getElementById('subsectionitems'+ssid).className != 'registrysectionitemsclosed')) { 113 | return; 114 | } 115 | document.getElementById('subsectionitems'+ssid).className = 'registrysectionitemsclosed'; 116 | setIndicatorForSubsection(ssid); 117 | } 118 | function toggleSubsection(ssid) { 119 | if (document.getElementById('subsectionitems'+ssid).className == 'registrysectionitemsclosed') { 120 | openSubsection(ssid); 121 | } else { 122 | closeSubsection(ssid); 123 | } 124 | } 125 | function updateButtonLabels() { 126 | if (window.getAllLength == 0) { 127 | document.getElementById('getall').innerHTML = 'ALL DOWNLOADED'; 128 | document.getElementById('getall').className = 'registrybuttons registrybuttoninstalled'; 129 | } else { 130 | if (window.getAllLength == 1) { 131 | document.getElementById('getall').innerHTML = 'DOWNLOAD 1 EXTENSION'; 132 | } else { 133 | document.getElementById('getall').innerHTML = 'DOWNLOAD ' + window.getAllLength + ' EXTENSIONS'; 134 | } 135 | document.getElementById('getall').className = 'registrybuttons registrybuttonuninstalled'; 136 | } 137 | if (window.updateListLength == 0) { 138 | document.getElementById('updateall').innerHTML = 'ALL UP TO DATE'; 139 | document.getElementById('updateall').className = 'registrybuttons registrybuttoninstalled'; 140 | } else { 141 | if (window.updateListLength == 1) { 142 | document.getElementById('updateall').innerHTML = 'UPDATE 1 EXTENSION'; 143 | } else { 144 | document.getElementById('updateall').innerHTML = 'UPDATE ' + window.updateListLength + ' EXTENSIONS'; 145 | } 146 | document.getElementById('updateall').className = 'registrybuttons registrybuttonupdate'; 147 | } 148 | } 149 | function clearSectionExtents(sid) { 150 | window.sectionExtentI[sid] = 0; 151 | window.sectionExtentD[sid] = 0; 152 | window.sectionExtentU[sid] = 0; 153 | window.sectionExtentR[sid] = 0; 154 | } 155 | function clearSubsectionExtents(ssid) { 156 | window.subsectionExtentI[ssid] = 0; 157 | window.subsectionExtentD[ssid] = 0; 158 | window.subsectionExtentU[ssid] = 0; 159 | window.subsectionExtentR[ssid] = 0; 160 | } 161 | function resetCounts(updating) { 162 | clearExtents(); 163 | setupResources(); 164 | maybeCloseSubsections(updating); 165 | updateButtonLabels(); 166 | } 167 | -------------------------------------------------------------------------------- /docs/v11/source/include/section_heading.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 13 | 19 | 20 |
4 | §{section-mark of: {SECTIONID}}.  5 | 7 | 8 | 9 | {section-title of: {SECTIONID}} 10 | 11 | 12 | 14 |      15 | 16 | 17 | 18 |
21 | -------------------------------------------------------------------------------- /docs/v11/source/include/structure.js: -------------------------------------------------------------------------------- 1 | function setupResources() \{ 2 | {resources in: ALL} 3 | query({ID}, 4 | {section of: {ID}}, 5 | {subsection of: {ID}}, 6 | '{author of: {ID} escape: quotes}', 7 | '{title of: {ID} escape: quotes}', 8 | 'Version {version of: {ID}}', 9 | 'library:/resources/Extensions/{author of: {ID} escape: both}/{title of: {ID} escape: both}.i7x?id={ID}'); 10 | {end-resources} 11 | \} 12 | function downloadSucceeded(itemid) \{ 13 | {resources in: ALL} 14 | if (itemid == {ID}) \{ openSection({section of: {ID}}); openSubsection({subsection of: {ID}}); \} 15 | {end-resources} 16 | resetCounts(1); 17 | \} 18 | function clearExtents() \{ 19 | {sections} 20 | clearSectionExtents({SECTIONID}); 21 | {subsections in: {SECTIONID}} 22 | clearSubsectionExtents({SUBSECTIONID}); 23 | {end-subsections} 24 | {end-sections} 25 | \} 26 | function maybeCloseSubsections(updating) \{ 27 | {sections} 28 | maybeCloseSection({SECTIONID}, updating); 29 | {subsections in: {SECTIONID}} 30 | maybeCloseSubsection({SUBSECTIONID}, updating); 31 | {end-subsections} 32 | {end-sections} 33 | \} 34 | function showJustHeadings() \{ 35 | {sections} 36 | closeSection({SECTIONID}); 37 | {end-sections} 38 | \} 39 | function showHeadingsAndSubheadings() \{ 40 | {sections} 41 | openSection({SECTIONID}); 42 | {subsections in: {SECTIONID}} 43 | closeSubsection({SUBSECTIONID}); 44 | {end-subsections} 45 | {end-sections} 46 | \} 47 | function showEverything() \{ 48 | {sections} 49 | openSection({SECTIONID}); 50 | {subsections in: {SECTIONID}} 51 | openSubsection({SUBSECTIONID}); 52 | {end-subsections} 53 | {end-sections} 54 | \} 55 | -------------------------------------------------------------------------------- /docs/v11/source/include/subsection_heading.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 13 | 19 | 20 |
4 | §{subsection-mark of: {SUBSECTIONID}}.  5 | 7 | 8 | 9 | {subsection-title of: {SUBSECTIONID}} 10 | 11 | 12 | 14 |      15 | 16 | 17 | 18 |
21 | -------------------------------------------------------------------------------- /docs/v11/source/index-linux.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css platform: linux} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/v11/source/index-macos.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css platform: macos} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/v11/source/index-windows.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css platform: windows} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/v11/source/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Extensions 6 | {include-css} 7 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 22 |
16 | 17 | 19 | {include file:description.html} 20 |
23 | 24 | 25 | 26 | 45 | 46 |
27 |
28 | {include file:filters.html} 29 | {sections} 30 | {process file:section_heading.html} 31 |
32 | {subsections in: {SECTIONID}} 33 | {process file:subsection_heading.html} 34 |
35 | {resources in: {SUBSECTIONID}} 36 | {process file:resource.html} 37 | {end-resources} 38 |
39 | {end-subsections} 40 |
41 | {end-sections} 42 |
43 | {include file:mass_download_buttons.html} 44 |
47 | 48 | -------------------------------------------------------------------------------- /docs/v11/source/pl404-linux.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css platform: linux} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/v11/source/pl404-macos.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css platform: macos} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/v11/source/pl404-windows.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css platform: windows} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/v11/source/pl404.html: -------------------------------------------------------------------------------- 1 | Extensions 2 | {include-css} 3 | 4 | 5 | 6 | 7 | 10 | 11 |
8 | {include file:description404.html} 9 |
12 | 13 | 14 | --------------------------------------------------------------------------------