Commands

Javascript commands can be executed through the AsciiMason >> command window. AsciiMason is designed such that you can still build sufficient games without writing code yourself. That is why click-to-insert commands are provided.

When using a click-to-insert command, all CAPITALIZED_TEXT are placeholders and must be replaced. When in doubt, use the Software Guide as a reference for what your replacement should look like.

This page should be expanded to include a reference for what all replacements should look like for every click-to-insert command in AsciiMason. Unfortunately, I do not have time to do this. Please feel free to expand this reference page.

When executed, some click-to-insert commands create a prompt or dialogue box asking for more code. This may seem redundant, but it has a purpose. See why does a prompt appear?

Web console
It is recommended to keep the web console open at all times when working with commands. How do I do that? If your game freezes, then your browser has most likely thrown an error which will appear in the web console in red so you can get a better idea of what went wrong.

Screen refresh (space bar)
If you execute a command and it doesn't produce an error but you don't see its effect, you may need to press the spacebar to refresh your screen. Why do I need to do this? In play mode, the player cannot press space to refresh the screen, so you will have to run the command  to refresh the screen for them whenever applicable. Most of the time, this is not necessary. For more information, see Screen refreshing.

Save your data
If you are unable to save your game data because you can't open the game menu due to a fatal crash, all hope is not lost! Open the web console and copy-paste this command:

This will save the json file to your computer. Refresh the page to get a clean slate and try loading the file back in. If you encounter a fatal crash upon trying to load this JSON file, that means something in your file is breaking AsciiMason right out of the gate, and the only way to fix it is to open the JSON file in a text editor (like Notepad) and look for and patch the issue.

Javascript: Learn the essentials
To avoid errors, try familiarizing yourself with Javascript syntax (syntax means grammar). There is a plethora of online resources for learning the basics of Javascript, and you only need a basic understanding to take full advantage of everything AsciiMason has to offer. I recommend Coding Train, from whom I learned almost everything I know about Javascript and the p5js Javascript library. -- Ikebot