How to make mods for Nuclear Throne Together


a half-reference to a drawing which is a reference to this one comment

As you may or may not know, one of the key features of my "Nuclear Throne Together" mod is it's ability to load other mods. People made a number of these (older mods; itch.io category).

This post houses a small collection of links and FAQs on the subject.

Outline for GameMaker users

If you've already used GameMaker before, NTT modding won't feel too different,

  • NTT's modding API similarly uses GML (with a few changes).
  • Each mod is essentially a collection of scripts inside a .gml file (like GM extensions).
    The game then calls specific scripts at specific times, depending on mod type.
  • Each mod has it's own scripts, global variables, and data structures.
    If you need mod interoperation, see the mod_ functions.
  • Mods share access to game's objects, instances, and assets.
  • Resources are loaded through code (sprite_add, sound_add, etc.)
  • As there are no functions to add objects through code, a set of special object types (that run specified scripts at step/draw/etc.) is included - see CustomObject, CustomHitme, etc.
    There are also functions that bind a script to run in a specific event at a specific depth (see script_bind_).
    For simple mods, you won't usually have to touch either, as most mod types have scripts that the game calls on related occasions.

Using GMEdit

Using GMEdit for Nuclear Throne Together mods

If situation permits, you can use GMEdit for Nuclear Throne Together modding - originally developed for use with GMS1/GMS2 projects, the tool had been since updated to support NTT-specific features.

Once installed (it's free), you can open a NTT mod directory by dragging your main.txt file onto GMEdit (if there's none, make a blank one) - this opens a mod directory as a "project" and you can consequently open your .gml files for editing by double-clicking them on the left pane;
This way it'll show you syntax highlighting and auto-completion for NTT-specific functions;
If you make changes to the mod directory and need the file list reloaded, you can press Ctrl+R.

Documentation

The following are the things that you may want to take a look at when trying to make things work,

  • NTT-Scripting
    Explains NTT-specific syntax and describes most of the NTT-specific functions.
  • NTT-Objects
    Has descriptions of all NT objects and variables that they have.
  • NTT-Sprites
    A complete list of "built-in" sprites available in NTT, along with thumbnails.
  • BitBucket wiki
    Was used exclusively prior to introduction of NTT-Scripting.
    Has a few topics that NTT-Scripting doesn't have along with data tables for APIs.
  • %LOCALAPPDATA%/nuclearthrone/api/api.gml
    Can be found after doing /gmlapi in chat.
    Has a complete list of supported functions along with small notes.
  • Official GameMaker documentation
    If something isn't in NTT-specific docs, it might be a regular GM function.
    If it's not there, also check the older GMS1 doc

Finally, don't forget that many things aren't very different between GM and NTT, so general GameMaker tutorials will work fine often enough.


There was probably supposed to be something else to this, but this post had been sitting like this in my drafts for too long, and I can no longer recall.

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *