Actor class | actor.t[5670], en_us.t[2129]

An Actor is a living person, animal, or other entity with a will of its own. Actors can usually be addressed with targeted commands ("bob, go north"), and with commands like ASK ABOUT, TELL ABOUT, GIVE TO, and SHOW TO.

Note that, by default, an Actor can be picked up and moved with commands like TAKE, PUT IN, and so on. This is suitable for some kinds of actors but not for others: it might make sense with a cat or a small dog, but not with a bank guard or an orc. For an actor that can't be taken, use the UntakeableActor or one of its subclasses.

An actor's contents are the things the actor is carrying or wearing.

Modified in en_us.t[2129]:
Language modifications for Actor.

An Actor has a "referral person" setting, which determines how we refer to the actor; this is almost exclusively for the use of the player character. The typical convention is that we refer to the player character in the second person, but a game can override this on an actor-by-actor basis.

`class Actor : Thing Schedulable Traveler ActorTopicDatabase`

Superclass Tree (in declaration order)

`Actor`
`Thing`
`VocabObject`
`object`
`Schedulable`
`object`
`Traveler`
`TravelMessageHandler`
`object`
`ActorTopicDatabase`
`TopicDatabase`
`object`

Subclass Tree

`Actor`
`UntakeableActor`
`Person`

Global Objects

(none)

Summary of Properties

`accompanyingActors actorNotifyList agendaList antecedentTable boredomAgendaItem boredomCount bulkCapacity canMatch3rdPerson canMatchHer canMatchHim canMatchIt canMatchThem commandReferralPerson communicationSenses contentsListed convMgrID convNodeTab curConvNode curState excludeFromLookAroundList followables_ followingActor getTravelerActors getTravelerMotiveActors hearinglikeSenses holdingDescInventoryLister inventoryLister isActor isLikelyCommandTarget isListed isListedAboardVehicle isListedInContents isListedInInventory issueCommandsSynchronously knownProp lastConsulted lastConvTime lastDoorTraversed lastInterlocutor lastTravelBack lastTravelDest locationBefore locationLitBefore maxSingleBulk mostRecentAction name nextHoldingIndex nextRunTime pcReferralPerson pendingCommand pendingConv pendingResponse possAnaphorTable posture responseSetConvNode revertTargetActorAtEndOfSentence scheduleOrder scopeSenses seenProp sightlikeSenses smelllikeSenses specialDescBeforeContents specialDescOrder specialTraveler takeFromNotInMessage waitingForActor waitingForInfo weightCapacity`

Inherited from `Thing` :
`actorInAName actorInName actorInPrep actorIntoName actorOutOfName actorOutOfPrep aDisambigName allStates aName brightness bulk canBeHeard canBeSeen canBeSmelled canBeTouched circularlyInMessage collectiveGroup collectiveGroups contents contentsListedInExamine contentsListedSeparately contentsLister descContentsLister described disambigEquivName disambigName distantDesc distantInitSpecialDesc distantSpecialDesc distinguishers dummyName effectiveFollowLocation equivalenceKey equivalentGrouper equivalentGrouperClass equivalentGrouperTable esEndingPat explicitVisualSenseInfo getState globalParamName holdingIndex iesEndingPat initDesc initNominalRoomPartLocation initSpecialDesc inlineContentsLister isEquivalent isHer isHim isInInitState isKnown isMassNoun isPlural isProperName isQualifiedName isThingConstructed isTopLevel listName listWith location lookInLister moved nameDoes nameSays nameSees notTravelReadyMsg objectNotifyList objInPrep obscuredInitSpecialDesc obscuredSpecialDesc owner patElevenEighteen patIsAlpha patLeadingTagOrQuote patOfPhrase patOneLetterAnWord patOneLetterWord patSingleApostropheS patTagOrQuoteChar patUpperOrDigit patVowelY pluralDisambigName pluralName pronounSelector roomDarkName roomLocation roomName seen sightPresence sightSize smellPresence smellSize soundPresence soundSize specialContentsLister specialDesc specialDescListWith specialNominalRoomPartLocation suppressAutoSeen theDisambigName theName theNamePossNoun tmpAmbient_ tmpAmbientFill_ tmpAmbientWithin_ tmpFillMedium_ tmpObstructor_ tmpObstructorWithin_ tmpPathIsIn_ tmpTrans_ tmpTransWithin_ touchPresence touchSize verbCan verbCannot verbCant verbEndingSD verbEndingSEd verbEndingSMessageBuilder_ verbMust verbToCome verbToDo verbToGo verbToLeave verbToSay verbToSee verbWill verbWont weight`

Inherited from `VocabObject` :
`canResolvePossessive disambigPromptOrder pluralOrder vocabLikelihood vocabWords weakTokens`

Inherited from `Schedulable` :
`allSchedulables gameClockTime`

``

``

Inherited from `ActorTopicDatabase` :
`askForTopics askTopics commandTopics giveTopics initiateTopics miscTopics showTopics specialTopics tellTopics`

Inherited from `TopicDatabase` :
`limitSuggestions suggestedTopics topicGroupActive topicGroupScoreAdjustment`

Summary of Methods

`acceptCommand acceptCommandBusy actorAction actorActionFollow actorHereDesc actorListWith actorRoomNameStatus actorThereDesc actorTravel actorVerifyFollow addAccompanyingActor addActorNotifyItem addBusyTime addFirstPendingAction addFirstPendingCommand addPendingAction addPendingCommand addToAgenda addToContents adjustLookAroundTable afterAction afterTravel aName aNameObj beforeAction beforeTravel bestVisualInfo calcScheduleOrder canBeTalkedTo canHear cannotFollow cannotRespondToCommand canOwn canSee canSmell canTalkTo checkBulkChangeWithin checkDarkTravel checkMovingTravelerInto checkReadyToEnterNestedRoom checkStagingLocation checkTakeFromInventory checkWaitingForActor conjugateRegularVerb conversedThisTurn copyPronounAntecedentsFrom defaultAskForResponse defaultAskResponse defaultCommandResponse defaultConvResponse defaultGiveResponse defaultGoodbyeResponse defaultGreetingResponse defaultNoResponse defaultShowResponse defaultTellResponse defaultYesResponse descViaActorContainer disembark distantSpecialDesc dobjFor(AskAbout) dobjFor(AskFor) dobjFor(Drop) dobjFor(Kiss) dobjFor(PutIn) dobjFor(PutOn) dobjFor(PutUnder) dobjFor(Take) dobjFor(TalkTo) dobjFor(TellAbout) dobjFor(Throw) dobjFor(ThrowAt) dobjFor(ThrowDir) dobjFor(ThrowTo) endConversation examineListContents examineStatus excludeFromLookAround executeActorTurn executeAgenda executeTurn findVisualObstructor forEachTravelingActor forgetPossAnaphors getActionMessageObj getActorNotifyList getBulkHeld getCurrentInterlocutor getDefaultInterlocutor getDropDestination getFollowables getFollowInfo getLookAroundName getParserDeferredMessageObj getParserMessageObj getPossAnaphor getPronounAntecedent getPushTraveler getTopicOwner getTraveler getVisualAmbient getWeightHeld goToSleep handleConversation hasSeen hideFromAll hideFromDefault idleTurn impliedCommandMode initializeActor initiateConversation initiateTopic inventorySense inventorySenseInfoTable iobjFor(GiveTo) iobjFor(ShowTo) iobjFor(ThrowTo) isActorTraveling isLikelyTopic isLocationLit isPlayerChar knowsAbout knowsTopic listActorPosture lookAround makePosture meetsObjHeld mustMoveObjInto nonIdleTurn noteConditionsAfter noteConditionsBefore noteConsultation noteConvAction noteConversation noteConversationFrom noteObjectShown noteSeenBy notifyIssuerParseFailure notifyParseFailure notifyTopicResponse npcDesc obeyCommand okayPostureChange orderingTime pcDesc postureDesc readyForTurn referralPerson rememberLastDoor rememberTravel remoteSpecialDesc removeActorNotifyItem removeFromAgenda reverseLastTravel sayArriving sayArrivingDir sayArrivingDownStairs sayArrivingLocally sayArrivingThroughPassage sayArrivingUpStairs sayArrivingViaPath sayDeparting sayDepartingDir sayDepartingDownStairs sayDepartingLocally sayDepartingThroughPassage sayDepartingUpStairs sayDepartingViaPath sayGoodbye sayHello sayNo saySpecialTopic sayToActor sayTravelingRemotely sayYes scheduleInitiateConversation scopeList scriptedTravelTo setConvNode setConvNodeReason setCurState setHasSeen setHer setHim setIt setKnowsAbout setPossAnaphor setPossAnaphorObj setPronoun setPronounAntecedent setPronounByType setPronounMulti setPronounObj setSpecialTraveler setThem showInventory showInventoryWith showSpecialDescInContents specialDesc specialDescListWith standUp suggestTopics suggestTopicsFor trackFollowInfo travelerName travelerPreCond travelerTravelWithin travelTo travelWithin tryMakingRoomToHold tryMovingObjInto unexcludeFromLookAround verifyFollowable verifyNotSelf visibleInfoTable visibleInfoTableFromPov waitForIssuedCommand wantsFollowInfo`

