advlite.hfile | source file

TADS 3 Library - main header

This file provides definitions of macros, properties, and other identifiers used throughout the library and in game source.

Each source code file in the library and in a game should generally #include this header near the top of the source file.

Summary of Classes

(none)

Summary of Global Functions

(none)

Summary of Macros

`_STRINGIZE _STRINGIZE abort abortImplicit accFor accList ADV3_H AHREF_Plain aobjFor aobjList asAccFor asAobjFor asDobjFor asDobjWithoutActionFor asDobjWithoutVerifyFor asExit asIobjFor asIobjWithoutActionFor asIobjWithoutVerifyFor askForAcc askForAobj askForDobj askForIobj asObjFor asObjWithoutActionFor asObjWithoutVerifyFor AudioLink BMsg BMsg cannotTouchMsg checkHitMsg checkTouchMsg ConversationLullReason dangerous DefaultTopicReason DefineAction DefineIAction DefineLiteralAction DefineLiteralTAction DefineNumericAction DefineNumericTAction DefineSystemAction DefineTAction DefineTActionSub DefineTIAAction DefineTIAActionSub DefineTIAction DefineTIActionSub DefineTopicAction DefineTopicTAction DefSignal DMsg DMsg dobjFor dobjList exit exitAction exitCommandLine feelResponseMsg gAcc gAction gActionIn gActionIs gActionList gActionListObj gActionListStr gActor gAobj gCommand gCommandToks gDobj gExitLister gExtraHintManager gHintManager gInformed gIobj gLastAction gLastCommand gLibMessages gLiteral gLocation gMessageParams gNumber goInstead goNested gOutStream gPlayerChar gReveal gRevealed gRoom gSetKnown gSetSeen gTentativeDobj gTentativeIobj gTopic gTopicMatch gTopicText gTravelActionIs gTurns gVerbPhrase gVerbWord gVerifyList hitResponseMsg IfDebug IfDebug illogical illogicalAlready illogicalNow illogicalSelf implausible inaccessible InitiateConversationReason input iobjFor iobjList isEatable isPotable isTouchable literalAcc literalAobj literalDobj literalIobj logical logicalRank M_DOWN M_PREV M_QUIT M_SEL M_UP MatchAdj MatchNoApprox MatchNoTrunc MatchNoun MatchPartMask MatchPhrase MatchPlural MatchPrep MatchStrengthMask MatchWeak more Msg multiAcc multiAobj multiDobj multiIobj nextrule nonObvious nostop numberDobj numericAcc numericAobj numericDobj numericIobj objFor reportAfter rnull SelArbitrary SelDefault SelDisambig SelPlural SelProg setPastTense singleAcc singleAobj singleDir singleDobj singleIobj stop STRINGIZE STRINGIZE topicAcc topicAobj topicDobj topicIobj touchDesc tSel VerbRule VideoLink waitKey withPast withPresent`

Summary of Enums

`ClosedGoal feminine FootnotesFull FootnotesMedium FootnotesOff indirectLockable large lockableWithKey lockableWithoutKey manyToMany manyToOne masculine medium neuter normalRelation notLockable null oneToMany oneToOne OpenGoal OtherObject reverseRelation rmcAskLiteral rmcAskObject rmcCommand rmcDisambig rmcOops small UndiscoveredGoal`

Summary of Templates

`Achievement ActorState AltTopic AltTopic ClockEvent DefaultConsultTopic DefaultThought DefaultTopic Doer Door Door Enterable Enterable EventList ExtraHint Footnote Goal Hint MenuItem MenuLongTopicItem MenuTopicItem MiscTopic MiscTopic NodeContinuationTopic NodeContinuationTopic QueryTopic QueryTopic QueryTopic QueryTopic QueryTopic QueryTopic Region Relation Room Room Rule SensoryEmanation ShuffledEventList string string string string string string string string string string string string string string string StyleTag SymConnector SymConnector SymPassage SymPassage SymPassage Test Test Thing Topic TopicEntry TopicEntry TopicEntry TopicEntry TopicGroup TravelConnector TravelConnector Unthing`

Global Functions

(none)

Macros

`_STRINGIZE (x)` | `advlite.h[265]`

`#@x`
A couple of utility macros we use internally for turning macro values into strings. STRINGIZE(x) expands any macros in its argument and then turns the result into a single-quoted string, which can then be used in regular program text or in directives that evaluate constant expressions, such as #if. (STRINGIZE is the real macro; _STRINGIZE is needed to force expansion of any macros in the argument, which is required because of the weird ANSI C expansion-order rules, and which works because of same.)

`_STRINGIZE (x)` | `advlite.h[952]`

`#@x`
A couple of utility macros we use internally for turning macro values into strings. STRINGIZE(x) expands any macros in its argument and then turns the result into a single-quoted string, which can then be used in regular program text or in directives that evaluate constant expressions, such as #if. (STRINGIZE is the real macro; _STRINGIZE is needed to force expansion of any macros in the argument, which is required because of the weird ANSI C expansion-order rules, and which works because of same.)

`abort` | `advlite.h[691]`

`throw new AbortActionSignal()`
a concise macro to throw an Abort signal

`abortImplicit` | `advlite.h[688]`

`throw new AbortImplicitSignal()`
a concise macro to throw an AbortImplicitSignal

`accFor (action)` | `advlite.h[625]`

`objFor(Aobj, action)`
no description available

`accList` | `advlite.h[74]`

`nounList->accMatch`
no description available

`ADV3_H` | `advlite.h[16]`

``
no description available

`AHREF_Plain` | `advlite.h[699]`

`0x0001 /* plain text hyperlink (no underline/color) */`
aHref() flags

`aobjFor (action)` | `advlite.h[623]`

`objFor(Aobj, action)`
no description available

`aobjList` | `advlite.h[75]`

`nounList->accMatch`
no description available

`asAccFor (action)` | `advlite.h[626]`

`asObjFor(Aobj, action)`
no description available

