Actorclass | actor.t[5670], en_us.t[2129] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
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
Actor
Thing
VocabObject
object
Schedulable
object
Traveler
TravelMessageHandler
object
ActorTopicDatabase
TopicDatabase
object
Actor
UntakeableActor
Person
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
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
accompanyingActors | actor.t[7816] |
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] |
agendaList | actor.t[6922] |
antecedentTable | actor.t[9953] |
boredomAgendaItem | actor.t[6929] |
boredomCount | actor.t[6831] |
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] |
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] |
canMatchHer OVERRIDDEN | en_us.t[2382] |
canMatchHim OVERRIDDEN | en_us.t[2381] |
canMatchIt OVERRIDDEN | en_us.t[2383] |
canMatchThem OVERRIDDEN | en_us.t[2384] |
commandReferralPerson | actor.t[6238] |
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] |
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] |
convMgrID | actor.t[5778] |
convNodeTab | actor.t[5726] |
curConvNode | actor.t[5715] |
curState | actor.t[5690] |
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] |
followables_ | actor.t[8158] |
followingActor | actor.t[9235] |
getTravelerActors OVERRIDDEN | actor.t[6435] |
getTravelerMotiveActors OVERRIDDEN | actor.t[6438] |
hearinglikeSenses | actor.t[7546] |
holdingDescInventoryLister | actor.t[8927] |
inventoryLister | actor.t[8917] |
isActor | actor.t[5672] |
isLikelyCommandTarget OVERRIDDEN | actor.t[9506] |
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] |
isListedAboardVehicle OVERRIDDEN | actor.t[6368] |
isListedInContents | actor.t[5944] |
isListedInInventory | actor.t[5945] |
issueCommandsSynchronously | actor.t[7695] |
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] |
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] |
lastConvTime | actor.t[6837] |
lastDoorTraversed | actor.t[6700] |
lastInterlocutor | actor.t[6818] |
lastTravelBack | actor.t[6704] |
lastTravelDest | actor.t[6703] |
locationBefore | actor.t[9000] |
locationLitBefore | actor.t[9001] |
maxSingleBulk | actor.t[6340] |
mostRecentAction | actor.t[9147] |
name OVERRIDDEN | en_us.t[2131] |
nextHoldingIndex | actor.t[7293] |
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] |
pcReferralPerson | actor.t[6223] |
pendingCommand | actor.t[9794] |
pendingConv | actor.t[5911] |
pendingResponse | actor.t[9801] |
possAnaphorTable | actor.t[9965] |
posture | actor.t[7322] |
responseSetConvNode | actor.t[5785] |
revertTargetActorAtEndOfSentence | actor.t[7722] |
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] |
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] |
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] |
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] |
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] |
specialDescBeforeContents OVERRIDDEN | actor.t[6063] |
specialDescOrder OVERRIDDEN | actor.t[6082] |
specialTraveler | actor.t[6462] |
takeFromNotInMessage OVERRIDDEN | actor.t[10047] |
waitingForActor | actor.t[7785] |
waitingForInfo | actor.t[7786] |
weightCapacity | actor.t[6348] |
acceptCommand (issuingActor) OVERRIDDEN | actor.t[9529] |
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] |
By default, we won't accept a command if we have any work pending.
actorAction ( ) | actor.t[8373] |
actorActionFollow (obj) | actor.t[7990] |
actorHereDesc ( ) | actor.t[6117] |
actorListWith ( ) | actor.t[6089] |
actorRoomNameStatus (room) | actor.t[6145] |
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] |
actorTravel (traveler, connector) | actor.t[8422] |
actorVerifyFollow (obj) | actor.t[7934] |
addAccompanyingActor (actor) | actor.t[7796] |
addActorNotifyItem (obj) | actor.t[8487] |
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] |
addFirstPendingAction (startOfSentence, issuer, action, [objs]) | actor.t[9785] |
addFirstPendingCommand (startOfSentence, issuer, toks) | actor.t[9761] |
addPendingAction (startOfSentence, issuer, action, [objs]) | actor.t[9773] |
addPendingCommand (startOfSentence, issuer, toks) | actor.t[9748] |
addToAgenda (item) | actor.t[6932] |
addToContents (obj) OVERRIDDEN | actor.t[7296] |
adjustLookAroundTable (tab, pov, actor) OVERRIDDEN | actor.t[7443] |
afterAction ( ) OVERRIDDEN | actor.t[8382] |
afterTravel (traveler, connector) OVERRIDDEN | actor.t[8411] |
aName ( ) | en_us.t[2316] |
aNameObj ( ) OVERRIDDEN | en_us.t[2319] |
beforeAction ( ) OVERRIDDEN | actor.t[8349] |
beforeTravel (traveler, connector) OVERRIDDEN | actor.t[8389] |
bestVisualInfo (obj) | actor.t[8559] |
calcScheduleOrder ( ) OVERRIDDEN | actor.t[9031] |
canBeTalkedTo (talker, sense, info) | actor.t[7663] |
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] |
cannotFollow ( ) | actor.t[9247] |
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] |
canOwn (obj) OVERRIDDEN | actor.t[6354] |
canSee (obj) OVERRIDDEN | actor.t[8665] |
canSmell (obj) OVERRIDDEN | actor.t[8705] |
canTalkTo (actor) | actor.t[7592] |
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] |
checkDarkTravel (dest, connector) | actor.t[6568] |
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] |
checkReadyToEnterNestedRoom (dest, allowImplicit) | actor.t[6479] |
checkStagingLocation (dest) OVERRIDDEN | actor.t[6710] |
checkTakeFromInventory (actor, obj) | actor.t[8459] |
checkWaitingForActor ( ) | actor.t[9090] |
conjugateRegularVerb (verb) OVERRIDDEN | en_us.t[2265] |
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] |
copyPronounAntecedentsFrom (issuer) | actor.t[10034] |
defaultAskForResponse (byActor, obj) | actor.t[10390] |
defaultAskResponse (fromActor, topic) | actor.t[10362] |
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] |
defaultConvResponse (actor, topic, convType) | actor.t[10307] |
defaultGiveResponse (byActor, topic) | actor.t[10386] |
defaultGoodbyeResponse (actor) | actor.t[10336] |
defaultGreetingResponse (actor) | actor.t[10332] |
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] |
defaultShowResponse (byActor, topic) | actor.t[10382] |
defaultTellResponse (fromActor, topic) | actor.t[10378] |
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] |
descViaActorContainer (prop, contToIgnore) | actor.t[6171] |
'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] |
distantSpecialDesc ( ) | actor.t[6051] |
dobjFor(AskAbout) OVERRIDDEN | actor.t[10230] |
dobjFor(AskFor) OVERRIDDEN | actor.t[10123] |
dobjFor(Drop) OVERRIDDEN | actor.t[10073] |
dobjFor(Kiss) OVERRIDDEN | actor.t[10112] |
dobjFor(PutIn) OVERRIDDEN | actor.t[10092] |
dobjFor(PutOn) OVERRIDDEN | actor.t[10074] |
dobjFor(PutUnder) OVERRIDDEN | actor.t[10075] |
dobjFor(Take) OVERRIDDEN | actor.t[10072] |
dobjFor(TalkTo) OVERRIDDEN | actor.t[10141] |
dobjFor(TellAbout) OVERRIDDEN | actor.t[10248] |
dobjFor(Throw) OVERRIDDEN | actor.t[10076] |
dobjFor(ThrowAt) OVERRIDDEN | actor.t[10077] |
dobjFor(ThrowDir) OVERRIDDEN | actor.t[10078] |
dobjFor(ThrowTo) OVERRIDDEN | actor.t[10079] |
endConversation ( ) | actor.t[5897] |
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] |
examineStatus ( ) OVERRIDDEN | actor.t[5978] |
excludeFromLookAround (obj) | actor.t[7457] |
executeActorTurn ( ) | actor.t[9297] |
executeAgenda ( ) | actor.t[6965] |
executeTurn ( ) OVERRIDDEN | actor.t[9268] |
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] |
forEachTravelingActor (func) OVERRIDDEN | actor.t[6424] |
forgetPossAnaphors ( ) | actor.t[10022] |
getActionMessageObj ( ) | actor.t[9835] |
getActorNotifyList ( ) | actor.t[8470] |
getBulkHeld ( ) | actor.t[7030] |
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] |
getDefaultInterlocutor ( ) | actor.t[6784] |
getDropDestination (objToDrop, path) OVERRIDDEN | actor.t[7490] |
getFollowables ( ) | actor.t[7823] |
getFollowInfo (obj) | actor.t[7918] |
getLookAroundName ( ) | actor.t[7432] |
getParserDeferredMessageObj ( ) | actor.t[9829] |
getParserMessageObj ( ) | actor.t[9807] |
getPossAnaphor (typ) | actor.t[10019] |
getPronounAntecedent (typ) | actor.t[9995] |
getPushTraveler (obj) | actor.t[6401] |
getTopicOwner ( ) OVERRIDDEN | actor.t[8261] |
getTraveler (conn) | actor.t[6381] |
If we have a special traveler explicitly set, it overrides the traveler indicated by the location.
getVisualAmbient ( ) | actor.t[8505] |
getWeightHeld ( ) | actor.t[7056] |
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] |
handleConversation (actor, topic, convType) | actor.t[10293] |
hasSeen (obj) | actor.t[8161] |
hideFromAll (action) OVERRIDDEN | actor.t[5922] |
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] |
idleTurn ( ) | actor.t[9168] |
impliedCommandMode ( ) | actor.t[6273] |
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] |
initiateConversation (state, node) | actor.t[5818] |
'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] |
inventorySense (sense, lister) | actor.t[8890] |
inventorySenseInfoTable ( ) | actor.t[8789] |
iobjFor(GiveTo) OVERRIDDEN | actor.t[10159] |
iobjFor(ShowTo) OVERRIDDEN | actor.t[10183] |
iobjFor(ThrowTo) OVERRIDDEN | actor.t[10082] |
isActorTraveling (actor) OVERRIDDEN | actor.t[6417] |
isLikelyTopic (obj) | actor.t[8254] |
isLocationLit ( ) | actor.t[8532] |
isPlayerChar ( ) | actor.t[6241] |
knowsAbout (obj) | actor.t[8195] |
knowsTopic (obj) | actor.t[8243] |
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] |
lookAround (verbose) OVERRIDDEN | actor.t[7413] |
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] |
meetsObjHeld (actor) OVERRIDDEN | actor.t[5936] |
mustMoveObjInto (obj) OVERRIDDEN | actor.t[6306] |
nonIdleTurn ( ) | actor.t[9224] |
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] |
noteConditionsBefore ( ) | actor.t[8959] |
noteConsultation (obj) | actor.t[6902] |
noteConvAction (other) | actor.t[6883] |
noteConversation (other) | actor.t[6855] |
noteConversationFrom (other) | actor.t[6870] |
noteObjectShown (obj) | actor.t[10215] |
noteSeenBy (actor, prop) OVERRIDDEN | actor.t[8167] |
notifyIssuerParseFailure (targetActor, messageProp, args) | actor.t[9943] |
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] |
notifyTopicResponse (fromActor, entry) | actor.t[6908] |
npcDesc ( ) | actor.t[6034] |
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] |
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] |
orderingTime (targetActor) | actor.t[7733] |
pcDesc ( ) | actor.t[6011] |
postureDesc ( ) | actor.t[6003] |
readyForTurn ( ) | actor.t[9049] |
referralPerson ( ) | actor.t[6220] |
rememberLastDoor (obj) | actor.t[6653] |
rememberTravel (origin, dest, backConnector) | actor.t[6661] |
remoteSpecialDesc (actor) OVERRIDDEN | actor.t[6052] |
removeActorNotifyItem (obj) | actor.t[8493] |
removeFromAgenda (item) | actor.t[6953] |
reverseLastTravel ( ) | actor.t[6675] |
sayArriving (conn) OVERRIDDEN | actor.t[6729] |
sayArrivingDir (dir, conn) OVERRIDDEN | actor.t[6739] |
sayArrivingDownStairs (conn) OVERRIDDEN | actor.t[6753] |
sayArrivingLocally (dest, conn) OVERRIDDEN | actor.t[6733] |
sayArrivingThroughPassage (conn) OVERRIDDEN | actor.t[6743] |
sayArrivingUpStairs (conn) OVERRIDDEN | actor.t[6751] |
sayArrivingViaPath (conn) OVERRIDDEN | actor.t[6747] |
sayDeparting (conn) OVERRIDDEN | actor.t[6731] |
sayDepartingDir (dir, conn) OVERRIDDEN | actor.t[6741] |
sayDepartingDownStairs (conn) OVERRIDDEN | actor.t[6757] |
sayDepartingLocally (dest, conn) OVERRIDDEN | actor.t[6735] |
sayDepartingThroughPassage (conn) OVERRIDDEN | actor.t[6745] |
sayDepartingUpStairs (conn) OVERRIDDEN | actor.t[6755] |
sayDepartingViaPath (conn) OVERRIDDEN | actor.t[6749] |
sayGoodbye (actor) | actor.t[9661] |
sayHello (actor) | actor.t[9660] |
sayNo (actor) | actor.t[9663] |
saySpecialTopic ( ) | actor.t[9715] |
sayToActor (actor, topic, convType) | actor.t[9666] |
sayTravelingRemotely (dest, conn) OVERRIDDEN | actor.t[6737] |
sayYes (actor) | actor.t[9662] |
scheduleInitiateConversation (state, node, turns) | actor.t[5881] |
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] |
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] |
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] |
setConvNodeReason (node, reason) | actor.t[5732] |
setCurState (state) | actor.t[5693] |
setHasSeen (obj) | actor.t[8164] |
setHer (obj) | actor.t[9983] |
setHim (obj) | actor.t[9977] |
setIt (obj) | actor.t[9971] |
setKnowsAbout (obj) | actor.t[8198] |
setPossAnaphor (typ, val) | actor.t[10012] |
setPossAnaphorObj (obj) | en_us.t[2577] |
setPronoun (lst) | en_us.t[2410] |
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] |
setPronounByType (typ, lst) | en_us.t[2516] |
setPronounMulti ([args]) | en_us.t[2463] |
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] |
setSpecialTraveler (traveler) | actor.t[6447] |
setThem (lst) | actor.t[9989] |
showInventory (tall) | actor.t[8851] |
showInventoryWith (tall, inventoryLister) | actor.t[8867] |
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] |
specialDesc ( ) | actor.t[6050] |
specialDescListWith ( ) | actor.t[6053] |
standUp ( ) | actor.t[7370] |
suggestTopics (explicit) | actor.t[8309] |
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] |
trackFollowInfo (obj, conn, from) | actor.t[7879] |
'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] |
travelerPreCond (conn) OVERRIDDEN | actor.t[6365] |
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] |
travelTo (dest, connector, backConnector) | actor.t[6603] |
travelWithin (dest) | actor.t[6500] |
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] |
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] |
unexcludeFromLookAround (obj) | actor.t[7472] |
verifyFollowable ( ) OVERRIDDEN | actor.t[7926] |
verifyNotSelf (msg) | actor.t[10050] |
visibleInfoTable ( ) | actor.t[8750] |
visibleInfoTableFromPov (pov) | actor.t[8761] |
waitForIssuedCommand (targetActor) | actor.t[7747] |
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] |
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.