Inherited from `Thing` :
`addAllContents addDirectConnections addObjectNotifyItem addToSenseInfoTable adjustThrowDestination allContents aNameFrom aNameOwnerLoc announceDefaultObject appendHeldContents atmosphereList baseMoveInto basicExamine basicExamineFeel basicExamineListen basicExamineSmell basicExamineTaste buildContainmentPaths cacheAmbientInfo cacheSenseInfo cacheSensePath canBeHeardBy canBeSeenBy canBeSensed canBeSmelledBy canBeTouchedBy canDetailsBeSensed canMatchPronounType canMoveViaPath cannotGoShowExits cannotReachObject cannotSeeSmellSource cannotSeeSoundSource canThrowViaPath canTouch canTouchViaPath checkActorOutOfNested checkBulkChange checkMoveViaPath checkThrowViaPath checkTouchViaPath checkTravelerDirectlyInRoom childInName childInNameGen childInNameWithOwner childInRemoteName clearSenseInfo cloneForMultiInstanceContents cloneMultiInstanceContents connectionTable construct contentsInFixedIn countDisambigName countListName countName countNameFrom countNameOwnerLoc darkRoomContentsLister defaultDistantDesc defaultObscuredDesc desc directionForConnector distantSmellDesc distantSoundDesc dobjFor(AskVague) dobjFor(AttachTo) dobjFor(Attack) dobjFor(AttackWith) dobjFor(Board) dobjFor(Break) dobjFor(Burn) dobjFor(BurnWith) dobjFor(Clean) dobjFor(CleanWith) dobjFor(Climb) dobjFor(ClimbDown) dobjFor(ClimbUp) dobjFor(Close) dobjFor(Consult) dobjFor(ConsultAbout) dobjFor(CutWith) dobjFor(Detach) dobjFor(DetachFrom) dobjFor(Dig) dobjFor(DigWith) dobjFor(Doff) dobjFor(Drink) dobjFor(Eat) dobjFor(Enter) dobjFor(EnterOn) dobjFor(Examine) dobjFor(Extinguish) dobjFor(Fasten) dobjFor(FastenTo) dobjFor(Feel) dobjFor(Flip) dobjFor(Follow) dobjFor(GetOffOf) dobjFor(GetOutOf) dobjFor(GiveTo) dobjFor(GoThrough) dobjFor(JumpOff) dobjFor(JumpOver) dobjFor(LieOn) dobjFor(Light) dobjFor(ListenTo) dobjFor(Lock) dobjFor(LockWith) dobjFor(LookBehind) dobjFor(LookIn) dobjFor(LookThrough) dobjFor(LookUnder) dobjFor(Move) dobjFor(MoveTo) dobjFor(MoveWith) dobjFor(Open) dobjFor(PlugIn) dobjFor(PlugInto) dobjFor(Pour) dobjFor(PourInto) dobjFor(PourOnto) dobjFor(Pull) dobjFor(Push) dobjFor(PushTravel) dobjFor(PutBehind) dobjFor(Read) dobjFor(Remove) dobjFor(Screw) dobjFor(ScrewWith) dobjFor(Search) dobjFor(Set) dobjFor(SetTo) dobjFor(ShowTo) dobjFor(SitOn) dobjFor(Smell) dobjFor(StandOn) dobjFor(Strike) dobjFor(Switch) dobjFor(TakeFrom) dobjFor(Taste) dobjFor(TellVague) dobjFor(Turn) dobjFor(TurnOff) dobjFor(TurnOn) dobjFor(TurnTo) dobjFor(TurnWith) dobjFor(TypeLiteralOn) dobjFor(TypeOn) dobjFor(Unfasten) dobjFor(UnfastenFrom) dobjFor(Unlock) dobjFor(UnlockWith) dobjFor(Unplug) dobjFor(UnplugFrom) dobjFor(Unscrew) dobjFor(UnscrewWith) dobjFor(Wear) examineListContentsWith examineSpecialContents failCheck feelDesc fillMedium findOpaqueObstructor findTouchObstructor forEachConnectedContainer forEachContainer fromPOV getAllForTakeFrom getAllPathsTo getAnnouncementDistinguisher getBagAffinities getBagsOfHolding getBestDistinguisher getBulk getBulkWithin getCarryingActor getCommonContainer getCommonDirectContainer getConnectedContainers getConnectorTo getContentsForExamine getDestName getEncumberingBulk getEncumberingWeight getExtraScopeItems getHitFallDestination getIdentityObject getInScopeDistinguisher getListedContents getLocPushTraveler getLocTraveler getMovePathTo getNoise getNominalDropDestination getNominalOwner getObjectNotifyList getOdor getOutermostRoom getOutermostVisibleRoom getRoomNotifyList getRoomPartLocation getStateWithInfo getStatuslineExitsHeight getThrowPathTo getTouchPathTo getTravelConnector getVisualSenseInfo getWeight hasCollectiveGroup initializeEquivalent initializeLocation initializeThing inRoomName iobjFor(AttachTo) iobjFor(AttackWith) iobjFor(BurnWith) iobjFor(CleanWith) iobjFor(CutWith) iobjFor(DetachFrom) iobjFor(DigWith) iobjFor(FastenTo) iobjFor(LockWith) iobjFor(MoveWith) iobjFor(PlugInto) iobjFor(PourInto) iobjFor(PourOnto) iobjFor(PutBehind) iobjFor(PutIn) iobjFor(PutOn) iobjFor(PutUnder) iobjFor(ScrewWith) iobjFor(TakeFrom) iobjFor(ThrowAt) iobjFor(TurnWith) iobjFor(UnfastenFrom) iobjFor(UnlockWith) iobjFor(UnplugFrom) iobjFor(UnscrewWith) isActorTravelReady isComponentOf isDirectlyIn isHeldBy isIn isInFixedIn isListed isListedInContents isListedInInventory isListedInRoomPart isLookAroundCeiling isNominallyIn isNominallyInRoomPart isOccludedBy isOrIsIn isOwnedBy isShipboard isVocabEquivalent itIs itNom itObj itPossAdj itPossNoun itVerb listCardinality localDirectionLinkForConnector lookAroundPov lookAroundWithin lookAroundWithinContents lookAroundWithinDesc lookAroundWithinName lookAroundWithinSense lookAroundWithinShowExits lookInDesc mainExamine mainMoveInto mapPushTravelHandlers mapPushTravelHandlers mapPushTravelHandlers mapPushTravelHandlers mapPushTravelHandlers mergeSenseInfo mergeSenseInfoTable moveInto moveIntoForTravel moveIntoNotifyPath nameIs nameIsnt nameVerb normalizePath notePromptByOwnerLoc notePromptByPossAdj notifyInsert notifyMoveInto notifyMoveViaPath notifyRemove obscuredDesc obscuredSmellDesc obscuredSoundDesc pluralNameFrom processThrow propHidesProp propWithPresent putInName receiveDrop remoteDesc remoteInitSpecialDesc remoteRoomContentsLister removeFromContents removeObjectNotifyItem restoreLocation roomActorThereDesc roomContentsLister roomDaemon roomDarkDesc roomDesc roomFirstDesc roomRemoteDesc roomTravelPreCond saveLocation selectPathTo sendNotifyInsert sendNotifyRemove senseAmbientMax senseInfoTable senseObj sensePathFromWithin sensePathFromWithout sensePathToContents sensePathToLoc sensePresenceList setAllSeenBy setContentsSeenBy setGlobalParamName setVisualSenseInfo shineFromWithin shineFromWithout shineOnContents shineOnLoc showDistantSpecialDesc showDistantSpecialDescInContents showInventoryContents showInventoryItem showInventoryItemCounted showListItem showListItemCounted showListItemCountedGen showListItemGen showObjectContents showObscuredSpecialDesc showObscuredSpecialDescInContents showRemoteSpecialDesc showRemoteSpecialDescInContents showSpecialDesc showSpecialDescInContentsWithInfo showSpecialDescWithInfo showStatuslineExits showWornItem showWornItemCounted smellDesc smellHereDesc soundDesc soundHereDesc specialDescList specialPathFrom statusName stopThrowViaPath superHidesSuper tasteDesc thatNom thatObj theNameFrom theNameObj theNameOwnerLoc theNameWithOwner throwTargetCatch throwTargetHitWith throwViaPath transmitAmbient transSensingIn transSensingOut traversePath tryHolding tryImplicitRemoveObstructor useInitDesc useInitSpecialDesc useSpecialDesc useSpecialDescInContents useSpecialDescInRoom useSpecialDescInRoomPart verbEndingEs verbEndingIes verbEndingS verbToHave verbWas verifyInsert verifyMoveTo verifyRemove whatIf whatIfHeldBy withVisualSenseInfo`

Inherited from `VocabObject` :
`addToDictionary expandPronounList filterResolveList getFacets inheritVocab initializeVocab initializeVocabWith matchName matchNameCommon matchNameDisambig throwNoMatchForLocation throwNoMatchForPossessive throwNothingInLocation`

Inherited from `Schedulable` :
`execute getNextRunTime incNextRunTime`

Inherited from `Traveler` :
`canTravelVia checkDirectlyInRoom describeArrival describeDeparture describeNpcArrival describeNpcDeparture explainNoTravelVia getNotifyTable isTravelerCarrying travelerLocName travelerRemoteLocName travelerSeenBy travelerTravelTo`

Inherited from `TravelMessageHandler` :
`getNominalTraveler`

Inherited from `ActorTopicDatabase` :
`showTopicResponse`

Inherited from `TopicDatabase` :
`addSuggestedTopic addTopic addTopicToList compareVocabMatch findTopicResponse handleTopic removeSuggestedTopic removeTopic removeTopicFromList showSuggestedTopicList`

Properties

`accompanyingActors` | `actor.t[7816]`

My vector of actors who are accompanying me.

This is for internal bookkeeping only, and it applies to the current travel only. This is NOT a general "follow mode" setting, and it shouldn't be used to get me to follow another actor or another actor to follow me. To make me accompany another actor, simply override accompanyTravel() so that it returns a suitable ActorState object.

`actorNotifyList` | `actor.t[8499]`

our list of registered actor notification items

`agendaList` | `actor.t[6922]`

The actor's "agenda." This is a list of AgendaItem objects that describe things the actor wants to do of its own volition on its own turn.

`antecedentTable` | `actor.t[9953]`

Antecedent lookup table. Each actor keeps its own table of antecedents indexed by pronoun type, so that we can simultaneously have different antecedents for different pronouns.

`boredomAgendaItem` | `actor.t[6929]`

our special "boredom" agenda item - this makes us initiate an end to an active conversation when the PC has ignored us for a given number of consecutive turns

`boredomCount` | `actor.t[6831]`

Our conversational "boredom" counter. While we're in a conversation, this tracks the number of turns since the last conversational command from the actor we're talking to.

Note that this state is part of the actor, even though it's usually managed by the InConversationState object. The state is stored with the actor rather than with the state object because it really describes the condition of the actor, not of the state object.

`bulkCapacity` | `actor.t[6339]`

You can limit the cumulative amount of bulk an actor can hold, and the maximum bulk of any one object the actor can hold, using bulkCapacity and maxSingleBulk. These properties are analogous to the same ones in Container.

A word of caution on these is in order. Many authors worry that it's unrealistic if the player character can carry too much at one time, so they'll fiddle with these properties to impose a carrying limit that seems realistic. Be advised that authors love this sort of "realism" a whole lot more than players do. Players almost universally don't care about it, and in fact tend to hate the inventory juggling it inevitably leads to. Juggling inventory isn't any fun for the player. Don't fool yourself about this - the thoughts in the mind of a player who's tediously carting objects back and forth three at a time will not include admiration of your prowess at simulational realism. In contrast, if you set the carrying limit to infinity, it's a rare player who will even notice, and a much rarer player who'll complain about it.

If you really must insist on inventory limits, refer to the BagOfHolding class for a solution that can salvage most of the "realism" that the accountancy-inclined author craves, without creating undue inconvenience for the player. BagOfHolding makes inventory limits palatable for the player by essentially automating the required inventory juggling. In fact, for most players, an inventory limit in conjunction with a bag of holding is actually better than an unlimited inventory, since it improves readability by keeping the direct inventory list to a manageable size.

`canMatch3rdPerson` | `en_us.t[2391]`

Test to see if we can match a third-person pronoun ('it', 'him', 'her', 'them'). We can unless we're the player character and the player character is referred to in the first or second person.

`canMatchHer` OVERRIDDEN | `en_us.t[2382]`