`asAobjFor (action)` | `advlite.h[624]`

`asObjFor(Aobj, action)`
no description available

`asDobjFor (action)` | `advlite.h[429]`

`asObjFor(Dobj, action)`
no description available

`asDobjWithoutActionFor (action)` | `advlite.h[449]`

`asObjWithoutActionFor(Dobj, action)`
no description available

`asDobjWithoutVerifyFor (action)` | `advlite.h[461]`

`asObjWithoutVerifyFor(Dobj, action)`
no description available

`asExit (dir)` | `advlite.h[477]`

`: UnlistedProxyConnector { direction = dir##Dir }`
no description available

`asIobjFor (action)` | `advlite.h[430]`

`asObjFor(Iobj, action)`
no description available

`asIobjWithoutActionFor (action)` | `advlite.h[450]`

`asObjWithoutActionFor(Iobj, action)`
no description available

`asIobjWithoutVerifyFor (action)` | `advlite.h[462]`

`asObjWithoutVerifyFor(Iobj, action)`
no description available

`askForAcc (action)` | `advlite.h[467]`

`askMissingObject(action, AccessoryObject)`
no description available

`askForAobj (action)` | `advlite.h[466]`

`askMissingObject(action, AccessoryObject)`
no description available

`askForDobj (action)` | `advlite.h[464]`

`askMissingObject(action, DirectObject)`
no description available

`askForIobj (action)` | `advlite.h[465]`

`askMissingObject(action, IndirectObject)`
no description available

`asObjFor (obj, Action)` | `advlite.h[419]`

`{ \
preCond { return preCond##obj##Action; } \
verify() { verify##obj##Action; } \
remap() { return remap##obj##Action; } \
check() { check##obj##Action; } \
action() { action##obj##Action; } \
report() { report##obj##Action; } \
}`
Treat an object definition as equivalent to another object definition. These can be used immediately after a dobjFor() or iobjFor() to treat the first action as though it were the second. So, if the player types "search box", and we want to treat the direct object the same as for "look in box", we could make this definition for the box:

dobjFor(Search) asDobjFor(LookIn)

Note that no semicolon is needed after this definition, and that this definition is completely in lieu of a regular property set for the object action.

In general, a mapping should NOT change the role of an object: dobjFor(X) should not usually be mapped using asIobjFor(Y), and iobjFor(X) shouldn't be mapped using asDobjFor(Y). The problem with changing the role is that the handler routines often assume that the object is actually in the role for which the handler was written; a verify handler might refer to '{dobj}' in generating a message, for example, so reversing the roles would give the wrong object in the role.

Role reversals should always be avoided, but can be used if necessary under conditions where all of the code involved in the TARGET of the mapping can be carefully controlled to ensure that it doesn't make assumptions about object roles, but only references 'self'. Reversing roles in a mapping should never be attempted in general-purpose library code, because code based on the library could override the target of the role-reversing mapping, and the override could fail to observe the restrictions on object role references.

Note that role reversals can almost always be handled with other mechanisms that handle reversals cleanly. Always consider Doer.doInstead() first when confronted with a situation that seems to call for a role-reversing asObjFor() mapping, as doInstead() specifically allows for object role changes.

`asObjWithoutActionFor (obj, Action)` | `advlite.h[440]`

`{ \
preCond { return preCond##obj##Action; } \
verify() { verify##obj##Action; } \
remap() { return remap##obj##Action(); } \
check() { check##obj##Action; } \
action() { } \
}`
Define mappings of everything except the action. This can be used in cases where we want to pick up the verification, preconditions, and check routines from another handler, but not the action. This is often useful for two-object verbs where the action processing is entirely provided by one or the other object, so applying it to both would be redundant.

`asObjWithoutVerifyFor (obj, Action)` | `advlite.h[452]`

`{ \
preCond { return preCond##obj##Action; } \
remap() { return remap##obj##Action(); } \
check() { check##obj##Action; } \
action() { action##obj##Action(); } \
report() { report##obj##Action(); } \
}`
no description available

`AudioLink` | `advlite.h[1214]`

`1`
Communication Link Types

AudioLink means audio communication only is available VideoLink means both audio and visual links are available.

`BMsg (id, txt, args, ...)` | `advlite.h[1021]`

`buildMessage(#@id, txt, ##args)`
no description available

`BMsg (id, txt, args, ...)` | `advlite.h[1024]`

`buildMessage(#@id, nil, ##args)`
no description available

`cannotTouchMsg` | `advlite.h[1245]`

`cannotFeelMsg`
no description available

`checkHitMsg` | `advlite.h[1247]`

`checkAttackMsg`
no description available

`checkTouchMsg` | `advlite.h[1242]`

`checkFeelMsg`
Define some synonyms for potentially confusing property names

`ConversationLullReason` | `advlite.h[830]`

`2`
no description available

`dangerous` | `advlite.h[672]`

`gAction.addVerifyResult(new VerifyResult(90, '', true, self, nil))`
no description available

`DefaultTopicReason` | `advlite.h[831]`

`3`
no description available

`DefineAction (name, baseClass, ...)` | `advlite.h[496]`

`name: ##baseClass \
baseActionClass = name`
Define an action OBJECT with the given name inheriting from the given base class, for use with the Mercury parser.

`DefineIAction (name)` | `advlite.h[512]`

`DefineAction(name, IAction)`
Define a concrete IAction, given the root name for the action. We'll automatically generate a class with name XxxAction.

`DefineLiteralAction (name)` | `advlite.h[539]`

`DefineAction(name, LiteralAction)`
no description available

`DefineLiteralTAction (name)` | `advlite.h[536]`

`DefineTActionSub(name, LiteralTAction)`
no description available

`DefineNumericAction (name)` | `advlite.h[551]`

`DefineAction(name, NumericAction)`
no description available

`DefineNumericTAction (name)` | `advlite.h[548]`

`DefineTActionSub(name, NumericTAction)`
no description available

