Script Settings


Script Settings is a hub where you can access a lot of the important scripts in NESmaker, like doUpdateCamera, hurtPlayer, doHandlePhysics and so on. It is worth noting however, that many Assembly code files are not linked here in Script Settings. Those scripts must be accessed from outside this interface.

Script Define

A Script Define in NESmaker is a collection of three things:

Name: A label that describes what this script does
Define: A label without spaces that can be referenced in code
Script: Path to an Assembly code file

Basically a Script Define is just a pointer to an Assembly code file. This pointer has a label which must be specified somewhere in the NESmaker code to actually put it into the NES ROM. A Script Define is not automatically added to any NESmaker code when you click the Add button. A Define like SCR_MY_DEFINE could be put into the file Bank1A.asm to add whatever code SCR_MY_DEFINE is pointing to into the Bank1A.asm file. This is done by adding this somewhere in the Bank1A.asm file:

.include SCR_MY_DEFINE

Script Defines are used to easily access or change Assembly scripts used in NESmaker. If you select a line in the interface and click the Edit button, then the .asm file will open in whatever editor you have installed on your PC (that can open .asm files).

Sections

Script Settings is divided into different sections (marked as folders). The setup here does not have any meaning to the actual NESmaker code. It is set up this way to make it easier to find the scripts you’re looking for. Let’s take a quick look at some sections you might want to access files from.

Game

Under Game you will find scripts like Extra Screen Load and Pickup Script. Here you will find scripts that are both general (applies to all modules) and module specific.

Tile Types

This section has Script Defines for all the 16 different tile types in NESmaker. Here you can edit the different tile types or change what script is connected to them. It’s important to know that even though some tile types look empty (blank.asm), they might still work as tiles in NESmaker since some tiles are hard coded into for example inputs and the physics script. An example of this is the Ladder tile (Tile 10), which does not have a script file connected to it, and appears to be free here in Script Settings.

Common

Here you will find scripts that are module specific. However… This can be somewhat confusing since a few NESmaker modules have mixed scripts from different modules. The MetroVania module for example has scripts from the Platformer module. Under Common you will find scripts like playerHurt and monsterHurt.

Banks

Here are the scripts that actually put code into the NES ROM file. If you want to add something to bank $1A for example, you need to edit the Bank1A.asm file and add:

.include ROOT\Game\Subroutines\myNewFile.asm

or

.include MY_SCRIPT_DEFINE