This step-by-step guide will explain how to extract the graphics from the game for editing, and how to mod them back in.
Guide to Edit Sprites and Swap Palettes
Extracting the Art Assets From zxnb Files for Modding
- Download xnbcli.
Note: This tool has a lot of guides and videos about it online. It was originally created for Stardew Valley modders but plenty of other games use the same format.
- Extract to a folder of your choice.
Note: Inside the folder you’ll see two sub-folders: ‘packed’ and ‘unpacked.’ They’ll come into play later.
- Go to the game install folder.
Note: If you ask me the easiest way to get here is to right-click the game from your Steam library, hover to ‘manage’ then select ‘browse local files’
- Navigate to Contents > 2D
Note: These four subfolders are where the game’s art assets are stored. If you’re just looking to edit the player characters that’s stored in Animations > Players. And then from there you’ll see seven subfolders named after our main cast. Let’s continue on as if we’re changing Raphael’s colors.
- For the sake of example, we’re gonna edit Raphael. So go to Animations > Players > Raphael
- Copy the file RaphaelTexture.zxnb and paste it to the ‘packed’ folder I mentioned earlier.
Note: If you’ve already downloaded a mod for the game then the file extension might be slightly different. Modded files of this type end in xnb instead of zxnb. (I’ll explain the difference in part 2) It’s not a big deal you can still work with it. But in this case it means you’re likely making edits to a mod. Most mod authors should be fine with this (I am) but it’s just something to keep in mind. Caution: The process below is destructive and will overwrite existing files in the ‘unpack’ folder with the same filename without warning!
- From your xnbcli folder run the ‘unpack’ command.
Note: If you’re in windows this should be a .bat file. OS X users will see a .command file. Linux users you’re on your own, I’m sorry homey.
- Check the ‘unpacked’ folder. You should see two new files: RaphaelTexture.png, RaphaelTexture.json.
Note: Okay hopefully that worked. If you’re on Windows look online for help! Like I said before xnbcli isn’t a new tool so chances are someone else out there has a fix for your issue. You really shouldn’t have any problems, honestly. But, for all my fellow Mac users out there you might encounter the same problem I had. If you get a ‘permission denied’ error open up terminal and type:
Include that space after the ‘x’. Now you’re gonna drag ‘pack.command’ to your terminal window. If it asks for your admin password go ahead and enter it. Do the same thing for ‘unpack.command’ since you’ll need it for the next step. It should work now.
- Edit RaphaelTexture.png to your liking.
Note: Palette swapping is a trivial task from here. If you’re looking to make changes to the actual sprite you can do that as well! Just be aware that the boundaries are unknown at this time. And judging by the spritesheet it doesn’t look like the boundaries are uniform. Maybe you get two extra pixels on the longest side? But don’t hold me to that, it’s just a guess.
Modding the Game to Display Your New Graphics
Note: This should be obvious but I’ll say it anyway: people online are not going to see these mods. They are for your eyes only! But hey, if you’re a streamer it could be a fun thing to change for your viewers. And I know for me after modding the game it makes it a lot easier to tell the turtles apart in multiplayer. Six-player mayhem is the biggest reason why I pursued this. But yeah, mix and match the mods, have some fun with it!
- Check the unpacked folder. It should contain RaphaelTexture.json and your new version of RaphaelTexture.png; the one with your changes to it.
Caution: The process below is destructive and will overwrite existing files in the ‘packed’ folder with the same filename without warning!
- From your xnbcli folder run the ‘unpack’ command.
- Check the ‘packed’ folder for RaphaelTexture.xnb. Your modded assets are now ready for the game!
Note: You’ll notice the file extension is slightly different from your original RaphaelTexture.zxnb. The z just indicates the file is compressed. xnbcli packs the files without compressing them. Lucky for us the game doesn’t care! Don’t rename the extension, that just crashes the game. I learned this the hard way, ha ha!
- Copy RaphaelTexture.xnb and paste it to Animations > Players > Raphael in your game folder.
- Rename or delete the original RaphaelTexture.zxnb file.
Note: I haven’t tried running the game with a zxnb and znb file in the same folder but I’m guessing it defaults to the zxnb file. If you deleted it and want the original file back you can always redownload from steam using the “Verify integrity of game files…” Just know that when you do that it’ll wipe out all your mods.
- Launch the game and admire your handiwork! You did it!
- Last step is to zip a copy of your xnb file (or files) and share to Nexus Mods! Really tho, zip those xnb files, it makes a HUGE difference.
Yeah I doubled checked in Windows, it says:
It doesnt work, it keeps saying failed in the .BAT file command to unpack…
you can even have the modded file in as a .png, so long as you rename the initial zxnb so the game doesn’t “see it”.
Tried all the Windows versions and the version from the more recent Git fork with no success.
As far as I can tell, the Win version ob xnbcli only accepts .xnb files and ignores .’z’xnb flies as they are compressed and it cannot handle them. There are no tutorials or additional commands for xnbcli.