TQS Home
Trivia Quiz Shell Version 2.8 Now Available!Bot Productions Home
TQS 2.0

Back to Reference

LOC Element

Contains the definition of a location.

Syntax
<LOC
  ID="id"
  TYPE="type"
  BGCOLOR="bgcolor"
  BGIMG="bgimg"
  BGSTYLE="bgstyle"
  REPORT="report"
  REPORTCHILDREN="reportchildren"
  DEFERSTATE="deferstate"
  STATE="state"
  TRIED="tried"
  CORRECT="correct"
  WRONG="wrong">
  ...
</LOC>
Attributes
ID
The ID of this location. Note that this ID must be unique among all LOC elements grouped at the same level.
TYPE
The type of location. This can be one of the current built-in values or the name of a custom location type defined in the CUSTOM element:
"NULL"
The location cannot be navigated to and is used only to hold other LOC elements.
"MENU"
The location is a menu; data is loaded from the MENU subelement.
"QUESTIONS"
The location is a set of trivia questions; data is loaded from the QUESTIONS subelement.
"HANGMAN"
The location is a hangman game; data is loaded from the HANGMAN subelement.
"HTML"
TQS 2.1 The location is HTML code, which is loaded from the HTML subelement.
"CUSTOM_*"
Substitute * with the name of your custom location type. Data is loaded from the subelement with that name.
BGCOLOR
Background color for this location; overrides any background color specified in the main TQSWINDOW element. Color values can either be words ("white", "blue") or hexadecimal values ("#FFFFFF", "#0000FF"). View the list of Internet Explorer's named colors.

TQS 2.7 Deprecated. This attribute is ignored if your TQS element's VERSION attribute is 2.7 or higher. Use a child TQSWINDOW element instead.

BGIMG
Background image for this location; overrides any background image specified in the main TQSWINDOW element.

TQS 2.7 Deprecated. This attribute is ignored if your TQS element's VERSION attribute is 2.7 or higher. Use a child TQSWINDOW element instead.

BGSTYLE
When set to "HIDEIMG", no background image will be shown; the background color either specified by this LOC element's BGCOLOR attribute or within TQSWINDOW will be used.

TQS 2.7 Deprecated. This attribute is ignored if your TQS element's VERSION attribute is 2.7 or higher. Use a child TQSWINDOW element instead.

REPORT
TQS 2.5 If the location type is specified in the REPORT element's INCLUDETYPES element, it will be included in the score report. To exclude it, set this attribute to "0".
REPORTCHILDREN
TQS 2.5 By default, the children of all "NULL" locations will be in the score report according to their inclusion in the INCLUDETYPES element, regardless of whether the "NULL" location is itself included. Setting this attribute to "0" will exclude this NULL location's child locations from the report.
DEFERSTATE
TQS 2.5 If set to "PARENT", this location's state will be mapped to the state of the parent location. For instance, the state of a "MENU" location should be set to its parent location's state, because a "MENU" location cannot be "completed." This attribute cannot be set when the LOC element is an immediate child of the LOCATIONS element.
STATE
TQS 2.5 Specifies the current state of the location. If this attribute is set, it will specify the initial state of the location. It is recommended that this attribute not be set; TQS will manage all location states.
TRIED
TQS 2.5 Specifies the number of questions or words that the user has tried.
CORRECT
TQS 2.5 Specifies the number of questions or words that the user has gotten correct.
WRONG
TQS 2.5 Specifies the number of questions or words that the user has gotten incorrect.
Placement

The LOC element must be a child of the LOCATIONS element or a child of a LOC element whose TYPE is "NULL".

Children

The following child elements are supported:

Remarks

All LOC elements must be specified within the LOCATIONS element, either directly or as sublocations of other LOC elements. All of the type-specific data (questions, hangman words, etc.) is contained in a subelement of the LOC element. The name of this element has to be the same as the LOC's TYPE attribute.

Note that if a location type is excluded from the report because it is not listed in the INCLUDETYPES element, setting the REPORT attribute to "1" will NOT include it.

The TRIED, CORRECT, and INCORRECT attributes will be created and used by TQS to keep track of the location's score, if the location type is included in the REPORT element's INCLUDETYPES element list. If the attributes are specified in your TQS file, they will provide initial values, but these values will be overwritten when the location is invoked. Thus, it is recommended that you not include these attributes; TQS will manage all scoring values.

For more information on TQS's state tracking and scoring capabilities, read the TQS Tutorial, Part XIII.

In a nested location hierarchy, TQS will walk the hierarchy, looking at the TQSWINDOW elements attached to each LOC element, in order to put together the composite visual appearance of the location. Read the TQS Tutorial, Part XVI for a more detailed explanation.

Examples

<LOCATIONS START="0">
  <LOC ID="0" TYPE="HANGMAN">
    <HANGMAN>...</HANGMAN>
  </LOC>
</LOCATIONS>
<TQSWINDOW ... BGIMG="img.gif"/>
<LOCATIONS START="0">
  <LOC ID="0" TYPE="MENU">
    <MENU>...</MENU>
  </LOC>
  <LOC ID="1" TYPE="NULL">
    <LOC ID="0" TYPE="MENU" DEFERSTATE="PARENT">
      <MENU>...</MENU>
    </LOC>
    <LOC ID="1" TYPE="CUSTOM_MATCHING">
      <TQSWINDOW
        BGCOLOR="#003300"
        BGSTYLE="HIDEIMG"
      />
      <CUSTOM_MATCHING>...</CUSTOM_MATCHING>
    </LOC>
  </LOC>
  ...
</LOCATIONS>

©2020 Bot Productions. All rights reserved.Last Updated: September 9, 2007