Introduction
Top Next

This manual is under construction, please excuse the incomplete information and empty sections. If you need more information on a particular subject PLEASE notify me and I will work on that portion of the manual.

Inner Space is a revolutionary platform for development inside other applications, most notably games. It is used to customize the application and automate a variety of tasks. It is extensible, so the range of features available are limited only by the time it takes for members of the community to develop extensions. It is application-independent, choosing instead to be system-dependent. Games tend to use a specific set of display and input systems (for example, Direct3D, OpenGL, DirectDraw), and Inner Space vies to support each of these different systems in order to allow use of Inner Space for as many actual games as possible. Currently, OpenGL and DirectDraw support are not included, but we hope to have them supported very soon.


Features
Previous Top Next

Inner Space is comprised of several independent systems, each providing a set of features.

Display - Inner Space is able to manipulate the graphical display, such as displaying a HUD (Heads Up Display)
Video Capture - Inner Space is able to record video with sound
Window - Inner Space is able to manipulate the window
Input - Inner Space is able to manipulate keyboard and mouse input
Console - Inner Space provides a console that can be used to enter commands and display output
Inter-Process - Inner Space provides commands to manipulate other Inner Space sessions
Scripting - Inner Space provides scripting functionality that can be used to automate
Custom Extensions - Inner Space provides the ability to use Custom Extensions to extend the existing feature set
Services - Inner Space provides a system for extensions to communicate with other extensions, and for the main program to notify extensions of events as well
Settings - Inner Space includes a system of named settings, separated into games and profiles. This system also allows users to add support to Inner Space for other games that use supported input and display systems


Supported Games

Inner Space is designed to support various input and display systems, rather than particular games. A way for users to add games that use supported systems is provided, so this list only contains those supported by default, not the complete list of games that Inner Space can be used for.

* Battlefield 1942
* Counter-strike: Source
* Dark Age of Camelot
* EverQuest
* EverQuest II
* Half-Life: Source
* Half-Life 2
* Lords of EverQuest
* Rise of Nations
* Rollercoaster Tycoon 3
* Sid Meier's Pirates!
* Sims 2
* Warcraft III
* World of Warcraft


Getting Started

Enter topic text here.


Using the Console

See Console & Commands


Adding Games

see Settings Overview


Adding a Profile for an existing game

see Settings Overview


Basic

Alias
Syntax:
Alias <-list|-delete <replacement>|<replace> <with>>
Description:
Adds, updates, displays, or deletes aliases. Aliases allow you to enter an alias name instead of a command name, which then gets replaced before executing commands. For example, "aliases" is aliased by default to "alias -list". Anything typed after "aliases" will then be passed just like another parameter. Alias names should NOT include spaces.
Examples:
Alias -list
Alias binds "bind -list"
Alias -delete binds

Commands
Syntax:
Commands
Description:
Lists all available commands

Exit
Syntax:
Exit
Description:
Exits the program immediately (same as selecting End Process from Task Manager)

Multiline
Syntax:
Multiline <separator> [command][<separator>[command]][<separator>[command]]...
Description:
Executes many commands at a time
Example:
Multiline ; press alt+1;press 2
Multiline | echo line 1|echo line 2

Version
Syntax:
Version
Description:
Displays into the console the current Inner Space version


Sessions

Name
Syntax:
Name <name>
Description:
Renames the current session. Can only be done from a session using the uplink command.
Example:
Name "Session 1"

Sessions
Syntax:
Sessions
Description:
Lists currently open sessions

Relay
Syntax:
Relay <name> <command>
Description:
Relays a command to another session
Examples:
Relay "Session 2" echo LOW HEALTH WARNING
Relay "Session 2" multiline ; press alt+f1;press 2


Console

Console
Syntax:
Console <on|off>
Description:
Opens or closes the main console window
Examples:
Console on
Console off

ConsoleClear
Syntax:
ConsoleClear
Description:
Clears the console buffer

Echo
Syntax:
Echo <text>
Description:
Displays text in the console
Example:
Echo "Welcome to Inner Space"

Log
Syntax:
Log <off|<filename>>
Description:
Logs all console output to disk as well as the console window
Examples:
Log "Console.txt"
Log off

Squelch
Syntax:
Squelch <command>
Description:
Executes a single command, but temporarily disables output to the console while doing so
Examples:
Squelch windowsize -reset


Settings

Game
Syntax:
Game <name> [-set <setting> <value>|-remove <setting>]
Description:
Lists, sets, or removes settings for a specific game. See the Game Settings Reference for more information.
Examples:
Game "EverQuest"
Game "EverQuest" -set Direct3D9 1
Game "EverQuest" -remove Direct3D8

Games
Syntax:
Games <-list|-reload|-save|-add <name> [copy from]|-remove <name>>
Description:
Manipulates the list of available games
Examples:
Games -list
Games -reload
Games -add "Grand Theft Auto: San Andreas"
Games -add "Grand Theft Auto: San Andreas" EverQuest
Games -save

Profile
Syntax:
Profile <name> [-set <setting> <value>|-remove <setting>]
Description:
Lists, sets, or removes settings for a specific profile. See the Profile Settings Reference for more information.
Examples:
Profile "EverQuest Default Profile"
Profile "EverQuest Default Profile" -set "Force Window" 1
Profile "EverQuest Default Profile" -remove "Force Window"

Profiles
Syntax:
Profiles <-list|-reload|-save|-add <name> [copy from]|-remove <name>>
Description:
Manipulates the list of available profiles
Examples:
Profiles -list
Profiles -reload
Profiles -add "Grand Theft Auto: San Andreas"
Profiles -add "Grand Theft Auto: San Andreas" "EverQuest Default Profile"
Profiles -save


Index of Uplink Commands

A
Alias
B
C
Commands
Console
ConsoleClear
D
E
Echo
Exit
F
G
Game
Games
H
I
J
K
L
Log
M
Multiline
N
Name
O
P
Profile
Profiles
Q
R
Relay
S
Squelch
Sessions
T
U
V
Version
W
X
Y
Z


Display

Enter topic text here.


Input

Enter topic text here.


Window

Inner Space's window system controls the behavior of the game's window itself.


HUD

Inner Space's HUD system provides a layer of graphics on top of the actual game. This layer is accessible via HUD commands, which allow the display of pieces of text at specified locations on the display window. The HUD system will re-process each of the text elements every few frames in case they use variables, and will display each of the elements for the current HUD filter. The HUD filter provides a way of displaying only a subset of all of the available HUD elements, depending on if the element is set to display for a given filter. The system is designed so that there can be 32 separate filters, and any element can be shown in one or all of them.


Console & Commands

