Develop:LavishScript:Getting Started
This tutorial will help bring you up to speed with LavishScript development.
So, by now you've read Develop:LavishScript and would like to get your feet wet and hands dirty. Let's go then. :)
Contents
Consoles
An Inner Space Console window is your first, and most handy, point of entry to LavishScript. There is a Console in the main Inner Space program (called the Uplink) available through its right-click menu, or in-game available via hotkey. LavishScript Commands can be manually entered into the Console.
Open the Console in the main Inner Space program now. Type something in it, and press enter to see what happens. If what you've entered is not recognized as a command, the result is something like this:
Unknown command 'something'
This time, type in "echo Hi" and press enter. Now, you see the result
Hi
Isn't that great? That is how a LavishScript console operates. By now, you should be feeling like an expert on the use of a LavishScript Console! ... If only you knew what to do with it. Let's move on.
Commands
Now that you know where to enter commands, it would really be helpful for you to know how to properly form commands, and what commands are actually available.
LavishScript commands have a fairly simple syntax. The first word is the command name, and any parameters can come after the command name, each separated by one or more spaces. If a parameter is to contain a space, it should be quoted using double quotes "like this". And if a parameter is to contain a double quote, it should be escaped using a \ as is generally standard.
To help you understand how a command and its parameters are processed, LavishScript provides a "test" command which specifies each portion of the command entered.
Enter the following command into a Console:
test "like \" this"
And here's the output for this command:
Console Command Tester Arguments: 2 Argument 0: 'Test' Argument 1: 'like " this'
So as you can see this is represented as a series of "Arguments", with 0 being the name of the command, and 1 being the first parameter. Each piece is surrounded by single quotes in the output, so you can identify its beginning and end very specifically. The outer quotes from the command-line itself are automatically stripped and not included as part of the actual parameter. The escaped double quote no longer appears escaped, because the \ is stripped. The double quote is now simply part of the parameter.
Some commands, such as Echo, automatically concatenate parameters together. Try the following commands, and note the differences in output:
echo One Two Three echo One Two Three echo "One Two Three"
Here's the output for you:
One Two Three One Two Three One Two Three
I suspect that you guessed the output of the first and last lines, but perhaps were not sure of the middle line. In the middle line, three parameters are passed to Echo, and each are separated by "one or more spaces" as detailed above.
The last thing you will need to know about LavishScript commands is that a semi-colon can be used as a command splitter:
echo Line one;echo Line two
Output:
Line one Line two
What Commands are available?
Depending on the context, such as whether you're using a Console in the Inner Space main program or in a game window, different commands may be available. You can always enter "commands" in the Console for a list of currently available commands.
- Here's the most common sources of LavishScript commands
- LavishScript Commands
- Inner Space Uplink Commands (main program)
- Inner Space Session Commands (launched game client)
- Inner Space Kernel Commands (common between both Uplink and Session)
Objects and Data Sequences
Work in progress.
Scripts
Work in progress.
ISBoxer 2 Module Development