Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Nuclear Throne Together

An online multiplayer mod for Nuclear Throne. · By YellowAfterlife

Custom graphics FAQ Sticky

A topic by YellowAfterlife created Jul 29, 2016 Views: 17,717 Replies: 46
Viewing posts 1 to 15
Developer (3 edits) (+2)

Loading custom graphics is done via commands.

Commands can be entered once the game starts (is in-game or at loadout, rather than menus).


Locating the graphics

Firstly, you will need to find the name of the sprite that you want to edit.

Fortunately, a complete list of game's sprite names is available.

Unfortunately, it's not super organized, so it may take a little while to find what you need.

Once you've found what seems to be the desired graphic(s), you can save them to disk via "/savesprite" command. For example,

/savesprite sprCactus

will save the graphic into the "images" directory inside the game's save directory:

If you are not sure where the game's save directory is, you can quickly navigate to it by inserting "%LOCALAPPDATA%/nuclearthrone" into Explorer's "address bar" and hitting Enter.


Editing the graphics

The next step is to edit the graphics.

Since these are saved in PNG format, any pixelart-compatible image editor with transparency support will do.

If you are not sure as to what is fitting, you can try Paint.NET, or even the built-in image editor in any version of GameMaker (which, while not advanced, allows to work with animations conveniently).

As an example, I'm going to add a little hat to the earlier saved cactus:


Replacing the graphics

Once editing is done, it's time to see your changes in-game.

For this there is a "/loadsprite" command. With the earlier shown cactus, you would use it like so:

/loadsprite sprCactus sprCactus.png

if all was well, the changes will be applied to the graphic instantly:

You can use "/loadsprite" to update the graphic as many times as you want;

If you want to revert the graphic to it's original form, you can use "/unloadsprite".


Replacing individual images

For certain graphics (portrait art, mutations, etc.), replacing an entire set of images to only change a single one may seem inconvenient.

For this reason, aside of "/loadsprite" and "/savesprite" there are also commands to deal with individual images of sprites, namely "/loadimage" and "/saveimage".

So, for example, you could save a particular graphic,

/saveimage sprFloor1 2

edit it,

and load it back, without affecting the rest of the images:

/loadimage sprFloor1 1 sprFloor1_image1.png


Packaging the graphics

If you want to distribute a pack of custom graphics, entering the separate commands to load each graphic may seem mildly inconvenient. While NTT has been update to allow pasting multiple lines of text into chat, it may regardless be desired to load the entire set through a single chat command. For that there is "/loadtext".

Essentially, "/loadtext" reads the contents of the given file, and sends each of them as a chat command.

Therefore, if you have your graphics pack residing in a folder,

you can also include a text file in that folder, containing commands to load the graphics from the folder,

/loadsprite mutant8idle HazmatRobot/Idle[4]
/loadsprite mutant8walk HazmatRobot/Walk[6]
/loadsprite mutant8hurt HazmatRobot/Hurt[3]
/loadsprite mutant8dead HazmatRobot/Dead[6]
/loadimage bigPortrait 14 HazmatRobot/Portrait
/loadimage mapIcon 14 HazmatRobot/MapIcon

therefore permitting to load an entire set via "/loadtext HazmatRobot/load.txt".


Notes on multiplayer

Custom graphics work in multiplayer.

The remote player does not need to have the graphics stored locally - they will be transmitted automatically.

Both players need to explicitly agree ("/sideload") to enable custom graphics loading.

If your own or remote player's choices of custom graphics no longer please you, you can disable custom graphics by doing "/sideload" again. This will revert all graphics to their original form for both players.


Notes on replays

Custom graphics are stored in replay files, therefore will show up in replays just as observed while playing.

The only thing to note here is that these, not unexpectedly, will also add to replay's size.


Notes on animations

In case of animations, the number of frames is deducted from filename.

So, for instance, if your animation has 4 frames,

the file should be named like "myAnim_strip4".

Alternatively, you can also use "myAnim[4]" for shortness.


Notes on modifications

Conventional graphic modding for Nuclear Throne requires your graphic edits to be of the exact size and frame counts as the originals.

NTT's system permits to load graphics with both different sizes and frame counts.

Graphics larger or smaller than the originals are assumed to be resized relative to center.

Graphics with varying frame counts will be used as-is, meaning that animations will playback at the same FPS but last shorter/longer.

Keep in mind, however, that the game uses image sizes and animation durations as references for game logic at a few points, therefore altering certain graphics may have side effects.


Notes of persistence

Due to technical concerns and limitations, the graphics are automatically unloaded when a game session ends.

If you have a particular set of graphics that you always want to use, it is advised that you assemble a command list to load it via "/loadtext".


Notes on convenience

To make the process of working with custom graphics simpler, NTT will make a number of assumptions in associated commands:

  • Sprite names are not case-sensitive.
  • "spr" prefix in sprite names is optional.
  • File names are not case-sensitive.
  • ".png" extension is optional and will be assumed if not specified.
  • "/save*" commands will automatically pick a filename if not given one.

If there's anything overlooked, feel free to ask.

hey I cant find the sprite list is it possible if you can post a link?

Developer

Added the link to the post. It was included in the text document all along though.

oh okay thank

also I think you forgot to put in the fire effects because I cant find them

Developer(+1)

It's probably sprTrapFire. There's nothing forgotten - that is a list of sprites in exact order that they were stored in. I have only attempted to deduct the original categorization.

ohhhh okay im just really confused

also you said it was in the text document but when i looked at the NuclearThroneTogether but I didn't see it so which one are you talking about?

Developer

From the text document:

