In the interest of backing up information (here and at sourceforge)
Instructions for command line (thank you original team).
Magic set editor can be started from the command prompt by typing:
mse
in Windows, or
magicseteditor
on other platforms.
The MSE program has several flags for choosing different behaviour.
Starting the GUI
mse
Invoking MSE with no arguments shows the welcome window.
mse my-set.mse-set
Invoking MSE with the filename of a set shows the main window with that set loaded. This command is automatically invoked when you double click on a set file in a file manager.
mse my-symbol.mse-symbol
Invoking MSE with the filename of a symbol shows the symbol editor window with that symbol loaded.
mse --symbol-editor
With the --symbol-editor flag the symbol editor is started with a blank symbol.
Information about MSE
mse --version
The --version flag (abbreviate as -v) writes the version number of MSE to the standard output, or in a message box if MSE was not started from the command prompt.
mse --help
The --help flag (abbreviate as -?) displays a list of available flags to the standard output, or in a message box if MSE was not started from the command prompt.
Installers
mse my-installer.mse-installer
Invoking MSE with the filename of an installer shows the package window, from where the packages in that installer can be installed. By passing the --local or --global flag you can change where the package will be installed. Global installation is for all users, local installation is for the current user only.
mse --create-installer <em>output.mse-installer</em> <em>package1.mse-game</em> <em>package2.mse-game</em> ...
Creates an installer package containing one or more packages from the mse data directory. The installer will be written to output.mse-installer. This name can be omitted, in which case the name of the first package will be used (in this case package1.mse-installer).
Interactive cli interface
mse --cli
Starts the Interactive command line interface. Optionally the filename of a set can be passed which will then be loaded.
CLI Description
mse --cli [my-set.mse-set]
The MSE interactive command line interface provides a way to work with set files without a graphical environment. The CLI shows a prompt where commands can be entered, which are then executed by MSE.
CLI CommandsCommand | Short Version
| Description
|
:help | :? | Show a help screen describing the available commands.
|
:quit | :q | Exit the MSE command line interface.
|
:load | :l | Load a set file. The current set will be unloaded. For example: :load my-set.mse-set
|
:reset | :r | Clear all variable definitions.
|
:cd | :c | Change the working directory.
|
:pwd | | Print the current working directory.
|
:! |
| Perform a shell command. For example :! dir shows a directory listing.
|
other |
| Execute the command as a line of script code. The script has access to the loaded set and all built in functions.
|
CLI Raw mode
mse.exe --cli --raw
For interfacing MSE with other programs the raw mode is most convenient.
In the raw mode the only output is in response to commands. For each command a single record is written to the standard output. The records consists of:
A line with an integer status code, 0 for ok, 1 for warnings, 2 for errors.
A line containing an integer k, the number of lines to follow.
k lines, each containing UTF-8 encoded string data.
Strings are not further encoded or escaped.
In this mode multi line strings can be transfered from MSE without much encoding/parsing hassle.
The behaviour of the raw mode is guaranteed not to change between versions of MSE (subject to bugs and changes in the scripting language), for the normal mode no such guarantee is made.
CLI Example
Here is an example session, the text entered by the user is shown in blue.
$ mse --cli
___
__ __ _ ___ _ ___ _ _ _ |__ \
| \/ |__ _ __ _(_)__ / __|___| |_ | __|__| (_) |_ ___ _ _ ) |
| |\/| / _` / _` | / _| \__ | -_) _| | _|/ _` | | _/ _ \ '_| / /
|_| |_\__,_\__, |_\__| |___|___|\__| |___\__,_|_|\__\___/_| / /_
|___/ |____|
> :load myset.mse-set
> first_card := set.cards.0 # the first card
[]
> first_card.name
"Pineapple of Doom"
> write_image_file(first_card, file: "firstcard.jpg")
> # the image file "firstcard.jpg" is now saved
> :! dir
2008-08-04 22:57 92 891 firstcard.jpg
1 File(s) 92 891 bytes
0 Dir(s) 986 562 560 bytes free
> :reset
> first_card.name # variable was cleared
ERROR: Variable not set: first_card
> :quit
Goodbye