X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=inflibqr%2Finflibqr.md;h=713e86a78762741f7b8b227cc99078ca87f003b8;hb=4ec96204c811bcc0d8b339e2aab326a017fe397a;hp=67fdb4e8a262d6b9b0a488a471491864e2fa8b65;hpb=0fa050c78301278308a5d2897cb9660a6db821c0;p=inform-resources.git diff --git a/inflibqr/inflibqr.md b/inflibqr/inflibqr.md index 67fdb4e..713e86a 100644 --- a/inflibqr/inflibqr.md +++ b/inflibqr/inflibqr.md @@ -47,4 +47,148 @@ Library constants In addition to the standard constants `true` (1), `false` (0) and `nothing` (0), the Library defines `NULL` (-1) for an action, property -or pronoun whose current value is undefined. \ No newline at end of file +or pronoun whose current value is undefined. + +User-defined constants +---------------------- + +Some constants control features rather than represent values. + +AMUSING_PROVIDED - Activates the `Amusing` entry_point. + +DEATH_MENTION_UNDO - Offers "UNDO the last move" when the game is +over. + +DEBUG - Activates the debug commands. + +Headline = "*string*" - **Mandatory**: the game style, copyright +information, etc. + +MANUAL_PRONOUNS - Pronouns reflect only objects mentioned by the +player. + +MAX_CARRIED = *expr* - Maximum number of direct possessions that the +player can carry (default 100). + +MAX_SCORE = *expr* - Maximum game score (default 0). + +MAX_TIMERS = *expr* - Maximum number of active timers/daemons +(default 32). + +NO_PLACES - The "`OBJECTS`" and "`PLACES`" verbs are not allowed. + +NUMBER_TASKS = *expr* - Number of `scored` tasks to be performed +(default 1). + +OBJECT_SCORE = *expr* - For taking a `scored` object for the first +time (default 4). + +ROOM_SCORE = *expr* - For visiting a `scored` room for the first time +(default 5). + +SACK_OBJECT = *object* - A `container` object where the game places +held objects. + +Story = "*string*" - **Mandatory**: the name of the story. + +TASKS_PROVIDED - Activates the task scoring system. + +USE_MODULES - Activates linking with pre-compiled library modules. + +WITHOUT_DIRECTIONS - De-activates standard compass directions (bar +"IN" and "OUT"). Place alternative directions in the compass. + +Library variables +----------------- + +action - The current *action*. + +actor - The target of an instruction: the player, or an NPC. + +deadflag - Normally 0: 1 indicates a regular death, 2 indicates that +the player has won, 3 or more denotes a user-defined end. + +inventory_stage - Used by `invent` and `list_together` properties. + +keep_silent - Normally false; true makes most group 2 actions silent. + +location - The player's current room; unless that's dark, when it +contains `thedark`, `real_location` contains the room. + +notify_mode - Normally `true`: `false` remains silent when score +changes. + +noun - The primary focus object for the current action. + +player - The object acting on behalf of the human player. + +real_location -The player's current room when in the dark. + +score - The current score. + +second - The secondary focus object for the current action. + +self - The object which received a message. (Note: a run-time +variable, not a compile-time constant.) + +sender - The object which sent a message (or `nothing`). + +task_scores - A byte array holding scores for the task scoring +system. + +the_time - The game's clock, in minutes 0..1439 since midnight. + +turns - The game's turn counter. + +wn - The input stream word number, counting from 1. + +Library routines +---------------- + +Achieved(*expr*) - A scored task has been achieved. + +AfterRoutines() - In a group 2 action, controls output of 'after' +messages. + +AllowPushDir() - An object can be pushed from one location to another. + +Banner() - Prints the game banner. + +ChangePlayer(*object*,*flag*) - Player assumes the persona of the +*object*. If the optional *flag* is *true*, room descriptions include +"(as *object*)". + +CommonAncestor(*object1*,*object2*) - Returns the nearest object which +a parental relationship to both *objects*, or `nothing`. + +DictionaryLookup(*byte_array*,*length*) - Returns address of word in +dictionary, or 0 if not found. + +DrawStatusLine() - Refreshes the status line. + +GetGNAOfObject(*object*) - Returns gender-number-animation 0..11 of +the *object*. + +HasLightSource(*object*) - Returns `true` if the *object* has light. + +IndirectlyContains(*parent_object*,*object*) - Returns true if object +is currently a child or grand-child or great-grand-child... of the +*parent_object*. + +IsSeeThrough(*object*) - Returns `true` if light can pass through the +*object*. + +Locale(*object*,"*string1*","*string2*") - Describes the contents of +object, and returns their number. After objects with own paragraphs, +the rest are listed preceded by *string1* or *string2*. + +LoopOverScope(*routine*,*actor*) - Calls *routine*(*object*) for each +*object* in scope. If the optional *actor* is supplied, that defines +the scope. + +MoveFloatingObjects() - Adjusts positions of game's `found_in` +objects. + +NextWord() - Returns the next dictionary word in the input stream, +incrementing *wn* by one. Returns `false` if the word is not in the +dictionary, or if the input stream is exhausted. \ No newline at end of file