How to compile a script - PlatinumMaster/BeaterScript GitHub Wiki
- A NARC tool, such as knarc or Tinke.
- A tool to extract and reinsert NARCs to your ROM, such as Tinke or NitroExplorer2b.
- The latest version of BeaterScript.
-
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, orOpen Powershell window here. On Linux, open your terminal, thencdto the BeaterScript directory. -
In the command prompt window which shows up, type in the following to compile your script (dependent on your operating system):
.\BeaterScript -m <input> <output>
./BeaterScript -m <input> <output>
To clarify:
-
inputis the path to the decompiled script. -
outputis the path where you want this script file to be written.
- 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 ata/0/5/6. - Unpack the NARC.
- 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.
- 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 ata/0/5/6. - Extract the contents of the NARC with the NARC tool you chose to use.
- Find and replace the script which you'd like to change.
- Recompile the NARC.
- 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.
- 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.