Explorations Event Triggers
Explorations features a very powerful Event Script processor. By design all Explorations scripts run asynchronously, that is the script run independent of the game engine. This design allows the game engine to run at full potential without affecting performance. Each script is designed to be small and execute quickly while the engine is running. These scripts can perform an enormous array of functions for your game. Scripts are placed in a queue and executed in the order in which they occurred. This design allows synchronous scripts to be simulated by specially marked asynchronous scripts that pause specific areas of the game engine. In truth, all Explorations scripts are asynchronous because while the engine is running scripts weather effects, projectiles and various sprite features are still fully functional. This approach was selected to enable games to remain vibrant during script execution as well as turn or phased based combat sequences. The next chapter will explain main of the standard script events as well as where they occur within the game engine.
System Events
System_StartUp
The System_StartUp event is stored within the General Scripts database. (SCRIPT.DAT) Explorations will search for the script entitled "System_StartUp" and execute the script sequence immediately after Explorations is started and the first map redraw sequence is initiated to the screen. This is the area the GM can re-establish any game specific variables within his game world.
System_ShutDown
The System_ShutDown event is stored within the General Scripts database. (SCRIPT.DAT) Explorations will search for the script entitled "System_ShutDown" and execute the script sequence immediately after a player has selected to exit the Explorations.
Map Events
All Explorations Map scripts are stored within the {mapname}.dat file that corresponds to the map the script will execute. By default Maps as well as the Tile and Script database are stored in "DATA\2D\ANIMATE\MiscAnim\<mapname>.map\" folder. The corresponding <mapname>.map file is the map database and the <mapname>.dat file is the script database for that map
Map_Load
The Map_Load event is triggered immediately after a map is loaded into Game Memory and before any graphics data has been loaded or displayed. The Map_Load event is the area that the GM can use to set-up any sprites or other items that will be displayed on the map being loaded. Whenever a sprite is dropped on a map within Explorations, the Writer triggers the needed Encounter script command that will tell the engine to load this sprite when the map is loaded. This script command is inserted under the Map_Load event.
The Map_Load event is the area where the GM can set up the players control interface. For example: When a player enters a Dungeon map the GM should give the players the ability to attack. When a player walks into his home town, the GM can remove all attack based commands from the players Command Queries, thus allowing the players to perform only friendly actions within his home town.
Map_UnLoad
The Map_UnLoad event is triggered the moment before a new map is loaded. All of the "old" map information is saved and cleared from memory. This areas allows the GM to save any information specific to the map being exited.
{x, y} Events
Each "E" located on the map denotes the locations of an Encounter Event. When a PC or NPC steps in that location the script is accessed and loaded to the queue. When the script engine execute the script, it will process the script asynchronously. In theory, the sprite could have already moved on to another location. Synchronous scripts are generated by specifying to the game engine if this script will "Stop" sprite activity. Doing so will enforce a synchronous style of script execution. When the script is finished the sprite will continue his last action.
Because scripts execute for NPC's as well as PC's the GM must design his script to only affect the sprites intended. NPC sprites can have custom movement scripts that will not effect other NPC's or PCs who step in the specified location. These scripts allow guard movement sequences to be easily created, thus enhancing game play.
Map Group Events
Explorations MapGroup events are triggered for dynamically dropped Map Group objects and objects that are designed to Animate. When script is used to place or remove a MapObject on the map during game play, the "On_AddMapObject" and "On_RemoveMapObject" scripts are added to the queue. The "On_Animate" and "On_ResetAnim" are triggered when the Animate and ResetAnim script commands are executed and these events only apply to Animated Map Groups.
On_Animate
The On_Animate script is added to the script queue just prior to the Map Group animation file being loaded and played on the screen. Because MapGroup animations are running synchronously to the game engine, all game play is stopped while the animation executes. The On_Animate script will actually execute after the Animation is played.
On_ResetAnim
The On_Animate script is added the script queue just prior to the Map Group animation file being loading and played on the screen. The Reset Animation is simply played in reverse. Because MapGroup animations are running synchronously to the game engine, all game play is stopped while the animation executes. The On_Animate script will actually execute after the Animation is played.
On_AddMapObject
The On_AddMapObject script is added to the script queue prior to the engine making any changes to the Map database. It will undoubtedly execute after the object is redrawn on the screen.
On_RemoveMapObject
The On_RemoveMapObject script is added to the script queue prior to the engine making any changes to the Map database. It will undoubtedly execute after the screen is redrawn with the object missing.
Sprite Events
Explorations Sprite Events are basic triggers to allow the GM to control a sprite's reactions to a players decisions. The combat AI is very good at tracking NPC movements for defense and self-preservations but these script related triggers allow the GM to capture and enhance decisions for a more powerful Sprite AI control system. In time, new sprite events could be added to provide higher levels of sprite control to Explorations.
On_Init
The On_Init trigger is a Sprite Event Script trigger that is stored within the "SCRIPT.DAT" database. The On-Init trigger is added to the script queue only if the Sprite has a script event record. The On_Init trigger is added to the queue immediately after the "Encounter{}" script event is executed from the Script engine. This is the area where the DM can control sprite set-up at the time they are loaded to the Map.
On_Dialog, On_Heal, On_Combat, On_Move, On_NewEnemy, On_Flee
All of the above triggers are added to the queue by the Artificial Intelligence engine. The AI engine is a combat-based engine. The game AI will allow NPCs to analyze potential targets, track them and attack where needed. If the NPC is hurt he may flee, or heal himself depending on how angry he is. These triggers allow the GM to intercept AI decisions and enhance these decisions with your own AI based scripts.
On_Dialog, On_Heal, On_Combat, On_Move, On_NewEnemy, On_Flee
All of the above triggers are added to the queue by the Artificial Intelligence engine. The AI engine is a combat-based engine. The game AI will allow NPCs to analyze potential targets, track them and attack where needed. If the NPC is hurt he may flee, or heal himself depending on how angry he is. These triggers allow the GM to intercept AI decisions and enhance these decisions with your own AI based scripts.
On_Killed
The On_Killed trigger is added to the script queue when an NPCs health has reached zero. These events will enable all GMs to analyze who died and possibly determine mission based outcomes as a result. For example if the current mission was to save a Princess and the princess is killed, the mission is obviously over. The GM can script and track the death of any NPC within his game world.
TalkTo_{NPC NAME}
This script event is added to the script queue the moment the player clicks the map of his intended NPC target. The GM could use this trigger to disable NPCs that are currently engaged in combat to seek dialog with the players. This trigger can also be used for simple dialog based events that are initiated by the players. This differs from the "On_Dialog" event in that the "On_Dialog" is a conversation that is initiated by the NPC whos combat AI is already enabled.
Attack_{NPC NAME}
This script event is added to the script queue the moment the player clicks the map of his intended NPC target. If the NPC has the Attack_ trigger the GM could opt to have the NPC spout out some famous battle cries before sending the NPC into combat mode.
Object Events
Describe_{OBJECT NAME}
The "Describe_{OBJECT NAME}" trigger is created by Explorations for every object within your game system. Explorations uses the System tables to create a sentenced based description of each object within your game world. This dialog is displayed when an object is picked up or examined.
Describe_Katana:|
Dialog {This weapon is a Katana. It is visually obvious that the weapon is well-crafted semi-precious. Using this weapon will affect a Single Opponent within Short range. This weapon has permanent duration affects. The single opponent will suffer very minor damage to health.}
EndEnc
Use_{OBJECT NAME}
The "Use_{OBJECT NAME}" trigger is appended to the script queue the moment the player chooses to use an object he possesses. The trigger is only appended to the script queue if the character possesses all the necessary Boolean triggers needed to use the object. This event trigger will allow the GM to create any special script events for each use of the object. For example: Using Dorothy's glass slippers would trigger a script transporting the players back home.
Equip_{OBJECT NAME}
The "Equip_{OBJECT NAME}" trigger is appended to the script queue the moment the player chooses to equip an object he possesses. The trigger is only appended to the script queue if the character possesses all the necessary Boolean triggers needed to use the object. This event trigger will allow the GM to create any special script events for each time an object is equipped. Objects can be created to automatically be used when they are equipped.
Un-Equip_{OBJECT NAME}]
The "Un-Equip_{OBJECT NAME}" trigger is appended to the script queue the moment he chooses to un-equip and object that he possesses. The GM can use this trigger to apply one time script events for each time the object is unequipped by the player.
Examine_{OBJECT NAME}
The "Examine_{OBJECT NAME}" trigger is appended to the script queue the moment the player chooses to look at an object he possesses. By default the Examine_{OBJECT NAME} trigger is linked to the "Describe_{OBJECT NAME}" trigger.
On_LastCharge
The "On_LastCharge" trigger is appended to the script queue when a player has extinguished all the uses out of an item. Items that have only a limited number of uses, or charges are the only objects that trigger this event. By default, Explorations handles notifying the players that the last charge has been used. The trigger is for the GM to establish any special scripting event that must occur when the last charge is expended.
On_Click
The "On_Click" trigger is appended to the script queue when a player clicks on any icon on the game screen. Because the Command.Dat database uses the same object structure as all game objects, the GM can create special script events to occur for every command clicked as well as when objects are clicked while playing.
Add_{OBJECT NAME}
The "Add_{OBJECT NAME}" trigger is appended to the script queue the moment the GM uses the AddItem{} script command to append objects or factoids to a character via script. The GM can use this trigger to apply one time script events for each time an object is added to a character.
Remove__{OBJECT NAME}
The "Remove_{OBJECT NAME}" trigger is appended to the script queue the moment the GM uses the RemoveItem{} script command to remove objects or factoids to a character via script. The GM can use this trigger to apply one time script events for each time an object is removed from a character.
Pick-Up_{OBJECT NAME}
The "Pick-Up_{OBJECT NAME}" trigger is appended to the script queue the moment the player chooses to pick-up an object off the map. By default the Pick-Up_{OBJECT NAME} trigger is linked to the "Describe_{OBJECT NAME}" trigger. This will give a brief description of each object when it is picked up.
Put-Down_{OBJECT NAME}
The "Put-Down_{OBJECT NAME}" trigger is appended to the script queue the moment the player chooses to put-down an object on the map.
Projectile Events
Init_Projectile
The Init_Projectile Trigger is added to the script queue directly after a sprite combat animation is played and its subsequent projectile sprite is initialized in memory. The projectile will then fly to its target at the speed designated by the object.
Miss_Target
The Miss_Target trigger is added to the script queue directly after the target has flown its maximum distance and has not struck any other sprites or structure objects.
Hit_Other
The Hit_Other Trigger is added to the script queue the moment the projectile has struck a sprite other than the intended Target sprite. This result will cause the Miss_Target trigger to be added to the queue just before the Hit_Other trigger.
Hit_Target
The Hit_Target is added to the script queue the moment the intended target is hit by the projectile.
Hit_Structure
The Hit_Structure is added to the script queue the moment the projectile has struck a Map Structure object. The result will cause the Miss_Target trigger to be added to the queue just prior to the Hit_Structure trigger.
Timed Events
Every Turn
Within Explorations a Turn is approximately 2 seconds real-time. Explorations will search within the Timed Script database to find the record entitled "Every Turn". The GM cannot create multiple scripts that trigger every round, but should use this single script as a router to other scripts based on maps or other game scenarios. Executing extensive scripts every 2 seconds could affect game performance.
Every Hour
Within Explorations an Hour is approximately 120 seconds, which is 2 minutes real-time. Explorations will search within the Timed Script database to find the record entitled "Every Hour". The GM cannot create multiple scripts that trigger every hour, but should use this single script as a router to other scripts based on maps or other game scenarios. This script is only checked when a change in the Hour has occurred.
Every Day
Within Explorations, a complete day is approximately 48 minutes real-time. Explorations will search within the Timed Script database to find the record entitled "Every Day". The GM cannot create multiple scripts that trigger every day, but should use this single script as a router to other scripts based on maps or other game scenarios. This script is only checked when a change in the Day counter has occurred.
Triggered On {Day} At {Time}
Explorations can be triggered to execute scripts at any specific time during game play. The exact Day and Time must be specified within the script builder. Multiply scripts can be generated at multiple times, but never two scripts to execute at the same time. If two event scripts need to be created, simply use one script as a router to either of the two even scripts. Because these scripts are specified to the exact time, both "Triggered" and "Every Turn" time based scripts must be checked every two seconds. Using numerous time-based scripts can affect game performance.
Miscellaneous Events
You can apply any addition script events to Sprites or Objects that are directly connected with the Command.DAT database and any of the object databases. For example: You can apply a Give_Katana: script Trigger to the Katana object script record, which could detect who it was given to and become cursed. Or attach the trigger to the owner of the Katana who will thank the players and reward them for the recovery of the item. Where you place triggers depend on the function, Explorations database system is designed to find the trigger and execute the script accordingly.
The Scope of Scripting
This chapter will take a clear look at Explorations script interface, design, and command language. It will give you a full understanding of the various types of scripts that can be handled within Explorations and a few examples on proper implementation.
Explorations takes care of allot of the standard game practices and uses the philosophy "if the graphics is present, use it." to accomplish its goals. Simply, adding graphics, animations, and sound requires understanding of the general Point-Click interface to import these features into the proper location in your game. Explorations will know when to Play a sound or Animation based on the import information you select.
For example: When using the Animation Matrix to import the animation of a sprite firing his Bow. You could at the same time apply the sound of the string as it releases, or the "whiishhh" of the arrow through the air. Scripting is not meant to handle general in-game graphics and sound but to control the game play, story line, and AI of the players within your world.
There are scripts for playing movies, showing large animation on the map; creating menu systems are other graphics but game independent features. But for the most part sprite animation, sound effects, and general sprite animation sequences are handled by Explorations native design. Research these features well before assuming you will have to script to achieve them.
Understanding Sync/Async Scripting