no description available

`canMatchHim` OVERRIDDEN | `en_us.t[2381]`

Test to see if we can match the third-person pronouns. We'll match these if our inherited test says we match them AND we can be referred to in the third person.

`canMatchIt` OVERRIDDEN | `en_us.t[2383]`

no description available

`canMatchThem` OVERRIDDEN | `en_us.t[2384]`

no description available

`commandReferralPerson` | `actor.t[6238]`

The referral person of the current command targeting the actor. This is meaningful only when a command is being directed to this actor, and this actor is an NPC.

The referral person depends on the specifics of the language. In English, a command like "bob, go north" is a second-person command, while "tell bob to go north" is a third-person command. The only reason this is important is in interpreting what "you" means if it's used as an object in the command. "tell bob to hit you" probably means that Bob should hit the player character, while "bob, hit you" probably means that Bob should hit himself.

`communicationSenses` | `actor.t[7574]`

Communication senses: these are the senses through which the actor can communicate directly with other actors through commands and messages.

Conceptually, these senses are intended to be only those senses that the actors would *naturally* use to communicate, because senses in this list allow direct communications via the most ordinary game commands, such as "bob, go east".

If some form of indirect communication is possible via a sense, but that form is not something the actor would think of as the most natural, default form of communication, it should *not* be in this list. For example, two sighted persons who can see one another but cannot hear one another could still communicate by writing messages on pieces of paper, but they would ordinarily communicate by talking. In such a case, sound should be in the list but sight should not be, because sight is not a natural, default form of communications for the actors.

`contentsListed` OVERRIDDEN | `actor.t[5948]`

the contents of an actor aren't listed in a room's description

`convMgrID` | `actor.t[5778]`

conversation manager ID - this is assigned by the conversation manager to map to and from output stream references to the actor; this is only for internal use by the conversation manager

`convNodeTab` | `actor.t[5726]`

Our table of conversation nodes. At initialization, the conversation manager scans all ConvNode instances and adds each one to its actor's table. This table is keyed by the name of node, and the value for each entry is the ConvNode object - this lets us look up the ConvNode object by name. Because each actor has its own lookup table, ConvNode names only have to be unique within the actor's set of ConvNodes.

`curConvNode` | `actor.t[5715]`

Our current conversation node. This is a ConvNode object that keeps track of the flow of the conversation.

`curState` | `actor.t[5690]`

Our current state. This is an ActorState object representing what we're currently doing. Whenever the actor changes to a new state (for example, because of a scripted activity), this can be changed to reflect the actor's new state. The state object groups the parts of the actor's description and other methods that tend to vary according to what the actor's doing; it's easier to keep everything related to scripted activities together in a state object than it is to handle all of the variability with switch() statements of the like in methods directly in the actor.

It's not necessary to initialize this if the actor doesn't take advantage of the ActorState mechanism. If this isn't initialized for a particular actor, we'll automatically create a default ActorState object during pre-initialization.

`excludeFromLookAroundList` | `actor.t[7483]`

Our list of objects explicitly excluded from 'look around'. These objects will be suppressed from any sort of listing (including in the room's contents list and in special descriptions) in 'look around' when this actor is doing the looking.

`followables_` | `actor.t[8158]`

Our list of followable information. Each entry in this list is a FollowInfo object that tracks a particular followable.

`followingActor` | `actor.t[9235]`

If we're following an actor, this keeps track of the actor we're following. NPC's can use this to follow around another actor whenever possible.

`getTravelerActors` OVERRIDDEN | `actor.t[6435]`

Get the actors involved in travel, when we're acting in our role as a Traveler. When the Traveler is simply the Actor, the only actor involved in the travel is 'self'.

`getTravelerMotiveActors` OVERRIDDEN | `actor.t[6438]`

we're the self-motive actor doing the travel

`hearinglikeSenses` | `actor.t[7546]`

Hearing-like senses. These are senses that the actor can use to hear objects.

`holdingDescInventoryLister` | `actor.t[8927]`

The Lister for inventory listings, for use in a full description of the actor. By default, we use the "long form" inventory lister, on the assumption that most actors have relatively lengthy descriptive text. This can be overridden to use other formats; the short-form lister, for example, is useful for actors with only brief descriptions.

`inventoryLister` | `actor.t[8917]`

The Lister object that we use for inventory listings. By default, we use actorInventoryLister, but this can be overridden if desired to use a different listing style.

`isActor` | `actor.t[5672]`

flag: we're an actor

`isLikelyCommandTarget` OVERRIDDEN | `actor.t[9506]`

By default, all actors are likely command targets. This should be overridden for actors who are obviously not likely to accept commands of any kind.

This is used to disambiguate target actors in commands, so this should provide an indication of what should be obvious to a player, because the purpose of this information is to guess what the player is likely to take for granted in specifying a target actor.

`isListed` | `actor.t[5943]`

Actors are not listed with the ordinary objects in a room's description. However, an actor is listed as part of an inventory description.

`isListedAboardVehicle` OVERRIDDEN | `actor.t[6368]`

by default, actors are listed when they arrive aboard a vehicle

`isListedInContents` | `actor.t[5944]`

no description available

`isListedInInventory` | `actor.t[5945]`

no description available

`issueCommandsSynchronously` | `actor.t[7695]`

Flag: we wait for commands issued to other actors to complete before we get another turn. If this is true, then whenever we issue a command to another actor ("bob, go north"), we will not get another turn until the other actor has finished executing the full set of commands we issued.

By default, this is true, which means that we wait for other actors to finish all of the commands we issue before we take another turn.

If this is set to nil, we'll continue to take turns while the other actor carries out our commands. In this case, the only time cost to us of issuing a command is given by orderingTime(), which normally takes one turn for issuing a command, regardless of the command's complexity. Some games might wish to use this mode for interesting effects with NPC's carrying out commands in parallel with the player, but it's an unconventional style that some players might find confusing, so we don't use this mode by default.

`knownProp` | `actor.t[8228]`

My 'known' property. By default, this is simply 'known', which means that we don't distinguish who knows what.

As with 'seenProp' above, if you want to keep track of each NPC's knowledge separately, you must override this property for each NPC who's to have its own knowledge base to use a separate property name. For example, if you want to keep track of what Bob knows individually, you could define 'knownProp = &bobKnows' in Bob.

`lastConsulted` | `actor.t[6915]`

the object we most recently consulted

`lastConvTime` | `actor.t[6837]`

game-clock time (Schedulable.gameClockTime) of the last conversational command addressed to us by the player character

`lastDoorTraversed` | `actor.t[6700]`

the last door I traversed

`lastInterlocutor` | `actor.t[6818]`

The most recent actor that we've interacted with through a conversational command (ASK, TELL, GIVE, SHOW, etc).

`lastTravelBack` | `actor.t[6704]`

no description available

`lastTravelDest` | `actor.t[6703]`

the destination and back connector for our last travel

`locationBefore` | `actor.t[9000]`

conditions we noted in noteConditionsBefore()

`locationLitBefore` | `actor.t[9001]`

no description available

`maxSingleBulk` | `actor.t[6340]`

no description available

`mostRecentAction` | `actor.t[9147]`

the action the actor performed most recently

`name` OVERRIDDEN | `en_us.t[2131]`

by default, use my pronoun for my name

`nextHoldingIndex` | `actor.t[7293]`

Next available "holding index" value. Each time we pick up an item, we'll assign it our current holding index value and then increment our value. This gives us a simple way to keep track of the order in which we picked up items we're carrying.

Note that we make the simplifying assumption that an object can be held by only one actor at a time (multi-location items are generally not portable), which means that we can use a simple property in each object being held to store its holding index.

`nextRunTime` OVERRIDDEN | `actor.t[9004]`

let the actor have a turn as soon as the game starts

`pcReferralPerson` | `actor.t[6223]`

by default, refer to the player character in the second person

`pendingCommand` | `actor.t[9794]`

pending commands - this is a list of PendingCommandInfo objects

`pendingConv` | `actor.t[5911]`

Our list of pending conversation initiators. In our takeTurn() processing, we'll check this list for conversations that we can initiate.

`pendingResponse` | `actor.t[9801]`

pending response - this is a single PendingResponseInfo object, which we'll deliver as soon as the issuing actor is in a position to hear us

`possAnaphorTable` | `actor.t[9965]`

Possessive anaphor lookup table. In almost all cases, the possessive anaphor for a given pronoun will be the same as the corresponding regular pronoun: HIS indicates possession by HIM, for example. In a few cases, though, the anaphoric quality of possessives takes precedence, and these will differ. For example, in TELL BOB TO DROP HIS BOOK, "his" refers back to Bob, while in TELL BOB TO HIT HIM, "him" refers to whatever it referred to before the command.

`posture` | `actor.t[7322]`

My current "posture," which specifies how we're positioned with respect to our container; this is one of the standard library posture enum values (Standing, etc.) or another posture added by the game.

`responseSetConvNode` | `actor.t[5785]`

Flag indicating whether or not we've set a ConvNode in the course of the current response. This is for use by the converstaion manager.

`revertTargetActorAtEndOfSentence` | `actor.t[7722]`

Flag: the "target actor" of the command line automatically reverts to this actor at the end of a sentence, when this actor is the issuer of a command. If this flag is nil, an explicit target actor stays in effect until the next explicit target actor (or the end of the entire command line, if no other explicit target actors are named); if this flag is true, a target actor is in effect only until the end of a sentence.

Consider this command line:

>Bob, go north and get fuel cell. Get log tape.

If this flag is nil, then the second sentence ("get log tape") is interpreted as a command to Bob, because Bob is explicitly designated as the target of the command, and this remains in effect until the end of the entire command line.

If this flag is true, on the other hand, then the second sentence is interpreted as a command to the player character, because the target actor designation ("Bob,") lasts only until the end of the sentence. Once a new sentence begins, we revert to the issuing actor (the player character, since the command came from the player via the keyboard).

`scheduleOrder` OVERRIDDEN | `actor.t[9028]`

Scheduling order - this determines the order of execution when several items are schedulable at the same game clock time.

We choose a scheduling order that schedules actors in this relative order:

100 player character, ready to execute
200 NPC, ready to execute
300 player character, idle
400 NPC, idle

An "idle" actor is one that is waiting for another character to complete a command, or an NPC with no pending commands to perform. (For the player character, it doesn't matter whether or not there's a pending command, because if the PC has no pending command, we ask the player for one.)

This ordering ensures that each actor gets a chance to run each turn, but that actors with work to do go first, and other things being equal, the player character goes ahead of NPC's.

`scopeSenses` | `actor.t[7514]`

The senses that determine scope for this actor. An actor might possess only a subset of the defined sense.

By default, we give each actor all of the human senses that we define, except touch. In general, merely being able to touch an object doesn't put the object in scope, because if an object isn't noticed through some other sense, touch would only make an object accessible if it's within arm's reach, which for our purposes means that the object is being held directly by the actor. Imagine an actor in a dark room: lots of things might be touchable in the sense that there's no physical barrier to touching them, but without some other sense to locate the objects, the actor wouldn't have any way of knowing where to reach to touch things, so they're not in scope. So, touch isn't a scope sense.

`seenProp` | `actor.t[8215]`

My 'seen' property. By default, this is simply 'seen', which means that we don't distinguish who's seen what - in other words, there's a single, global 'seen' flag per object, and if anyone's ever seen something, then we consider that to mean everyone has seen it.

Some games might want to track each NPC's sight memory separately, or at least they might want to track it individually for a few specific NPC's. You can do this by making up a new property name for each NPC whose sight memory you want to keep separate, and simply setting 'seenProp' to that property name for each such NPC. For example, for Bob, you could make the property bobHasSeen, so in Bob you'd define 'sightProp = &bobHasSeen'.

`sightlikeSenses` | `actor.t[7540]`

"Sight-like" senses: these are the senses that operate like sight for the actor, and which the actor can use to determine the names of objects and the spatial relationships between objects. These senses should operate passively, in the sense that they should tend to collect sensory input continuously and without explicit action by the actor, the way sight does and the way touch, for example, does not. These senses should also operate instantly, in the sense that the sense can reasonably take in most or all of a location at one time.

These senses are used to determine what objects should be listed in room descriptions, for example.

By default, the only sight-like sense is sight, since other human senses don't normally provide a clear picture of the spatial relationships among objects. (Touch could with some degree of effort, but it can't operate passively or instantly, since deliberate and time-consuming action would be necessary.)

