gemus_script_reference:comparison_fields
Table of Contents
GEMUS Comparison Fields
Comparison Fields
Field Name | Operators | Description |
---|---|---|
GameType | CONTAINS, EXCLUDES | This field signifies the type of game being run by the script. It directly correlates to the game's filename extension (without the preceding “.” character). Possible values for this field might be D64, TAP etc.. Example: If GameType CONTAINS(D64||TAP) |
Control | =, != | This field signifies the primary control method of the game being run by the script. This field will contain one of the following values: JoyPort1, JoyPort2, Keyboard, PaddlePort1, PaddlePort2, Mouse, LightPen, KoalaPad or LightGun. Example: ElseIf Control = JoyPort2 |
NumPlayers | =, !=, <, > | This field signifies the number of players that the game being run by the script supports. This will typically be a number larger than 0. Example: If NumPlayers > 1 |
PalNTSC | =, != | This field signifies the whether the game being run by the script is Pal or NTSC compliant. This field will contain one of the following values: PAL, NTSC or BOTH. Example: ElseIf PalNTSC = NTSC |
TrueDriveEmu | = | This field signifies the whether the game being run by the script has its True Drive Emulation setting enabled. This field will contain either YES or NO. Example: ElseIf TrueDriveEmu = YES |
GameComment | CONTAINS, EXCLUDES | This field signifies the “Game Comment” database field of the game being run by the script. Example: If GameComment CONTAINS(*password is:*) |
VersionComment | CONTAINS, EXCLUDES | This field signifies the “Version Comment” database field of the game being run by the script. Example: ElseIf VersionComment CONTAINS(*load manually*) |
ImageName | CONTAINS, EXCLUDES | This field contains the same value as the %imagename% script environment variable. Example: ElseIf ImageName CONTAINS(*) (not: If %imagename% CONTAINS(*)). Note: you cannot use the %imagename% variable as a comparison field name, nor can you use the ImageName field name as an environment variable. Be careful not to confuse the two - field names are for comparisons only, whilst environment variables are for replacing text in function parameters only. |
NumFiles | =, !=, <, > | This field signifies the number of game files selected for the game being run by the script. It contains the same value as the %numfiles% script environment variable. Note: you cannot use the %numfiles% variable as a comparison field name, nor can you use the NumFiles field name as an environment variable. Be careful not to confuse the two - field names are for comparisons only, whilst environment variables are for replacing text in function parameters only. Example: If NumFiles = 2 (not: If %numfiles% = 2) |
QUESTION(text) | = | This field is really a comparison function. It will display a message window asking the question text to the user, who must respond by either clicking a YES or NO button to answer the question. Example: If QUESTION(Do you want to run in NTSC mode?) = YES |
Key_keyname | CONTAINS, EXCLUDES | The Key_keyname fields give you lots of flexibility in GEMUS. By pressing F2 (or selecting the 'GEMUS' item from GameBase's 'Edit' menu) you can optionally put in key=value pairs for each game. These pairs can really be anything you like, for instance memory=512 or fullscreen=yes. By creating these pairs, you can test for virtually any game-specific setting or option within a GEMUS comparison statement. To test the field, just put the prefix “Key_” before the name of the key you want to test. Example: If Key_memory CONTAINS(512) See also the %keyname_value% environment variable. |
%…% | CONTAINS, EXCLUDES | This field %…% corresponds to any script environment variable. For example, if you want to test a game's filename has certain text in it (e.g. a TOSEC filename) you could use the environment variable %gamefile% with the CONTAINS function. Example: If %gamefile% CONTAINS(*128k*) |
Comparison Operators
Operator | Usage | Description |
---|---|---|
= | [If|ElseIf] FieldName = Value | Returns True if Fieldname is equal to Value |
!= | [If|ElseIf] FieldName != Value | Returns True if Fieldname is not equal to Value |
< | [If|ElseIf] FieldName < Value | Returns True if Fieldname is numerically less than Value |
> | [If|ElseIf] FieldName > Value | Returns True if Fieldname is numerically more than Value |
CONTAINS | [If|ElseIf] FieldName CONTAINS([*]value[*][||[*]value[*]…]) | The CONTAINS operator returns True if a textual match has been found in at least one of the supplied value arguments. Multiple values can be supplied by separating them with the || delimiter. The criteria for matching the values is as follows: - value=*text* → Returns True if value is found anywhere in FieldName value=text* → Returns True if value matches the beginning characters in FieldName value=*text → Returns True if value matches the ending characters in FieldName value=text → Returns True if value exactly matches FieldName value=* → Returns True if value is non-empty |
EXCLUDES | [If|ElseIf] FieldName EXCLUDES([*]value[*][||[*]value[*]…]) | The EXCLUDES operator returns True if a textual match has NOT been found in all of the supplied value arguments. Multiple values can be supplied by separating them with the || delimiter. This is basically the opposite of the CONTAINS operator. |
gemus_script_reference/comparison_fields.txt · Last modified: 2023/10/04 14:15 by 127.0.0.1