- Pokémon Essentials Version
- v17.2 ➖
Shell as a Service
Originally built for my fangame, Pokémon as a Service, Shell as a Service is a developer tool that offers an environment for debugging and extending the game's capabilities during runtime (plus it's nice for just messing around in general). This resource is still a work-in-progress and will contain some minor bugs, but it should be more than ready for prime time.Marin's Utilities are required. Get the script here:
Marin's Utilities
Marin's Utilities
The Sessions
A bare-bones console session can be started with ConsoleSession.new at any time. Those looking to start a console session upon bootup should place the code somewhere in Main, preferably at the top of the section. There is an additional ConsoleSession_Interactive class that displays some minor information during startup, but otherwise behaves the same.
An additional ConsoleSession_Ingame class is supplied, accessible at any time while pressing CTRL + S in-game. There are commands exclusive to this class, and a couple that can not be accessed from it. More on those later.
The Commands
Shell as a Service functions similarly to Unix shells like Bash or Zsh. To give a command, enter its name and any potential arguments:
Passing invalid commands or arguments results in an error:
The shell ignores all excess whitespace. Surround your argument in double quotes to include the whitespace, like this:
When using the eval command, either use single quotes or escaped double quotes when dealing with strings:
String together multiple commands with ; or &&:
Some commands take optional options. For example, the echo command accepts three possible options:
- --align / -a (integer): text alignment (0 = left, 1 = center, 2 = right)
- --raw / -r: special codes like \n, \t and \h are not parsed
- -n: the trailing newline is omitted
All options can be passed at once, too.
Oh, and there's aliasing as well!
There are certain commands that take subcommands. For example, the config command has five different subcommands. If you are feeling a little overwhelmed, don't worry! The help command is here to, well, help!
Here's what the subcommands look like in action:
Some commands, like item and pkmn are only accessible inside an in-game session. There are two commands that are only accessible outside the game:
Restoretool & Wipetool
Restoretool and Wipetool are console applications designed for backing up, restoring and removing save data. All backups go into their own folder called SaveBackup. Restoretool creates this folder for you. Both of these applications are very basic, and I will be improving them in the future.
Multieval
Multieval is a special command that allows for multi-line code input. This allows you to modify your game's code during runtime. However, please note that changes made with Multieval are not saved and thus will not persist after the game closes.
Creating new commands is simple. As a demonstration, here's me creating a new console command inside the console:
The SAAS_Core script section contains lengthy documentation regarding the ConsoleBase and ConsoleCommand classes as well as the CommandValidation module. If you're interested in extending SAAS, consider reading them.
Have fun!
- Credits
- Savordez
Marin (for the input_to_args code and help overall)