`DefineSystemAction (name)` | `advlite.h[505]`

`DefineAction(name, SystemAction)`
Define a "system" action. System actions are meta-game commands, such as SAVE and QUIT, that generally operate the user interface and are not part of the game world.

`DefineTAction (name)` | `advlite.h[521]`

`DefineTActionSub(name, TAction)`
Define a concrete TAction, given the root name for the action. We'll automatically generate a class with name XxxAction, a verProp with name verXxx, a checkProp with name checkXxx, and an actionProp with name actionDobjXxx.

`DefineTActionSub (name, cls)` | `advlite.h[527]`

`DefineAction(name, cls) \
verDobjProp = &verifyDobj##name \
remapDobjProp = &remapDobj##name \
preCondDobjProp = &preCondDobj##name \
checkDobjProp = &checkDobj##name \
actionDobjProp = &actionDobj##name \
reportDobjProp = &reportDobj##name \
`
Define a concrete TAction with a specific base class.

`DefineTIAAction (name)` | `advlite.h[595]`

`DefineTIAActionSub(name, TIAAction)`
The following macros relating to the TIAAction class are only relevant when the TIAAction extension is used. The macros are nevertheless included here for convenience when using the TIAAction extension.

Define a concrete TIAAction, given the root name for the action. We'll automatically generate a class with name XxxAction, a verDobjProp with name verDobjXxx, a verIobjProp with name verIobjxxx, a checkDobjProp with name checkDobjXxx, a checkIobjProp with name checkIobjXxx, an actionDobjProp with name actionDobjXxx, and an actionIobjProp with name actionIobjXxx.

`DefineTIAActionSub (name, cls)` | `advlite.h[601]`

`DefineAction(name, cls) \
verDobjProp = &verifyDobj##name \
verIobjProp = &verifyIobj##name \
verAobjProp = &verifyAobj##name \
remapDobjProp = &remapDobj##name \
remapIobjProp = &remapIobj##name \
remapAobjProp = &remapAobj##name \
preCondDobjProp = &preCondDobj##name \
preCondIobjProp = &preCondIobj##name \
preCondAobjProp = &preCondAobj##name \
checkDobjProp = &checkDobj##name \
checkIobjProp = &checkIobj##name \
checkAobjProp = &checkAobj##name \
actionDobjProp = &actionDobj##name \
actionIobjProp = &actionIobj##name \
actionAobjProp = &actionAobj##name \
reportDobjProp = &reportDobj##name \
reportIobjProp = &reportIobj##name \
reportAobjProp = &reportAobj##name \
`
Define a concrete TIAction with a specific base class.

`DefineTIAction (name)` | `advlite.h[563]`

`DefineTIActionSub(name, TIAction)`
Define a concrete TIAction, given the root name for the action. We'll automatically generate a class with name XxxAction, a verDobjProp with name verDobjXxx, a verIobjProp with name verIobjxxx, a checkDobjProp with name checkDobjXxx, a checkIobjProp with name checkIobjXxx, an actionDobjProp with name actionDobjXxx, and an actionIobjProp with name actionIobjXxx.

`DefineTIActionSub (name, cls)` | `advlite.h[569]`

`DefineAction(name, cls) \
verDobjProp = &verifyDobj##name \
verIobjProp = &verifyIobj##name \
remapDobjProp = &remapDobj##name \
remapIobjProp = &remapIobj##name \
preCondDobjProp = &preCondDobj##name \
preCondIobjProp = &preCondIobj##name \
checkDobjProp = &checkDobj##name \
checkIobjProp = &checkIobj##name \
actionDobjProp = &actionDobj##name \
actionIobjProp = &actionIobj##name \
reportDobjProp = &reportDobj##name \
reportIobjProp = &reportIobj##name \
`
Define a concrete TIAction with a specific base class.

`DefineTopicAction (name)` | `advlite.h[545]`

`DefineAction(name, TopicAction)`
no description available

`DefineTopicTAction (name)` | `advlite.h[542]`

`DefineTActionSub(name, TopicTAction)`
no description available

`DefSignal (sig, nam)` | `advlite.h[1297]`

`sig##Signal: Signal \
name = #@nam\
handleProp = &handle_##sig`
Definitions for the Signals Extension

`DMsg (id, txt, args, ...)` | `advlite.h[1020]`

`message(#@id, txt, ##args)`
DMsg() - default English library message cover macro.

Whenever the library displays a message, it uses the DMsg() macro. The arguments are a message ID, and the default English message text to display. The message ID is a string that identifies the message; this is used to look for overriding customizations of the message. Refer to the CustomMessages class for information on customizing the standard library messages.

In our approach, the library defines the default English text of the messages in-line, directly in the code. On the surface, this is contrary to standard practices in most modern programming projects, which strive to make translations easier by separating the message text from the program code, gathering all of the text into a central message file that can be replaced for each language. Despite appearances, we're accomplishing the same thing - but in our system, we have the advantage that we *also* define the default English message text in-line as part of the code it applies to. This makes it easier to read the code by keeping a message and its full context in one place; this way you don't have to shuttle between the code and message file.

Here's how we accomplish the message separation required for translations, and also for games that wish to customize the library defaults. The DMsg() macro requires both the default English message text *and* an ID key for the message. The message display function receives both. The display function proceeds to look up the ID key in a translation table; if it finds an entry, it uses the version of the message in the translation table instead of the English default passed in via DMsg(). A language module can provide a message table that defines the language translations, and a game can provide a table that further customizes the library messages to fit its narrative style.

There's one additional element. Translators and game authors need to be able to see all of the messages in one place, so they can create their tables. We would seem to lack that central list of English messages. Fortunately, by using a standard macro for each message, we can extract a comprehensive English message list automatically via a special tool. We use this as part of the library release process to create the English message file for reference.

Note that the macro expansion includes the default English text only in English builds. It omits the text in non-English builds. This is to save space - we assume that the English messages will all be overridden anyway by each translated library version, so there's no point in including their text in the final compiled program.

