Post tutorial Report RSS How To: Make Custom Skins

In this tutorial you learn about the tools used to create custom skins, textures and sprites for XNA games using tools available to download.

Posted by on - Basic Textures

How To: Make Custom Skins


You’ll need the right tools for the job, which I’ve provided here on ModDB.

But first…


A little about XNA

Microsoft’s XNA game engine was primarily used by indie-game developers to create games for the Xbox 360 platform. Murder Miners by JForce Games was originally released on Xbox 360 and was well received by FPS fans in North America.

Later, after its success on the Xbox 360, JForce games decided to port the Halo + Minecraft-inspired cult classic over to PC. Released on Steam and widely sold for 99c, Murder Miners PC re-ignited some of it’s former success by attracting the attention of the loyal, adoring fans of the original Xbox release and bringing in new players from the realm of PC.

Microsoft’s XNA Game Studio and the XNA Framework allowed indie-game developers such as JForce Games to develop independent releases for the Xbox 360. However, the use of XNA to develop games was never strictly to produce games for the Xbox 360 platform.

Wikipedia Excerpt

XNA can still be found in use today, in somewhat more fringe use-cases in 2017/2018; but with steady popularity among indie-game developers. Setting up a development environment with .NET, XNA and Visual Studio is a viable and popular alternative to developing games with more widely used platforms such as Unreal and Unity. Given this is the case, a sub-culture and community built around creating mod content for games which use the XNA Content Pipeline is already in existence.

There are several handy tools which have already been created for use in making mods for XNA-based games. Three of the most useful tools for unpacking and repacking .XNB container files (XNA content) are available to download on this mod profile.

Modifying XNA Game Content

To edit the content inside the games .XNB container files, first you will need to unpack the content inside them. When it comes to modifying player or weapon skins, usually the file inside the container will be an image.

Another title built with XNA and released on Xbox/PC was Dust: An Elysian Tail.

Why mention this? Because a handy little tool which was designed to unpack the content from .XNB containers for the game Dust: An Elysian Tail has already been created! This tool has also been redistributed previously for use in the Murder Miners community and it is one of the tools I have used to access the various skins inside the .XNB containers for Murder Miners when making the Retro Pack mod.

Here’s the link to the original Steam Thread where I obtained the mod-making tools I described:

Steamcommunity.com

You’ll find that the link to download the tools has been removed from the post. I’ve uploaded them in the files section of this ModDB profile, the community can access them here.

These are the original instructions from the README.txt that came with the tool:

- Place ‘MM Decompiler.exe’ in the folder of the .xnb file you wish to extract.

- Make a backup of the .xnb you wish to extract

- Follow instructions on the MM Decomplier

- Take the .PNG it creates and alter it in whatever way you want (do not change the size of the images)

This is the window you will be presented with when targeting a player or weapon skin .XNB container to unpack:

xnb unpack


The second step in the process is to repack the modified content in the .XNB container once more. As shown in the original post on Steam, there is another application used for this called XNAFormatter and is available to download here.

These are the original instructions from the README.txt that came with the tool:

- Open the XNA folder

- Run XNAFormatter as Admin

- Select the altered .PNG

- Click start to convert it to .xnb

- Open the /content folder inside the XNA folder to get your new .xnb file

- Place the new .xnb file in the folder where the original came from

This is the window you will be presented with when repacking an image to .XNB format:

xnb pack


Basically, you unpack the content in .PNG format using MM Decompiler, make your modification and then pack the content in .XNB format again using XNAFormatter. You simply use your modified .XNB file to replace the original content you modified. You must make sure the output .XNB has the same name as the original file and is placed in the right game folder to enable the game to find your new content.

However, it is important to note that regarding the use of XNAFormatter:

----------------------------------------------------------------------------------------------------------------------------------


[excerpt from README.txt]

The purpose of the program is to create .XNB files for use in XNA games. To run, it requires XNA 4.0 and .NET 4.0 with the appropriate .DLLs installed. It also requires the environment variable %XNAGSv4%, which should be created by default whenever XNA is installed.

The following .DLLs are required to run, and as they cannot be redistributed, you'll need to download the full version of XNA 4.0, located here: Microsoft.com

Microsoft.Xna.Framework.dll,

Microsoft.Xna.Framework.Content.Pipeline.dll,

Microsoft.Xna.Framework.Content.Pipeline.AudioImporters.dll,

Microsoft.Xna.Framework.Content.Pipeline.EffectImporter.dll,

Microsoft.Xna.Framework.Content.Pipeline.FBXImporter.dll,

Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.dll,

Microsoft.Xna.Framework.Content.Pipeline.VideoImporters.dll

----------------------------------------------------------------------------------------------------------------------------------


Alternative to Installing Full XNA Game Studio 4.0:

Installing and configuring XNA studio is beyond the scope of this article but I may publish a tutorial at some later date. Because the requirement of XNA and the associated frameworks, as detailed above, can pose a slight hurdle for less experienced mod-makers, there is one more utility in the tool-kit which has been made available here.

This utility is called Easy-XNB and was originally developed by a mod-maker for use with the XNA-based game StarDew Valley. To the best of my knowledge, this is a stand-alone application capable of unpacking and repacking multiple .XNB container files at once.

Please note, I am only assuming that Easy-XNB is a stand-alone application from how I’ve used it personally with Murder Miners. Based on the minimal documentation available for it, the task would be difficult for me to determine 100% beyond a doubt, if any dependency on XNA 4.0 exists, as I have XNA Game Studio fully installed on my machine now. However, I am 98% certain it works without XNA installed what-so-ever.

(I had it running on an older machine which XNA Game Studio wasn’t installed, so I guess that is my guarantee of sorts!)

Easy-XNB leverages the use of XNBNode and xcompress32.dll, of which I’m certain is how it handles compression/decompression of .XNB container files.

easy xnb

That's basically it...

All you need to do now is go and download the mod-making tools via the links I've provided. I recommend trying Easy-XNB if you don't want the hassle of configuring any Microsoft XNA stuff.


Once you've got the tools, have a mess around with them but as always, make copies of the original game files you intend to modify, FIRST!


Happy Modding!

Post comment Comments
Guest
Guest - - 691,014 comments

This comment is currently awaiting admin approval, join now to view.

Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: