en_us.h file | source file

TADS 3 Library - US English header

This file defines common properties, macros, and other identifiers used throughout the US English modules of the TADS 3 library.

Summary of Classes

(none)

Summary of Global Functions

(none)

Summary of Macros

`dobjList iobjList setPastTense singleDir singleDobj singleIobj singleLiteral singleNumber singleTopic tSel VerbRule withPast withPresent`

Summary of Enums

(none)

Summary of Templates

`Actor DeadEndConnector Enterable Exitable NoTravelMessage OneWayRoomConnector Passage Room Thing ThingState TravelMessage Unthing VocabObject`

Global Functions

(none)

Macros

`dobjList` | `en_us.h[158]`

`nounList->dobjMatch`
no description available

`iobjList` | `en_us.h[159]`

`nounList->iobjMatch`
no description available

`setPastTense (val)` | `en_us.h[175]`

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

`singleDir` | `en_us.h[163]`

`directionName->dirMatch`
no description available

`singleDobj` | `en_us.h[156]`

`singleNoun->dobjMatch`
no description available

`singleIobj` | `en_us.h[157]`

`singleNoun->iobjMatch`
no description available

`singleLiteral` | `en_us.h[162]`

`literalPhrase->literalMatch`
no description available

`singleNumber` | `en_us.h[160]`

`numberPhrase->numMatch`
no description available

`singleTopic` | `en_us.h[161]`

`topicPhrase->topicMatch`
no description available

`tSel (presVal, pastVal)` | `en_us.h[181]`

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

`VerbRule (tag)` | `en_us.h[155]`

`grammar predicate(tag):`
Convenience macros for defining command grammar.

A command's grammar is defined via a 'grammar' rule definition for the 'predicate' production; the VerbRule macro can be used for better readability.

Within a command grammar rule, there are several commonly-used object roles assigned to single-noun or noun-list phrases. We provide the singleDobj, dobjList, singleIobj, and iobjList macros to make these assignments more readable. In addition, number, topic, literal, and direction phrases can be assigned with singleNumber, singleTopic, singleLiteral, and singleDir, respectively.

`withPast (callback)` | `en_us.h[189]`

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

`withPresent (callback)` | `en_us.h[188]`

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

Enums

(none)

Templates

`Actor` | `en_us.h[94]`

`'vocabWords' 'name' @location? "npcDesc";`
For actors, we generally override the npcDesc or pcDesc rather than the base desc. For the standard templates, set the npcDesc, since most actors are NPC's rather than the player character.

`DeadEndConnector` | `en_us.h[126]`

`'apparentDestName'? "travelDesc" | [eventList];`
no description available

`Enterable` | `en_us.h[112]`

`->connector inherited;`
For enterables, allow special syntax to point to the connector which an actor uses to traverse into the enterable.

`Exitable` | `en_us.h[113]`

`->connector inherited;`
no description available

`NoTravelMessage` | `en_us.h[125]`

`"travelDesc" | [eventList];`
For connectors that don't go anywhere but do show a message on a travel attempt, we just need to specify the travel message.

`OneWayRoomConnector` | `en_us.h[106]`

`->destination;`
For one-way room connectors, provide special syntax to point to the destination room.

`Passage` | `en_us.h[100]`

`->masterObject inherited;`
For passages, allow special syntax to point to the master side of the passage.

`Room` | `en_us.h[87]`

`'roomName' 'destName'? 'name'? "desc"?;`
For rooms, we normally have no vocabulary words, but we do have a name and description, and optionally a "destination name" to use to describe connectors from adjoining rooms.

`Thing` | `en_us.h[80]`

`'vocabWords' 'name' @location? "desc"?;`
Define some templates that apply to ordinary objects (descendants of Thing).

`ThingState` | `en_us.h[135]`

`'listName_' +listingOrder?;`
ThingState objects

`TravelMessage` | `en_us.h[119]`

`->destination "travelDesc" | [eventList];`
For TravelMessage connectors, provide special syntax to specify the message and point to the destination.

`Unthing` | `en_us.h[132]`

`'vocabWords' 'name' @location? 'notHereMsg'?;`
Unthings are defined pretty much like Things, except they have no use for a desc, and frequently want a custom notHereMsg.

`VocabObject` | `en_us.h[74]`

`'vocabWords';`
Templates for the basic vocabulary object

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3