Teenage Mutant Ninja Turtles: Shredder's Revenge

Teenage Mutant Ninja Turtles: Shredder's Revenge

Evaluări insuficiente
How to Edit Sprites and Swap Palettes in Teenage Mutant Ninja Turtles: Shredder's Revenge
De către Alain-Christian
This step-by-step guide will explain how to extract the graphics from the game for editing, and how to mod them back in.
3
   
Premiază
Adaugă la preferate
Preferat
Elimină din preferate
Introduction
Hey! I originally posted this guide to Nexus Mods. Whenever I mod something I like to share the knowledge if I can. I just makes sense to also have this guide available on Steam so that's why I'm doing this. I want to reach as much people as I can with this information.

This guide and the one I posted to Nexus Mods are the same except for formatting. Nexus lets you change fonts and stuff, it's not really that important though. If anything changes I'll update both guides. So rest assured what you're reading here is the latest version.

Speaking of Nexus Mods, you can click here to download my Archie Comics Raphael palette Swap![www.nexusmods.com] And there's plenty of other mods on that page. As of right now there's 20. Let's grow that number!

(Last updated 21 June 2022)
- Vital info was missing about initial decompressing of zxnb files. Thanks to csonora for bringing it to my attention!
Converting Game Files From ZXNB to XNB
1. Download Offzip[aluigi.altervista.org].

NOTE: This tool is needed for extracting zlib-compressed game files. If you're working with files already in XNB format you can skip this step.

2. From the zip file extract offzip.exe to a folder of your choice.

NOTE: You can ignore all those other files it comes with. Those are just source files.

3. Create a subfolder named 'out'.

4. 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'

5. 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.

6. For the sake of example, we're gonna edit Raphael. So go to Animations > Players > Raphael

7. Copy the file RaphaelTexture.zxnb and paste it to your Offzip folder.

8. Offzip is a command line tool. Run it as follows:

offzip -z -15 -a RaphaelTexture.zxnb out 0

NOTE: If you're curious about what these command line arguments do just run the program without arguments.
💡 TIP: Those of you good with BASIC or .bat files might want to automate this and make it easier on yourselves.

9. In your 'out' subfolder you'll find a file named '00000000.xnb'. Rename it to 'RaphaelTexture.xnb'

NOTE: Unfortunately 'Offzip' doesn't let you name the outfile. Again, a .bat file or something would be helpful here.
Extracting the Art Assets From ZXNB Files for Modding
1. Download xnbcli[github.com]. (https://github.com/LeonBlade/xnbcli/releases)

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. If you find yourself getting stuck with any of this your problem has likely already been answered online. But if you still need help feel free to hit me up. I can be found on ig[www.instagram.com] or twitter. I'll also respond to questions below but I'm slower to respond to Steam notifications. Sorry!

2. Extract to a folder of your choice.

Note: Inside the folder you'll see two sub-folders: 'packed' and 'unpacked.'

3. Copy the file RaphaelTexture.xnb and paste it to the 'packed' folder.

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! ⚠️

4. 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.

5. 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:

chmod +x

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.

6. 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!

1. 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! ⚠️

2. From your xnbcli folder run the 'unpack' command.

3. 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!

4. Copy RaphaelTexture.xnb and paste it to Animations > Players > Raphael in your game folder.

5. 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.

6. Launch the game and admire your handiwork! You did it!

7. Last step is to zip a copy of your xnb file (or files) and share to Nexus Mods[www.nexusmods.com]! Really tho, zip those xnb files, it makes a HUGE difference.
Conclusion
TA~DA! Not that difficult right? I'm looking forward to your wild edits!

If you have questions I'm easier to each on my socials:
https://twitter.com/AlainChristian
https://www.instagram.com/alainchristian/
13 comentarii
bonclyde06 25 iul. 2022 la 20:58 
Any tips on how to extract/mod the .zpbn (pbn) files? I'm trying to take a look at the level art to mess with it but all I see is "Portable Bridge Notation?"
Alain-Christian  [autor] 7 iul. 2022 la 6:59 
@Mumrah that's not supported by the applications but one could certainly code a BAT file to handle that.
Mumrah 6 iul. 2022 la 7:33 
Hmm, I got it to work to convert one zxnb to an xnb. Is it possible to convert the entire folder with subfolders?
Kai 23 iun. 2022 la 0:39 
I wonder if people can eventually mod it to allow more characters in the lobby to basically play with a bigger roster and then mod the game to enable more levels with new enemies and such. Pretty sure since this is a TMNT game, the company will not like players creating their own content to play rather than paying for it.
Alain-Christian  [autor] 20 iun. 2022 la 23:33 
Alright, It's updated! Thanks again for your feedback everyone!
Alain-Christian  [autor] 20 iun. 2022 la 22:32 
Thanks for the awards and feedback. I went back to test it and csnora is correct, I'm missing a vital step. Give me an hour and I'll have some updated instructions for extracting the compressed files. Sorry for the confusion! And thank you for letting me know. I'm about to leave on business for two weeks and I'm glad you told me about this before I left! 👍🏾
TeddyBear-69 20 iun. 2022 la 14:35 
I wonder if people are gonna be pervs and do certain mods of the female cast...
csonora 20 iun. 2022 la 13:46 
The above guide is incorrect, as the author only took into account the steps needed to mod an already modded XNB file. XNBCLI only works with unzipped XNB files, it's not able to unpack ZXNB files, which are the original game's files format.

ZXNB files are in reality XNB files which have been compressed using a standard zlib/deflated algorithm. In order to make the readable to XNBCLI, it's necessary to unzip them first using a zlib decompressor like OFFZIP or EiffelExtractor: https://gist.github.com/JohnnyonFlame/b979ae7a8da2a0f61cd84dfd1c533e92

Hope this helps to clarify all the confusion that this guide is causing.
Killface 20 iun. 2022 la 13:42 
Update 2;
I'm skipping the "Copy 'z'xnb file" stuff and use already uncompressed xnb as a basis.

https://www.nexusmods.com/tmntshreddersrevenge/mods/6?tab=files
Killface 20 iun. 2022 la 13:37 
Having the same issue here,

UPDATE: 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.