Rules

Making new rulebooks 


Rules occurring at given times

When play begins 
Every turn 
When play ends 

Rules taking place when scenes begin and end can be found in the Scenes index.


Rules governing actions

Before 

Reaching inside 
        can't reach inside rooms rule
        can't reach inside closed containers rule
        outcome  allow access - a success
        outcome  deny access - a failure
Reaching outside 
        can't reach outside closed containers rule
        outcome  allow access - a success
        outcome  deny access - a failure
Visibility 
        can't act in the dark rule
        outcome  there is sufficient light - a failure
        outcome  there is insufficient light - a success

Instead of 
        default outcome is failure

After 
        default outcome is success

Does the player mean 
        taking something which is carried by the player  very unlikely to mean taking what's already carried rule
        outcome  it is very likely - a success
        outcome  it is likely - a success
        outcome  it is possible - a success
        outcome  it is unlikely - a success
        outcome  it is very unlikely - a success
Persuasion 
        outcome  persuasion succeeds - a success
        outcome  persuasion fails - a failure
Unsuccessful attempt by 
        default outcome is success

Rules for checking, carrying out and reporting on actions can be found in the Actions index. Summary of action rules 


Before, for and after activities

Printing the name 
    before     a thing (called the item being printed)  make named things mentioned rule
    for         standard name printing rule
        default outcome is success
Printing the plural name 
    for         something (called the item)  standard printing the plural name rule
        default outcome is success
Printing a number 
    for         something (called the item)  standard printing a number of something rule
        default outcome is success
Printing room description details 
Listing contents 
    for         standard contents listing rule
        default outcome is success
Grouping together 
Writing a paragraph about 
Listing nondescript items 
Printing the name of a dark room 
Printing the description of a dark room 
Printing the announcement of darkness 
Printing the announcement of light 
    for         look around once light available rule
        default outcome is success
Printing a refusal to act in the dark 
Constructing the status line 
Printing the banner text 
Reading a command 
Deciding the scope 
Deciding the concealed possessions 
Deciding whether all includes 
        outcome  it does not - a failure
        outcome  it does - a success
Clarifying the parser's choice 
Asking which do you mean 
Printing a parser error 
Supplying a missing noun 
    for         while an actor smelling  ambient odour rule
    for         while an actor listening  ambient sound rule
    for         while an actor going  block vaguely going rule
        default outcome is success
Supplying a missing second noun 
Implicitly taking 
Starting the virtual machine 
Amusing a victorious player 
Printing the player's obituary 
    for         print obituary headline rule
    for         print final score rule
    for         display final status line rule
        default outcome is success
Handling the final question
    before     print the final question rule
    before     print the final prompt rule
    before     read the final answer rule
    for         standard respond to final question rule
        default outcome is success
Printing the locale description 
    before     initialise locale description rule
    before     find notable locale objects rule
    for         interesting locale paragraphs rule
    for         you-can-also-see rule
        default outcome is success
Choosing notable locale objects 
    for         standard notable locale objects rule
        default outcome is success
Printing a locale paragraph about 
    for         a thing (called the item)  don't mention player's supporter in room descriptions rule
    for         a thing (called the item)  don't mention scenery in room descriptions rule
    for         a thing (called the item)  don't mention undescribed items in room descriptions rule
    for         a thing (called the item)  set pronouns from items in room descriptions rule
    for         a thing (called the item)  offer items to writing a paragraph about rule
    for         a thing (called the item)  use initial appearance in room descriptions rule
    for         a thing (called the item)  describe what's on scenery supporters in room descriptions rule
        default outcome is success

What are activities?  How to make new activities 


Procedural rules

Procedural 


Some internally-used rulebooks

Startup rules 
        virtual machine startup rule
        initialise memory rule
        seed random number generator rule
        update chronological records rule
        position player in model world rule
        start in the correct scenes rule
        when play begins stage rule
        fix baseline scoring rule
        display banner rule
        initial room description rule
Turn sequence rules
        parse command rule
        generate action rule
        (consider the scene changing rules)
        every turn stage rule
        timed events rule
        advance time rule
        update chronological records rule
        (consider the scene changing rules)
        adjust light rule
        note object acquisitions rule
        notify score changes rule
Shutdown rules
        when play ends stage rule
        print player's obituary rule
        resurrect player if asked rule
        ask the final question rule


Action-processing rules
        announce items from multiple object lists rule
        set pronouns from items from multiple object lists rule
        before stage rule
        basic visibility rule
        basic accessibility rule
        carrying requirements rule
        instead stage rule
        requested actions require persuasion rule
        carry out requested actions rule
        descend to specific action-processing rule
        end action-processing in success rule
Specific action-processing rules
        work out details of specific action rule
        investigate player's awareness before action rule
        check stage rule
        carry out stage rule
        after stage rule
        investigate player's awareness after action rule
        report stage rule
        (rule succeeds)
Player's action awareness rules
        player aware of his own actions rule
        player aware of actions by visible actors rule
        player aware of actions on visible nouns rule
        player aware of actions on visible second nouns rule