/loadsprite [sprite name] [file name]
	Replaces the given sprite with file' contents.
	Files should reside in "images" subdirectory of the game.
	File names can have `_stripN` or `[N]` suffix to denote the number of frames included.
	For list of modifiable sprites, see https://bitbucket.org/snippets/yal_cc/jxLMx
if unfortunately Nuclear throne together has graphics limitations, 
I can simulate a "filter", 
as I was able to create a trailing 
effect to the character while
 it has a speed buff, similar to Motion Blur. 
if so is it possible?

Can you do this with code?

Developer

Do what in particular?

Just edit the stuff. Just to mess around with NT

Developer

Not unless you are willing to spend quite a while poking file formats apart to figure out how to do this or that.

(1 edit)
I know the question is kind of off topic, 
but can I create custom graphics? 
like Minecraft's Shaders?, 
or Simple effects filters to the game, because I'm developing a Dynamic mod that, 
to make it more faithful to the name,
 I would need to add graphic effects to the 
game's projectiles like 
the famous Bloom among others, 
could help me in that?  
A community-made mod called "Cool Shadows", 
is very similar to minecraft shaders, 
including its extreme lag on non-dedicated architecture processors kkk, 
I took a look at the guy's code, 
and saw that he didn't render from the GPU but rather simulated 
the shadows of game elements using draw events built into your NTT,
 I was wondering if I can create shaders and an "OpenGL Code Interpreter" 
and integrate it into my mod.  
Is this possible?, can I create a Code Interpreter in NTT?
Thanks in advance!.
Developer(+1)

v9940 has HLSL loading functions (shader_create, etc. - the 3d mod uses them I think), but I do not know if they will remain available since the extension I used no longer works in current GameMaker versions and my attempts to recreate it had very partial success.

Any “interpreter” for such a thing would be unbearably slow, which is also why integrated graphics cards struggle with shaders.

Thanks!

Can I have those cool looking custom Robot graphics? Did you get those from NotYourSagittarius?

Hey, is there an A skin rebel portrait to edit?

One for the game pause and one for the character select.

Thanks!

Developer

Pretty much anything is editable, you only need to know where to find things. In this case it should be in sprBigPortrait. You can use /loadimage to only replace the Rebel' portrait.

Deleted 8 years ago
Developer

Perhaps they are bigger? Try `/savesprite`-ing the graphics that you replace and compare resolution. The game cannot and will not downscale graphics if they are wrong resolution.

Deleted 8 years ago

Sorry for the (again) troubles, do you know the Horror B skin pause menu sprite?

Cheers!

Developer

Same as menu graphic, in sprBigPortrait.

thanks man, you're a big help!

Hey where can i find the small character portraits and ultra mutation sprites for steroids

Developer

You probably want sprCharSelect and sprEGSkillIcon. Perhaps sprEGIconHUD too.

Is it possible to change things like Fish's name when you select him at the campsite through custom graphics or is that still not possible? I don't mean the big names, I know those are a sprite of there own, I mean the ones you see over the tiny portraits at the bottom of the screen when you select a mutant.

Developer

Unfortunately, those are all hardcoded, therefore the only way you could change them would be by finding-replacing text in game's executable via a hex editor.

Ah, i'm guessing the loading screen tips are on the same boat then?

Developer

Indeed. A few people had suggested that commands could have been added for changing game text, but, unfortunately, it is a pretty big effort as for the end result.

Upcoming update will introduce ability to create custom characters - with that you have full control over text/sprites/behaviour for the thing.

Can't wait for the next update then. Though I do have to ask. Similarly to the sprites, is there a way to change the music in the game? Thanks, and keep up the good work!

Developer

There are no commands for changing music (because things aren't easy on that front), but you can simply replace OGG files in the game' directory.

sadly, i have been experiencing crashes when attempting to sideload on new versions of the gam, specifically with /loadtext. is there way way to fix this?

Developer

Some preview versions of NTT have issues with replacing some sprites. There is no apparent dependency, but it's different sprites per version, leading me to assume that it's some issue with texture pages. I hope to either workaround the issue by the next public release or migrate the mod onto a version of GameMaker runtime that does not show the issue. In the current-most version /loadsprite includes a workaround, but /loadimage doesn't, therefore /savesprite'ing the sprite and /loadsprite'ing it back (replacing the base sprite with a same-looking imported one) before calling /loadimage fixes the problem.

On the spritelist page, there are things called msks. What exactly are they?

Developer

Collision masks used for various things in game. Are assigned to mask_index variable to apply.

1. Can you Reupload images? I don't see them.

2. Where i can get SPRITES of things?

Developer

1. Fixed.

2. Please read the FAQ.

hello can I add a character from 0 for example take a character and edit the abilities and that appears in the menu ??

Developer

Yes - by making a custom character mod. Examples

Hello, which is the command for the loadout icons? 

Developer(+1)

If you are doing custom skins, there's skin mod support for that nowadays.

Deleted 6 years ago

I found the command for the loadout icon, but i can't use it in the way you shown :/ i want to do something like "/saveimage loadout7" or something like that but i can't  :/

Developer(+1)

May want to clarify which loadout then (guns? characters? actual bits of loadout ui?); there's this page with a complete list of sprites and small previews.

hello, i want to instal some mods (for example stand powers). I can load mod.gml but also this mod have some sprites. So how to ADD sprites of this mod in game?

Developer

You make sure that the sprite files lie in the same directory with the mod - you load the mod, and the mod then loads its sprites.

Ok my mod in same directory with sprites but it wrires "could not find sprites (name)"

ok nevermind i found a solution

hey, can you do a actualized version of this plz, because i play in epic and dont have an appdata save :(