An actor can have more than one sight-like sense, in which case the senses will act effectively as one sense that can reach the union of objects reachable through the individual senses.

`smelllikeSenses` | `actor.t[7552]`

Smell-like senses. These are senses that the actor can use to smell objects.

`specialDescBeforeContents` OVERRIDDEN | `actor.t[6063]`

By default, show the special description for an actor in the group of special descriptions that come *after* the room's portable contents listing. An actor's presence is usually a dynamic feature of a room, and so we don't want to suggest that the actor is a permanent feature of the room by describing the actor directly with the room's main description.

`specialDescOrder` OVERRIDDEN | `actor.t[6082]`

By default, put all of the actor special descriptions after the special descriptions of ordinary objects, by giving actors a higher listing order value.

`specialTraveler` | `actor.t[6462]`

our special traveler

`takeFromNotInMessage` OVERRIDDEN | `actor.t[10047]`

show a "take from" message as indicating I don't have the dobj

`waitingForActor` | `actor.t[7785]`

Synchronous command processing: the target actor and dummy pending command we're waiting for. When these are non-nil, we won't take another turn until the given PendingCommandInfo has been removed from the given target actor's command queue.

`waitingForInfo` | `actor.t[7786]`

no description available

`weightCapacity` | `actor.t[6348]`

An actor can limit the cumulative amount of weight being held, using weightCapacity. By default we make this so large that there is effectively no limit to how much weight an actor can carry.

Methods

`acceptCommand (issuingActor)`OVERRIDDEN | `actor.t[9529]`

Determine if we should accept a command. 'issuingActor' is the actor who issued the command: if the player typed the command on the command line, this will be the player character actor.

This routine performs only the simplest check, since it doesn't have access to the specific action being performed. This is intended as a first check, to allow us to bypass noun resolution if the actor simply won't accept any command from the issuer.

Returns true to accept a command, nil to reject it. If this routine returns nil, and the command came from the player character, a suitable message should be displayed.

Note that most actors should not override this routine simply to express the will of the actor to accept a command, since this routine performs a number of checks for the physical ability of the actor to execute a command from the issuer. To determine whether or not the actor should obey physically valid commands from the issuer, override obeyCommand().

`acceptCommandBusy (issuingActor)` | `actor.t[9573]`

Check to see if I'm busy with pending commands, and if so, whether or not I should accept a new command. Returns true if we should accept a command, nil if not. If we return nil, we must notify the issuer of the rejection.

By default, we won't accept a command if we have any work pending.

`actorAction ( )` | `actor.t[8373]`

Perform any actor-specific processing for an action. The main command processor invokes this on gActor after notifying nearby objects via beforeAction(), but before carrying out the main action of the command.

`actorActionFollow (obj)` | `actor.t[7990]`

Carry out a "follow" command being performed by this actor.

`actorHereDesc ( )` | `actor.t[6117]`

Actor "I am here" description. This is displayed as part of the description of a room - it describes the actor as being present in the room. By default, we let the "nominal actor container" provide the description.

`actorListWith ( )` | `actor.t[6089]`

Get my listing group for my special description as part of a room description. By default, we'll let our immediate location decide how we're grouped.

`actorRoomNameStatus (room)` | `actor.t[6145]`

Show our status, as an addendum to the given room's name (this is the room title, shown at the start of a room description and on the status line). By default, we'll let our nominal actor container provide the status, to indicate when we're standing/sitting/lying in a nested room.

In concrete terms, this generally adds a message such as "(sitting on the chair)" to the name of a room if we're in a nested room within the room. When we're standing in the main room, this generally adds nothing.

Note that we pass the room we're describing as the "container to ignore" parameter, because we don't want to say something like "Phone Booth (standing in the phone booth)" - that is, we don't want to mention the nominal container again if the nominal container is what we're naming in the first place.

`actorThereDesc ( )` | `actor.t[6125]`

Actor's "I am over there" description. This is displayed in the room description when the actor is visible, but is either in a separate top-level room or is at a distance. By default, we let the "nominal actor container" provide the description.

`actorTravel (traveler, connector)` | `actor.t[8422]`

Receive notification that I'm initiating travel. This is called on the actor performing the travel action before the travel is actually carried out.

`actorVerifyFollow (obj)` | `actor.t[7934]`

Verify a "follow" command being performed by this actor.

`addAccompanyingActor (actor)` | `actor.t[7796]`

Add the given actor to the list of actors accompanying my travel on the current turn. This does NOT set an actor in "follow mode" or "accompany mode" or anything like that - don't use this to make an actor follow me around. Instead, this makes the given actor go with us for the CURRENT travel only - the travel we're already in the process of performing to process the current TravelVia action.

`addActorNotifyItem (obj)` | `actor.t[8487]`

Add an item to our registered notification items. These items are to receive notifications when we're the actor performing a command.

Items can be added here if they must be notified of actions performed by the actor even when the items aren't connected by containment with the actor at the time of the action. All items connected to the actor by containment are automatically notified of each action; only items that must receive notification even when not in scope need to be registered here.

`addBusyTime (action, units)` | `actor.t[9154]`

Add busy time. An action calls this when we are the actor performing the action, and the action consumes game time. This marks us as busy for the given time units.

`addFirstPendingAction (startOfSentence, issuer, action, [objs])` | `actor.t[9785]`

Insert a resolved action at the start of our pending command list. The new command is specified as a resolved Action object; it is added before any commands already in our list.

`addFirstPendingCommand (startOfSentence, issuer, toks)` | `actor.t[9761]`

Insert a command at the head of our pending command list. The new command is specified as a list of tokens to parse, and it is inserted into our pending command list before any commands already in the list.

`addPendingAction (startOfSentence, issuer, action, [objs])` | `actor.t[9773]`

Add a resolved action to our pending command list. The new command is specified as a resolved Action object; it is added after any commands already in our list.

`addPendingCommand (startOfSentence, issuer, toks)` | `actor.t[9748]`

Add a command to our pending command list. The new command is specified as a list of tokens to be parsed, and it is added after any commands already in our pending list.

`addToAgenda (item)` | `actor.t[6932]`

add an agenda item

`addToContents (obj)`OVERRIDDEN | `actor.t[7296]`

add an object to my contents

`adjustLookAroundTable (tab, pov, actor)`OVERRIDDEN | `actor.t[7443]`

Adjust a table of visible objects for 'look around'. By default, we remove any explicitly excluded objects.

`afterAction ( )`OVERRIDDEN | `actor.t[8382]`

Receive notification that a command has just been carried out in our presence.

`afterTravel (traveler, connector)`OVERRIDDEN | `actor.t[8411]`

receive a notification that someone has just traveled here

`aName ( )` | `en_us.t[2316]`

Get the name with an indefinite article. Use the same rules of referral person as for definite articles.

`aNameObj ( )`OVERRIDDEN | `en_us.t[2319]`

aName in objective case

`beforeAction ( )`OVERRIDDEN | `actor.t[8349]`

Receive notification that a command is being carried out in our presence.

`beforeTravel (traveler, connector)`OVERRIDDEN | `actor.t[8389]`

receive a notification that someone is about to travel

`bestVisualInfo (obj)` | `actor.t[8559]`

Get the best (most transparent) sense information for one of our visual senses to the given object.

`calcScheduleOrder ( )`OVERRIDDEN | `actor.t[9031]`

calculate the scheduling order

`canBeTalkedTo (talker, sense, info)` | `actor.t[7663]`

Determine whether or not I can understand an attempt by another actor to talk to me. 'talker' is the actor doing the talking. 'sense' is the sense we're testing; this will always be a sense in our communicationSenses list, and will always be a communications sense we have in common with the other actor. 'info' is a SenseInfo object giving information on the clarity of the sense path to the other actor.

We return true if we can understand the communication, nil if not. There is no middle ground where we can partially understand; we can either understand or not.

Note that this routine is concerned only with our ability to sense the communication. The result here should NOT pay any attention to whether or not we can actually communicate given a clear sense path - for example, this routine should not reflect whether or not we have a spoken language in common with the other actor.

This is a service method for canTalkTo. This is broken out as a separate method so that individual actors can override the necessary conditions for communications in particular senses.

`canHear (obj)`OVERRIDDEN | `actor.t[8685]`

Determine if I can hear the given object.

`cannotFollow ( )` | `actor.t[9247]`

Handle a situation where we're trying to follow an actor but can't. By default, this simply cancels our follow mode.

Actors might want to override this to be more tolerant. For example, an actor might want to wait until five turns elapse to give up on following, in case the target actor returns after a brief digression; or an actor could stay in follow mode until it received other instructions, or found something better to do.

`cannotRespondToCommand (issuingActor, messageProp, args)` | `actor.t[9912]`

We have a parser error to report to the player, but we cannot respond at the moment because the player is not capable of hearing us (there is no sense path for our communications senses from us to the player actor). Defer reporting the message until later.

`canOwn (obj)`OVERRIDDEN | `actor.t[6354]`

Can I own the given object? By default, an actor can own anything.

`canSee (obj)`OVERRIDDEN | `actor.t[8665]`

Determine if I can see the given object. This returns true if the object can be sensed at all in one of my sight-like senses, nil if not.

`canSmell (obj)`OVERRIDDEN | `actor.t[8705]`

