HermitActorStateclass
A “hermit” actor state is a state where the actor is unresponsive to conversational overtures (ASK ABOUT, TELL ABOUT, HELLO, GOODBYE, YES, NO, SHOW TO, GIVE TO, and any orders directed to the actor). Any attempt at conversation will be met with the ‘noResponse’ message.
class
HermitActorState
:
ActorState
Superclass Tree (in declaration order)
HermitActorState
ActorState
TravelMessageHandler
` object
[
ActorTopicDatabase](../object/ActorTopicDatabase.html)
[
TopicDatabase](../object/TopicDatabase.html)
object`
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
Inherited from ActorState
:
autoSuggest
getImpliedConvState
isInitState
location
stateDesc
stateSuggestedTopics
Inherited from ActorTopicDatabase
:
askForTopics
askTopics
commandTopics
giveTopics
initiateTopics
miscTopics
showTopics
specialTopics
tellTopics
Inherited from TopicDatabase
:
suggestedTopics
topicGroupActive
topicGroupScoreAdjustment
Summary of Methods
Inherited from ActorState
:
activateState
afterAction
afterTravel
arrivingTurn
arrivingWithDesc
beforeAction
beforeTravel
construct
deactivateState
distantSpecialDesc
endConversation
getActor
getNominalTraveler
getSuggestedTopicList
getTopicOwner
initializeActorState
justFollowed
notifyTopicResponse
obeyCommand
remoteSpecialDesc
showSpecialDescInContents
specialDesc
specialDescListWith
suggestTopicsFor
takeTurn
Inherited from TravelMessageHandler
:
sayArriving
sayArrivingDir
sayArrivingDownStairs
sayArrivingLocally
sayArrivingThroughPassage
sayArrivingUpStairs
sayArrivingViaPath
sayDeparting
sayDepartingDir
sayDepartingDownStairs
sayDepartingLocally
sayDepartingThroughPassage
sayDepartingUpStairs
sayDepartingViaPath
sayTravelingRemotely
Inherited from ActorTopicDatabase
:
initiateTopic
showTopicResponse
Inherited from TopicDatabase
:
addSuggestedTopic
addTopic
addTopicToList
compareVocabMatch
findTopicResponse
handleTopic
removeSuggestedTopic
removeTopic
removeTopicFromList
showSuggestedTopicList
Properties
limitSuggestions
OVERRIDDEN
Since the hermit state blocks topics from outside the state, don’t offer suggestions for other topics while in this state.
Note that you might sometimes want to override this to allow the usual topic suggestions (by setting this to nil). In particular:
- If it’s not outwardly obvious that the actor is unresponsive, you’ll probably want to allow suggestions. Remember, TOPICS suggests topics that the *PC* wants to talk about, not things the NPC is interested in. If the PC doesn’t necessarily know that the NPC won’t respond, the PC would still want to ask about those topics.
- If the hermit state is to be short-lived, you might want to show the topic suggestions even in the hermit state, so that the player is aware that there are still useful topics to explore with the NPC. The player might otherwise assume that the NPC is out of useful topics, and not bother trying again later when the NPC becomes more responsive.
Methods
handleConversation (otherActor, topic, convType)
OVERRIDDEN
all conversation actions get the same default response
noResponse ( )
Show our response to any conversational command. We’ll simply show the standard “there’s no response” message by default, but subclasses can (and usually should) override this to explain what’s really going on. Note that this routine will be invoked for any sort of conversation command, so any override needs to be generic enough that it’s equally good for ASK, TELL, and everything else.
Note that it’s fairly easy to create a shuffled list of random messages, if you want to add some variety to the actor’s responses. To do this, use an embedded ShuffledEventList:
myState: HermitActorState
noResponse() { myList.doScript(); }
myList: ShuffledEventList {
[‘message1’, ‘message2’, ‘message3’] }
;
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3