`DMsg (id, txt, args, ...)` | `advlite.h[1023]`

`message(#@id, nil, ##args)`
no description available

`dobjFor (action)` | `advlite.h[375]`

`objFor(Dobj, action)`
no description available

`dobjList` | `advlite.h[94]`

`nounList->dobjMatch`
Also add a couple of synonyms familiar froma adv3

`exit` | `advlite.h[682]`

`throw new ExitSignal()`
a concise macro to throw an ExitSignal

`exitAction` | `advlite.h[685]`

`throw new ExitActionSignal()`
a concise macro to throw an ExitActionSignal

`exitCommandLine` | `advlite.h[845]`

`throw new ExitCommandLineSignal()`
Terminate execution of the command line. This aborts the current command, including any remaining object iterations for the current action, and discards anything else on the command line.

`feelResponseMsg` | `advlite.h[1243]`

`touchResponseMsg`
no description available

`gAcc` | `advlite.h[628]`

`gAction.curAobj`
no description available

`gAction` | `advlite.h[294]`

`(libGlobal.curAction)`
the Action object of the command being executed

`gActionIn (action, ...)` | `advlite.h[318]`

`(gAction != nil \
&& (action#foreach/gAction.ofKind(action)/||/))`
is the current global action ANY of the specified actions?

`gActionIs (action)` | `advlite.h[314]`

`(gAction != nil && gAction.ofKind(action))`
Determine if the current global action is the specified action. Only the action prefix is needed - so use "Take" rather than "TakeAction" here.

This tests to see if the current global action is an instance of the given action class - we test that it's an instance rather than the action class itself because the parser creates an instance of the action when it matches the action's syntax.

`gActionList` | `advlite.h[327]`

`(nilToList(gCommand.action.actionList))`
the list of objects involved in the action just completed

`gActionListObj` | `advlite.h[338]`

`(object: Thing \
{ \
plural = (gAction.reportList.length > 1 || \
gAction.reportList[1].plural); \
isIt = (gAction.reportList.length == 1 ? \
gAction.reportList[1].isIt : nil);\
isHim = (gAction.reportList.length == 1 ? \
gAction.reportList[1].isHim : nil);\
isHer = (gAction.reportList.length == 1 ? \
gAction.reportList[1].isHer : nil);\
name = gActionListStr; \
qualified = true; \
} )`
an object that is singular or plural according to whether gActionList represents a single object of a plurality of objects, and which picks up the correct gender if there is only a single object.

`gActionListStr` | `advlite.h[330]`

`makeListStr(gCommand.action.reportList, &theName)`
a displaying string version of the above

`gActor` | `advlite.h[279]`

`(libGlobal.curActor)`
the actor performing the current command

`gAobj` | `advlite.h[627]`

`gAction.curAobj`
no description available

`gCommand` | `advlite.h[295]`

`(libGlobal.curCommand)`
no description available

`gCommandToks` | `advlite.h[1147]`

`(gCommand == nil || gCommand.verbProd == nil ? [] \
: gCommand.verbProd.tokenList.mapAll({t: getTokVal(t)}))`
Get the command tokens for the current command.

`gDobj` | `advlite.h[287]`

`(gAction.curDobj)`
For convenience, define some macros that return the current direct and indirect objects from the current action. The library only uses direct and indirect objects, so games that define additional command objects will have to add their own similar macros for those.

`gExitLister` | `advlite.h[880]`

`(libGlobal.exitListerObj)`
the exit lister object - if the exits module isn't included in the game, this will be nil

`gExtraHintManager` | `advlite.h[893]`

`(libGlobal.extraHintManagerObj)`
the extra hint manager object - if the hints module isn't included in the game, this will be nil

`gHintManager` | `advlite.h[886]`

`(libGlobal.hintManagerObj)`
the hint manager object - if the hints module isn't included in the game, this will be nil

`gInformed (key)` | `advlite.h[1234]`

`(getActor.informedAbout(key))`
has a topic key been revealed to an NPC through <.inform>?

`gIobj` | `advlite.h[288]`

`(gAction.curIobj)`
no description available

`gLastAction` | `advlite.h[301]`

`(libGlobal.lastAction)`
The previous action and command

`gLastCommand` | `advlite.h[302]`

`(libGlobal.lastCommand)`
no description available

`gLibMessages` | `advlite.h[874]`

`(libGlobal.libMessageObj)`
The current library messages object. This is the source object for messages that don't logically relate to the actor carrying out the comamand. It's mostly used for meta-command replies, and for text fragments that are used to construct descriptions.

This message object isn't generally used for parser messages or action replies - most of those come from the objects given by the current actor's getParserMessageObj() or getActionMessageObj(), respectively.

By default, this is set to libMessages. The library never changes this itself, but a game can change this if it wants to switch to a new set of messages during a game. (If you don't need to change messages during a game, but simply want to customize some of the default messages, you don't need to set this variable - you can simply use 'modify libMessages' instead. This variable is designed for cases where you want to *dynamically* change the standard messages during the game.)

`gLiteral` | `advlite.h[289]`

`(gAction.literal)`
no description available

`gLocation` | `advlite.h[362]`

`(gPlayerChar.location)`
get the player character's location

`gMessageParams (var, ...)` | `advlite.h[1064]`

`(gAction.setMessageParams(var#foreach/#@var, var/,/))`
Some message processors add their own special parameters to messages, because they want to use expansion parameters (in the "{the dobj/him}" format) outside of the set of objects directly involved in the command.

The Action method setMessageParam() lets you define such a parameter, but for convenience, we define this macro for setting one or more parameters whose names exactly match their local variable names. In other words, if you call this macro like this:

gMessageParams(obj, cont)

then you'll get one parameter with the text name 'obj' whose expansion will be the value of the local variable obj, and another with text name 'cont' whose expansion is the value of the local variable cont.

`gNumber` | `advlite.h[290]`

`(gAction.num)`
no description available

