Setting Up Text


Setting Up the Textbox Area
Text Entries and Text Groups
Text Input Scripts
Auto Text Tile

Setting up and using textboxes in NESmaker will be slightly different depending on what module you use. Some modules are very much made for using text, like for example the Adventure module. Other modules like the Shooter or Brawler modules are not set up to use text at all. That doesn’t mean we can’t use text in those games, but we need to be aware of a few things. First of all I do not recommend using textboxes on scrolling screens. NESmaker doesn’t handle that very well (by default) and you will most likely get a lot of graphical glitches, and the game might even crash. So make sure you only use textboxes on screens that don’t scroll. Another thing we should be aware of is that some modules will have a Tile Type called Auto Text that is supposed to trigger the text when the player touches it. The problem is that it isn’t connected to any code, so nothing will happen when the player touches that tile. This can easily be fixed by connecting the tile script InstantActivateText_AdventureBase.asm from the Adventure module to Tile 05 in Project Settings – Script Settings (under TileTypes).

You can read more about how text in NESmaker works here.

Setting Up the Textbox Area

In the Context Menu on the left in NESmaker you find HUD & Boxes. Click it and the interface on the right will change into the HUD section. To make sure we get the correct colors in our textbox it is important that we set it up to be aligned to a 32×32 grid, so check that checkbox first. Then hold down the left mouse button and start dragging the textbox where you want it on the screen. Again, make sure it aligns with the 32×32 grid. Then click the Set button under where it says Textbox Area. You have now set up the textbox area but if you haven’t created or loaded any text tiles, then you won’t see anything on the screen. Read more about setting up the text tiles here.


Text Entries and Text Groups

You can have 512 different text entries in NESmaker, but each screen can only be set up with 4. Text entries are connected to a Text Group which must be assigned to a screen. This is done in Screen Info for that particular screen.

This example has the default name for both text entries and text groups, but since there can be some many different text groups you should probably give them very descriptive names. The same goes for the text entries.

Setting up a Text Group is easy. Just select what four text entries you want for each group. Remember (as previously mentioned) that the text group is what decides what text can be displayed at any given screen.

There are different ways to handle the end of the textbox. In other words, what should happen when the text has finished drawing to the screen? Unfortunately some of these options don’t work in NESmaker, but here we will look at the ones that do. First let’s just quickly look at the ones you can ignore.

These End of Text Action can be ignored:

  • Open Shop
  • Win Game

PS! It is worth noting that there is a tutorial on the NESmaker forum that will allow you to warp as an End of Text Action. You can find the tutorial here.

The End of Text Action called NPC Gives Item is mainly made for the Adventure module. You can use it in other modules as well, but it will require knowledge both about Assembly programming and how NESmaker works. In order to see how to set it up properly in the Adventure module I recommend watching the official Adventure tutorial. The link will go directly to the correct timestamp, so you don’t have to skip through the video to find it.

There is an End of Text Action called None. Use this if you don’t want anything special to happen at the end of the text. For example if you just want to talk to an NPC where nothing happens when he’s done talking, then use this End Action.

The End of Text Action called NPC is Trigger will trigger the current screen. That means the screen will go into the triggered state. That will happen to all screens set up with the selected screen type (screen type 5 in this example).


Text Input Scripts

There are a few different input scripts to use when working with textboxes. This is necessary to for example start, advance or close the textbox. The two scripts in the main inputScripts folder are:

  • drawSomeText.asm – Use this one if you only need basic functionality to for example open, advance or close the textbox.
  • drawNPCtext.asm – This code is more complicated and requires a setup with an NPC character (object).

The Adventure module has its own text input script. If you are using the Adventure module, then I recommend using this input script for text:

  • drawNPCtext_AdventureBase.asm

Add the input script that is appropriate for your game and assign it to a button.


Auto Text Tile

In some modules like MetroVania and Arcade Platformer there is a tile called Auto Text. This tile doesn’t work. The reason for that is that it’s not connected to any script files. So nothing will happen if you place that tile on the screen and the player collides with it. To fix that we can use a script from the Adventure module. It’s located in the Tiles folder inside MOD_AdventureBase. So the full path is:

…\Game\MOD_AdventureBase\Tiles\InstantActivateText_AdventureBase.asm

Open Project Settings – Script Settings and find Tile 05 under TileTypes. Select it, and in the window on the right navigate to the file mentioned above. You navigate by double clicking on folder names and files. Once you double click on the file name for the InstantActivateText file it will connect it to this tile type. Now you can place the Auto Text tile on the screen, and when the player collides with it the text box will be triggered (with whatever text group is set up for that screen).