The above screenshot is the Explorations script editor. At the upper left portion of the editor, are the settings for each script event record. A script is set to [x] Enabled by default but can be Disabled so that scripts execute only once. The option [ ] Force PC to Stop in conjunction with the [Face Direction] button allows the GM to make the script Synchronous. The character will stop and face the direction specified and wait for the script to execute. The [ ] Relative Script option allows all Map Coordinates to be centered around the X, Y coordinates shown. Relative scripts are good for making NPCs reuse movement patterns for combat. Each script must be given a title. Explorations uses several standard titles which must NOT be changed in order to execute. These titles correspond to many of the game events such as "Map_Load". The Explorations game engine searches for this title to know what script to execute. Just below the script title is the Event Tag. The Explorations Event Tag acts like programming Subroutines or Functions. The Event represents a block of script code that executes when called. Each Event has a default "StartUp Script" that is executed if no specific tag is specified. Explorations has numerous Event Triggers that are created and executed by the game engine, but you have the liberty of creating your own for you Game requirements. At no time should you rename or reuse any Explorations standard Script Triggers. When creating game script, try to create your own naming convention to keep your scripts orderly and easy to understand. Applying the prefix "GAME_" to all Variables, Script Titles and Events will save you allot of time understanding and organizing your script database.

Just below the script settings is the script command interface. Each script command is separated into groups that the command was intended to target. Selecting any of the Command groups will display the list of commands for that group. Selecting the command will display the Syntax, Description, and potential Return Values for the script function. Remember, Explorations is intuitive. Scripting is not forcing the players to be at certain locations and forcing sprites to walk up to them. Scripting in Explorations is allowing the NPCs to look around and determine if they "see" the players, then telling the NPC to walk up to the players where-ever they may be. This style of game design may see complicated.. But its much simpler to control than keeping track of the exact grid location of sprites for complicated movement sequences.

