TopicTActionclassaction.t[5786], en_us.t[9151]

An Action with a direct object and a topic, such as "ask <actor> about <topic>". Topics differ from ordinary noun phrases in scope: rather than resolving to simulation objects based on location, we resolve these based on the actor's knowledge.

The grammar rules that produce these actions must set dobjMatch to the resolvable object of the command (the <actor> in "ask <actor> about <topic>"), and must set topicMatch to the topic match tree object, which must be a TopicProd object. Note that, in some cases, the phrasing might make the dobjMatch the indirect object, grammatically speaking: "type <topic> on <object>"; even in such cases, use dobjMatch for the resolvable object.

When we resolve the topic, we will always resolve it to a single object of class ResolvedTopic. This contains the literal tokens of the original command plus a list of simulation objects matching the topic name, ordered from best to worst. This is different from the way most commands work, since we do not resolve the topic to a simple game world object. We keep all of this extra information because we don't want to perform disambiguation in the normal fashion, but instead resolve as much as we can with what we're given, and then give the specialized action code as much information as we can to let the action code figure out how to respond to the topic.

Modified in en_us.t[9151]:
English-specific additions for verbs with topic phrases.

class TopicTAction :   TopicActionBase   TAction

Superclass Tree   (in declaration order)


Subclass Tree  


Global Objects  


Summary of Properties  

needAnaphoricBinding_  predicateNounPhrases  topicList_  topicResolver_  whichMessageObject  whichMessageTopic  whichObject 

Inherited from TopicActionBase :

Inherited from TAction :
actionAllowsAll  actionDobjProp  actor_  askDobjResponseProd  checkDobjProp  dobjCur_  dobjInfoCur_  dobjList_  dobjMatch  dobjResolver_  issuer_  preCondDobjProp  remapDobjProp  verDobjProp 

Inherited from Action :
actionTime  afterActionMainList  beforeAfterObjs  defaultForRecursion  extraMessageParams  implicitMsg  includeInUndo  isImplicit  isRepeatable  iterationCanceled  originalAction  parentAction  preCond  pronounOverride  remappedFrom  showDefaultReports  synthParamID  verbFlags  verifiedOkay 

Inherited from BasicProd :
firstTokenIndex  isSpecialResponseMatch  lastTokenIndex 

Inherited from Resolver :
action_  equivs_  isGlobalScope  isSubResolver  scope_ 

Summary of Methods  

announceDefaultObject  createTopicResolver  filterTopic  getAnaphoricBinding  getCurrentObjects  getMatchForRole  getObjectForRole  getOtherMessageObjectPronoun  getOtherObjectRole  getQuestionInf  getRoleFromIndex  getVerbPhrase  initForMissingDobj  initForMissingTopic  resetAction  resolveNouns  retryWithMissingTopic  setCurrentObjects  setObjectMatches  setResolvedObjects  whatObj 

Inherited from TopicActionBase :
getMessageParam  getTopic  getTopicQualifierResolver  getTopicResolver  reparseMatchAsTopic  resolveTopic  setResolvedTopic  setTopicMatch 

Inherited from TAction :
adjustDefaultObjectPrep  announceAllDefaultObjects  canDobjResolveTo  checkAction  checkRemapping  construct  createDobjResolver  createForMissingDobj  createForRetry  doActionMain  execAction  filterAmbiguousDobj  filterPluralDobj  getAllDobj  getDefaultDobj  getDobj  getDobjCount  getDobjFlags  getDobjInfo  getDobjResolver  getDobjTokens  getDobjWords  getObjResponseProd  getPreCondDescList  getPreCondPropForRole  getRemapPropForRole  getResolvedDobjList  getResolvedObjList  getResolveInfo  getVerbPhrase1  getVerifyPropForRole  initResolver  initTentative  resolvedObjectsInScope  retryWithAmbiguousDobj  retryWithMissingDobj  setResolvedDobj  testRetryDefaultDobj  verifyAction 

Inherited from Action :
actionOfKind  addBeforeAfterObj  afterAction  afterActionMain  announceActionObject  beforeAction  beforeActionMain  cacheMultiObjectAnnouncements  callAfterActionMain  callCatchAllProp  callPreConditions  callVerifyPreCond  callVerifyProp  cancelIteration  checkPreConditions  combineRemappedVerifyResults  createActionFrom  createActionInstance  createTopicQualifierResolver  doAction  doActionOnce  filterAmbiguousWithVerify  filterFacets  filterPluralWithVerify  finishResolveList  getDefaultWithVerify  getEnteredVerbPhrase  getImplicitPhrase  getInfPhrase  getNotifyTable  getObjPreCondDescList  getObjPreConditions  getOriginalAction  getOrigTokenList  getParticiplePhrase  getPredicate  getPronounOverride  getRemappedFrom  getSimpleSynonymRemap  getSortedVerifyResults  isConversational  isNestedIn  isPartOf  isRemapped  makeResolveInfo  makeResolveInfoList  maybeAnnounceDefaultObject  maybeAnnounceImplicit  maybeAnnounceMultiObject  noMatch  notifyBeforeAfter  objListPronoun  preAnnounceActionObject  recalcSenseContext  repeatAction  resolveAction  runBeforeNotifiers  saveActionForAgain  setImplicit  setMessageParam  setMessageParams  setNested  setOriginalAction  setPronounOverride  setRemapped  spPrefix  spSuffix  synthMessageParam  verifyHandlersExist  whatTranslate  withVerifyResults  zeroActionTime 