The Inner Space console is derived from the consoles found in most first-person shooters, and loosely follows the same concept as operating system command shells. The console is accessed via the "console" key, a configurable input bind that is set to the ` key by default. With the console visible, keyboard input is sent to the console and blocked from the game itself. The only binds that will operate while the console is visible are the "console" key and any bind that uses the alt or control keys (Later this will be modified so that binds work unless they are only comprised of printable characters).

Commands are entered in the console, and may use "parameters". Parameters are things typed after a command in order to achieve the desired result. For example, the "WindowPosition" command can accept parameters to move the window, ex: "WindowPosition 0,0", or can be used without parameters to show the current position of the window. Command parameters are separated by spaces. If you must use a space within a single parameter to a command, surround that parameter with double quotes "like this". That way, the command knows you wanted that to be one parameter instead of two or more. Some commands do not require quotes around the final parameter, counting all of the rest of the line as a single parameter.

Commands to NOT have to be typed in their entirety, just enough to identify (in alphabetical order) which command you mean. For example, the "WindowPosition" command can be shortened to "WindowPos", or even "WindowP" and still be the same. Commands are also NOT case sensitive, so you can type "WINDOWPOS" or "windowpos" and still get the "WindowPosition" command.

The console also provides command auto-completion and cycling by use of the "tab" key. Pressing tab with a command partially entered will result in the full command being entered in the command entry box. Pressing tab with a command fully entered will cycle to the next command, and holding shift while doing so will cycle to the previous command. Additionally, the console has a command history feature. By holding shit and pressing up or down, you can cycle through previous commands entered. The last command entered will always be retrieved with shift+up. Finally, the console allows viewing of previous text shown in the console by pressing up, down, pageup, or pagedown.

Aliases are custom commands that allow you to type something in place of something else (shorter or easier to remember, for example). Aliases must be one word, but can be used in place of a command with parameters. Additionally, anything typed after the alias will be extra parameters to the command executed. For example, you may alias "session1" to "uplink relay session1", and then use "session1" as if it were a normal session command to relay commands to a session named session1. Aliases do not follow the same rules for auto-completion as shown above. Aliases MUST be typed in their entirety, and are not in the tab cycling, but are not case sensitive. Therefore, if you would like to only type "rel" to relay, you would have to alias that as well.


File System

Enter topic text here.


Inter-Process Communication

Inner Space provides a way for sessions to communicate with each other. This is called Inter-Process Communication. The system is asynchronous, which means that you can send any number of commands and they will execute as soon as possible, rather than immediately. This allows your sessions to continue doing what they need to do, rather than sit around waiting for a response from the other session, which may be under heavy load. The system is also ordered, which means that the commands are executed in the order received.


Video Capture

The Inner Space video capture system allows you to take potentially full-motion video of any game window. Be aware that real-time video capture may have adverse effects on your game's performance, and you should expect a drop in framerate during capturing and encoding. The system breaks the process into two main parts. First, the video is captured to a temporary file, and then after capture completes the encoding process begins. This split improves playability, while allowing flexibility in the encoding process. The system also provides ways of decreasing the temporary file usage by making smaller videos or using compression, which can allow you to take much longer videos, as well as control over the encoded video quality. The system encodes the video to .WMV format, using the WMP 9 codec, and therefore the system requires you to have Windows Media Player 9 or later.


Extensions

Enter topic text here.


Scripting & Variables

Inner Space's scripting system provides a way to access various information and provide automation that may be too difficult to understand or develop otherwise. This system is much easier to learn and use than real programming, and requires no special programs like compilers.


Using Command Execution Files (ICE)

Inner Space Command Execution Files are files that contain a set of commands to execute linearly. These are not like scripts, which use functions and have flow control. These will simply execute commands for you that you would otherwise have to type manually.


Basic

Alias
Syntax:
Alias <-list|-delete <replacement>|<replace> <with>>
Description:
Adds, updates, displays, or deletes aliases. Aliases allow you to enter an alias name instead of a command name, which then gets replaced before executing commands. For example, "aliases" is aliased by default to "alias -list". Anything typed after "aliases" will then be passed just like another parameter. Alias names should NOT include spaces.
Examples:
Alias -list
Alias binds "bind -list"
Alias -delete binds

Arg
Syntax:
Arg <#> [...]
Description:
Displays the nth argument (also known as parameter) out of the following parameters
Examples:
Arg 1 one two three four
Arg 3 one two three four

Commands
Syntax:
Commands
Description:
Lists all available commands

Execute
Syntax:
Execute <command>
Description:
Executes a single command. This is mainly useful when using variables that contain commands to execute.

ExecuteFile
Syntax:
ExecuteFile <filename>
Description:
Executes a given .ice file (you may omit the extension). This file contains only a linear sequence of commands. For example, a set of bind commands.
Example:
ExecuteFile autoexec
ExecuteFile myconfig

Exit
Syntax:
Exit
Description:
Exits the game immediately (same as selecting End Process from Task Manager)

NoParse
Syntax:
NoParse <command>
Description:
Executes a single command, temporarily disabling the parsing of variables so that variables in this line do not get parsed. This is mainly useful when variables should be parsed LATER instead of when the command is executed.
Example:
NoParse Alias hps echo ${Me.CurrentHPs}

TimedCommand
Syntax:
TimedCommand <delay> <command>
Description:
Executes a given command in a specified amount of time, given in tenths of seconds
Example:
TimedCommand 10 echo one second has passed

Version
Syntax:
Version
Description:
Displays into the console the current Inner Space version
Example:
Version


Display

DisplayInfo
Syntax:
DisplayInfo
Description:
Displays basic information about the current display system and mode, including information about image distortion.
Example:
DisplayInfo

FPS
Syntax:
FPS
Description:
Displays the current sustained framerate within the game. This does not indicate the time used for a single frame, but rather the average over 64 consecutive frames.
Example:
FPS

HUDAdd
Syntax:
HUDAdd <name> <#,#> <text>
Description:
Adds a HUD element with the given text
Example:
HUDAdd "IS Beta" 20,20 "Inner Space (${Game}) - Beta"

HUDList
Syntax:
HUDList
Description:
Lists all HUD elements
Example:
HUDList

HUDRemove
Syntax:
HUDRemove <name>
Description:
Removes a HUD element
Example:
HUDRemove "IS Beta"

HUDSet
Syntax:
HUDSet <name> [-c <color>] [-f <filter>] [-l #,#]
Description:
Changes the color, filter, or position of a HUD element. Color is given in RRGGBB in hexadecimal, such as FF0000 for full red, 00FF00 for full blue, and 0000FF for full green. Filter is currently unused and in development. Location is given in game display coordinates (in other words, if the game runs at 800x600 and the window is stretched to 1024x768, this is relative to the game's resolution of 800x600).
Examples:
HUDSet "IS Beta" -c ff0000
HUDSet "IS Beta" -l 0,0

MaxFPS
Syntax:
MaxFPS <-bg|-fg> [-calculate|-absolute] [frames per second]
Description:
Sets and/or displays the Frames-per-Second (FPS) limiter information for background (-bg) or foreground (-fg). FPS limiting has two modes -- calculate and absolute. Calculate mode is best known as "FPS Limiting", while absolute mode is best known as "CPU Limiting". The difference is that absolute mode gives up the same amount of CPU time every frame, and therefore the maximum FPS in this mode will never be reached. The maximum FPS in absolute mode is the exact FPS your game would reach if it used up absolutely no CPU time itself (therefore the FPS is never reached because your game does use CPU time). Calculate mode gives up the minimum amount of time possible to reach, but not surpass, the desired maximum FPS. If you are not reaching the desired FPS, it will give up the minimum amount of time required by your system to run correctly. A maximum of 0 in either mode will result in giving up the minimum amount of time required by your system to run correctly.
Note: If you are playing EQ1 with Inner Space and are using EQPlayNice, you should set foreground and background both to 0.
Examples:
MaxFPS -bg
MaxFPS -fg
MaxFPS -fg -calculate 60
MaxFPS -bg -absolute 30
MaxFPS -fg -absolute
MaxFPS -fg 60

WireFrame
Syntax:
WireFrame <on|off|toggle>
Description:
Sets a DirectX option to display the game in wireframe mode. Using this may break license agreements; use at your own discretion.
Examples:
WireFrame on
WireFrame off
WireFrame toggle


Video Capture

CaptureBegin
Syntax:
CaptureBegin [Options] [Resolution] [Image Quality]
Description:
Begins capturing video. Currently captures every frame, but will be updated to allow capturing less frames, similar to WinEQ.

Default settings if no parameters are given are:
Resolution = Window Size
Image Quality = 60 - % of Image Quality for resulting video, 100 is highest
Sound ON
Pre-Shrink ON - If ON, shrinks the captured image to the final video size before temporarily
storing it
Compression OFF - If ON, compresses the temporary file used during video capture, so that longer
videos can be made with less temporary space, but decreases framerate

Valid Options, which ARE case sensitive and can be bundled together (e.g. -cPS), are:
-c Enable compression
-P Disable Pre-Shrink
-S Disable Sound

Resolution can be given in the form #x#, such as 1024x768 (DO NOT use spaces). Image Quality should be given as a single number
Examples:
todo

CaptureEnd
Syntax:
CaptureEnd
Description:
Ends capturing video, and begins encoding it to the final state.


Window

ClipMouse
Syntax:
ClipMouse <on|off|toggle>
Description:
Enables, disables, or toggles mouse clipping. Mouse clipping prevents the mouse from leaving the confines of the window (note that this particular command is not useful for DirectInput mice. See DIMouse)
Examples:
ClipMouse on
ClipMouse off
ClipMouse toggle

WindowFrame
Syntax:
WindowFrame <none|thin|thick>
Description:
Changes the style of border around the game window.
none: Not resizable or movable, and has no title bar
thin: Not resizable, but has title bar
thick: Resizable with title bar
Examples:
WindowFrame none
WindowFrame thin
WindowFrame thick

WindowPosition
Syntax:
WindowPosition [-viewable] [#,#]
Description:
When used without parameters, displays the current position of the window. With parameters, moves the window to the desired coordinates. Unless the -viewable parameter is given, this is the upper left corner of the entire window, not just the part displaying the game. Coordinates are in X,Y form, where X is left/right and Y is down/up. The top left corner of the screen is 0,0, and the numbers increase going down and to the right.
Examples:
WindowPosition
WindowPosition 0,0
WindowPosition -viewable 0,0

WindowScale
Syntax:
WindowScale [#]
Description:
When used without parameters, displays the current scale of the window in comparison to the game's current display resolution. With parameters, rescales the window to a desired percentage of the game's current display resolution.
Examples:
WindowScale 20
WindowScale 100

WindowSize
Syntax:
WindowSize [-fullscreen|-reset|[-viewable] [#x#]]
Description:
When used without parameters, displays the current size of the window. With parameters, resizes the window to the desired size. Unless the -viewable parameter is given, this is the size of the entire window in pixels including borders, not just the part displaying the game (therefore, the game may look distorted if it does not adjust its resolution accordingly). With the -viewable parameters, the borders are not included in the size adjustment, and should not horribly distort the game display as long as you use the correct ratio. If the -reset parameter is given, the window size is reset to the correct size for the game's current display resolution. If the -fullscreen parameter is given, the window's viewable area is set to the display resolution. Used in conjunction with WindowPosition 0,0, this can create the illusion of a full screen game, while still being windowed.
Examples:
WindowSize -fullscreen
WindowSize -reset
WindowSize 1280x1024
WindowSize -viewable 1280x1024

WindowText
Syntax:
WindowText <text>
Description:
Changes the text being shown in the window's title bar. Note that the game itself may update the text, and Inner Space does not currently prevent that.
Examples:
WindowText "Inner Space - ${Game}"

WindowTray
Syntax:
WindowTray <off|on [tooltip]>
Description:
Adds or removes an icon in the system tray for this game, using the game's icon. Left-clicking the icon brings the window to the foreground. When the game is minimized, the normal taskbar button is hidden, and the game does not appear in the alt-tab list.
Examples:
WindowTray off
WindowTray on
WindowTray on "${Game}"

WindowVisibility
Syntax:
WindowVisibility [-noactivate] <foreground|alwaysontop|down|bottom|minimize>
Description:
Changes the window's visibility state. If -noactivate is supplied, will not change input focus to the window.
foreground: Brings window to the foreground
alwaysontop: Sets window to always on top
down: Moves window downward (note: currently counts invisible windows rather than skipping them)
bottom: Moves window so that it is underneath all other windows
minimize: Minimizes the window
Examples:
WindowVisibility foreground
WindowVisibility alwaysontop
WindowVisibility down
WindowVisibility bottom
WindowVisibility minimize
WindowVisibility -noactivate alwaysontop


Input

Bind
Syntax:
Bind <-list|-delete <name>|<name> <key combo> <command>>
Description:
Adds, updates, displays, or deletes key binds. Key combos must not contain spaces, and keys must be separated by + (example: Ctrl+Alt+N), in the same style as WinEQ.

DIMouse
Syntax:
DIMouse [-lock] <on|off|toggle>
Description:
Releases (off) or re-captures (on) the DirectInput mouse. The -lock switch is used to prevent the application from re-capturing the DirectInput mouse -- for example some games re-capture the mouse when switching to the window from another application. When the mouse is released with -lock, -lock must also be used when re-capturing.

GlobalBind
Syntax:
GlobalBind <-list|-delete [name]|[name] [combo] [command]>
Description:
Adds, updates, displays, or deletes global key binds. Key combos must not contain spaces, and keys must be separated by + (example: Ctrl+Alt+N), in the same style as WinEQ. Global binds must use exactly ONE non-modifier key, but may use any combination of Ctrl, Alt, Shift and Win. Only one global bind may exist for any particular combination, as constrained by Windows. Windows may also reserve certain keys, for example F12 is a reserved key and may not be used as a global bind (but may be used in a normal bind).
Global binds work from ANY other window.

MouseClick
Syntax:
MouseClick <-left|-right> [hold]
Description:
Clicks the left or right button of the mouse at the current position. Use the extra "hold" parameter to hold the button down. When ready to release, use MouseClick again without "hold".

MouseTo
Syntax:
MouseTo <#,#>
Description:
Moves the mouse to the specified coordinate within the window (does not work for DirectInput mice, such as used in EverQuest 1)

Press
Syntax:
Press <key combination>
Description:
Presses and then releases any combination of keys.
Example:
Press Shift+1

Type
Syntax:
Type <text>
Description:
Types, letter by letter, some text.
Example:
multiline ; type myusername;press tab;type mypassword;press enter
(note: it might not be safe to keep a macro for entering your username and password handy, but it is a valid example)


Console

Console
Syntax:
Console <on|off|toggle>
Description:
Enables, disables, or toggles the console.
Examples:
Console on
Console off
Console toggle

ConsoleClear
Syntax:
ConsoleClear
Description:
Clears the console buffer
Example:
ConsoleClear

ConsoleVisibleLines
Syntax:
ConsoleVisibleLines [#]
Description:
Sets the number of visible lines in the console. Valid values are 2 to 50.
Example:
ConsoleVisibleLines 25

Echo
Syntax:
Echo <on|off|<text>>
Description:
Displays text in the console, or enables/disables console output
Example:
Echo "Welcome to Inner Space"

Log
Syntax:
Log <off|<filename>>
Description:
Logs all console output to disk as well as the console window
Examples:
Log "Console.txt"
Log off

Squelch
Syntax:
Squelch <command>
Description:
Executes a single command, but temporarily disables output to the console while doing so.
Examples:
Squelch windowsize -reset


File System

Cat
Syntax:
Cat [-] [file ...]
Description:
Concatenate files and print on the standard output
Examples:
cat file1.txt
cat file1.txt file2.txt >> file3.txt

FileRedirect
Syntax:
FileRedirect <-list|-remove <original filename>|<original filename> [new filename]>
Description:
Redirects game's basic usage of file X to file Y. Will not work in all cases (for example, cannot be used to force the game to use different DLL files).
Examples:
FileRedirect -list
FileRedirect User.Dat User-John.dat
FileRedirect -remove User.Dat

INIRedirect
Syntax:
INIRedirect <-list|-remove <file|*> <section|*> <setting|*>|<file|*> <section|*> <setting|*> <new file|*> <new section|*> <new setting|*>>
Description:
Redirect game's basic usage of .ini file settings, if it uses the Windows API functions for .ini file usage. * may be used in place of a specific file, section, or setting name to mean ALL, or in the case of new file, new section, new setting to mean KEEP ORIGINAL. * may also be used to indicate a wildcard once in a specific file, section, or setting name, at the beginning, middle, or end. For example, if a file contains sections named "Section1" and "Section2", you may use "Section*" to include both of the sections.
If a new file is given and does not already exist, it will be created from the original .ini file.
Examples:
INIRedirect -list
INIRedirect eqclient.ini * * eqclient-profile1.ini * *
INIRedirect -remove eqclient.ini * *

Head
Syntax:
Head [-n #] [file ...]
Description:
Displays the top # lines of given files. Defaults to 10 lines. If no parameters are given or the file "-" is used, standard input will be read (pipelining only)
Examples:

Line
Syntax:
Line <#> [file]
Description:
Retrieves a specific line from a given file. If no file parameter is given, standard input will be read (pipelining only)
Examples:

Tail
Syntax:
Tail [-n #] [file ...]
Description:
Displays the final # lines of given files. Defaults to 10 lines. If no parameters are given or the file "-" is used, standard input will be read (pipelining only)
Examples:


Inter-Process

Uplink
Syntax:
Uplink <command>
Description:
Executes an uplink command (see Uplink Command Reference)
Examples:
Uplink relay "Session 1" echo Hello from session two


Custom Extensions

Extension
Syntax:
Extension <-list|<-unload <extension>>|<extension>>
Description:
Lists loaded extensions, or unloads or loads an extension
Examples:
Extension -list
Extension isxgenhack
Extension -unload isxgenhack

Services
Syntax:
Services
Description:
Displays information about each currently available service
Example:
Services


Scripting & Variables

Call
Syntax:
Call <function name> [Parameters]
Description:
Calls a function and passes any given parameters, if the function is set up to take them. See Functions
Examples:
Call UpdateFunction 1

DeclareVariable
Syntax:
DeclareVariable <varname|varname[array extents]> [type] [global|script|local] [default value]
Description:
Declares a variable. Variables have a name, type, scope, and value. Variables can also have array extents, without artificial limitations on number of dimensions or total size (though if you make an array too large to fit in your memory, you will of course have problems). Array extents come immediately after the name and are enclosed in brackets [ ], with dimensions separated by commas. Variable types are IS Data types (see Data Reference). If no type is given, the type defaults to string. Variable scopes define where the variable is valid. Inside a script, DeclareVariable defaults to local scope if a scope is not given. If typed manually, DeclareVariable defaults to global scope if a scope is not given. Default value will be assigned to the variable immediately upon creation. The default value for a variable if not given depends entirely on the variable type, but the basic types will default to an empty string, 0, or FALSE.
Examples:
DeclareVariable count int local 1
DeclareVariable Names[12] script "No Name"
DeclareVariable Test

DeleteVariable
Syntax:
DeleteVariable <name|* global>
Description:
Deletes a single variable, or ALL global variables
Examples:
DeleteVariable MyGlobalVariable
DeleteVariable * global

Do
Syntax:
Do
Description:
Provides a starting point for a While loop. See Do..While
Examples:
See Do..While

Else
Syntax:
Else
Description:
Can only be used with If. See If..Else
Examples:
See If..Else

EndScript
Syntax:
EndScript <filename>
Description:
Immediately ends execution of a given script
Examples:
EndScript MyScript

If
Syntax:
If <#>
Description:
Executes the next command (or block) if # is non-zero. If # is zero, it skips the next command (or block), and if the line after THAT is "else", executes the else statement or block. See If..Else
Examples:
See If..Else

Return
Syntax:
Return [value]
Description:
Immediately returns from a function, and optionally returns a string that can be retrieved with ${Return}
Examples:
Return
Return FALSE
Return "What can this strange device be? When I touch it, it gives forth a sound."

RunScript
Syntax:
RunScript <filename> <parameters to main>
Description:
Begins execution of a given script (use the extension .iss, for Inner Space Script)
Examples:
RunScript MyScript
RunScript MyScript Param1 Param2 "Parameter 3"

VarCalc
Syntax:
VarCalc <name> <formula>
Description:
Calculates the result of a given formula, and sets the value of the specified variable
Examples:
VarCalc Count ${Count}+1

VarData
Syntax:
VarData <name> <data>
Description:
Parses an "IS Data" segment, placing the result in the specified variable if the resulting type is compatible with the type of variable. The segment must NOT be encased in ${}. This is slightly faster than setting a variable with VarSet to the result of an IS Data segment, and is the "better" way.
Examples:
VarData Framerate FPS.Int
VarData GameResolutionWidth Display.Width

VarSet
Syntax:
VarSet <name> <value>
Description:
Sets a variable value
Examples:
VarSet Count 1
VarSet Name Jim

Wait
Syntax:
Wait <delay in tenths of seconds> [early end condition]
Description:
Waits a specified amount of time in deciseconds (tenths of seconds) before continuing execution of this script, with an optional early ending (would wait until the delay is up OR the condition evaluates to non-zero)
Examples:
Wait 10
Wait 10 ${Me.Health}<10

While
Syntax:
While <#>
Description:
If # is non-zero, jumps back to the Do that appears in the same block. See Do..While
Examples:
See Do..While


Index of Session Commands

A
Alias
Arg
B
Bind
C
CaptureBegin
CaptureEnd
Call
Cat
ClipMouse
Commands
Console
ConsoleClear
ConsoleVisibleLines
D
DeclareVariable
DeleteVariable
DIMouse
DisplayInfo
Do
E
Echo
Else
EndScript
Execute
ExecuteFile
Exit
Extension
F
FileRedirect
FPS
G
Game
Games
GlobalBind
H
Head
I
If
J
K
L
Line
Log
M
MouseClick
MouseTo
N
NoParse
O
P
Press
Profile
Profiles
Q
R
Return
RunScript
S
Services
Squelch
T
Tail
TimedCommand
Type
U
Uplink
V
VarCalc
VarData
VarSet
Version
W
Wait
While
WindowFrame
WindowPosition
WindowScale
WindowSize
WindowText
WindowTray
WindowVisibility
WireFrame
X
Y
Z


Overview

Inner Space's basic settings are split into two sections -- Games, and Profiles. The Games section describes all of the games supported -- what input and display systems they use, what modules they have, how to find the game's main window, and so on. The Profiles section describes ways of launching the games. While there should be only one set of information describing each game, there can be many different profiles describing ways of launching that game.

Inner Space provides two separate mechanisms for manipulating the game and profile settings. One is through the Games window in the main program, and the other is through any Inner Space console. This section will describe the window.

As shown in the picture, the window is divided into 3 distinct sections. On the left is the categories, which divide the settings into groups. In the upper right is the group of available settings for the selected category. In the lower right is a description of the currently selected category, or of the currently selected setting if you have selected one to change.

Using the Category Tree
The category tree allows easy navigation of games and profiles, with an alphabetical list of games and all of the profiles associated with each game in a subcategory for that game. The tree also accepts certain keyboard and mouse input to rename, add, copy, or delete a new game or profile. To rename a game or profile, select the game or profile to rename and hit F2 or left click on the name again after it is selected. To delete a game or profile, press the delete key after selecting the game or profile you wish to delete, or press the "Remove" button at the bottom of the window. To create an empty game set, select the "Games" category and press the insert key or click the "New" button at the bottom of the window. To create a new profile for a particular game, select the "Profiles" subcategory for the game and press the insert key or click the "New" button at the bottom of the window. To copy any game or profile, select the game or profile to copy and press the insert key.

When renaming, deleting, or copying a game, the profiles associated with the game are included in the process. In other words, if you delete a game, the profiles assigned to the game are also deleted. If you copy a game, the profiles assigned to the game are also copied. If you rename a game, the profiles stay with the renamed game.

Any time a new category is selected, the description box shows information about the selected category.

Changing Settings
Individual settings come in a few different forms: Text, Paths, Sets, Whole Numbers, and Real Numbers. Text settings accept any input, and examples of text settings would be executable file names and command-line parameters. Paths are text, but are to be used only for paths to certain files, such as the game executable. Path settings have a text entry box, but also have a "..." button that can be used to browse to the path, rather than trying to remember it on your own. Sets accept only a few specific values, which are listed in a dropdown box. Whole number settings accept only whole numbers (as in, no decimal point), and use a text entry box. Real number settings accept any number, including decimal point, and also use a ext entry box.

Any time a new setting is selected for modification, the description box shows information about the selected setting.


Game

Direct3D8
Set to "1" if the game can or does use Direct3D8

Direct3D9
Set to "1" if the game can or does use Direct3D9

OpenGL
Set to "1" if the game can or does use OpenGL (not curently supported)

DirectDraw
Set to "1" if the game can or does use DirectDraw (not curently supported)

WindowClass
Name of the window class used for the game's main window

Block New WndProc
Set to "1" to prrevent the game from switching WndProcs

DirectInput8 Mouse
Set to "1" if the game uses DirectInput (any version) for mouse input

DirectInput8 Keyboard
Set to "1" if the game uses DirectInput (any version) for keyboard input

Win32I Mouse
Set to "1" if the game uses window messages for mouse input

Win32I Keyboard
Set to "1" if the game uses window messages for keyboard input

HooksI Mouse
Set to "1" if the game uses Windows hooks for mouse input

HooksI Keyboard
Set to "1" if the game uses Windows hooks for mouse keyboard

modules
Custom DLLs loaded by the game that may contain input or display system functionality, separated by commas

PreInit
todo

AutoExec
Executes a command file (after running "AutoExec.ice") - you may omit the .ice extension

OnStartup
Executes a single command (after running Game's AutoExec)


Profile

Game
Game to associate this profile with

Force Window
Forces this game into a window. May not work for all games. Note that for some games if the size of the actual window's viewable area is not equal to the game resoslution, the mouse will not function correctly.

Path
Path to the game executable

Executable
Game Executable

Parameters
Parameters to pass to the game executable, if any

Console Scrollback Size
Number of lines sent to the console to retain in the scrollback (typically 500)

Console Visible Lines
Number of lines to be displayed on screen when the in-game console is visible

AutoExec
Executes a command file (after executing Game's AutoExec and OnStartup) - you may omit the .ice extension

OnStartup
Executes a single command (after running Profile's AutoExec)

Preload Path
Path to a program to run before running the game, if any

Preload Executable
Executable to run before running the game, if any

Preload Parameters
Parameters to pass to the Preload Executable, if any

PreInit
todo

OnActivate
Single command to execute when session is becoming the active window

OnDeactivate
Single command to execute when session will no longer be the active window


Overview

The IS Data system is composed of types of objects, and instances of those types. Each object type may have "data members" as well as a direct method of converting this type to the actual output string.

NOTE: This system is in development and is not complete. There are more types coming, and more members coming in most types.

Syntax
The basic syntax for usage is something like this...
${TopLevelObject[index](cast).Member[index](cast).Member[index](cast)}
You must always use a top level object, but you don't necessarily have to use an index, cast, or member. For example, ${xxxx.yyyyy}. xxxx is a top level object of type "zzzzzz", and yyyyy is a member of that type. ${xx[1].yyyyy}. xxxxxxxx is a top level object of type "zzzzzzzzzzz", and yyyyy is a member of that type. You may nest your ${} usage, for example ${TopLevelObject[${TopLevelObject[index].Member}]}
* Failures will ALWAYS result in NULL


Data Types

array
bool
byte
dataset
display
float
int
keyboard
math
mouse
string
time
type


array

Overview

Members
int Dimensions: Number of dimensions this array stores
int Size: Total number of elements this array stores (all dimensions combined)
int Size[n]: Total number of elements stored in the nth dimension of this array

To String
none

Examples


bool

Overview

Members
(none)

To String
"TRUE" if the value is not equal to zero, or "FALSE" if the value is equal to zero

Examples


byte

Overview

Members
(none)

To String


dataset

Overview

Members
string Name: Name of the data set
string GetString[setting]: Retrieves a string value from the data set
int GetInt[setting]: Retrieves an int value from the data set
float GetFloat[setting]: Retrieves a float value from the data set

To String
Same as Name


display

Overview

Members
string System: Name of the currently active display system (Direct3D8, Direct3D9, OpenGL, DirectDraw, etc)
bool Windowed: Whether the application is really windowed
bool AppWindowed: Whether the application thinks it is windowed
int Width: The game's actual resolution width
int Height: The game's actual resolution height
int X: X position of the full window's left edge
int Y: Y position of the full window's top edge
int WindowWidth: Width of the full window
int WindowHeight: Height of the full window
int Monitor: Current monitor. 1 for primary, 2 for secondary (not yet implemented)
int DesktopWidth: Width of the windows desktop on the current monitor
int DesktopHeight: Height of the windows desktop on the current monitor
int ViewableX: X position of the left edge of the window's viewable portion (does not include the border, etc)
int ViewableY: Y position of the top edge of the window's viewable portion (does not include the border, etc)
int ViewableWidth: Width of the window's viewable portion
int ViewableHeight: Height of the window's viewable portion
bool Foreground: True if the window is currently the active window on the system

To String
Same as System


float

Overview

Members
string Deci: The value of this float, to the nearest tenth
string Centi: The value of this float, to the nearest hundredth
string Milli: The value of this float, to the nearest thousandth
int Int: The value of this float, to the nearest whole number
string Precision[n]: The value of this float, to the nearest n decimal places (e.g. 1 is tenths, 2 is hundredths, 3 is thousandths, and so on)

To String


int

Overview

Members
float Float: This number, converted to float
string Hex: This number, converted to hexadecimal (base-16, 0123456789abcdef)
int Reverse: This number, with its bytes reversed (1234 is turned into 3523477504.. easier to see in hex: 00 00 04 D2 -> D2 04 00 00)

To String


keyboard

Overview

Members
string System: Name of the currently active display system for keyboard input (DirectInput, Win32I, HooksI)

To String
none


math

Overview

Members
float Abs[formula]: Absolute value
int Rand[n]: Random number with range of n, meaning Rand[n]=0-(n-1). e.g. Rand[2] will give 0 or 1
float Calc[formula]: Performs any number of basic mathematical operations
float Sin[formula]: The Sin of formula
float Cos[formula]: The Cos of formula
float Tan[formula]: The Tan of formula
float Asin[formula]: The Asin of formula
float Acos[formula]: The Acos of formula
float Atan[formula]: The Atan of formula
string Hex[n]: The hex value of n
int Dec[hex]: The decimal value of a hexadecimal string
int Not[n]: Performs a bitwise not on n
float Distance[]: (not yet implemented)
float Sqrt[formula]: The square root of formula

To String
none


mouse

Overview

Members
string System: Name of the currently active display system for keyboard input (DirectInput, Win32I, HooksI)
int X: Current mouse X position (horizontal)
int Y: Current mouse Y position (vertical)

To String
none


string

Overview

Members
string Arg[n,separator]:
string Mid[position,length]:
string Left[length]:
string Right[length]:
int Find[text]:
int Length:
string Upper:
string Lower:
int Compare[text]:
int CompareCS[text]:
bool Equal[text]:
bool NotEqual[text]:
bool EqualCS[text]:
bool NotEqualCS[text]:
int Count[char]:
string Token[n,separator]:

To String
The value of the string


time

Overview

Members
int Hour: Hour (0-23)
int Minute: ...
int Second: ...
int DayOfWeek: 1=sunday to 7=saturday
int Day: Day of the month
int Month: Month of the year
int Year: ...
string Time12: hh:mm:ss, 12-hour format
string Time24: hh:mm:ss, 24-hour format
string Date: MM/DD/YY
bool Night: True if the current hour is 7pm or later, or 6am or earlier (7:00pm-6:59am)
int SecondsSinceMidnight: Number of seconds since midnight

To String
Same as Time24


type

Overview

Members
string Name: Type name
string Member[id]: Member name based on an internal ID number (based on 1 through n, not all values will be used)
int Member[name]: Member internal ID number based on name (will be a number from 1 to n)

To String
Same as Name


hudelement

Overview

Members
string Name:
int X:
int Y:
int Color:
int Filter:

To String


console

Overview

Members
bool Open:
bool Echo:

To String


script

Overview

Members
string Filename:

To String


extension

extension (not yet available)
Previous Top Next

Overview

Members
string Filename:

To String


bind

Overview

Members
string Name:
string Combo:
string Command:

To String


system

Overview

Members
string OS: The Windows version name, for example "Microsoft Windows XP"
string OSBuild: The Windows build number, for example "2600.xpsp_sp2_rtm.040803-2158"
int MemFree: The amount of free physical system RAM (less "shared video RAM" for onboard video cards), in megabytes
int MemTotal: The total amount of physical system RAM (less "shared video RAM" for onboard video cards), in megabytes

To String
Same as OS


Top-Level Objects

Top-Level Objects are instances of a given type.

type Type[text]:
int Int[text]:
math Math:
string String[text]:
float Float[text]:
bool Bool[text]:
string If[condition,nonzero]:
string If[condition,nonzero,zero]:
time Time:
dataset Game:
dataset Profile:
string Session:
string Session[n]:
string Session[name]:
string Return:
float FPS:
mouse Mouse:
keyboard Keyboard:
int Sessions:
display Display:
system System:


Overview

This section is under construction (and so is the rest of the manual, if you couldn't tell), so you may want to refer to the Tutorial part for much of your information. Certain parts of this section are complete.


Functions

A function is a sequence of code that performes a specific task. Functions provide a way to divide scripts into several small parts, rather than one big mess. This makes developing scripts much easier, and much easier to read as well. For example, imagine for a moment that you are programming a robot. If you want the robot to walk to a certain location, you really want to give as few commands as possible, rather than having to type thousands of commands. Move left leg, move right leg, right? Those commands are then broken down similarly into their own set of commands. In this fashion, a sort of hierarchy is created, and the main routines look short and sweet, and are incredibly easy to understand. Here's how such a hierarchy might appear.

Certainly, it is much easier to understand "Move Left Foot" than it is to see a sequence of motors turning, and it is much easier to understand "Walk" than it is to see a sequence of feet moving. This should serve as a general guideline when designing your scripts.

Inner Space script functions look like this:
function main()
{
statements
}

A function begins with the "function" keyword, followed by its name. "main" is a required script function, and is the function run when the script begins execution (hence being called "main"). When the main function ends, the script ends. Functions may have parameters, and parameters may have types. If function parameters are not given types, they default to string. The main function can have parameters as well. Functions with parameters look like this:
function TurnMotor(int Motor, int Degrees, bool CounterClockwise)
{
statements
}

Functions are called with the "call" command. This command requires the name of the function, and any parameters to pass, separated by spaces. Here is what this script might look like with function calls:
function main()
{
call TurnMotor 1 90 true
call TurnMotor 2 90 false
call TurnMotor 1 90 false
call TurnMotor 2 90 true
}

function TurnMotor(int Motor, int Degrees, bool CounterClockwise)
{
statements
}

The main function in this example calls the TurnMotor function 4 times, and the TurnMotor function does some unknown and unimportant operations to achieve the result. With properly designed functions, it should not be important to know their inner workings. Function calls are somewhat flexible, so you do not have to provide the function with the correct number of parameters, assuming the function is designed to handle it. If the function is given too few parameters on a call, the extra parameters are undefined and no variable with that name will be created for the function. If too many parameters are given, the extras are simply ignored, and no extra variables are automatically created for the function (this may be changed later).

Any function can "return" a value. Return values are used to pass information back to the function that called the returning function. The "Return" command is reserved for this purpose, and will immediately end the execution of the current function. The caller then has the option of retrieving the return value using ${Return}. The return value is always considered a string. The Return command can also be used with no value to immediately return from the current function.


Statements

Statements are individual Inner Space commands, as they would be entered in the console. There is nothing particularly different about using the commands in scripts, except that some commands will only function when used in a script. These commands are Flow Control statements, such as Do, While, If, Else, Call, Return and Wait. Statements in scripts can only be used as part of a function.


Comments

Comments in Inner Space scripts are required to be on their own line, and begin with a semicolon (;). Comment lines are ignored during script execution, and do not affect execution speed because the script is loaded into specially structured memory. Therefore, it is good practice to thoroughly comment your scripts, particularly parts that may be confusing to anyone trying to read it (including yourself at a later time).

; valid comment
function main() ; invalid comment
{
;valid comment
echo Hi;invalid comment, this will be echoed!
; Comments can also be used to temporarily remove lines of code:
; echo Hi
}


#include

Enter topic text here.


Variables & Scopes

A variable is simply a storage unit that accepts specific types of information. Unlike a car garage that can also be used to store bicycles, freezers, and other junk, a car variable could only be used to store a car. There are, of course, ways of disguising information to look like something else. So, a car variable would also accept newspaper that is folded into the shape of a car... A variable has four parts. A name, a type, a scope and a value. The default types are listed in the Data Reference, and more can also be added by extensions, although some types do not allow variables. Values are the information of the specified type that is to be stored in the variable.

There are three variable scopes, and they are very closely related to scripting. The "global" variable scope is just what its name implies -- global. It is accessible inside and outside of scripts. The "script" variable scope is probably exactly what you're thinking it is. It is accessible only inside the script it was created by. The "local" variable scope is only accessible inside the function it was created by.

There are two basic variable operations -- read, and write. Reading variables is done through the IS Data system, and each variable is treated as a Top-Level Object as long as it is used in the scope of the variable. Writing to variables is done through the VarCalc, VarData and VarSet commands. Each of the three commands has their own special purpose. VarSet is the simplest of the three. It simply takes the value it is given, and smashes it into the variable so hopefully the variable then contains the new value. The variable's type may reject the new value (this is also the case for VarCalc and VarData). VarCalc assumes that the value given is a mathematical formula, such as 1+1, and the end result is placed in the variable if posssible. This is "faster" than using VarSet with ${Math.Calc[formula]}. VarData assumes that the value given is an IS Data segment, such as "Session[1]". This is "faster" than using VarSet with ${Session[1]}.


Math Operations

Enter topic text here.


If..Else

Many times, you will want to execute a particular set of commands only when certain conditions hold true. For example, if your character in a game has less than 10 hit points, you might have some sort of emergency routine. Sometimes you may also have something else to do, but only if that condition that has already been checked does not hold true. For example, if your character is in a room with three gigantic monsters, you might want to flee, but if there is only two small monsters, you might want to stay and fight. If..Else statements look like this in Inner Space scripts:
If <condition>
<statement>
- or -
If <condition>
<statement>
Else
<statement>

It is important that "Else" be on its own line, as it is processed as a command. It is also important that the statements be on their own line. A code block may be used in place of the single statement, as long as the { and } appear on their own lines. This is how If..Else statements look when used with code blocks:
If <condition>
{
<statements>
}
- or -
If <condition>
{
<statements>
}
Else
{
<statements>
}

Conditions use mathematical operations, generally comparisons, to mean true (by resulting in any non-zero number) or false (by resulting in zero).


Do..While

There are many times when it is necessary to repeat a set of commands. For example, to perform the same operations with the numbers 1 through 100, you generally want to only type the operations one time. Do..While loops are used for this purpose, and may be used to repeat a set of commands while a specified condition holds true. Here is what Do..While loops look like in Inner Space scripts:
Do
<statement>
While <condition>
- or -
Do
{
<statements>
}
While <condition>

Conditions use mathematical operations, generally comparisons, to mean true (by resulting in any non-zero number) or false (by resulting in zero).


Errors & Stack Dump

Enter topic text here.


Tutorial

I will caution you before you read on that whatever you're thinking you want to do in a particular game,
if it requires any knowledge of the game then you aren't going to be able to do it without an extension for
that game. We at Lavish Software do not provide extensions for any game, so it is up to the community to do
so. You should also be aware that custom extensions should come from trusted sources, so you should only use
plugins that are distributed under open source terms (Library/Lesser GPL is probably the most appropriate), and
compiled for you by a trusted source. The problem is that there is a very real possibility that extensions
contain malicious code.

My goal with this tutorial is to make scripting sound like a relatively easy task, because it invariably sounds like
a very difficult task. You should be able to create simple scripts by the end of it. However, be aware that
the more complex your goal is, the more difficult it will be to achieve. Completely automating play is something
that takes many hours of work and may take months to perfect, so you may want to break down your ideas into many
separate, simple tasks and go from there.

Scripts are simply sequences of Inner Space commands, but with some added bonuses and minor extra requirements.
The bonuses come in the form of "flow control", which allows scripts to make decisions based on certain conditions.
The extra requirements are that the script must use "function"s, particularly one called "main". Functions are
just a group of commands, nothing more, nothing less. If you will be repeating the same set of commands often,
perhaps with slightly different parameters, then you may benefit from creating a function.

All scripts must have a "main" function. There are no special requirements for the main function, just that it
must exist. This will be the "entry point" for your script, or the first thing that happens. When this function
ends, so does your script. If you need the script to run continually, you use "flow control" to prevent the function
from ending before you want it to. Here is the obligatory "Hello World!" script:
function main()
{
echo Hello World!
}

This example simply runs and echoes "Hello World!" to the console. It could do literally anything that you want it to
do, such as automate a task. Consider the following script:
function main()
{
type My Account Name
press tab
type My Account Password
press enter
}

This script does precisely the same thing as the example given for the Type command, just in longer form. This also
demonstrates that there are several different ways to achieve the same goal. There's not necessarily a "right" or
"wrong" way, just different. One way may be considered "better" than another for some reason, but if you achieve your
goal that's all that really matters in the end.

Let's take this one step further. Say you want to "pause" for a bit before entering your password.
function main()
{
type My Account Name
wait 5
type My Account Password
wait 5
press enter
}

This time, the script waits for half a second (Wait uses tenths of seconds, so 5 tenths is half a second) after typing
the account name, and also after typing the password.

Now I will introduce "variables" and the "ISData" system. A variable is just a description of something. For example,
hockey game scores can be two variables, one for the home team's score and one for the away team. Both of them contain
numbers, so the "type" of the information we would keep is some sort of number -- in this case, we will call them
"integers", which is shortened to "int" but more on that later. Integer is just another name for whole numbers, or
numbers without a decimal point and some extra portion. So we could have two integer variables. Consider the score
1-3. We have a variable called "home" with the value 1, and "away" with the value 3. Here's an example of how we
could represent this in our script.
function main()
{
declare home int local 1
declare away int local 3
echo The score is ${home}-${away}
}

Here we have "declare"d the two integer variables, in the local scope, with default values. "Scope" just defines the
context of the variable, or where else it is valid. Variables are not valid when they are out of scope. The "local"
scope begins when a function is called, and ends when it returns. You can never access another function's local
variables. The "script" scope begins when a script begins, and ends when a script ends. You can never access another
script's script variables, and can never access them by typing commands or in a HUD (local variables either). The
"global" scope begins when an Inner Space session begins, and ends when that session ends. You can never access
another session's global variables. If you do not specify a scope when declaring a variable, the variable will be
declared in the global scope. If you do not specify a default value when declaring a variable, the variable will be
given the default value of the given type, which for integers is 0. If you do not specify a type when declaring a
variable, the variable will be given the "string" type, which is another name for "text".

This example shows the two separate ways of accessing a variable -- reading and writing. Writing is done exclusively
through the variable manipulation commands -- declare, delete, varset, varcalc, vardata. Reading is done exclusively
through the "ISData" system. ISData considers all variables to be "Top-Level Objects", which means the value can be
retrieved in the form ${name}. ISData is object-oriented, meaning that all "Top-Level Objects" are of a specific type,
and other information can be obtained. For example, we could show our scores in "hexadecimal" (base 16, which is
represented by 0123456789ABCDEF) by changing the line to say "The score is ${home.Hex}-${away.Hex}". If you want to
know more about that, check the ISData section. For now we can just concentrate on the basics.

Let's see how to display the numbers 1 through 10 in the console:
function main()
{
declare count int 1
do
{
echo ${count}
varcalc count ${count}+1
}
while ${count}<11
}

This demonstrates the use of command blocks, and do-while loops. You do not *need* to use a command block in this case,
but it makes it easier to read. The "do" command provides a point for the "while" command to send the execution to, if
the conditions evaluate to non-zero. The do command must be in the same command block as the while loop. If the
condition evaluates to zero, execution simply goes to the command following the while.

Now let's see about calling a function...
; This function echoes some text
function myecho(string text)
{
echo ${text}
}

; The main function is required by Inner Space
function main()
{
declare count int 1
; Loop until count is 11
do
{
call myecho "${count}"
varcalc count ${count}+1
}
while ${count}<11
}

This example calls a function called "myecho", passing it a single parameter. The myecho function accepts the
value as a string, and then is executed the same way the main function is. The value of the parameter is
automatically assigned to the given variable name in the local scope. Notice the double quotes around the
parameter given to the "call" command. This ensures that whatever value is in ${count} is given to the function
as a single parameter, even if it has a space (though may fail to work correctly if the ${count} value contains
double quotes). When the function call completes, execution continues to the next line after the call. You should
have also noticed that there are "comments" in this example. Comments must be on the beginning of the line, aside
from spacing, and begin with a semi-colon (;).

You should now understand the very basics of scripting. This tutorial/reference will be extended more as alpha
testing goes on. It skips plenty of important stuff like explanations of varset,varcalc,vardata,if,else...


Troubleshooting
Previous Top

Enter topic text here.