Once you become familiar with the Script Command Groups you simply double-click on any script command and Explorations will guide you through the criteria for each command. The command will append in the Script Data dialog at the EXACT location of the cursor position within the dialog. So, if you manually edit the dialog in anyway, make sure you return the cursor to a blank line before inserting more commands. The Script command interface is script controlled. All of the .ECMD files within the Writer control this interface. Why, you ask? So that Explorations Script interface can me improved and grow to a robust series of controls without constant changes to the Writer.EXE. You can receive new script commands by downloading updated .ECMD files and the accompanying Driver.EXE update to support the command.
Map Scripts
Explorations Map scripts are triggered directly from a location on any map. Each map has its own Map Script database which resides in the same directory as the .MAP file. Map Script database is labeled as {MAPNAME}.DAT. Map Scripts are rarely relative because of their nature. They usually force the PC to stop and face a particular direction. But for NPCs they can be run asynchronous to check the NPC's identity and execute a movement path.
NPC scripts can allow NPCs to perform simple guard-post movement routines or logical movement operations. Each PC and NPC has a unique HANDLE. The handle is kept in the PLR_HANDLE$ variable. By simply checking for a specific NPC using the If-Then script command you can generate NPC specific map events. You can also create map scripts that only affect NPCs and not PCs.
What happens when a PC steps on a Map Location and executes the script?
Why does Explorations collect all this information? So that the GM has total control and knowledge of what happened within this game event. The script can check ANY variable of the character that triggered the event. Or determine from the SCRIPT_EVENTTYPE$ variable if the script is intended to execute for PCs or NPCs. If an NPC executes a script for PCs the script exits and the game continues as normal. By examining the Explorations StartUp script that is generated with each startup map you will see the following script code:
If {SCRIPT_EVENTTYPE$ = PC} Then
If {PLR_RECORD% = SYS_NUMBER_PCS%} Then
SetVar {SCRIPT_ENABLED%,SYS_FALSE%}
Update_Script {}
EndIf:{PLR_RECORD% = SYS_NUMBER_PCS%}
If {PLR_HIDDEN() <> 25} Then
AddItem { 5 , 25
}
Read_Map(X,Y)
{PLR_GRIDLOC_X%,PLR_GRIDLOC_Y%}
SetVar
{MAP_SPRITE%, 0}
Update_Map(X,Y)
{}
If {PLR_RECORD%
= 1} Then
SetVal {SYS_DAYS%, 1}
SetVal {SYS_TIME$, 2:00 PM}
Dialog {Welcome to Explorations 32bit! RPG Development System. (c)1995 - Forever
by Tyrone W. Lee. Your adventure will begin here!}
Calc {PLR_LOC_Y% = PLR_LOC_Y% - SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 1}
If {PLR_RECORD%
= 2} Then
Calc {PLR_LOC_X% = PLR_LOC_X% - SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 2}
If {PLR_RECORD%
= 3} Then
Calc {PLR_LOC_Y% = PLR_LOC_Y% + SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 3}
If {PLR_RECORD%
= 4} Then
Calc {PLR_LOC_X% = PLR_LOC_X% + SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 4}
If {PLR_RECORD%
= 5} Then
Calc {PLR_LOC_Y% = PLR_LOC_Y% - SYS_MAP_STEP%}
Calc {PLR_LOC_X% = PLR_LOC_X% - SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 5}
If {PLR_RECORD%
= 6} Then
Calc {PLR_LOC_Y% = PLR_LOC_Y% + SYS_MAP_STEP%}
Calc {PLR_LOC_X% = PLR_LOC_X% - SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 6}
If {PLR_RECORD%
= 7} Then
Calc {PLR_LOC_Y% = PLR_LOC_Y% + SYS_MAP_STEP%}
Calc {PLR_LOC_X% = PLR_LOC_X% + SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 7}
If {PLR_RECORD%
= 8} Then
Calc {PLR_LOC_Y% = PLR_LOC_Y% - SYS_MAP_STEP%}
Calc {PLR_LOC_X% = PLR_LOC_X% + SYS_MAP_STEP%}
EndIf:{PLR_RECORD%
= 8}
Calc
{PLR_GRIDLOC_X% = PLR_LOC_X% / SYS_MAP_STEP%}
Calc
{PLR_GRIDLOC_Y% = PLR_LOC_Y% / SYS_MAP_STEP%}
Update_Char {}
Read_Map(X,Y)
{PLR_GRIDLOC_X%,PLR_GRIDLOC_Y%}
SetVar
{MAP_SPRITE%, PLR_RECORD%}
Update_Map(X,Y)
{}
EndIf:{PLR_HIDDEN() <> 25}
EndIf:{SCRIPT_EVENTTYPE$ = PC}
If you don't understand the entire script, its OK.
What it does is checks to see if a PC is standing at the start up location. If so, it
determines what PC index is executing the script and selects an adjacent tile for him to
appear. The first PC added to the map will display the greeting and initialize the Day and
Time of your game world. The last PC within the party being added to the map will disable
the script so it only executes once. All of the Calc commands merely calculate the new
grid location of your party so they all don't appear standing on top of one another on the
map. This script executes very quickly and appears seamless at the start up of any
Explorations Game. In time you will learn how to create power seamless scripts to build
custom menus, and create dynamic Artificial Intelligence routines.
General Scripts
General scripts act as the wastebasket for all other script events. They share the luxury of Timed Scripts for the power of relative coordinate calculations and the precision of Map Scripts because usually the event is triggered by an event that occurred on the map. The difference is the location of the General Script execution could be anywhere on the map, at any time.
All of the Object Script Event, such as Pick-Up_{OBJECT NAME} is contained within the General Script database, SCRIPT.DAT. An object could be dropped at any location on the map, so Explorations must be powerful and dynamic enough to account for every event trigger. The General Script database is the fall-over area that handles event Triggers that are not Time dependent or Map Location dependent.
You will find yourself writing most of your support scripts within this database. It is as well, as the Timed Script database is shared between maps, so any map script can call functions in either the General or Timed Script databases.
The Script Control Language
The script control language is the most powerful interface within Explorations. It is not a compiled C++ code language, but merely a powerful and simple BASIC oriented text language created for RPG design. It is object oriented and Event Driven. There are three type of scripts used by the Exploration System: Relative, Actual, and Add-In. Actual Scripts are scripts that will execute when a player steps in a given location. All of the references to grid coordinates are actually from the map. These are the standard scripts used by most RPG making systems.
Relative scripts are similar to actual scripts but the coordinates are with respect to the location where the script is executed. These scripts can be used to create excellent relative movement sequences for attack systems. Relative scripts can be used by any NPC or Player whose position can accommodate the script. The game designer must use care when using relative scripts, else NPCs will appear to lose control and walk aimlessly into walls. The script language interface is a point-click application that makes it easy to create logical game events. From here I will explain the syntax of the Explorations Script Language and give examples of each command within script code.
Dialog Command
Syntax:
Dialog {text out}
The Dialog command allows the author to include a text message explaining the surrounds and the story line. When Explorations RPG Engine is executing a script there is a dedicated text window for combat and a dedicated window for dialog command text.
Dice
Syntax:
Dice {#of side}
The Dice command is used to generate a random number between 1 and the number of sides of the specified dice. The result value is stored in the (dice) script system variable.
Encounter
Syntax:
Encounter {unique_handle, npc_record, xpos, ypos, mapname, AI_flag}
This command will load and show a NPC on the described map at the (xpos, ypos) coordinates. The unique handle is specified by the game maker. Once the handle is specified the author muse select the actual NPC record from the monster database. Once the monster is selected, you must select the place the NPC will appear on the map. Each NPC can be Artificially Intelligent controlled or Manually controlled. The AI engine is totally capable of movement, NPC decision, and combat. If the AI engine is not used, it is the authors responsibility to control the NPCs movement. If the NPC is attack by any player or another NPC, the AI engine automatically switched ON and enters attack mode.
RndEncounter
Syntax:
RndEncounter {unique_handle, xpos, ypos, mapname, AI_flag}
This command will select a random NPC and display it on the map at (xpos, ypos). The random NPC can be selected with or without Artificial Intelligence. If the NPC is attacked by any player or NPC the AI engine engages and enters attack mode.
Display
Syntax:
Display {filename, xpos, ypos).
This command will display a bitmap graphic on the screen. The bitmap form will be loaded and displayed so that the author may select the placement of the picture. After the form is placed where the author would like it to appear, click the [Done] button and the command is displayed.
Movie
Syntax:
Movie {filename, #frames, frames/sec, #repeats, xpos, ypos}
The movie command will display a picclip file within a dialog window. The author must know the number of frames within the picclip. The {frames/sec} parameter specifies the time duration pause between frames. The {#repeats} parameter specifies the number of times the movie will repeat. Once this information is selected the first frame of the movie is displayed on a form to be placed where you want this movie to appear on the screed. Clicking [DONE] will complete the command.
Defining Game Commands
DefCmd
Syntax:
DefCmd { #ofcommands, #ofdisplaycolumns, [cmd#1], [cmd#2], [cmd#3],
}
DefCmd {0}
At the bottom of the game screen is a horizontal list of commands, such as "Look", "PickUp", etc. This list is used to generate EventScript label procedures. The author can build specialize command lists for your event script. The command list will be added while the game is running and will be used continuously to generate label command events until it is rest or changed again. To reset the command list to the system default values, use the command: DefCmd {0}
BMP Hyperlink
Syntax:
Mouse_Click_image10.bmp (lox, loy, hix, hiy):
EndEnc
The BMP Hyperlink allows the author to create a HOT-SPOT event link between a currently displayed bitmap or movie. The HOT-SPOT is nothing more than an Event Label procedure. When the upper left and lower right corners of the hot spot area is selected, the author will see the event label procedure. When the bitmap is clicked, the Explorations system will search all Mouse_Click events to see if the coordinates clicked are within the areas defined for an event.
Delete Variable
Syntax:
DelVal{<variablename>%}
DelVal{<variablename>!}
DelVal{<variablename>$}
This command will delete a variable that you have declared within the Explorations script system. The command is very powerful and can be used to delete system variable. Be careful when using this command.
Clear Variables
Syntax:
ClrVal {<variablename>%}
ClrVal {<variablename>!}
ClrVal {<variablename>$}
This command will delete variables that have similar names. For example, when an Exploration game ends the system executes a DelVals{"SCRIPT_"} command that will delete ALL the variables that begin with "SCRIPT_". The power of this command is to allow you to declare a group of variables with a similar naming structure and then remove all of them from memory when your script is complete. Be careful when using this command.
Set Value
Syntax:
SetVal{<variablename>%, <value>)
SetVal{<variablename>!, <value>)
SetVal{<variablename>$, <value>)
Example:
SetVal{MAP_TERRAIN%, 5}
This powerful command allows the GM create variables dynamically, or adjust the value of existing variables. Under the Ev5 system (%) variables denote a Long data types, (!) variables hold Single Precision, and ($) hold String values.
Calculate
Syntax:
Calc {<variablename>% = <variablename1>% <operator>
<variablename2>}
Example:
Calc {SCR_X% = SCR_X% + 32}
The calculate function informs Ev5 that you are about to perform a formula calculations. The calculation function will store the result into the <variablename> variable. The <variablename1>, <variablename2> parameters can be swapped with literal constants, as show in the example. The <operator> expression can be -, +, /, x, Avg, or Mod.
Play, Play!
Syntax:
Play {filename}
Play! {filename}
This command will play a .WAV sound file. Play! will wait until the .WAV is complete before continuing the script execution.
Music, Music!
Syntax:
Music{filename}
Music!{filename}
Music{STOP}
The Music command will play a MIDI or .WAV music file while the game is playing. When the music has completed it will automatically repeat. If at any time you wish to stop this music, you me use the STOP command. The Music! command will wait until the song is finished playing before continuing the script execution.
Speech
Syntax:
Speech{unique_handle, dialog_text}
The Speech command allows the author to display text over an NPCs characters head as spoke text. A continue button will be shown so the game play can continue after the text is read.
SetLocation:
Syntax:
SetLocation{X%, Y%, MapName}
The SetLocation command will set the players location to a new location specified by the author. This location can be on the same map or within a new map. If a new map is specified, it will be loaded.
GotoRecord, GosubRecord
Syntax:
GotoRecord {record#}
GosubRecord {record#}
The GotoRecord command will allow the author to load and execute an new script record. The author must select the script record to be executed by the title. The record will begin executing at the top of the script. The GosubRecord acts the same as the GotoRecord command except with the new script is finish executing, the control will return to the previous script and continue running. *Be careful using GosubRecord and GosubLabel. Over use of these function can result in "Out of Stack space errors."
GotoLabel, GosubLabel
Syntax:
GotoLabel {label_handle}
GosubLabel {label_handle}
The GotoLabel allows the author to automatically just to a pre-designed event label. Event labels are any lines within your event scripts that end with a colon. ":" The GosubLabel command acts the same as the GotoLabel except when the label procedure is finished executing, control is passed back to the point within the script that made the GosubLabel reference.
LoadRecord
Syntax:
LoadRecord {record#}
This command is a special command that is primarily used by the system. It will load an Event Script into memory without executing. The system uses this function for background event script calls. This command is for advanced level scripting.
Goto REL Script, GoSub REL Script, Load REL Script
If-Then
Syntax:
If {system_variable > 30} Then
EndIf: {system_variable > 30}
The If-Then command is a powerful game control decision making function. The If_Then will evaluate an expression and based on the outcome, execute the True:{expression} or the False:{expression} script. The EndEnc will stop the program flow after the code is executed. Nested If-Then sequences can be used, but complex And/Or expressions are not supported. Basically, the If_Then function allows the author to evaluate player status, skills, weapons, and map information. The If_Then can reference ALL of the system global variables. For example, the {dice} variable could be check and different results could be executed based on the result.
Screen_Freeze
Syntax:
Screen_Freeze {screen#}
This command allows the author to Freeze a players game window. Freezing the screen keeps the player from using his window view port to issue commands, but allows him to watch what is going on around him. This command is primarily used to control game flow and story line.
Screen_UnFreeze
Syntax:
Screen_UnFreeze {screen#}
The command will release any screen that has been frozen. Giving the player full control to issue commands.
Freeze Scrollbars
Syntax:
Scroll_Freeze
This command will lock the main screens current location so that if the player moves the screen will not follow him. The command can come in handy when simulating movies and you don't want the current screen position to change.
UnFreeze Scrollbars
Syntax:
Scroll_UnFreeze
This command will release the screen to its default state. As the character move these screen will scroll and track his location.
Animate
Syntax:
Animate {xpos, ypos, MapName}
This function will trigger a structure animation. Structures can be made to animate like a switch. Using the Animate command will turn the switch ON, and the ResetAnim will turn the switch OFF. This command is also used for opening doors or triggering Animated Structure Groups.
ResetAnim
Syntax:
ResetAnim {xpos, ypos, mapname}
This function will reset structure at the given location to its original state. The animation will be played in reverse to simulate the de-activation, or the "door closing." Once the animation is complete the structure will be reset and the PCs as well as NPCs can no longer pass.
SpriteControl
Syntax:
Projectile {sprite_type, unique_handle, target_handle, obj_type, obj_rec#, startx,
starty, endx,endy}
This neat little command allows the author to automatically generate a projectile animation from thin air. It will allow the author to specify the type, a start location and end location. Of course, an appropriate object type and record must be associated with this sprite object so the engine can determine effects and properties of the sprite. This command is extremely powerful if the author wishes to generation booby-trapped doors that shoot arrows at the PCs.
PanMap
Syntax:
PanMap {direction, distance}
This command will automatically make the users map view port change to a new location. The PC will remain in his current position but the windows view will change.
Special Commands
Get_Direction
Syntax:
Get_Direction {[x_start%],[y_start%],[x_dest%],[y_dest%]}
This command will return a polar direction N,NE,E,SE,S,SW,W, or NW within the "SCR_DIRECTION$" variable.
InView
Syntax:
InView? {[x_start%],[y_start%],[x_coordinate%],[y_coordinate%]}
This command will analyse the two locations passed to the function to determine if they are in view of one another. If they are in view, a SYS_TRUE% is returned within "SCR_BOOLEAN%" system variable.
PC_InView?
Syntax:
PC_InView? {[x_start%],[y_start%]}
This command will check the location passed to see if any PC's are within view of the location. The first PC that is found within view will exit the function. When a PC is discovered in view, a SYS_TRUE% is returned within the "SCR_BOOLEAN%" system variable and the PC's unique handle will be stored within the "SCR_HANDLE$"
NPC_InVew?
Syntax:
NPC_InView? {[x_start%],[y_start%]}
This command will check the location passed to see if any NPC's are within view of the location. The first NPC that is found within view will exit the function. When a NPC is discovered in view, a SYS_TRUE% is returned within the "SCR_BOOLEAN%", system variable and the NPC's unique handle will be stored within the "SCR_HANDLE$"
Find_Path
Syntax:
Find_Path {[x_start%],[y_start%],[x_dest%],[y_dest%]}
This command will calculate the movement path between two locations. When this command is executed correctly, the system will return a SYS_TRUE%, within the "SCR_BOOLEAN%" system variable and the polar movement commands within the "SCR_MOVEPATH$"
Find_Cover
Syntax:
Find_Cover {[x_start%],[y_start%],[x_coordinate%],[y_coordinate%],[scan_radius%]}
This command will scan the radius from the map location given by (x_start%, y_start%) to see if there is a location that is NOT within view of (x_coordinate%, ycoordinate%). When this command is complete, the system will return a SYS_TRUE% within the "SCR_BOOLEAN%" system variable. The location that is not in view of (x_coordinate%, ycoordinate%) will be stored in "SCR_X%", "SCR_Y%" respectively. And the polar movement commands will be stored within "SCR_MOVEPATH$"
Find_NearestPC
Syntax:
Find_NearestPC {[x_start%],[y_start%],[scan_radius%]}
This command scans the given location for a specified radius for any PC's within the area. If a PC is found within the area the system will return the location of the nearest PC within "SCR_X%", and "SCR_Y%" and the handle of the PC within "SCR_HANDLE$"
Find_NearestNPC
Syntax:
Find_NearestNPC {[x_start%],[y_start%],[scan_radius%]}
This command scans the given location for a specified radius for any NPC's within the area. If a NPC is found within the area the system will return the location of the nearest NPC within "SCR_X%", and "SCR_Y%" and the handle of the NPC within "SCR_HANDLE$"
Find_NearestCHR
Syntax:
Find_NearestCHR {[x_start%],[y_start%],[scan_radius%]}
This command scans the given location for a specified radius for any PC or NPC's within the area. If a PC/NPC is found within the area the system will return the location of the nearest PC or NPC within "SCR_X%", and "SCR_Y%" and the handle of the PC/NPC within "SCR_HANDLE$"
Find_ClosestLocation
Syntax:
Find_ClosestLocation {[x_start%],[y_start%],[scan_radius%]}
This command will find the closest location the location provided if there is something currently in the location given. This command is executed by default within the movement sequences.
Object Commands
Get_CharObject
Syntax:
Get_CharObject {[object_type%],[object_record%]}
This command will retrieve the record information for a particular object from a the current character.
Update_CharObject
Syntax:
Update_CharObject {}
This command will update the record information for a particular object within the current character.
GetLinkObject
Syntax:
Get_LinkObject {[link_object_index%]}
This command will get one of the current objects required objects. The link_object_index% specifies the object within the list of objects needed for the current object to be used.
Update_LinkObject
Syntax:
Update_LinkObject {}
This command will update any changes to the current object's list of needed objects.
Read_Object
Syntax:
Read_Object {[database_record%],[database_filename$]}
This command will read an object record from the database filename specified. A complete drive and path must be given on order to read the database record. When the record is read all of the default system variables that have the prefix "OBJ_" are set.
Write_Object
Syntax:
Write_Object {[database_record%],[database_filename$]}
This command will write all the values stored within the system variables having the prefix "OBJ_" to an external database file.
Find_ObjInFile
Syntax:
Find_ObjInFile {[object_name$],[database_filename$]}
This function will search and external database file for a record that matches the object_name$. When a match is found in the database "SCR_BOOLEAN%" will be set to "SYS_TRUE%" and "SCR_RECORD%" will contain the record of the database.
Find_ObjOnChar
Syntax:
Find_ObjOnChar {[object_name$]}
This function will search the current character for an object that matched the object_name$ passed. When a match is found on the current character the "SCR_BOOLEAN%" system variable will be set to "SYS_TRUE%", the "SCR_OBJTYPE%" will be set to the object database type, and "SCR_OBJINDEX%" will be set to the object index.
The object types are as follows:
0 - Skills Database
1 - Armor Database
2 - Weapons Database
3 - Equipment Database
4 - Spells Database
5 - Special Database (Hidden Items/Factoids)
Find_LinkObj
Syntax:
Find_LinkObj {[object_name$]}
This command will search the current object record list of linked objects for an object matching the object name provided. This command can be used to scan the current objects requirement objects. If a matching object is found the "SCR_BOOLEAN%" is set to SYS_TRUE%. The "SCR_OBJTYPE%" is set to the corresponding object database type. The "SCR_OBJINDEX%" is set to the current objects list index, and the "SCR_RECORD%" is set to the corresponding external database record.
WhereIs_Obj?
Syntax:
WhereIs_Obj? {[object_name$]}
This command will scan the current map for a particular object matching by the object_name$ provided. When an object is found that matches the name provided the "SCR_BOOLEAN%" is set to "SYS_TRUE%". The "SCR_X%" and "SCR_Y%" will be set to the map location of the object. The "SCR_RECORD%" will be set to the database record of the current map object database.
DOS Commands
Kill
Syntax:
Kill {[filename$]}
This command deletes a specified filename from your hard drive. You must specify the complete drive and path of the file. Be careful using this command, deleting system files can damage your game.
MakeDir
Syntax:
MakeDir {[filepath$]}
This command will create a directory path based on your filepath specified.
RemoveDir
Syntax:
RemoveDir {[filepath$]}
This command will remove a directory that you have specified. Be careful removing system directories, deleting improper system directories can damage your game.
Rename
Syntax:
Rename {[old_filename$],[new_filename$]}
This command will rename a file on your hard drive. You must specify a complete drive and path for the file you wish to rename.
DelRecord
Syntax:
DelRecord {[record%],[record_size%],[filename$]}
This command will delete a database record, specified by record%, from an external database specified by the given filename. A complete drive and path must be given for this filename. The record size can be one of three constant system types, depending on the type of database records you are attempting to count. Use LEN_OBJECT%, LEN_CHARACTER%, LEN_MAP% data constants to read records from object, character, and map databases respectively.
RecordCount
Syntax:
RecordCount {[dest_variable%],[record_size%],[filename$]}
This command will count the number of records within the database filename you specify. A complete drive and path must be given for this filename. The record size can be one of three constant system types, depending on the type of database records you are attempting to count. Use LEN_OBJECT%, LEN_CHARACTER%, LEN_MAP% data constants to read records from object, character, and map databases respectively. The destination_variable% is the user defined system variable that you want the record count to be stored.
Char Commands
AddItem
Syntax:
AddItem {[object_type%],[object_record%]}
This command will add a database object to the current character. When the database object is added to the character, the Add_ObjectName script is triggered. The object types specify the type of object being added. The object types are as follows:
0 - Skills Database
1 - Armor Database
2 - Weapons Database
3 - Equipment Database
4 - Spells Database
5 - Special Database
RemoveItem
Syntax:
RemoveItem {[object_type%],[object_record%]}
This command will remove a database object to the current character. When the database object is removed from the character, the Remove_ObjectName event is triggered. The object types specify the type of object being removed. The object types are as follows:
0 - Skills Database
1 - Armor Database
2 - Weapons Database
3 - Equipment Database
4 - Spells Database
5 - Special Database
DropItem
Syntax:
DropItem {[object_type%],[object_record%]}
This command will force the current character to put down an object. All the needed animations are automatically shown and the Put-Down_ObjectName script event is triggered. The object type specifies the type of object being put down.
The object types are as follows:
0 - Skills Database
1 - Armor Database
2 - Weapons Database
3 - Equipment Database
4 - Spells Database
5 - Special Database
PickUpItem
Syntax:
PickUpItem {[object_type%],[object_record%]}
This command will force the current character to pick up an object. All the needed animations are automatically shown and the Pick-Up_ObjectName script event is triggered. The object type specifies the type of object being put down.
The object types are as follows:
0 - Skills Database
1 - Armor Database
2 - Weapons Database
3 - Equipment Database
4 - Spells Database
5 - Special Database
GiveItem
Syntax:
GiveItem {[character_handle$],[object_type%],[object_record%]}
ShowAction
Syntax:
ShowAction {[bmp_filename$]}
This command will automatically show an animation sequence that you specified by filename. These filename are specified within the Character Animation form. By editing the Anim.TXT file you can create addition animation filenames.
Get_Char
Syntax:
Get_Char {[character_handle$]}
This command will select a PC/NPC's from memory as the current character by its unique handle. PC's unique handle is specified at the time the party is generated. NPC's unique handle are specified at the time the Encounter or RndEncounter script command is executed.
RemoveNPC
Syntax:
RemoveNPC {[character_handle$]}
This command will remove any NPC loaded into memory by its unique handle. NPC's unique handle are specified at the time the Encounter or RndEncounter script command is executed.
WhereIs_Char?
Syntax:
WhereIs_Char? {[character_handle$]}
Find_CharInFile
Syntax:
Find_CharInFile {[character_handle$],[database_filename$]}
This command will search an external database filename for a character record that has the unique handle specified. When an character is found that matches the name provided the "SCR_BOOLEAN%" is set to "SYS_TRUE%". The "SCR_RECORD%" will be set to the database record of the character within the database.
Read_Char
Syntax:
Read_Char {[character_record%],[database_filename$]}
This command will read a character record from an external database filename specified. When the database record is read, the current player will be set to the newly read record. Any character system variables changed must be updated using the Update_Char command before the character record can be written back to an external database.
Write_Char
Syntax:
Write_Char {[character_record%],[database_filename$]}
This command will write a character record from an external database filename specified. Any character system variables changed must be updated using the Update_Char command before the character record can be written back to an external database.
Update_Char
Syntax:
Update_Char {}
Update_Char! {}
This command will update the changes made to the system character variables back to the current player. System variables that reference the current player have a prefix of "PLR_" The Update_Char! command will wait until the current player has executed any movement commands before continuing the script execution.
MAP Commands
Read_Map
Syntax:
Read_Map(X,Y) {[x_coordinate%],[y_coordinate%]}
This command will read the current map database and store the contents into the system variables that have the prefix of "MAP_"
WhereIs_Map?
Syntax:
WhereIs_Map? {[icon_type%],[icon_record%],[scan_radius%]}
This command will scan a location and a given radius on the current map for a specific Icon type and record. This command will search the map for a specific tile. This command can be used to scan the map for a door way by looking for one of the tiles that compose the door. When the command is complete, "SCR_BOOLEAN%" is set to "SYS_TRUE", and the location of the tile will be stored in "SCR_X%", "SCR_Y%" respectively.
Update_Map
Syntax:
Update_Map(X,Y) {}
When changes are made to a map database record, you can use the Update_Map command to store the values from the "MAP_" system variables back to the database.
Form Commands
LockScript
Syntax:
LockScript
This command is used to turn off form related event triggers. This command is used to control event execution while a form and controls are being created and adjusted.
UnLockScript
Syntax:
UnLockScript
This command will release the form script back to the system so that normal form events will be processed.
PercentOn
Syntax:
PecentOn
This command will change all units of measure with regard to forms screen position and controls set-up to use percentage based valued. Using percentages will allow the forms to resize automatically if the game is running on computers with different screen resolutions.
PercentOff
Syntax:
PercentOff
This command will change all units of measure with regard to forms to the default pixels. All forms, and control will be sized to the exact value given. This will insure the exact size of forms and controls, but will not adjust for smaller or larger screen resolutions.
End
Syntax:
End
This command will exit you current game.
ExitEnc
Syntax:
ExitEnc
This command will exit the current encounter script
Return
Syntax:
Return
This command will return the control from a GosubLabel command.
SetProperty, SetAllProperties
Syntax:
SetProperty {[control_handle$],[property_name$],[new_value]}
SetAllProperties
{[control_handle$],[property_name$],[new_value]}
This command will automatically set ALL controls or forms properties to a given value. The control handle will search for all similar control handles and set the propert_name$ specified to the value given. This is excellent for adjusting several command button FontsStyles to a specific font. If all the command buttons were given a handle with a "BTN_" prefix, this command could adjust all the property values simultaneously.
GetProperty {[control_handle$],[property_name$],[dest_variable]}
CreateControl
Syntax:
CreateControl {[form_handle$],[control_type$],[control_handle$]}
This command will create a Visual Basic Control through scripting. Currently Explorations supports:
CMD_BUTTON
OPT_BUTTON
CHECK_BOX
TEXT_BOX
LIST_BOX
IMAGE_BOX
COMBO_BOX
PICTURE_BOX
TEXT_LABEL
TIMER_CTRL
MEDIA_CTRL
HSCROLL
VSCROLL
MARQUEE
MEMO_BOX
CreateForm
Syntax:
CreateForm {[form_handle$]}
This command will create a Visual Basic form through scripting.
Unload
Syntax:
Unload{[form_handle$]}
This command will unload a form or control previously created with the CreateForm or CreateControl command.
System Variables
The following are a list of all the current system variables used by Explorations. If
you use the SetVar script command to create/hold a value you can not use any of the
variable names below.
SYS_DEFAULT_DRIVE$
SYS_DEFAULT_PATH$
SYS_PROGRAM_PATH$
These commands hold the basic directory paths of the game currently being executed.. Use
these commands for advanced scripting only.
PARTY_NAME$
LEN_OBJECT%
LEN_CHARACTER%
LEN_MAP%
SYS_RETURN$ = Chr$(13)+Chr$(10) 'Carriage Return
SYS_TAB$ = Tab(8) or Spc(8)
SYS_MAP_STEP% = 32
SYS_TRUE% = -1
SYS_FALSE% = 0
The above values hold basic database and system constants.
SYS_CURRENT_MODULE%
SYS_NUMBER_MAPS%
SYS_NUMBER_CHARACTERS%
SYS_NUMBER_PLAYERS%
SYS_MAX_PLAYERS%
SYS_WALK_SPEED%
SYS_RUN_SPEED%
SYS_MIN_HEALTH_FLEE%
SYS_MIN_HEALTH_HEAL%
SYS_TERRAIN_ANIMATION% True/False
SYS_PROJECTILE_ANIMATION% True/False
SYS_COLLISION_DISTANCE%
SYS_ARMOR_DB_STATUS% True/False
SYS_SKILLS_DB_STATUS% True/False
SYS_WEAPONS_DB_STATUS% True/False
SYS_EQUIPMENT_DB_STATUS% True/False
SYS_SPELLS_DB_STATUS% True/False
SYS_RACE_DATABASE_STATUS% True/False
SYS_CLASSES_DATABASE_STATUS% True/False
SYS_SOUND_FX% True/False
SYS_BACKGROUND_MUSIC% True/False
SYS_COMBAT_MODE% True/False
SYS_FORCE_ICONSIZE% True/False
SYS_DEFAULT_ICONWIDTH%
SYS_DEFAULT_ICONHEIGHT%
SYS_GAME_SPEED%
SYS_SEGMENTS_PER_ROUND%
SYS_ANIMTERRAIN_UPDATE INTERVAL%
SYS_ANIMSTRUCTURE_UPDATE INTERVAL%
SYS_ANIMOBJECT_UPDATE INTERVAL%
SYS_DEFAULT_#_ANIM_FRAMES%
SYS_GRAPHICS_MODE%
All of the previous system variables are set within the Explorations Writer under Game
Information. Be sure you understand the affects of changing these values during game play
time.
SYS_ATTACKER_HANDLE$
SYS_DEFENDER_HANDLE$
During combat, if a script is triggered in which you need to determine the current
Attacker or Defender you can read the character handles from within these script
variables.
SYS_HSCROLL% True/False
SYS_HSCROLL_VALUE%
SYS_VSCROLL% True/False
SYS_VSCROLL_VALUE%
SYS_SCREEN_WIDTH%
SYS_SCREEN_HEIGHT%
SYS_TRANSPARENT%
These values are used to read the current GUI control values.
MAP_TRAVERSE% True/False
MAP_TERRAIN%
MAP_OBJECT%
MAP_STRUCTURE%
MAP_ENCOUNTER%
MAP_PLAYER%
MAP_ICON_TYPE%
MAP_ICON_REC%
MAP_ICON_X%
MAP_ICON_Y%
Map Global Variables are set when a Get Map Location (ScriptCommand) is executed. You may
read any map location values as well as edit/change the value of map icons during game
play time. To make your map changes take affect the UpdateMap command must be executed.
PLR_RECORD%
PLR_VISIBLE%
PLR_ENABLED%
PLR_CMD$
PLR_ACTION$
PLR_FOLLOW$
PLR_ENEMY$
PLR_DIRECTION%
PLR_DEMEANOR%
PLR_OBJECTTYPE%
PLR_OBJECTCLASS%
PLR_OBJECTREC%
PLR_SPEED%
PLR_ROW%
PLR_COL%
PLR_X%
PLR_Y%
PLR_MOVESEQ$
When an NPC/PC is selected using the SelectNPC/SelectPC command the above script values
are set. These values are the sprite control values. Changing these values can adjust a
PCs /NPCs current direction he is facing or establish a walk path.
PLR_HANDLE$
PLR_ICON$
PLR_SCRIPT$
PLR_AI_STATUS% True/False
PLR_MOBILITY% True/False
PLR_NAME$
PLR_EXPERIENCE%
PLR_MONEY%
PLR_CLASS%
PLR_RACE%
PLR_ANIMKEY$
PLR_STATS_X%
PLR_STATS_Y%
PLR_STATS_ANIMTYPE%
PLR_STATS_MAP$
PLR_STATS_HEALTH%
PLR_STATS_DEFENSE%
PLR_STATS_MAGIC%
PLR_STATS_STR%
PLR_STATS_END%
PLR_STATS_INT%
PLR_STATS_WIS%
PLR_STATS_CON%
PLR_STATS_DEX%
PLR_STATS_CHR%
PLR_STATS_LDR%
PLR_OBJECTSINDEX%
PLR_OBJECTSTYPE%
This Player script variables represent the character's physical stats. You can edit/
change any of these stats when a PC/NPC is selected. All changes to a PC/NPCs stats
or controls will take affect when the UpdatePC or UpdateNPC command is executed.
PLR_OBJECTS:RECORD%
PLR_OBJECTS:INHAND%
PLR_OBJECTS:CLASS%
PLR_OBJECTS:DURATION%
PLR_OBJECTS:CHARGES%
These Object script variables are set when a GetObject script command is called. The
GetObject command can only be executed after a SelectPC command is executed. This command
will select individual objects possessed by the selected PCNPC.
OBJ_RECORD%
OBJ_X%
OBJ_Y%
OBJ_MAP$
OBJ_NAME$
OBJ_DBNAME$
OBJ_VISIBLE% True/False
OBJ_LINKINDEX% (0 - 10)
OBJ_LINK:TYPE%
OBJ_LINK:RECORD%
OBJ_PROJTYPE%
OBJ_CLASS%
OBJ_SPEED%
OBJ_RANGE%
OBJ_AFFECTS_WHO%
OBJ_USES%
OBJ_DURATION%
OBJ_COST%
OBJ_AFFECTS_X%
OBJ_AFFECTS_Y%
OBJ_AFFECTS_ANIMTYPE%
OBJ_AFFECTS_MAP$
OBJ_AFFECTS_DEFENSE%
OBJ_AFFECTS_MAGIC%
OBJ_AFFECTS_STR%
OBJ_AFFECTS_END%
OBJ_AFFECTS_INT%
OBJ_AFFECTS_WIS%
OBJ_AFFECTS_CON%
OBJ_AFFECTS_DEX%
OBJ_AFFECTS_CHR%
OBJ_AFFECTS_LDR%
These script variables are the actual database values of any given object. When an object
database record is read you can adjust the actual database information by adjusting these
values. These database records can be written back to the database if you wish these
database values to be permanent.
SCRIPT_FILE$
SCRIPT_RECORD%
SCRIPT_CONTINUE%
SCRIPT_EVENTTYPE$
SCRIPT_TITLE$
SCRIPT_MAPINDEX%
SCRIPT_MAPNAME$
SCRIPT_X%
SCRIPT_Y%
These script values are set whenever a script record is executed. There are designs to
give the script writer control over which commands are executed. Scripts can be executed
by a given map location, specific object, PC, or NPC. So a different event can be
generated depending on who/what executed the script.
SCR_X%
SCR_Y%
SCR_MUSIC$
SCR_BOOLEAN%
SCR_HANDLE$
SCR_OBJTYPE%
SCR_OBJINDEX%
SCR_RECORD%
SCR_DIRECTION$
SCR_MOVEPATH$
SCR_DICE%
All of these script variables are return values. When certain script functions are called
it is necessary for the system to inform your script of the results. These are the
variables that can enable you to evaluate your results and script accordingly. For
example: The FindPath script command will determine the walk path from 2 map coordinates.
The walk path is a series of N,S,E,W,NW,NE,SW,SE movement commands stored within the
SCR_MOVEPATH$ script variable. When a players command script PLR_MOVESEQ$ is set to
SCR_MOVEPATH$, he will walk along the path given.
The following are a list of all the current system variables used by Explorations. If you
use the SetVar script command to create/hold a value you can not use any of the variable
names below.
SYS_DEFAULT_DRIVE$
SYS_DEFAULT_PATH$
SYS_PROGRAM_PATH$
These commands hold the basic directory paths of the game currently being executed.. Use
these commands for advanced scripting only.
PARTY_NAME$
LEN_OBJECT%
LEN_CHARACTER%
LEN_MAP%
SYS_RETURN$ = Chr$(13)+Chr$(10) 'Carriage Return
SYS_TAB$ = Tab(8) or Spc(8)
SYS_MAP_STEP% = 32
SYS_TRUE% = -1
SYS_FALSE% = 0
The above values hold basic database and system constants.
SYS_CURRENT_MODULE%
SYS_NUMBER_MAPS%
SYS_NUMBER_CHARACTERS%
SYS_NUMBER_PLAYERS%
SYS_MAX_PLAYERS%
SYS_WALK_SPEED%
SYS_RUN_SPEED%
SYS_MIN_HEALTH_FLEE%
SYS_MIN_HEALTH_HEAL%
SYS_TERRAIN_ANIMATION% True/False
SYS_PROJECTILE_ANIMATION% True/False
SYS_COLLISION_DISTANCE%
SYS_ARMOR_DB_STATUS% True/False
SYS_SKILLS_DB_STATUS% True/False
SYS_WEAPONS_DB_STATUS% True/False
SYS_EQUIPMENT_DB_STATUS% True/False
SYS_SPELLS_DB_STATUS% True/False
SYS_RACE_DATABASE_STATUS% True/False
SYS_CLASSES_DATABASE_STATUS% True/False
SYS_SOUND_FX% True/False
SYS_BACKGROUND_MUSIC% True/False
SYS_COMBAT_MODE% True/False
SYS_FORCE_ICONSIZE% True/False
SYS_DEFAULT_ICONWIDTH%
SYS_DEFAULT_ICONHEIGHT%
SYS_GAME_SPEED%
SYS_SEGMENTS_PER_ROUND%
SYS_ANIMTERRAIN_UPDATE INTERVAL%
SYS_ANIMSTRUCTURE_UPDATE INTERVAL%
SYS_ANIMOBJECT_UPDATE INTERVAL%
SYS_DEFAULT_#_ANIM_FRAMES%
SYS_GRAPHICS_MODE%
All of the previous system variables are set within the Explorations Writer under Game
Information. Be sure you understand the affects of changing these values during game play
time.
SYS_ATTACKER_HANDLE$
SYS_DEFENDER_HANDLE$
During combat, if a script is triggered in which you need to determine the current
Attacker or Defender you can read the character handles from within these script
variables.
SYS_HSCROLL% True/False
SYS_HSCROLL_VALUE%
SYS_VSCROLL% True/False
SYS_VSCROLL_VALUE%
SYS_SCREEN_WIDTH%
SYS_SCREEN_HEIGHT%
SYS_TRANSPARENT%
These values are used to read the current GUI control values.
MAP_TRAVERSE% True/False
MAP_TERRAIN%
MAP_OBJECT%
MAP_STRUCTURE%
MAP_ENCOUNTER%
MAP_PLAYER%
MAP_ICON_TYPE%
MAP_ICON_REC%
MAP_ICON_X%
MAP_ICON_Y%
Map Global Variables are set when a Get Map Location (ScriptCommand) is executed. You may
read any map location values as well as edit/change the value of map icons during game
play time. To make your map changes take affect the UpdateMap command must be executed.
PLR_RECORD%
PLR_VISIBLE%
PLR_ENABLED%
PLR_CMD$
PLR_ACTION$
PLR_FOLLOW$
PLR_ENEMY$
PLR_DIRECTION%
PLR_DEMEANOR%
PLR_OBJECTTYPE%
PLR_OBJECTCLASS%
PLR_OBJECTREC%
PLR_SPEED%
PLR_ROW%
PLR_COL%
PLR_X%
PLR_Y%
PLR_MOVESEQ$
When an NPC/PC is selected using the SelectNPC/SelectPC command the above script values
are set. These values are the sprite control values. Changing these values can adjust a
PCs /NPCs current direction he is facing or establish a walk path.
PLR_HANDLE$
PLR_ICON$
PLR_SCRIPT$
PLR_AI_STATUS% True/False
PLR_MOBILITY% True/False
PLR_NAME$
PLR_EXPERIENCE%
PLR_MONEY%
PLR_CLASS%
PLR_RACE%
PLR_ANIMKEY$
PLR_STATS_X%
PLR_STATS_Y%
PLR_STATS_ANIMTYPE%
PLR_STATS_MAP$
PLR_STATS_HEALTH%
PLR_STATS_DEFENSE%
PLR_STATS_MAGIC%
PLR_STATS_STR%
PLR_STATS_END%
PLR_STATS_INT%
PLR_STATS_WIS%
PLR_STATS_CON%
PLR_STATS_DEX%
PLR_STATS_CHR%
PLR_STATS_LDR%
PLR_OBJECTSINDEX%
PLR_OBJECTSTYPE%
This Player script variables represent the character's physical stats. You can edit/
change any of these stats when a PC/NPC is selected. All changes to a PC/NPCs stats
or controls will take affect when the UpdatePC or UpdateNPC command is executed.
PLR_OBJECTS:RECORD%
PLR_OBJECTS:INHAND%
PLR_OBJECTS:CLASS%
PLR_OBJECTS:DURATION%
PLR_OBJECTS:CHARGES%
These Object script variables are set when a GetObject script command is called. The
GetObject command can only be executed after a SelectPC command is executed. This command
will select individual objects possessed by the selected PCNPC.
OBJ_RECORD%
OBJ_X%
OBJ_Y%
OBJ_MAP$
OBJ_NAME$
OBJ_DBNAME$
OBJ_VISIBLE% True/False
OBJ_LINKINDEX% (0 - 10)
OBJ_LINK:TYPE%
OBJ_LINK:RECORD%
OBJ_PROJTYPE%
OBJ_CLASS%
OBJ_SPEED%
OBJ_RANGE%
OBJ_AFFECTS_WHO%
OBJ_USES%
OBJ_DURATION%
OBJ_COST%
OBJ_AFFECTS_X%
OBJ_AFFECTS_Y%
OBJ_AFFECTS_ANIMTYPE%
OBJ_AFFECTS_MAP$
OBJ_AFFECTS_DEFENSE%
OBJ_AFFECTS_MAGIC%
OBJ_AFFECTS_STR%
OBJ_AFFECTS_END%
OBJ_AFFECTS_INT%
OBJ_AFFECTS_WIS%
OBJ_AFFECTS_CON%
OBJ_AFFECTS_DEX%
OBJ_AFFECTS_CHR%
OBJ_AFFECTS_LDR%
These script variables are the actual database values of any given object. When an object
database record is read you can adjust the actual database information by adjusting these
values. These database records can be written back to the database if you wish these
database values to be permanent.
SCRIPT_FILE$
SCRIPT_RECORD%
SCRIPT_CONTINUE%
SCRIPT_EVENTTYPE$
SCRIPT_TITLE$
SCRIPT_MAPINDEX%
SCRIPT_MAPNAME$
SCRIPT_X%
SCRIPT_Y%
These script values are set whenever a script record is executed. There are designs to
give the script writer control over which commands are executed. Scripts can be executed
by a given map location, specific object, PC, or NPC. So a different event can be
generated depending on who/what executed the script.
SCR_X%
SCR_Y%
SCR_MUSIC$
SCR_BOOLEAN%
SCR_HANDLE$
SCR_OBJTYPE%
SCR_OBJINDEX%
SCR_RECORD%
SCR_DIRECTION$
SCR_MOVEPATH$
SCR_DICE%
All of these script variables are return values. When certain script functions are called
it is necessary for the system to inform your script of the results. These are the
variables that can enable you to evaluate your results and script accordingly. For
example: The FindPath script command will determine the walk path from 2 map coordinates.
The walk path is a series of N,S,E,W,NW,NE,SW,SE movement commands stored within the
SCR_MOVEPATH$ script variable. When a players command script PLR_MOVESEQ$ is set to
SCR_MOVEPATH$, he will walk along the path given.