`goInstead (dirn)` | `advlite.h[471]`

`doInstead(Go, dirn##Dir)`
Convenience macros for synthesizing travel in a given compass direction

`goNested (dirn)` | `advlite.h[472]`

`doNested(Go, dirn##Dir)`
no description available

`gOutStream` | `advlite.h[1042]`

`(outputManager.curOutputStream)`
no description available

`gPlayerChar` | `advlite.h[359]`

`(libGlobal.playerChar)`
get the current player character Actor object

`gReveal (key)` | `advlite.h[1227]`

`(libGlobal.setRevealed(key))`
reveal a topic key, as though through <.reveal>

`gRevealed (key)` | `advlite.h[1224]`

`(libGlobal.revealedNameTab[key] != nil)`
has a topic key been revealed through <.reveal>?

`gRoom` | `advlite.h[371]`

`(gPlayerChar.getOutermostRoom)`
get the player character's current room (which may or may not be the same as his/her location)

`gSetKnown (obj)` | `advlite.h[1230]`

`(gPlayerChar.setKnowsAbout(obj))`
mark a Topic/Thing as known/seen by the player character

`gSetSeen (obj)` | `advlite.h[1231]`

`(gPlayerChar.setHasSeen(obj))`
no description available

`gTentativeDobj` | `advlite.h[297]`

`(gCommand.dobjs.mapAll({x: x.obj}).toList)`
no description available

`gTentativeIobj` | `advlite.h[298]`

`(gCommand.iobjs.mapAll({x: x.obj}).toList)`
no description available

`gTopic` | `advlite.h[377]`

`(gAction.curTopic)`
no description available

`gTopicMatch` | `advlite.h[379]`

`(gTopic.getBestMatch)`
no description available

`gTopicText` | `advlite.h[378]`

`(gTopic.getTopicText)`
no description available

`gTravelActionIs (dirn)` | `advlite.h[323]`

`(gAction != nil && gAction.ofKind(Travel) && gAction.direction == dirn ## Dir)`
is the current action a Travel action going dirn

`gTurns` | `advlite.h[365]`

`(libGlobal.totalTurns)`
get the current turn count

`gVerbPhrase` | `advlite.h[1151]`

`(gCommand.getCommandPhrase())`
Get the command phrase for the current command.

`gVerbWord` | `advlite.h[1143]`

`(gCommand == nil || gCommand.verbProd == nil ? '' \
: getTokVal(gCommand.verbProd.tokenList[1]))`
Get the first word the player entered for the current command.

`gVerifyList` | `advlite.h[636]`

`gAction.verifyList`
Macros for use in verify routines, returning various kinds of verify results

`hitResponseMsg` | `advlite.h[1248]`

`attackResponseMsg`
no description available

`IfDebug (key, code)` | `advlite.h[1036]`

`if (DebugCtl.enabled[#@key]) { code; } else { }`
Debugging. When we compile in development mode, we'll include a number of functions and methods that display information for debugging purposes. We omit these in release builds to keep the compiled file size smaller, and to avoid making it too easy for end users to snoop around in the program internals.

`IfDebug (key, code)` | `advlite.h[1039]`

``
no description available

`illogical (msg)` | `advlite.h[640]`

`gAction.addVerifyResult(new VerifyResult(30, msg, nil, self))`
no description available

`illogicalAlready (msg)` | `advlite.h[654]`

`gAction.addVerifyResult(new VerifyResult(40, msg, nil, self))`
IllogicalAlready doesn't do anything different from IllogicalNow in adv3Lite, but is supplied so that game authors familiar with adv3 can use it without getting a compilation error. It may also be slightly useful for documentary purposes to clarify why a verify routine in game code is ruling out an action.

`illogicalNow (msg)` | `advlite.h[643]`

`gAction.addVerifyResult(new VerifyResult(40, msg, nil, self))`
no description available

`illogicalSelf (msg)` | `advlite.h[657]`

`gAction.addVerifyResult(new VerifyResult(20, msg, nil, self))`
no description available

`implausible (msg)` | `advlite.h[666]`

`gAction.addVerifyResult(new VerifyResult(35, msg, nil, self))`
no description available

`inaccessible (msg)` | `advlite.h[663]`

`gAction.addVerifyResult(new VerifyResult(10, msg, nil, self))`
no description available

`InitiateConversationReason` | `advlite.h[829]`

`1`
Define convenient named constants for use with ConvAgendaItem

`input (x, ...)` | `advlite.h[1256]`

`inputManager.getInputLine(x)`
no description available

`iobjFor (action)` | `advlite.h[376]`

`objFor(Iobj, action)`
no description available

`iobjList` | `advlite.h[95]`

`nounList->iobjMatch`
no description available

`isEatable` | `advlite.h[1115]`

`isEdible`
The library uses isEdible rather than isEatable, since edible is the more natural word to use, but strict consistency might have dictated isEatable, so we make it an effective synonym in case some game authors use it.

`isPotable` | `advlite.h[1122]`

`isDrinkable`
Conversely, authors alive to the Latin root of edible might try the latinate isPotable instead of isDrinable.

`isTouchable` | `advlite.h[1244]`

`isFeelable`
no description available

`literalAcc` | `advlite.h[85]`

`literalPhrase->accMatch`
no description available

`literalAobj` | `advlite.h[86]`

`literalPhrase->accMatch`
no description available

`literalDobj` | `advlite.h[83]`

`literalPhrase->dobjMatch`
no description available

`literalIobj` | `advlite.h[84]`

`literalPhrase->iobjMatch`
no description available

`logical` | `advlite.h[638]`

`gAction.addVerifyResult (new VerifyResult(100, '', true, self))`
no description available

`logicalRank (score)` | `advlite.h[660]`

`gAction.addVerifyResult(new VerifyResult(score, '', true, self))`
no description available

`M_DOWN` | `advlite.h[1079]`

`4`
no description available

`M_PREV` | `advlite.h[1077]`

`2`
no description available

