CommandReportclassreport.t[55]

Command report objects. The library uses these to control how the text from a command is displayed. Game code can also use report objects to show and control command results, but this isn't usually necessary; game code can usually simply display messages directly.

Reports are divided into two broad classes: "default" and "full" reports.

A "default" report is one that simply confirms that an action was performed, and provides little additional information. The library uses default reports for simple commands whose full implications should normally be obvious to a player typing such commands: take, drop, put in, and the like. The library's default reports are usually quite terse: "Taken", "Dropped", "Done".

A "full" report is one that gives the player more information than a simple confirmation. These reports typically describe either the changes to the game state caused by a command or surprising side effects of a command. For example, if the command is "push button," and pushing the button opens the door next to the button, a full report would describe the door opening.

Note that a full report is warranted any time a command describes anything beyond a simple confirmation. In our door-opening button example, opening the door by pushing the button always warrants a full report, even if the player has already seen the effects of the button a hundred times before, and even if the button is labeled "push to open door." It doesn't matter whether or not the consequences of the command ought to be obvious to the player; what matters is that the command warrants a report beyond a simple confirmation. Any time a report is more than a simple confirmation, it is a full report, no matter how obvious to the player the effects of the action.

Full reports are further divided into three subcategories by time ordering: "main," "before," and "after." "Before" and "after" reports are ordered before and after (respectively) a main report.

class CommandReport :   object

Superclass Tree   (in declaration order)

CommandReport
        object

Subclass Tree  

CommandReport
        CommandAnnouncement
                AmbigObjectAnnouncement
                CommandSepAnnouncement
                DefaultObjectAnnouncement
                ImplicitActionAnnouncement
                MultiObjectAnnouncement
                RemappedActionAnnouncement
        CommandReportMessage
                CosmeticSpacingCommandReport
                DefaultCommandReport
                DefaultDescCommandReport
                ExtraCommandReport
                FullCommandReport
                        AfterCommandReport
                        BeforeCommandReport
                        FailCommandReport
                        MainCommandReport
                                QuestionCommandReport
        ConvBoundaryReport
                ConvBeginReport
                ConvEndReport
        GroupSeparatorMessage
        InternalSeparatorMessage
        MarkerReport
                EndOfDescReport
                FailCommandMarker

Global Objects  

(none)

Summary of Properties  

action_  isFailure  isQuestion  iter_ 

Summary of Methods  

construct  getAction  isActionImplicit  isActionNestedIn  isPartOf  setAction 

Properties  

action_report.t[97]

the action I'm associated with

isFailurereport.t[85]
Flag: if this property is true, this report indicates a failure. By default, a report does not indicate failure.

isQuestionreport.t[91]
Flag: if this property is true, this report indicates an interruption for interactive input.

iter_report.t[94]
iteration number current when we were added to the transcript

Methods  

construct ( )report.t[56]

no description available

getAction ( )report.t[67]
get/set my action

isActionImplicit ( )report.t[71]
check to see if my action is implicit

isActionNestedIn (other)report.t[74]
check to see if my action is nested in the other report's action

isPartOf (report)report.t[104]
Am I part of the same action as the given report? Returns true if this action is part of the same iteration and part of the same action as the other report.

setAction (action)report.t[68]
no description available

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