Inherited from BasicProd :
canResolveTo  getOrigText  setOrigTokenList 

Inherited from Resolver :
allowAll  cacheScopeList  filterAll  filterAmbiguousEquivalents  filterAmbiguousNounPhrase  filterPluralPhrase  filterPossRank  getAction  getAll  getAllDefaults  getDefaultObject  getPossessiveResolver  getPronounDefault  getQualifierResolver  getRawPronounAntecedent  getReflexiveBinding  getScopeList  getTargetActor  matchName  objInScope  resetResolver  resolvePronounAntecedent  resolveUnknownNounPhrase  selectIndefinite  withGlobals 



Flag: we have been asked for an anaphoric binding, but we don't have a binding available. We'll check this after resolving the first-resolved noun phrase so that we can go back and re-resolve it again after resolving the other noun phrase.

we have a direct object and a topic phrase

the resolved topic object list

my cached topic resolver

What we call our direct object might actually be playing the grammatical role of the indirect object - in order to inherit easily from TAction, we call our resolved object our direct object, regardless of which grammatical role it actually plays. For the most part it doesn't matter which is which; but for the purposes of our resolver, we actually do care about its real role. So, override the resolver method whichMessageObject so that it returns whichever role is NOT served by the topic object.

grammatical role played by topic phrase in generated messages

the true role of the resolved object is always as the direct object


announceDefaultObject (obj, whichObj, resolvedAllObjects)OVERRIDDENen_us.t[9152]

no description available

createTopicResolver (issuingActor, targetActor)OVERRIDDENaction.t[5908]
create our TAction topic resolver

filterTopic (lst, np, resolver)action.t[5848]
Filter the resolved topic. This is called by our TActionTopicResolver, which refers the resolution back to us.

getAnaphoricBinding (typ)OVERRIDDENaction.t[5922]
In the topic phrase, we can use an anaphoric pronoun to refer back to the direct object. Since we resolve the direct object phrase first, we can simply return the direct object list as the binding. If the direct object isn't resolved yet, make a note to come back and re-bind the anaphor.

getCurrentObjects ( )OVERRIDDENaction.t[6013]
Get the list of active objects. We return only our direct object, since our topic isn't actually a simulation object.

getMatchForRole (role)OVERRIDDENaction.t[5977]
get the match tree for the given role

getObjectForRole (role)OVERRIDDENaction.t[5967]
get the resolved object in a given role

getOtherMessageObjectPronoun (which)en_us.t[9177]
use the same handling as for a regular two-object action

getOtherObjectRole (role)OVERRIDDENaction.t[5960]
get the OtherObject role for the given role

getQuestionInf (which)OVERRIDDENen_us.t[9171]
use the same handling we use for a regular two-object action

getRoleFromIndex (idx)OVERRIDDENaction.t[5950]
get an object role

getVerbPhrase (inf, ctx)OVERRIDDENen_us.t[9201]
return a generic pronoun for the topic

initForMissingDobj (orig)OVERRIDDENaction.t[5881]
initialize a new action we're retrying for a missing direct object

initForMissingTopic (orig)action.t[5893]
initialize for retrying with a missing topic phrase

resetAction ( )OVERRIDDENaction.t[5790]
reset the action

resolveNouns (issuingActor, targetActor, results)OVERRIDDENaction.t[5802]
resolve our noun phrases to objects

retryWithMissingTopic (orig)action.t[5863]
Retry a single-object action as an action taking both an object and a topic phrase. We'll treat the original action's direct object list as our direct object list, and we'll obtain a topic phrase interactively.

This routine terminates with 'exit' if it doesn't throw some other error.

setCurrentObjects (lst)OVERRIDDENaction.t[6019]
set the current objects

setObjectMatches (dobj, topic)OVERRIDDENaction.t[6000]
manually set the pre-resolved match trees

setResolvedObjects (dobj, topic)OVERRIDDENaction.t[5990]
Manually set the resolved objects. We'll set our direct and indirect objects.

whatObj (which)OVERRIDDENen_us.t[9165]
Use the same handling as for a regular two-object action. We can only default the actual object in this kind of verb; the actual object always fills the DirectObject slot, but in message generation it might use a different slot, so use the message generation slot here.

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