The Four-Eyed Guide to TADS 3 by David Welbourn index


Default minimal behavior

Empty Room

EmptyRoom: Room 'Empty Room' ;

look matches VerbRule(Look) which invokes LookAction. Assuming that the player character is in a room and that there's light in the room, LookAction calls gActor.lookAround(true), which in turn calls gActor.location.lookAroundPov(gActor, gActor, true), which calls (via recursion) the outermost visible location with lookAroundWithin(gActor, gActor, true).

Most of the work of looking around is managed by the Thing.lookAroundWithin method. It calls self.lookAroundWithinName to provide the name of the location when used as a room and encloses it with <.roomname> and <./roomname> tags to give it the roomname style, normally bold. lookAroundwithinName prints either the location's roomName or roomDarkName as appropriate, plus the actor's posture (if any). The default values for roomName and roomDarkName are and libMessages.roomDarkName respectively.

Likewise, lookAroundWithin calls self.lookAroundWithinDesc to provide the description of the location when used as a room and encloses it with <.roomdesc> and <./roomdesc> tags to give it the roomdesc style, normally plain. The value of lookAroundWithinDesc will be either self.roomDarkDesc (if the room is too dark, default value: libMessages.roomDarkDesc), or self.roomFirstDesc (if this is the first time the room has been seen, default value: self.roomDesc), or self.roomDesc (default value for a Room is self.desc; default value for a Thing is gActor.listActorPosture(gActor)). Since our Empty Room wasn't defined with a desc method value, no description was printed.

For this minimal example, we'll assume there aren't things or exits here that need to be listed, and ignore how that gets done for now.

Simple Looking

Endless tracks of sand surround you, and every direction looks much the same.

Desert: OutdoorRoom 'Desert'
  "Endless tracks of sand surround you, and every direction looks much the same. "

Summary of library references to looking around


Short description

DefineIAction(Look) Defines class LookAction: IAction.
Note: DefineIAction(name) is a macro defined in adv3.h. Note: IAction is a class defined in action.t.


Short description

Actor.lookAround(verbose) Calls location.lookAroundPov(self, self, verbose) to do the work.


Short description

Thing.lookAround(actor, verbose)
Thing.lookAroundPov(actor, pov, verbose)
Thing.lookAroundWithin(actor, pov, verbose)
Thing.lookAroundWithinName(actor, illum)
Thing.lookAroundWithinDesc(actor, illum)
Thing.lookAroundWithinContents(actor, illum, infoTab)
Thing.lookAroundWithinSense(actor, pov, sense, lister)
Thing.lookAroundWithinShowExits(actor, illum)


Short description

VerbRule(Look) Associates the grammar "look" with LookAction.
Note: VerbRule(tag) is a macro defined in en_us.h. Note: LookAction is defined in actions.t via DefineIAction(Look); see above.


Short description

libMessages.roomDarkName 'In the dark'
libMessages.roomDarkDesc "It's pitch black. "
playerActionMessages.newlyDark 'It is now pitch black. '