Logical operators are used by condition and effect objects to express
the essence of a some question or action. Operators range
from simple mathematical functions, such as addition and subtraction, to
more complex operations, such as list management, or power
control. Both conditions and effects are broken into three parts, as represented by
the following equation:
Result = Target Operator Value
The exact syntax requirements are specific to each operator.
In general, a logical operator will obtain a
Result, using some
often using the contents of a second
Result will evaluate to either
FALSE. For effects,
Result is some object or value. For effect operators
which specify a
Result, once the effect is applied,
as in the following equation:
Target = Result
Within the context of an active simulation, there are five types of object
references which govern how the
parts of the equation are resolved during event
execution. At design-time,
are resolved using one of the following reference types:
- Persistent Objects. This reference type allows objects to be located at
design-time using a key value.
- Class Names. Some operators require the class
name of an object to function properly. This reference allows class names
to be chosen from a list of all known object classes.
- Object Types. Some operators require the object type
of an object to function properly. This reference allows object types to
be chosen from a list of all known object types.
- Literal Values. Literal values apply only to the
Value portion of the operator equation, and
allows strings, numbers, or dates to be explicitly specified.
- Contextual Objects. This reference type allows objects to be located whose
identities are not known until run-time. Such objects are typically
associated with the simulation's Multiverse object, as expressed by the
The following chart lists all contextual object references:
| The Multiverse
||The simulation's Multiverse object contains
information regarding the current state of the simulation at run-tim.
The Multiverse object reference allows access to this state information.
| Current Room
||All actions within a simulation must occur within
the context of a room object. The current room object
reference provides access to the room in which the
current event is executing.
| Current Event
||The current event references
the event instance which is currently executing.
| Current Source
||The current source object is typically an avatar instance, one associated
with a simulation participant whose actions resulted in the execution of the current event.
| Current Target
||The current target object is used when an event references a
a specific object. For example, in the simulation command
the current target object becomes the rock.
| Current Object
||The current object is a general purpose object
reference that can be used to reference any object. For simulation
commands which reference two objects, as in
GIVE ROCK TO FRED,
the current object becomes
while the current target object becomes the rock.
These object references can all be freely used to contain objects
which may be used as part of events which manage each type of reference.
For example, during a mana tap,
the current conduit references the
instance used to supply the mana. As events grow increasingly complex, these
references provide places to store object instances while the
simulation caculates the changes it will make to the
Numeric Format Strings
Formatting strings are used to express
They contain various symbols that are translated at run-time into strings
which are then displayed to simulation participants. Symbols enclosed in either
single or double quotes ('Aa' or "Aa") are ignored by the Event Driver,
and appear unmodified within the final output at the designated position.
The locations of the leftmost '0' before the decimal point in a format string and the rightmost '0' after the decimal point in a format string determine the range of digits that are always present in the output string.
The number being formatted is always rounded to as many decimal places as there are digit placeholders ('0' or '#') to the right of the decimal point. If the format string contains no decimal point, the value being formatted is rounded to the nearest whole number.
If the number being formatted has more digits to the left of the decimal separator than there are digit placeholders to the left of the '.' character in the format string, the extra digits are output before the first digit placeholder.
To allow different formats for positive, negative, and zero values, the format string can contain between one and three sections separated by semicolons as follows:
- One section: The format string applies to all values.
- Two sections: The first section applies to positive values and zeros, and the second section applies to negative values.
- Three sections: The first section applies to positive values, the second applies to negative values, and the third applies to zeros.
If the section for negative values or the section for zero values is empty (i.e., if there is nothing between the semicolons that delimit the section), the section for positive values is used instead.
If the section for positive values is empty, or if the entire format string is empty, the value is formatted using general floating-point formatting with 15 significant digits. General floating-point formatting is also used if the value has more than 18 digits to the left of the decimal point and the format string does not specify scientific notation.
Format symbols may be written in upper case as well as in lower case letters. Both produce the same result.
If the a format string for a date value is empty, the date and time value is formatted as if a 'c' format symbol had been given.
Many symbols inherit their behavior from the Regional Options section of the Windows Control Panel within
the operating system in which the Event Driver is currently executing. These symbols include the decimal point character (.), the
thousands separator (,), currency symbols ($), the time separator (:), and the
short (m/d/yy) and long (dddd, mmmm dd, yyyy) date formats.
||Digit place holder. If the value being formatted has a digit in the position where the '0' appears in the format string, then that digit is copied to the output string. Otherwise, a '0' is stored in that position in the output string.
||Digit placeholder. If the value being formatted has a digit in the position where the '#' appears in the format string, then that digit is copied to the output string. Otherwise, nothing is stored in that position in the output string.
||Decimal point. The first '.' character in the format string determines the location of the decimal separator in the formatted value; any additional '.' characters are ignored. The actual character used as a the decimal separator in the output string is determined by the DecimalSeparator global variable.
||Thousand separator. If the format string contains one or more ',' characters, the output will have thousand separators inserted between each group of three digits to the left of the decimal point. The placement and number of ',' characters in the format string does not affect the output, except to indicate that thousand separators are wanted.
||Scientific notation. If any of the strings 'E+', 'E-', 'e+', or 'e-' are contained in the format string, the number is formatted using scientific notation. A group of up to four '0' characters can immediately follow the 'E+', 'E-', 'e+', or 'e-' to determine the minimum number of digits in the exponent. The 'E+' and 'e+' formats cause a plus sign to be output for positive exponents and a minus sign to be output for negative exponents. The 'E-' and 'e-' formats output a sign character only for negative exponents.
||Separates sections for positive, negative, and zero numbers in the format string, respectively.
||Displays the date using the format given by the short date format, followed by the time using the long date format. The time is not displayed if the fractional part of the date value is zero.
||Displays the day as a number without a leading zero (1-31).
||Displays the day as a number with a leading zero (01-31).
||Displays the day as an abbreviation (Sun-Sat).
||Displays the day as a full name (Sunday-Saturday).
||Displays the date using the short date format (d/m/yy).
||Displays the date using the long date format (dddd, mmmm dd, yyyy).
|Displays the date and time as an amount of accumulated time, formatted as follows:
#yr #mo #day(s) #hr #min #sec. The yr, mo, and
day(s) segments will be omitted if the date value would cause the accumulated
years, months, or days to be equal to zero, respectively.
||Displays the month as a number without a leading zero (1-12). If the m symbol immediately follows an h or hh symbol, the minute rather than the month is displayed.
||Displays the month as a number with a leading zero (01-12). If the m symbol immediately follows an h or hh symbol, the minute rather than the month is displayed.
||Displays the month as an abbreviation (Jan-Dec).
||Displays the month as a full name (January-December).
||Displays the year as a two-digit number (00-99).
||Displays the year as a four-digit number (0000-9999).
||Displays the hour without a leading zero (0-23).
||Displays the hour with a leading zero (00-23).
||Displays the minute without a leading zero (0-59).
||Displays the minute with a leading zero (00-59).
||Displays the second without a leading zero (0-59).
||Displays the second with a leading zero (00-59).
||Displays the time using the short time format (hh:nn AM/PM).
||Displays the time using the long time format (hh:nn:ss AM/PM).
||Uses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
||Uses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
||Displays the date separator character.
||Displays the time separator character.
||Displays the date as the nearest whole number of years.
||Displays the date as the nearest whole number of months.
||Displays the date as the nearest whole number of weeks.
||Displays the date as the nearest whole number of days.
||Displays the date as the nearest whole number of hours.
||Displays the date as the nearest whole number of minutes.
||Displays the date as the nearest whole number of seconds.