Determine if I can smell the given object.

`canTalkTo (actor)` | `actor.t[7592]`

Determine if I can communicate with the given character via a natural, default form of communication that we share with the other character. This determines if I can talk to the other character. We'll return true if I can talk to the other actor, nil if not.

In order for the player character to issue a command to a non-player character (as in "bob, go east"), the NPC must be able to sense the PC via at least one communication sense that the two actors have in common.

Likewise, in order for a non-player character to say something to the player, the player must be able to sense the NPC via at least one communication sense that the two actors have in common.

`checkBulkChangeWithin (obj)`OVERRIDDEN | `actor.t[7252]`

Check a bulk change of one of my direct contents.

`checkDarkTravel (dest, connector)` | `actor.t[6568]`

Check for travel in the dark. If we're in a dark room, and our destination is a dark room, ask the connector for guidance.

Travel connectors normally call this before invoking our travelTo() method to carry out the travel. The darkness check usually must be made before any barrier checks.

`checkMovingTravelerInto (room, allowImplicit)`OVERRIDDEN | `actor.t[6468]`

Try moving the actor into the given room in preparation for travel, using pre-condition rules.

`checkReadyToEnterNestedRoom (dest, allowImplicit)` | `actor.t[6479]`

Check to ensure the actor is ready to enter the given nested room, using pre-condition rules. By default, we'll ask the given nested room to handle it.

`checkStagingLocation (dest)`OVERRIDDEN | `actor.t[6710]`

use a custom message for cases where we're holding a destination object for BOARD, ENTER, etc

`checkTakeFromInventory (actor, obj)` | `actor.t[8459]`

Check to see if we want to allow another actor to take something from my inventory. By default, we won't allow it - we'll always fail the command.

`checkWaitingForActor ( )` | `actor.t[9090]`

Check to see if we're waiting for another actor to do something. Return true if so, nil if not. If we've been waiting for another actor, and the actor has finished the task we've been waiting for since the last time we checked, we'll clean up our internal state relating to the wait and return nil.

`conjugateRegularVerb (verb)`OVERRIDDEN | `en_us.t[2265]`

Conjugate a regular verb in the present or past tense for our person and number.

In the present tense, this is pretty easy: we add an 's' for the third person singular, and leave the verb unchanged for every other case. The only complication is that we must check some special cases to add the -s suffix: -y -> -ies, -o -> -oes.

In the past tense, we use the inherited handling since the past tense ending doesn't vary with person.

`conversedThisTurn ( )` | `actor.t[6845]`

Did we engage in any conversation on the current turn? This can be used as a quick check in background activity scripts when we want to run a step only in the absence of any conversation on the same turn.

`copyPronounAntecedentsFrom (issuer)` | `actor.t[10034]`

Copy pronoun antecedents from the given actor. This should be called whenever an actor issues a command to us, so that pronouns in the command are properly resolved relative to the issuer.

`defaultAskForResponse (byActor, obj)` | `actor.t[10390]`

the default response for ASK FOR

`defaultAskResponse (fromActor, topic)` | `actor.t[10362]`

Show the default answer to a question - this is called when we're the actor in ASK <actor> ABOUT <topic>, and we can't find a more specific response for the given topic.

By default, we'll show the basic "there's no response" message. This isn't a very good message in most cases, because it makes an actor pretty frustratingly un-interactive, which gives the actor the appearance of a cardboard cut-out. But there's not much better that the library can do; the potential range of actors makes a more specific default response impossible. If the default response were "I don't know about that," it wouldn't work very well if the actor is someone who only speaks Italian. So, the best we can do is this generally rather poor default. But that doesn't mean that authors should resign themselves to a poor default answer; instead, it means that actors should take care to override this when defining an actor, because it's usually possible to find a much better default for a *specific* actor.

The *usual* way of providing a default response is to define a DefaultAskTopic (or a DefaultAskTellTopic) and put it in the actor's topic database.

`defaultCommandResponse (fromActor, topic)` | `actor.t[10402]`

default refusal of a command

`defaultConvResponse (actor, topic, convType)` | `actor.t[10307]`

Show a default response to a conversational action. By default, we'll show the default response for our conversation type.

`defaultGiveResponse (byActor, topic)` | `actor.t[10386]`

the default response for GIVE TO

`defaultGoodbyeResponse (actor)` | `actor.t[10336]`

show our default goodbye message

`defaultGreetingResponse (actor)` | `actor.t[10332]`

Show our default greeting message - this is used when the given another actor greets us with HELLO or TALK TO, and we don't otherwise handle it (such as via a topic database entry).

By default, we'll just show "there's no response" as a default message. We'll show this in default mode, so that if the caller is going to show a list of suggested conversation topics (which the 'hello' and 'talk to' commands will normally try to do), the topic list will override the "there's no response" default. In other words, we'll have one of these two types of exchanges:

>talk to bob
There's no response

>talk to bill
You could ask him about the candle, the book, or the bell, or
tell him about the crypt.

`defaultNoResponse (fromActor)` | `actor.t[10398]`

default response to being told NO

`defaultShowResponse (byActor, topic)` | `actor.t[10382]`

the default response for SHOW TO

`defaultTellResponse (fromActor, topic)` | `actor.t[10378]`

Show the default response to being told of a topic - this is called when we're the actor in TELL <actor> ABOUT <topic>, and we can't find a more specific response for the topic.

As with defaultAskResponse, this should almost always be overridden by each actor, since the default response ("there's no response") doesn't make the actor seem very dynamic.

The usual way of providing a default response is to define a DefaultTellTopic (or a DefaultAskTellTopic) and put it in the actor's topic database.

`defaultYesResponse (fromActor)` | `actor.t[10394]`

default response to being told YES

`descViaActorContainer (prop, contToIgnore)` | `actor.t[6171]`

Describe the actor via the "nominal actor container." The nominal container is determined by our direct location.

'contToIgnore' is a container to ignore. If our nominal container is the same as this object, we'll generate a description without a mention of a container at all.

The reason we have the 'contToIgnore' parameter is that the caller might already have reported our general location, and now merely wants to add that we're standing or standing or whatever. In these cases, if we were to say that we're sitting on or standing on that same object, it would be redundant information: "Bob is in the garden, sitting in the garden." The 'contToIgnore' parameter tells us the object that the caller has already mentioned as our general location so that we don't re-report the same thing. We need to know the actual object, rather than just the fact that the caller mentioned a general location, because our general location and the specific place we're standing or sitting or whatever might not be the same: "Bob is in the garden, sitting in the lawn chair."

`disembark ( )` | `actor.t[7387]`

Disembark. This is used by the 'Get out' action to carry out the command. By default, we'll let the room handle it.

`distantSpecialDesc ( )` | `actor.t[6051]`

no description available

`dobjFor(AskAbout)`OVERRIDDEN | `actor.t[10230]`

also mark the visible contents of the object as having been seen

`dobjFor(AskFor)`OVERRIDDEN | `actor.t[10123]`

cannot kiss oneself

`dobjFor(Drop)`OVERRIDDEN | `actor.t[10073]`

no description available

`dobjFor(Kiss)`OVERRIDDEN | `actor.t[10112]`

do the normal work

`dobjFor(PutIn)`OVERRIDDEN | `actor.t[10092]`

treat PUT SELF IN FOO as GET IN FOO

`dobjFor(PutOn)`OVERRIDDEN | `actor.t[10074]`

no description available

`dobjFor(PutUnder)`OVERRIDDEN | `actor.t[10075]`

no description available

`dobjFor(Take)`OVERRIDDEN | `actor.t[10072]`

For the basic physical manipulation verbs (TAKE, DROP, PUT ON, etc), it's illogical to operate on myself, so check for this in verify(). Otherwise, handle these as we would ordinary objects, since we might be able to manipulate other actors in the normal manner, especially actors small enough that we can pick them up.

`dobjFor(TalkTo)`OVERRIDDEN | `actor.t[10141]`

let the state object handle it

`dobjFor(TellAbout)`OVERRIDDEN | `actor.t[10248]`

let our state object handle it

`dobjFor(Throw)`OVERRIDDEN | `actor.t[10076]`

no description available

`dobjFor(ThrowAt)`OVERRIDDEN | `actor.t[10077]`

no description available

`dobjFor(ThrowDir)`OVERRIDDEN | `actor.t[10078]`

no description available

`dobjFor(ThrowTo)`OVERRIDDEN | `actor.t[10079]`

no description available

`endConversation ( )` | `actor.t[5897]`

Break off our current conversation, of the NPC's own volition. This is the opposite number of initiateConversation: this causes the NPC to effectively say BYE on its own, rather than waiting for the PC to decide to end the conversation.

This call is mostly useful when the actor's current state is an InConversationState, since the main function of this routine is to switch to an out-of-conversation state.

`examineListContents ( )`OVERRIDDEN | `actor.t[6037]`

examine my contents specially

`examineStatus ( )`OVERRIDDEN | `actor.t[5978]`

show our status

`excludeFromLookAround (obj)` | `actor.t[7457]`

Add an object to the 'look around' exclusion list. Returns true if the object was already in the list, nil if not.

`executeActorTurn ( )` | `actor.t[9297]`

The main processing for an actor's turn. In most cases, subclasses should override this method (rather than executeTurn) to specialize an actor's turn processing.

`executeAgenda ( )` | `actor.t[6965]`

Execute the next item in our agenda, if there are any items in the agenda that are ready to execute. We'll return true if we found an item to execute, nil if not.

`executeTurn ( )`OVERRIDDEN | `actor.t[9268]`

Execute one "turn" - this is a unit of time passing. The player character generally is allowed to execute one command in the course of a turn; a non-player character with a programmed task can perform an increment of the task.

We set up an ActorTurnAction environment and invoke our executeActorTurn() method. In most cases, subclasses should override executeActorTurn() rather than this method, since overriding executeTurn() directly will lose the action environment.

`findVisualObstructor (obj)` | `actor.t[8725]`

Find the object that prevents us from seeing the given object.

`forEachTravelingActor (func)`OVERRIDDEN | `actor.t[6424]`

invoke a callback on each actor traveling with the traveler

`forgetPossAnaphors ( )` | `actor.t[10022]`

forget the possessive anaphors

`getActionMessageObj ( )` | `actor.t[9835]`

Get the library message object for action responses. This is used to generate library responses to verbs.

`getActorNotifyList ( )` | `actor.t[8470]`

Build a list of the objects that are explicitly registered to receive notification when I'm the actor in a command.

`getBulkHeld ( )` | `actor.t[7030]`

Calculate the amount of bulk I'm holding directly. By default, we'll simply add up the "actor-encumbering bulk" of each of our direct contents.

Note that we don't differentiate here based on whether or not an item is being worn, or anything else - we deliberately leave such distinctions up to the getEncumberingBulk routine, so that only the objects are in the business of deciding how bulky they are under different circumstances.