`M_QUIT` | `advlite.h[1076]`

`1`
The indices for the key values used to navigate menus, which are held in the keyList array of MenuItems.

`M_SEL` | `advlite.h[1080]`

`5`
no description available

`M_UP` | `advlite.h[1078]`

`3`
no description available

`MatchAdj` | `advlite.h[134]`

`0x0002`
matched an adjective (the phrase contains at least one adjective)

`MatchNoApprox` | `advlite.h[153]`

`0x1000`
all words were matched WITHOUT character approximations (such as matching 'a' to 'a-umlaut')

`MatchNoTrunc` | `advlite.h[156]`

`0x2000`
all words were matched WITHOUT truncation

`MatchNoun` | `advlite.h[137]`

`0x0004`
matched a noun (the phrase contains at least one noun word)

`MatchPartMask` | `advlite.h[146]`

`0x0FFF`
mask to select only the part-of-speech flags

`MatchPhrase` | `advlite.h[143]`

`0x0010`
matched a phrase

`MatchPlural` | `advlite.h[140]`

`0x0008`
matched a plural (the phrase contains at least one plural word)

`MatchPrep` | `advlite.h[125]`

`0x0001`
matched a preposition (the phrase contains at least one preposition)

`MatchStrengthMask` | `advlite.h[159]`

`0xF000`
mask to select only the match-strength flags

`MatchWeak` | `advlite.h[131]`

