• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Shell as a Service

Shell as a Service 0.8.0

Pokémon Essentials Version
v17.2 ➖
Shell as a Service
animation.gif
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

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:

5R2MdZv.png


Passing invalid commands or arguments results in an error:

kJeVL2O.png


The shell ignores all excess whitespace. Surround your argument in double quotes to include the whitespace, like this:

e1zYhio.png


When using the eval command, either use single quotes or escaped double quotes when dealing with strings:

mVO5mFy.png


String together multiple commands with ; or &&:

Qu4NiH5.png


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

rn2koWo.png


All options can be passed at once, too.

jq6ssn8.png


Oh, and there's aliasing as well!

scCWj5F.png


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!

WchqpDq.png


Here's what the subcommands look like in action:

vQ11qDd.png


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

screenshot1.png


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.

screenshot2.png


Creating new commands is simple. As a demonstration, here's me creating a new console command inside the console:

player.gif


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!

OculhMu.gif
Credits
Savordez
Marin (for the input_to_args code and help overall)
  • screenshot3.png
    screenshot3.png
    8.2 KB · Views: 308
  • screenshot4.png
    screenshot4.png
    14.3 KB · Views: 293
Author
Savordez
Downloads
918
Views
1,098
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Savordez

Latest updates

  1. 0.8.0: mkxp-z compatibility

    0.8.0: mkxp-z compatibility NEW FEATURES - Proper mkxp-z compatibility - New console commands...
Back
Top