`getCurrentInterlocutor ( )` | `actor.t[6765]`

Get the current interlocutor. By default, we'll address new conversational commands (ASK ABOUT, TELL ABOUT, SHOW TO) to the last conversational partner, if that actor is still within range.

`getDefaultInterlocutor ( )` | `actor.t[6784]`

Get the default interlocutor. If there's a current interlocutor, and we can still talk to that actor, then that's the default interlocutor. If not, we'll return whatever actor is the default for a TALK TO command. Note that TALK TO won't necessarily have a default actor; if it doesn't, we'll simply return nil.

`getDropDestination (objToDrop, path)`OVERRIDDEN | `actor.t[7490]`

Get the location into which objects should be moved when the actor drops them with an explicit 'drop' command. By default, we return the drop destination of our current container.

`getFollowables ( )` | `actor.t[7823]`

Get the list of objects I can follow. This is a list of all of the objects which I have seen departing a location - these are all in scope for 'follow' commands.

`getFollowInfo (obj)` | `actor.t[7918]`

Get information on what to do to make this actor follow the given object. This returns a FollowInfo object that reports our last knowledge of the given object's location and departure, or nil if we don't know anything about how to follow the actor.

`getLookAroundName ( )` | `actor.t[7432]`

Get my "look around" location name as a string. This returns a string containing the location name that we display in the status line or at the start of a "look around" description of my location.

`getParserDeferredMessageObj ( )` | `actor.t[9829]`

Get the deferred library message object for a parser message addressed to the player character. We only use this to generate messages deferred from non-player characters.

`getParserMessageObj ( )` | `actor.t[9807]`

get the library message object for a parser message addressed to the player character

`getPossAnaphor (typ)` | `actor.t[10019]`

get a possessive anaphor value

`getPronounAntecedent (typ)` | `actor.t[9995]`

look up a pronoun's value

`getPushTraveler (obj)` | `actor.t[6401]`

Get the "push traveler" for the actor. This is the nominal traveler that we want to use when the actor enters a command like PUSH BOX NORTH. 'obj' is the object we're trying to push.

`getTopicOwner ( )`OVERRIDDEN | `actor.t[8261]`

we are the owner of any TopicEntry objects contained within us

`getTraveler (conn)` | `actor.t[6381]`

Get the object that's actually going to move when this actor travels via the given connector. In most cases this is simply the actor; but when the actor is in a vehicle, travel commands move the vehicle, not the actor: the actor stays in the vehicle while the vehicle moves to a new location. We determine this by asking our immediate location what it thinks about the situation.

If we have a special traveler explicitly set, it overrides the traveler indicated by the location.

`getVisualAmbient ( )` | `actor.t[8505]`

Get the ambient light level in the visual senses at this actor. This is the ambient level at the actor.

`getWeightHeld ( )` | `actor.t[7056]`

Calculate the total weight I'm holding. By default, we'll add up the "actor-encumbering weight" of each of our direct contents.

Note that we deliberately only consider our direct contents. If any of the items we are directly holding contain further items, getEncumberingWeight will take their weights into account; this frees us from needing any special knowledge of the internal structure of any items we're holding, and puts that knowledge in the individual items where it belongs.

`goToSleep ( )` | `actor.t[7310]`

Go to sleep. This is used by the 'Sleep' action to carry out the command. By default, we simply say that we're not sleepy; actors can override this to cause other actions.

`handleConversation (actor, topic, convType)` | `actor.t[10293]`

Handle a conversational command. All of the conversational actions (HELLO, GOODBYE, YES, NO, ASK ABOUT, ASK FOR, TELL ABOUT, SHOW TO, GIVE TO) are routed here when we're the target of the action (for example, we're BOB in ASK BOB ABOUT TOPIC) AND the ActorState doesn't want to handle the action.

`hasSeen (obj)` | `actor.t[8161]`

determine if I've ever seen the given object

`hideFromAll (action)`OVERRIDDEN | `actor.t[5922]`

Hide actors from 'all' by default. The kinds of actions that normally apply to 'all' and the kinds that normally apply to actors have pretty low overlap.

If a particular actor looks a lot like an inanimate object, it might want to override this to participate in 'all' for most or all actions.

`hideFromDefault (action)`OVERRIDDEN | `actor.t[5929]`

don't hide actors from defaulting, though - it's frequently convenient and appropriate to assume an actor by default, especially for commands like GIVE TO and SHOW TO

`idleTurn ( )` | `actor.t[9168]`

When it's our turn and we don't have any command to perform, we'll call this routine, which can perform a scripted operation if desired.

`impliedCommandMode ( )` | `actor.t[6273]`

Implicit command handling style for this actor. There are two styles for handling implied commands: "player" and "NPC", indicated by the enum codes ModePlayer and ModeNPC, respectively.

In "player" mode, each implied command is announced with a description of the command to be performed; DEFAULT responses are suppressed; and failures are shown. Furthermore, interactive requests for more information from the parser are allowed. Transcripts like this result:

>open door
(first opening the door)
(first unlocking the door)
What do you want to unlock it with?

In "NPC" mode, implied commands are treated as complete and separate commands. They are not announced; default responses are shown; failures are NOT shown; and interactive requests for more information are not allowed. When an implied command fails in NPC mode, the parser acts as though the command had never been attempted.

By default, we return ModePlayer if we're the player character, ModeNPC if not (thus the respective names of the modes). Some authors might prefer to use "player mode" for NPC's as well as for the player character, which is why the various parts of the parser that care about this mode consult this method rather than simply testing the PC/NPC status of the actor.

`initializeActor ( )` | `actor.t[8932]`

Perform library pre-initialization on the actor

`initiateConversation (state, node)` | `actor.t[5818]`

Initiate a conversation with the player character. This lets the NPC initiate a conversation, in response to something the player character does, or as part of the NPC's scripted activity. This is only be used for situations where the NPC initiates the conversation - if the player character initiates conversation with TALK TO, ASK, TELL, etc., we handle the conversation through our normal handlers for those commands.

'state' is the ActorState to switch to for the conversation. This will normally be an InConversationState object, but doesn't have to be.

You can pass nil for 'state' to use the current state's implied conversational state. The implied conversational state of a ConversationReadyState is the associated InConversationState; the implied conversation state of any other state is simply the same state.

'node' is a ConvNode object, or a string naming a ConvNode object. We'll make this our current conversation node. A valid conversation node is required because we use this to generate the initial NPC greeting of the conversation. In most cases, when the NPC initiates a conversation, it's because the NPC wants to ask a question or otherwise say something specific, so there should always be a conversational context implied, thus the need for a ConvNode. If there's no need for a conversational context, the NPC script code might just as well display the conversational exchange as a plain old message, and not bother going to all this trouble.

`initiateTopic (obj)`OVERRIDDEN | `actor.t[5853]`

Initiate a conversation based on the given simulation object. We'll look for an InitiateTopic matching the given object, and if we can find one, we'll show its topic response.

`inventorySense (sense, lister)` | `actor.t[8890]`

Add to an inventory description a list of things we notice through a specific sense.

`inventorySenseInfoTable ( )` | `actor.t[8789]`

Build a lookup table of the objects that can be sensed for the purposes of taking inventory. We'll include everything in the normal visual sense table, plus everything directly held.

`iobjFor(GiveTo)`OVERRIDDEN | `actor.t[10159]`

handle it as a 'hello' topic

`iobjFor(ShowTo)`OVERRIDDEN | `actor.t[10183]`

let the state object handle it

`iobjFor(ThrowTo)`OVERRIDDEN | `actor.t[10082]`

customize the message for THROW TO <actor>

`isActorTraveling (actor)`OVERRIDDEN | `actor.t[6417]`

is an actor traveling with us?

`isLikelyTopic (obj)` | `actor.t[8254]`

Determine if the given object is a likely topic for a conversational action performed by this actor. By default, we'll return true if the topic is known, nil if not.

`isLocationLit ( )` | `actor.t[8532]`

Determine if my location is lit for my sight-like senses.

`isPlayerChar ( )` | `actor.t[6241]`

determine if I'm the player character

`knowsAbout (obj)` | `actor.t[8195]`

Determine if I know about the given object. I know about an object if it's specifically marked as known to me; I also know about the object if I can see it now, or if I've ever seen it in the past.

`knowsTopic (obj)` | `actor.t[8243]`

Determine if the actor recognizes the given object as a "topic," which is an object that represents some knowledge the actor can use in conversations, consultations, and the like.

By default, we'll recognize any Topic object marked as known, and we'll recognize any game object for which our knowsAbout(obj) returns true. Games might wish to override this in some cases to limit or expand an actor's knowledge according to what the actor has experienced of the setting or story. Note that it's often easier to control actor knowledge using the lower-level knowsAbout() and setKnowsAbout() methods, though.

`listActorPosture (povActor)` | `actor.t[7356]`

Describe the actor as part of the EXAMINE description of a nested room containing the actor. 'povActor' is the actor doing the looking.

`lookAround (verbose)`OVERRIDDEN | `actor.t[7413]`

Display a description of the actor's location from the actor's point of view.

If 'verbose' is true, then we'll show the full description in all cases. Otherwise, we'll show the full description if the actor hasn't seen the location before, or the terse description if the actor has previously seen the location.

`makePosture (newPosture)` | `actor.t[7398]`

Set our posture to the given status. By default, we'll simply set our posture property to the new status, but actors can override this to handle side effects of the change.

`meetsObjHeld (actor)`OVERRIDDEN | `actor.t[5936]`

We meet the objHeld precondition for ourself - that is, for any verb that requires holding an object, we can be considered to be holding ourself.

`mustMoveObjInto (obj)`OVERRIDDEN | `actor.t[6306]`

desribe our containment of an object as carrying the object

`nonIdleTurn ( )` | `actor.t[9224]`

Receive notification that this is a non-idle turn. This is called whenever a command in our pending command queue is about to be executed.

This method need not do anything at all, since the caller will take care of running the pending command. The purpose of this method is to take care of any changes an actor wants to make when it receives an explicit command, as opposed to running its own autonomous activity.

By default, we cancel follow mode if it's in effect. It usually makes sense for an explicit command to interrupt follow mode; follow mode is usually started by an explicit command in the first place, so it is usually sensible for a new command to replace the one that started follow mode.

`noteConditionsAfter ( )` | `actor.t[8972]`

Note conditions after an action or other event. By default, if we are still in the same location we were in when noteConditionsBefore() was last called, and the light/dark status has changed, we'll mention the change in light/dark status.

`noteConditionsBefore ( )` | `actor.t[8959]`

Note conditions before an action or other event. By default, we note our location and light/dark status, so that we comment on any change in the light/dark status after the event if we're still in the same location.

`noteConsultation (obj)` | `actor.t[6902]`

note that we're consulting an item

`noteConvAction (other)` | `actor.t[6883]`

