[4.5.x] Adding New Scripts and Includes [NESMAKER 4n00bz]

IMBrendan

Member
There are a lot of ways you can screw up your NESMaker default set up - one of the biggest things I learned was how to add new includes to your NESMaker "Script Settings". Lets go ahead and start with a fresh install - and start including new ASM files as a seperate instance.

In your "**********\NESmaker_4_5_9\NESmaker_4_5_x\GameEngineData\Routines" folder create a new folder for your new and modified ASM files. I create subfolders based on their default location, but I think that's more for ease of use on my end.

After you've created a folder for your new ASM file - lets include it in NESMAKER. Click the cog icon - then go to "Script Settings" tab. For new scripts - click the "Add" button.

moWZOq95pV.gif

So the screen below will open up for you and you can pretty much type whatever you want in here. The name is for your reference and does nothing on a programming level to change what is happening in the game. The second line is how NESMaker will call the new constant within code. The third is where you point the script to. Just leave the third section blank for this second.
Instead - Press "OK"
DGyBOqzUTP.gif

Select your new script - then select where it points to from the visible ASM files on the right. This could point anywhere - including a default blank tile as a placeholder for scripts you KNOW you are going to need in the future but don't need right now.

1E2DUSE9qk.gif

Once You're ready, its time to include them in your game.
Open in a separate notepad or notepad++ instance - the "LoadAllSubroutines.asm" file located by default in the "********\Routines\BASE_4_5\Game" and add the script in the includes by typing ".include SCR_DO_LOAD_SCREEN" or ".include ********" where "*********" is the SCR_WHATEVER you included in script settings. In the example of ".include SCR_DO_LOAD_SCREEN" we have an extra step as we aren't adding a new script but replacing an old one already included in "LoadAllSubroutines.asm".

**EXTRA STEP**
Search in "LoadAllSubroutines.asm" and find the reference to ".include ROOT\Game\Subroutines\********.asm" that you are trying to replace. Comment this section out and add ".include SCR_WHATEVER" so it looks like the follow;

; .include ROOT\Game\Subroutines\doLoadScreen.asm
.include SCR_DO_LOAD_SCREEN

Run and test the game. If done correctly NESMaker should see no difference - but this will allow you to point all your scripts to default ones when you need to debug or if you screw something up and want a stable build again.

Happy NESMaking!


Happy NESMaking
 
Top Bottom