How to compile a script - PlatinumMaster/BeaterScript GitHub Wiki

Prerequisites

Procedure

  1. Open a command prompt/terminal in the BeaterScript directory. On Windows, you can just browse to the directory with Windows Explorer, press Shift + Right Click inside of the folder, then click Open command prompt here, or Open Powershell window here. On Linux, open your terminal, then cd to the BeaterScript directory.

  2. In the command prompt window which shows up, type in the following to compile your script (dependent on your operating system):

If you are on Windows:

.\BeaterScript -m <input> <output>

If you are on Linux:

./BeaterScript -m <input> <output>

If you are on Mac, let me know. I believe it is the same as Linux.

To clarify:

  • input is the path to the decompiled script.
  • output is the path where you want this script file to be written.

If you are using Tinke:

  1. Load your ROM in Tinke, then locate the script NARC of the game you are hacking. For example: Black and White's script NARC is at a/0/5/7, and Black 2 and White 2's script NARC is at a/0/5/6.
  2. Unpack the NARC.
  3. Find the script which you'd like to change, then click "Change file" and replace it with your custom script. Make sure you hit "Pack" on the NARC folder when you are done.

If you are not using Tinke:

  1. With your ROM tool, the script NARC of the game you are hacking. For example: Black and White's script NARC is at a/0/5/7, and Black 2 and White 2's script NARC is at a/0/5/6.
  2. Extract the contents of the NARC with the NARC tool you chose to use.
  3. Find and replace the script which you'd like to change.
  4. Recompile the NARC.
  5. Using your ROM tool, replace the NARC with your modified one, then save your changes and test in-game.
  • Save the ROM, then test in-game.

Troubleshooting/FAQ:

  • Why do I get? <filename>:<line_num>: Error: bad instruction <some instruction name here>
    • You either put in the wrong command, do not have the .s in the same directory as the script, or the command does not exist in the .s.
⚠️ **GitHub.com Fallback** ⚠️