Note that we're taking part in a conversational action with another character. This is symmetrical - it could mean we're the initiator of the conversation action or the target. We'll remember the person we're talking to, and reset our conversation time counters so we know we've conversed on this turn.

`noteConversation (other)` | `actor.t[6855]`

Note that we're performing a conversational command targeting the given actor. We'll make the actors point at each other with their 'lastInterlocutor' properties. This is called on the character performing the conversation command: if the player types ASK BOB ABOUT BOOK, this will be called on the player character actor, with 'other' set to Bob.

`noteConversationFrom (other)` | `actor.t[6870]`

Note that another actor is issuing a conversational command targeting us. For example, if the player types ASK BOB ABOUT BOOK, then this will be called on Bob, with the player character actor as 'other'.

`noteObjectShown (obj)` | `actor.t[10215]`

Note that the given object has been explicitly shown to me. By default, we'll mark the object and its visible contents as having been seen by me. This is called whenever we're the target of a SHOW TO or GIVE TO, since presumably such an explicit act of calling our attention to an object would make us consider the object as having been seen in the future.

`noteSeenBy (actor, prop)`OVERRIDDEN | `actor.t[8167]`

receive notification that another actor is observing us

`notifyIssuerParseFailure (targetActor, messageProp, args)` | `actor.t[9943]`

Receive notification that a command we sent to another NPC failed. This is only called when one NPC sends a command to another NPC; this is called on the issuer to let the issuer know that the target can't perform the command because of the given resolution failure.

By default, we don't do anything here, because we don't have any default code to send a command from one NPC to another. Any custom NPC actor that sends a command to another NPC actor might want to use this to deal with problems in processing those commands.

`notifyParseFailure (issuingActor, messageProp, args)` | `actor.t[9853]`

Notify an issuer that a command sent to us resulted in a parsing failure. We are meant to reply to the issuer to let the issuer know about the problem. messageProp is the libGlobal message property describing the error, and args is a list with the (varargs) arguments to the message property.

`notifyTopicResponse (fromActor, entry)` | `actor.t[6908]`

Receive notification that a TopicEntry response in our database is being invoked. We'll just pass this along to our current state.

`npcDesc ( )` | `actor.t[6034]`

Show the description of this actor when this actor is a non-player character.

This description should include only the constant, fixed description of the character. Do not include information on what the actor is doing right now, because that belongs in the ActorState object instead. When we display the actor's description, we'll show this text, and then we'll show the ActorState description as well; this combination approach makes it easier to keep the description synchronized with any scripted activities the actor is performing.

By default, we'll show this as a "default descriptive report," since it simply says that there's nothing special to say. However, whenever this is overridden with an actual description, you shouldn't bother to use defaultDescReport - simply display the descriptive message directly:

npcDesc = "He's wearing a gorilla costume. "

`obeyCommand (issuingActor, action)` | `actor.t[9645]`

Determine whether or not we want to obey a command from the given actor to perform the given action. We only get this far when we determine that it's possible for us to accept a command, given the sense connections between us and the issuing actor, and given our pending command queue.

When this routine is called, the action has been determined, and the noun phrases have been resolved. However, we haven't actually started processing the action yet, so the globals for the noun slots (gDobj, gIobj, etc) are NOT available. If the routine needs to know which objects are involved, it must obtain the full list of resolved objects from the action (using, for example, getResolvedDobjList()).

When there's a list of objects to be processed (as in GET ALL), we haven't started working on any one of them yet - this check is made once for the entire command, and applies to the entire list of objects. If the actor wants to respond specially to individual objects, you can do that by overriding actorAction() instead of this routine.

This routine should display an appropriate message and return nil if the command is not to be accepted, and should simply return true to accept the command.

By default, we'll let our state object handle this.

Note that actors that override this might also need to override wantsFollowInfo(), since an actor that accepts "follow" commands will need to keep track of the movements of other actors if it is to carry out any following.

`okayPostureChange ( )` | `actor.t[7333]`

Get a default acknowledgment of a change to our posture. This should acknowledge the posture so that it tells us the current posture. This is used for a command such as "stand up" from a chair, so that we can report the appropriate posture status in our acknowledgment; we might end up being inside another nested container after standing up from the chair, so we might not simply be standing when we're done.

`orderingTime (targetActor)` | `actor.t[7733]`

The amount of time, in game clock units, it takes me to issue an order to another actor. By default, it takes one unit (which is usually equal to one turn) to issue a command to another actor. However, if we are configured to wait for our issued commands to complete in full, the ordering time is zero; we don't need any extra wait time in this case because we'll wait the full length of the issued command to begin with.

`pcDesc ( )` | `actor.t[6011]`

The default description when we examine this actor and the actor is serving as the player character. This should generally not include any temporary status information; just show constant, fixed features.

`postureDesc ( )` | `actor.t[6003]`

Show my posture, as part of the full EXAMINE description of this actor. We'll let our nominal actor container handle it.

`readyForTurn ( )` | `actor.t[9049]`

Determine if we're ready to do something on our turn. We're ready to do something if we're not waiting for another actor to finish doing something and either we're the player character or we already have a pending command in our command queue.

`referralPerson ( )` | `actor.t[6220]`

refer to the player character with my player character referral person, and refer to all other characters in the third person

`rememberLastDoor (obj)` | `actor.t[6653]`

Remember the last door I traveled through. We use this information for disambiguation, to boost the likelihood that an actor that just traveled through a door is referring to the same door in a subsequent "close" command.

`rememberTravel (origin, dest, backConnector)` | `actor.t[6661]`

