Difference between revisions of "How tasks work"

From ADRIFT 5 Manual Wiki
Jump to: navigation, search
m
Line 36: Line 36:
 
| style="background-color: #00C000;" | [[User functions]]
 
| style="background-color: #00C000;" | [[User functions]]
 
|}
 
|}
 +
 +
This is a step-by-step description of how ADRIFT processes a players command and chooses which tasks to run.
 +
 +
It is not meant to be read through start to finish, it is provided as a reference for more advanced ADRIFT uses to help design more complex multiple-task commands and debug problems.
 +
 +
# The first thing the parser does is replace the words "[[The command parser#IT|it]]", "[[The command parser#THEM|them]]", "[[The command parser|HIM#him]]" and "[[The command parser|HER#her]]" with the appropriate object or character that the player most recently refered to.
 +
# The parser now checks each [[general task]], starting from the one with the lowest number in the "Task Priority:" field on its [[Tasks#Advanced|"Advanced" page]] and proceeding in order until it finds a match between the player's input and one of the command lines of a task, using "[[General_tasks#Advanced_Command_Construction|Advanced Command Construction]]" matching.
 +
# When it finds a matching general task, it now tries to match the references. Eg.If the command contains an %object% [[General_tasks#References|reference]] then ADRIFT searches through all of the objects in the game trying to find one which matches what the player typed in that part of the input. Note that the player may have entered the names of several objects, eg. "the watch and the pendant" or "all except the hat", and all of these must match objects in the game.
 +
  
  
  
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Executing sub-tasks|<<< Executing sub-tasks]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Main_Page#The_Main_Items|Main_Page]]</TD><TD ALIGN=CENTER>[[Characters|Characters >>>]]</TD></TABLE>
 
<TABLE ALIGN=CENTER BORDER=1 WIDTH="50%"><TD WIDTH="33%" ALIGN=CENTER>[[Executing sub-tasks|<<< Executing sub-tasks]]</TD><TD WIDTH="34%" ALIGN=CENTER>[[Main_Page#The_Main_Items|Main_Page]]</TD><TD ALIGN=CENTER>[[Characters|Characters >>>]]</TD></TABLE>

Revision as of 01:59, 1 February 2014

THE MAIN ITEMS
Locations
Objects
Tasks
---- Specific
---- General
---- System
---- Executing sub-tasks
---- How tasks work
Characters
Events
Variables
Groups
Properties
Text Overrides
Hints
Synonyms
User functions

This is a step-by-step description of how ADRIFT processes a players command and chooses which tasks to run.

It is not meant to be read through start to finish, it is provided as a reference for more advanced ADRIFT uses to help design more complex multiple-task commands and debug problems.

  1. The first thing the parser does is replace the words "it", "them", "HIM#him" and "HER#her" with the appropriate object or character that the player most recently refered to.
  2. The parser now checks each general task, starting from the one with the lowest number in the "Task Priority:" field on its "Advanced" page and proceeding in order until it finds a match between the player's input and one of the command lines of a task, using "Advanced Command Construction" matching.
  3. When it finds a matching general task, it now tries to match the references. Eg.If the command contains an %object% reference then ADRIFT searches through all of the objects in the game trying to find one which matches what the player typed in that part of the input. Note that the player may have entered the names of several objects, eg. "the watch and the pendant" or "all except the hat", and all of these must match objects in the game.



<<< Executing sub-tasksMain_PageCharacters >>>