`0x0001`
matched a weak token (which we'll treat as equivalent to matchimg a preposition).

`more` | `advlite.h[1255]`

`inputManager.pauseForMore()`
Define some macros to give abbreviated synonyms to inputManager method

`Msg (id, txt)` | `advlite.h[967]`

`#@id, txt`
Msg() - define a custom message to override a library message. 'id' is the message ID, which is the same ID used for the DMsg() message that you wish to override. Do NOT use quotes around the ID - just enter it as though it were a variable name. 'txt' is the message text, as a single-quoted string.

This is used in CustomMessages objects to define message overrides. See CustomMessages for full details.

`multiAcc` | `advlite.h[76]`

`nounList->accMatch`
no description available

`multiAobj` | `advlite.h[77]`

`nounList->accMatch`
no description available

`multiDobj` | `advlite.h[72]`

`nounList->dobjMatch`
no description available

`multiIobj` | `advlite.h[73]`

`nounList->iobjMatch`
no description available

`nextrule` | `advlite.h[1277]`

`return (rulebook.contValue)`
no description available

`nonObvious` | `advlite.h[669]`

`gAction.addVerifyResult(new VerifyResult(30, '', true, self, nil))`
no description available

`nostop` | `advlite.h[1278]`

`return (rulebook.contValue)`
no description available

`numberDobj` | `advlite.h[78]`

`numberPhrase->dobjMatch`
no description available

`numericAcc` | `advlite.h[90]`

`numberPhrase -> accMatch`
no description available

`numericAobj` | `advlite.h[91]`

`numberPhrase -> accMatch`
no description available

`numericDobj` | `advlite.h[88]`

`numberPhrase -> dobjMatch`
no description available

`numericIobj` | `advlite.h[89]`

`numberPhrase -> iobjMatch`
no description available

`objFor (which, action)` | `advlite.h[373]`

`propertyset '*' ## #@which ## #@action`
no description available

`reportAfter (msg)` | `advlite.h[381]`

`gCommand.afterReports += msg`
no description available

`rnull` | `advlite.h[1276]`

`return null`
Convenient abbreviations for rules that want to allow their RuleBook to continue processing more rules.

`SelArbitrary` | `advlite.h[196]`

`0x0002`
This object was chosen arbitrarily from a larger set, because the noun phrase construction says we should do so. This flag is set when the noun phrase is something TAKE A BOOK or TAKE ANY OF THE BOOKS.

`SelDefault` | `advlite.h[210]`

`0x0008`
We selected an object as a default. This is set when the player leaves out a noun phrase, but we can guess what was probably meant based on context: e.g., ASK ABOUT THE HOUSE is probably directed to Bob if Bob is the only person nearby.

`SelDisambig` | `advlite.h[189]`

`0x0001`
The noun phrase required disambiguation, because more than one object was in scope that matched the noun phrase. We were able to figure out which one(s) the player meant from context, without having to ask the player for help.

For example, there are two doors in the room, one open and one closed. The player types OPEN DOOR. It's fairly obvious that they must be talking about the closed door. So, we choose that object and set the Disambig flag.

(Note that this flag specifically does NOT mean that we had to ask the user for help with the dreaded "Which do you mean..." question. It's kind of the opposite: it means that we had a noun phrase that was initially ambiguous, but that we managed to disambiguate it on our own. When we get the user involved, there's ambiguity *before* we ask the question, but the user's response removes the ambiguity by telling us exactly which alternative they intended. This flag indicates that we made an educated guess about what the user must have intended, without asking. The flag lets the parser tell the player about the guess, which is desirable because the guess is sometimes wrong.

`SelPlural` | `advlite.h[202]`

`0x0004`
The noun phrase that we matched was a manifestly plural construction, such as TAKE ALL or TAKE THE BOOKS.

`SelProg` | `advlite.h[218]`

`0x1000`
This object was set internally by the program; it did not come from parsing any player input. This generally means that the whole command was constructed by the program, to handle an event or other internal processing, rather than by parsing player input.

`setPastTense (val)` | `advlite.h[905]`

`(gameMain.usePastTense = (val))`
Set the current narrative tense. Use val = true for past and val = nil for present.

`singleAcc` | `advlite.h[70]`

`singleNoun->accMatch`
no description available

`singleAobj` | `advlite.h[71]`

`singleNoun->accMatch`
no description available

`singleDir` | `advlite.h[87]`

`directionName->dirMatch`
no description available

`singleDobj` | `advlite.h[68]`

`singleNoun->dobjMatch`
Verb rule noun phrase macros. These are convenience macros for specifying the most common noun phrase slots in the grammar templates for verb rules.

`singleIobj` | `advlite.h[69]`

`singleNoun->iobjMatch`
no description available

`stop` | `advlite.h[1264]`

`return stopValue;`
Definitions for the rules.t extension

`STRINGIZE (x)` | `advlite.h[266]`

`_STRINGIZE(x)`
no description available

`STRINGIZE (x)` | `advlite.h[953]`

`_STRINGIZE(x)`
no description available

`topicAcc` | `advlite.h[81]`

`topicPhrase->accMatch`
no description available

`topicAobj` | `advlite.h[82]`

`topicPhrase->accMatch`
no description available

`topicDobj` | `advlite.h[79]`

`topicPhrase->dobjMatch`
no description available

`topicIobj` | `advlite.h[80]`

`topicPhrase->iobjMatch`
no description available

`touchDesc` | `advlite.h[1246]`

`feelDesc`
no description available

`tSel (presVal, pastVal)` | `advlite.h[911]`

`(gameMain.usePastTense ? (pastVal) : (presVal))`
Shorthand macro for selecting one of two values depending on the current narrative tense.

`VerbRule (tag)` | `advlite.h[61]`

`grammar predicate(tag):`
The VerbRule macro starts the definition of a verb grammar rule. The tag is just an identifying name for the rule, so that you can refer to it with 'replace' or 'modify'.

`VideoLink` | `advlite.h[1215]`

`2`
no description available

`waitKey (x, ...)` | `advlite.h[1257]`

`inputManager.getKey(x)`
no description available

`withPast (callback)` | `advlite.h[919]`

`(withTense(true, (callback)))`
no description available

`withPresent (callback)` | `advlite.h[918]`

`(withTense(nil, (callback)))`
Temporarily override the current narrative tense and invoke a callback function.

Enums

`ClosedGoal OpenGoal UndiscoveredGoal` | `advlite.h[1184]`

Enums for Goals in the Hint system

`feminine masculine neuter` | `advlite.h[853]`

no description available

`FootnotesFull FootnotesMedium FootnotesOff` | `advlite.h[1187]`

Enums for Footnotes

`indirectLockable lockableWithKey lockableWithoutKey notLockable` | `advlite.h[851]`

enums for different types of lock:

`large` | `advlite.h[1168]`

Large - the object is large enough that its details can be sensed from a distance or through an obscuring medium.

`manyToMany manyToOne oneToMany oneToOne` | `advlite.h[1287]`

Definitions for the relations.t extension

`medium` | `advlite.h[1175]`

Medium - the object can be sensed at a distance or when obscured, but not in any detail. Most objects fall into this category. Note that things that are parts of large objects should normally be medium.

`normalRelation reverseRelation` | `advlite.h[1290]`

no description available

`null` | `advlite.h[1270]`

Null value to return from Rules that don't stop a RuleBook from continuing to consider rules.

`OtherObject` | `advlite.h[938]`

A special role for the "other" object of a two-object command. This can be used in certain contexts (such as remapTo) where a particular object role is implied by the context, and where the action involved has exactly two objects; OtherObject in such contexts means DirectObject when the implied role is IndirectObject, and vice versa.

`rmcAskLiteral` | `advlite.h[248]`

reading a response to a prompt for a missing literal phrase

`rmcAskObject` | `advlite.h[245]`

reading a response to a prompt for a missing object phrase

`rmcCommand` | `advlite.h[239]`

reading a normal command line

`rmcDisambig` | `advlite.h[251]`

reading a response to an interactive disambiguation prompt

`rmcOops` | `advlite.h[242]`

reading an unknown word response, to check for an "oops" command

`small` | `advlite.h[1181]`

Small - the object cannot be sensed at a distance at all. This is appropriate for detailed parts of medium-class objects.

Templates

`Achievement` | `advlite.h[708]`

`+points? "desc";`
An achievement defines its descriptive text. It can also optionally define the number of points it awards.

`ActorState` | `advlite.h[744]`

`"specialDesc" 'stateDesc' | "stateDesc" ?;`
no description available

`AltTopic` | `advlite.h[819]`

`"topicResponse" | [eventList];`
AltTopics just specify the response text or list

`AltTopic` | `advlite.h[820]`

`[firstEvents] [eventList];`
no description available

`ClockEvent` | `advlite.h[1193]`

`[eventTime];`
Template for ClockEvent

`DefaultConsultTopic` | `advlite.h[809]`

`"topicResponse" | [eventList];`
no description available

`DefaultThought` | `advlite.h[810]`

`"topicResponse" | [eventList];`
no description available

`DefaultTopic` | `advlite.h[808]`

`"topicResponse" | [eventList];`
no description available

`Doer` | `advlite.h[822]`

`'cmd';`
no description available

`Door` | `advlite.h[731]`

`'vocab' @location? "desc"? ->otherSide;`
no description available

`Door` | `advlite.h[732]`

`->otherSide 'vocab' @location? "desc"?;`
no description available

`Enterable` | `advlite.h[737]`

`inherited ->connector;`
no description available

`Enterable` | `advlite.h[738]`

`->connector inherited;`
no description available

`EventList` | `advlite.h[1101]`

`[eventList];`
templates for EventLists

`ExtraHint` | `advlite.h[1096]`

`+hintDelay? "hintText" | [eventList];`
A Template to facilitate the definition of ExtraHints. We can define it here and not in a header file since ExtraHints are only defined in this

`Footnote` | `advlite.h[1190]`

`"desc";`
Template for Footnotes

`Goal` | `advlite.h[1088]`

`->closeWhenAchieved? 'title' 'heading'? [menuContents];`
templates for hint system objects

`Hint` | `advlite.h[1089]`

`'hintText' [referencedGoals]?;`
no description available

`MenuItem` | `advlite.h[1083]`

`'title' 'heading'?;`
some templates for defining menu items

`MenuLongTopicItem` | `advlite.h[1085]`

`'title' 'heading'? 'menuContents';`
no description available

`MenuTopicItem` | `advlite.h[1084]`

`'title' 'heading'? [menuContents];`
no description available

`MiscTopic` | `advlite.h[813]`

`"topicResponse" | [eventList];`
miscellanous topics just specify the response text or list

`MiscTopic` | `advlite.h[814]`

`[firstEvents] [eventList];`
no description available

`NodeContinuationTopic` | `advlite.h[815]`

`"topicResponse" | [eventList];`
no description available

`NodeContinuationTopic` | `advlite.h[816]`

`[firstEvents] [eventList];`
no description available

`QueryTopic` | `advlite.h[774]`

`+matchScore? 'matchPattern' "topicResponse" | [eventList] ?;`
no description available

`QueryTopic` | `advlite.h[778]`

`+matchScore? 'matchPattern' [firstEvents] [eventList];`
no description available

`QueryTopic` | `advlite.h[782]`

`+matchScore? 'qtype' @matchObj | [matchObj] | 'matchPattern' "topicResponse" | [eventList] ?;`
no description available

`QueryTopic` | `advlite.h[788]`

`+matchScore? 'qtype' @matchObj | [matchObj] | 'matchPattern' [firstEvents] [eventList];`
a ShuffledEventList version of the above

`QueryTopic` | `advlite.h[794]`

`+matchScore? 'qtype' @matchObj | [matchObj] 'matchPattern' "topicResponse" | [eventList] ?;`
we can also include *both* the match object/list *and* pattern

`QueryTopic` | `advlite.h[801]`

`+matchScore? 'qtype' @matchObj | [matchObj] 'matchPattern' [firstEvents] [eventList];`
a ShuffledEventList version of the above

`Region` | `advlite.h[729]`

`[rooms];`
no description available

`Relation` | `advlite.h[1288]`

`'name' 'reverseName'? @relationType? +reciprocal?;`
no description available

`Room` | `advlite.h[726]`

`'roomTitle' 'vocab' "desc"?;`
no description available

`Room` | `advlite.h[727]`

`'roomTitle' "desc"?;`
no description available

`Rule` | `advlite.h[1280]`

`@location? &action | [action]?;`
no description available

`SensoryEmanation` | `advlite.h[742]`

`inherited [eventList]?;`
no description available

`ShuffledEventList` | `advlite.h[1102]`

`[firstEvents] [eventList];`
no description available

`string` | `advlite.h[1129]`

`<> mentionA;`
String templates for room descriptions etc.

`string` | `advlite.h[1130]`

`<> mentionA;`
no description available

`string` | `advlite.h[1131]`

`<> mentionThe;`
no description available

`string` | `advlite.h[1132]`

`<< list of * is >> listStrIs;`
no description available

`string` | `advlite.h[1133]`

`<< list of * >> makeListInStr;`
no description available

`string` | `advlite.h[1134]`

`<< is list of * >> isListStr;`
no description available

`string` | `advlite.h[1135]`

`<< exclude * >> makeMentioned;`
no description available

`string` | `advlite.h[1196]`

`<> takeTime;`
String Templates for Objective Time module

`string` | `advlite.h[1197]`

`<> takeTime;`
no description available

`string` | `advlite.h[1198]`

`<> takeTime;`
no description available

`string` | `advlite.h[1199]`

`<> takeTime;`
no description available

`string` | `advlite.h[1201]`

`<> addTime;`
no description available

`string` | `advlite.h[1202]`

`<> addTime;`
no description available

`string` | `advlite.h[1203]`

`<> addTime;`
no description available

`string` | `advlite.h[1204]`

`<> addTime;`
no description available

`StyleTag` | `advlite.h[716]`

`'tagName' 'openText'? 'closeText'?;`
Templates for style tags

`SymConnector` | `advlite.h[1305]`

`->destination;`
Definitions for the SymConn Extension

`SymConnector` | `advlite.h[1306]`

`@room1 @room2;`
no description available

`SymPassage` | `advlite.h[1308]`

`->destination 'vocab' "desc"?;`
no description available

`SymPassage` | `advlite.h[1309]`

`'vocab' ->destination "desc"?;`
no description available

`SymPassage` | `advlite.h[1310]`

`'vocab' @room1 @room2 "desc"?;`
no description available

`Test` | `advlite.h[825]`

`'testName' [testList] @location? [testHolding]?;`
Templates for use with test sequences

`Test` | `advlite.h[826]`

`'testName' [testList] [testHolding]? @location?;`
no description available

`Thing` | `advlite.h[723]`

`'vocab' @location? "desc"?;`
Object definition templates

`Topic` | `advlite.h[724]`

`'vocab' @familiar?;`
no description available

`TopicEntry` | `advlite.h[749]`

`+matchScore? @matchObj | [matchObj] | 'matchPattern' "topicResponse" | [eventList] ?;`
no description available

`TopicEntry` | `advlite.h[755]`

`+matchScore? @matchObj | [matchObj] | 'matchPattern' [firstEvents] [eventList];`
a ShuffledEventList version of the above

`TopicEntry` | `advlite.h[761]`

`+matchScore? @matchObj | [matchObj] 'matchPattern' "topicResponse" | [eventList] ?;`
we can also include *both* the match object/list *and* pattern

`TopicEntry` | `advlite.h[768]`

`+matchScore? @matchObj | [matchObj] 'matchPattern' [firstEvents] [eventList];`
a ShuffledEventList version of the above

`TopicGroup` | `advlite.h[746]`

`+scoreBoost? 'convKeys' | [convKeys] ? ;`
no description available

`TravelConnector` | `advlite.h[734]`

`'vocab'? @location? "desc"? ->destination;`
no description available

`TravelConnector` | `advlite.h[735]`

`->destination "travelDesc";`
no description available

`Unthing` | `advlite.h[740]`

`'vocab' @location? 'notHereMsg'?;`
no description available

Adv3Lite Library Reference Manual
Generated on 28/03/2016 from adv3Lite version 1.5