Remember our most recent travel. If we know the back connector (i.e., the connector that reverses the travel we're performing), then we'll be able to accept a GO BACK command to attempt to return to the previous location.

`remoteSpecialDesc (actor)`OVERRIDDEN | `actor.t[6052]`

no description available

`removeActorNotifyItem (obj)` | `actor.t[8493]`

remove an item from the registered notification list

`removeFromAgenda (item)` | `actor.t[6953]`

remove an agenda item

`reverseLastTravel ( )` | `actor.t[6675]`

Reverse the most recent travel. If we're still within the same destination we reached in the last travel, and we know the connector we arrived through (i.e., the "back connector" for the last travel, which reverses the connector we took to get here), then try traveling via the connector.

`sayArriving (conn)`OVERRIDDEN | `actor.t[6729]`

Travel arrival/departure messages. Defer to the current state object on all of these.

`sayArrivingDir (dir, conn)`OVERRIDDEN | `actor.t[6739]`

no description available

`sayArrivingDownStairs (conn)`OVERRIDDEN | `actor.t[6753]`

no description available

`sayArrivingLocally (dest, conn)`OVERRIDDEN | `actor.t[6733]`

no description available

`sayArrivingThroughPassage (conn)`OVERRIDDEN | `actor.t[6743]`

no description available

`sayArrivingUpStairs (conn)`OVERRIDDEN | `actor.t[6751]`

no description available

`sayArrivingViaPath (conn)`OVERRIDDEN | `actor.t[6747]`

no description available

`sayDeparting (conn)`OVERRIDDEN | `actor.t[6731]`

no description available

`sayDepartingDir (dir, conn)`OVERRIDDEN | `actor.t[6741]`

no description available

`sayDepartingDownStairs (conn)`OVERRIDDEN | `actor.t[6757]`

no description available

`sayDepartingLocally (dest, conn)`OVERRIDDEN | `actor.t[6735]`

no description available

`sayDepartingThroughPassage (conn)`OVERRIDDEN | `actor.t[6745]`

no description available

`sayDepartingUpStairs (conn)`OVERRIDDEN | `actor.t[6755]`

no description available

`sayDepartingViaPath (conn)`OVERRIDDEN | `actor.t[6749]`

no description available

`sayGoodbye (actor)` | `actor.t[9661]`

no description available

`sayHello (actor)` | `actor.t[9660]`

Say hello/goodbye/yes/no to the given actor. We'll greet the target actor is the target actor was specified (i.e., actor != self); otherwise, we'll greet our current default conversational partner, if we have one.

`sayNo (actor)` | `actor.t[9663]`

no description available

`saySpecialTopic ( )` | `actor.t[9715]`

Handle the XSPCLTOPIC pseudo-command. This command is generated by the SpecialTopic pre-parser when it recognizes the player's input as matching an active SpecialTopic's custom syntax. Our job is to route this back to our current interlocutor's active ConvNode, so that it can find the SpecialTopic that it matched in pre-parsing and show its response.

`sayToActor (actor, topic, convType)` | `actor.t[9666]`

handle one of the conversational addresses

`sayTravelingRemotely (dest, conn)`OVERRIDDEN | `actor.t[6737]`

no description available

`sayYes (actor)` | `actor.t[9662]`

no description available

`scheduleInitiateConversation (state, node, turns)` | `actor.t[5881]`

Schedule initiation of conversation. This allows the caller to set up a conversation to start on a future turn. The conversation will start after (1) the given number of turns has elapsed, and (2) the player didn't target this actor with a conversational command on the same turn. This allows us to set the NPC so that it *wants* to start a conversation, and will do so as soon as it has a chance to get a word in.

If 'turns' is zero, the conversation can start the next time the actor takes a turn; so, if this is called during the PC's action processing, the conversation can start on the same turn. Note that if this is called during the actor's takeTurn() processing, it won't actually start the conversation until the next turn, because that's the next time we'll check the queue. If 'turns' is 1, then the player will get at least one more command before the conversation will begin, and so on with higher numbers.

`scopeList ( )` | `actor.t[8594]`

Build a list of all of the objects of which an actor is aware.

An actor is aware of an object if the object is within reach of the actor's senses, and has some sort of presence in that sense. Note that both of these conditions must be true for at least one sense possessed by the actor; an object that is within earshot, but not within reach of any other sense, is in scope only if the object is making some kind of noise.

In addition, objects that the actor is holding (i.e., those contained by the actor directly) are always in scope, regardless of their reachability through any sense.

`scriptedTravelTo (dest)` | `actor.t[6635]`

Perform scripted travel to the given adjacent location. This looks for a directional connector in our current location whose destination is the given location, and for a corresponding back-connector in the destination location. If we can find the connectors, we'll perform the travel using travelTo().

The purpose of this routine is to simplify scripted travel for simple cases where directional connectors are available for the desired travel. This routine is NOT suitable for intelligent goal-seeking NPC's who automatically try to find their own routes, for two reasons. First, this routine only lets an NPC move to an *adjacent* location; it won't try to find a path between arbitrary locations. Second, this routine is "omniscient": it doesn't take into account what the NPC knows about the connections between locations, but simply finds a connector that actually provides the desired travel.

What this routine *is* suitable for are cases where we have a pre-scripted series of NPC travel actions, where we have a list of rooms we want the NPC to visit in order. This routine simplifies this type of scripting by automatically finding the connectors; the script only has to specify the next location for the NPC to visit.

`setConvNode (node)` | `actor.t[5729]`

set the current conversation node

`setConvNodeReason (node, reason)` | `actor.t[5732]`

set the current conversation node, with a reason code

`setCurState (state)` | `actor.t[5693]`

set the current state

`setHasSeen (obj)` | `actor.t[8164]`

mark the object to remember that I've seen it

`setHer (obj)` | `actor.t[9983]`

set the antecedent for the feminine singular ("her")

`setHim (obj)` | `actor.t[9977]`

set the antecedent for the masculine singular ("him")

`setIt (obj)` | `actor.t[9971]`

set the antecedent for the neuter singular pronoun ("it" in English)

`setKnowsAbout (obj)` | `actor.t[8198]`

mark the object as known to me

`setPossAnaphor (typ, val)` | `actor.t[10012]`

set a possessive anaphor value

`setPossAnaphorObj (obj)` | `en_us.t[2577]`

set a possessive anaphor

`setPronoun (lst)` | `en_us.t[2410]`

Set a pronoun antecedent to the given list of ResolveInfo objects. Pronoun handling is language-specific, so this implementation is part of the English library, not the generic library.

If only one object is present, we'll set the object to be the antecedent of 'it', 'him', or 'her', according to the object's gender. We'll also set the object as the single antecedent for 'them'.

If we have multiple objects present, we'll set the list to be the antecedent of 'them', and we'll forget about any antecedent for 'it'.

Note that the input is a list of ResolveInfo objects, so we must pull out the underlying game objects when setting the antecedents.

`setPronounAntecedent (typ, val)` | `actor.t[10002]`

set a pronoun's antecedent value

`setPronounByType (typ, lst)` | `en_us.t[2516]`

Set a pronoun antecedent to the given ResolveInfo list, for the specified type of pronoun. We don't have to worry about setting other types of pronouns to this antecedent - we specifically want to set the given pronoun type. This is language-dependent because we still have to figure out the number (i.e. singular or plural) of the pronoun type.

`setPronounMulti ([args])` | `en_us.t[2463]`

Set a pronoun to refer to multiple potential antecedents. This is used when the verb has multiple noun slots - UNLOCK DOOR WITH KEY. For verbs like this, we have no way of knowing in advance whether a future pronoun will refer back to the direct object or the indirect object (etc) - we could just assume that 'it' will refer to the direct object, but this won't always be what the player intended. In natural English, pronoun antecedents must often be inferred from context at the time of use - so we use the same approach.

Pass an argument list consisting of ResolveInfo lists - that is, pass one argument per noun slot in the verb, and make each argument a list of ResolveInfo objects. In other words, you call this just as you would setPronoun(), except you can pass more than one list argument.

We'll store the multiple objects as antecedents. When we need to resolve a future singular pronoun, we'll figure out which of the multiple antecedents is the most logical choice in the context of the pronoun's usage.

`setPronounObj (obj)` | `en_us.t[2535]`

Set a pronoun antecedent to the given simulation object (usually an object descended from Thing).

`setSpecialTraveler (traveler)` | `actor.t[6447]`

Set the "special traveler." When this is set, we explicitly perform travel through this object rather than through the traveler indicated by our location. Returns the old value, so that the old value can be restored when the caller has finished its need for the special traveler.

`setThem (lst)` | `actor.t[9989]`

set the antecedent list for the ungendered plural pronoun ("them")

`showInventory (tall)` | `actor.t[8851]`

Show what the actor is carrying.

`showInventoryWith (tall, inventoryLister)` | `actor.t[8867]`

Show what the actor is carrying, using the given listers.

Note that this method must be overridden if the actor does not use a conventional 'contents' list property to store its full set of contents.

`showSpecialDescInContents (actor, cont)`OVERRIDDEN | `actor.t[6071]`

When we're asked to show a special description as part of the description of a containing object (which will usually be a nested room of some kind), just show our posture in our container, rather than showing our full "I am here" description.

`specialDesc ( )` | `actor.t[6050]`

Always list actors specially, rather than as ordinary items in contents listings. We'll send this to our current state object for processing, since our "I am here" description tends to vary by state.

`specialDescListWith ( )` | `actor.t[6053]`

no description available

`standUp ( )` | `actor.t[7370]`

Stand up. This is used by the 'Stand' action to carry out the command.

`suggestTopics (explicit)` | `actor.t[8309]`

Suggest topics of conversation. This is called by the TOPICS command (in which case 'explicit' is true), and whenever we first engage a character in a stateful conversation (in which case 'explicit' is nil).

We'll show the list of suggested topics associated with our current conversational partner. If there are no topics, we'll say nothing unless 'explicit' is true, in which case we'll simply say that there are no topics that the player character is thinking about.

The purpose of this method is to let the game author keep an "inventory" of topics with this actor for a given conversational partner. This inventory is meant to represent the topics that on the player character's mind - things the player character wants to talk about with the other actor. Note that we're talking about what the player *character* is thinking about - obviously we don't know what's on the player's mind.

When we enter conversation, or when the player asks for advice, we'll show this inventory. The idea is to help guide the player through a conversation without the more heavy-handed device of a formal conversation menu system, so that conversations have a more free-form feel without leaving the player hunting in the dark for the magic ASK ABOUT topic.

The TOPICS system is entirely optional. If a game doesn't specify any SuggestedTopic objects, then this routine will simply never be called, and the TOPICS command won't be allowed. Some authors think it gives away too much to provide a list of topic suggestions like this, and others don't like anything that smacks of a menu system because they think it destroys the illusion created by the text-input command line that the game is boundless. Authors who feel this way can just ignore the TOPICS system. But be aware that the illusion of boundlessness isn't always a good thing for players; hunting around for ASK ABOUT topics can make the game's limits just as obvious, if not more so, by exposing the vast number of inputs for which the actor doesn't have a good response. Players aren't stupid - a string of variations on "I don't know about that" is just as obviously mechanistic as a numbered list of menu choices. Using the TOPICS system might be a good compromise for many authors, since the topic list can help guide the player to the right questions without making the player feel straitjacketed by a menu list.

`suggestTopicsFor (actor, explicit)` | `actor.t[8339]`

Suggest topics that the given actor might want to talk to us about. The given actor is almost always the player character, since generally NPC's don't talk to one another using conversation commands (there'd be no point; they're simple programmed automata, not full-blown AI's).

`trackFollowInfo (obj, conn, from)` | `actor.t[7879]`

Receive notification that an object is leaving its current location as a result of the action we're currently processing. Actors (and possibly other objects) will broadcast this notification to all Actor objects connected in any way by containment when they move under their own power (such as with Actor.travelTo) to a new location. We'll keep tracking information if we are configured to keep tracking information for the given object and we can see the given object. Note that this is called when the object is still at the source end of the travel - the important thing is that we see the object departing.

'obj' is the object that is seen to be leaving, and 'conn' is the TravelConnector it is taking.

'conn' is the connector being traversed. If we're simply being observed in this location (as in a call to setHasSeen), rather than being observed to leave the location, the connector will be nil.

'from' is the effective starting location of the travel. This isn't necessarily the departing object's location, since the departing object could be inside a vehicle or some other kind of traveler object.

Note that this notification is sent only to actors with some sort of containment connection to the object that's moving, because a containment connection is necessary for there to be a sense connection.

`travelerName (arriving)` | `en_us.t[2373]`

Show my name for an arrival/departure message. If we've been seen before by the player character, we'll show our definite name, otherwise our indefinite name.

`travelerPreCond (conn)`OVERRIDDEN | `actor.t[6365]`

Get the preconditions for travel. By default, we'll add the standard preconditions that the connector requires for actors.

Note that these preconditions apply only when the actor is the traveler. If the actor is in a vehicle, so that the vehicle is the traveler in a given travel operation, the vehicle's travelerPreCond conditions are used instead of ours.

`travelerTravelWithin (actor, dest)`OVERRIDDEN | `actor.t[6517]`

Traveler interface: perform local travel, between nested rooms within a single top-level location.

`travelTo (dest, connector, backConnector)` | `actor.t[6603]`

Travel to a new location.

`travelWithin (dest)` | `actor.t[6500]`

Travel within a location, as from a room to a contained nested room. This should generally be used in lieu of travelTo when traveling between locations that are related directly by containment rather than with TravelConnector objects.

Travel within a location is not restricted by darkness; we assume that if the nested objects are in scope at all, travel among them is allowed.

This type of travel does not trigger calls to travelerLeaving() or travelerArriving(). To mitigate this loss of notification, we call actorTravelingWithin() on the source and destination objects.

`tryMakingRoomToHold (obj, allowImplicit)` | `actor.t[7086]`

Try making room to hold the given object. This is called when checking the "room to hold object" pre-condition, such as for the "take" verb.

If holding the new object would exceed the our maximum holding capacity, we'll go through our inventory looking for objects that can reduce our held bulk with implicit commands. Objects with holding affinities - "bags of holding", keyrings, and the like - can implicitly shuffle the actor's possessions in a manner that is neutral as far as the actor is concerned, thereby reducing our active holding load.

Returns true if an implicit command was attempted, nil if not.

`tryMovingObjInto (obj)`OVERRIDDEN | `actor.t[6283]`

Try moving the given object into this object. For an actor, this will do one of two things. If 'self' is the actor performing the action that's triggering this implied command, then we can achieve the goal simply by taking the object. Otherwise, the way to get an object into my possession is to have the actor performing the command give me the object.

`unexcludeFromLookAround (obj)` | `actor.t[7472]`

remove an object from the 'look around' exclusion list

`verifyFollowable ( )`OVERRIDDEN | `actor.t[7926]`

By default, all actors are followable.

`verifyNotSelf (msg)` | `actor.t[10050]`

verify() handler to check against applying an action to 'self'

`visibleInfoTable ( )` | `actor.t[8750]`

Build a table of full sensory information for all of the objects visible to the actor through the actor's sight-like senses. Returns a lookup table with the same set of information as senseInfoTable().

`visibleInfoTableFromPov (pov)` | `actor.t[8761]`

Build a table of full sensory information for all of the objects visible to me from a particular point of view through my sight-like senses.

`waitForIssuedCommand (targetActor)` | `actor.t[7747]`

Wait for completion of a command that we issued to another actor. The parser calls this routine after each time we issue a command to another actor.

If we're configured to wait for completion of orders given to other actors before we get another turn, we'll set ourselves up in waiting mode. Otherwise, we'll do nothing.

`wantsFollowInfo (obj)` | `actor.t[7839]`

Do I track departing objects for following the given object?

By default, the player character tracks everyone, and NPC's track only the actor they're presently tasked to follow. Most NPC's will never accept 'follow' commands, so there's no need to track everyone all the time; for efficiency, we take advantage of this assumption so that we can avoid storing a bunch of tracking information that will never be used.

TADS 3 Library Manual
Generated on 8/21/2012 from TADS version 3.1.2