! | Message from: KliPeH |
Disclaimer
- None of the programs in the compilation were made by me. All rights for the downloaded software are reserved to their respective creators and/or owners. More info about this in the Credits section.
- I would have not been able to create this tutorial without referring to the original. It contains all the instructions and requirements, but is extensively elaborated upon in this thread.
- Don't like reading? @Shark kindly went ahead and created a video to show the process in video format. The files he's using are similar to the ones you'll download here, and his tutorial is relatively short too. The only downside is that his commentary is in Portuguese, taking into consideration most of the community here isn't. If you decide to watch the video and run into problems refer to the instructions written here. Here's the video:
|
Required Programs
- Image editing software such as MSPaint.
- An online tool or a program that can convert white BGs to transparent (optional but still provided).
► Show Spoiler
Only for Pre-Release versions (Beta 1.0.2c and down):
- WinRAR or 7-Zip to unpack the kit.
- Microsoft Visual C# 2010 Express
- Microsoft XNA Game Studio 4.0
Downloads
== This is no longer needed for Steam release version (1.0.0.0.e and up), and newer operating systems. ==
== If you are using a pre-release copy of SFD, this will still be required. ==
Tutorial
== This is no longer needed for Steam release version (1.0.0.0.e and up), and newer operating systems. ==
== If you are using a pre-release copy of SFD, this will still be required. ==
► Show Spoiler
Step #1: Getting Ready
Make sure you've downloaded
Texture Creation Kit.rar and unzipped it somewhere easily accessible like your Desktop (all the example directories in the thread refer to it). You are provided with:
a) Setup files for all necessary programs.
b) A backup of the "Weapons" folder containing both PNG and XNB files (updated as of
23.04.2019 /
version 1.2.0c)
c) Tools to convert the necessary files into editable image files, and vice versa.
If you don't want to download the whole pack, install any missing components of it while making sure you have all the required programs installed and have a valid backup of the XNB/PNG files in case something goes wrong.
Installing the required programs:
It is important to install the software in the correct order. Visual C# 2010 is required to run XNA Game Studio, while XNA Game Studio is required to run the texture conversion tools.
- If you don't already have an unpacking program, get WinRAR [link].
- Install Microsoft C# 2010 Express first (via setup.exe).
- Install Microsoft XNA Game Studio 4.0 second (via XNAGS40_setup.exe)
- If you don't already have an image editing software (other than MSPaint) and don't want to look for one online, install paint.NET (via paint.net.4.1.6.install.exe)
== This is no longer needed for Steam release version (1.0.0.0.e and up), and newer operating systems. ==
== If you are using a pre-release copy of SFD, this will still be required. ==
► Show Spoiler
Step #2: Obtaining the Texture Files
In this step you'll get familiarized with the
XNB to PNG Converter.
The problem many people face when trying to create custom textures for SFD is the game's texture file format. You cannot edit .XNB files with regular image editing software, and thus are required to convert them into "readable" image files image editors can “see”.
The main uses of the Converter are:
- Converting the default SFD .XNB files to .PNG so they can be edited manually.
- Converting other users' textures for manual editing in case they don't provided the necessary .PNG files themselves.
If you wish to edit default SFD weapon textures, you can find their .PNG versions (already converted by me) in the "Backup" folder inside the kit. All you'll have to do, other than editing them, is convert them back to .XNB files after you've changed them and replace the default textures with the modified ones (all explained in the next few steps).
Alternatively, use the tool yourself by following these steps:
- Obtain the .XNB files of a weapon of your choice by accessing the main SFD file directory. It should look like this:
C: \ My Games \ Superfighters Deluxe \ Content \ Data \ Images \ Weapons
- Copy-paste the files into the "Input" folder of the XNB to PNG Converter. Its directory should look like this:
C: \ Users \ YOURNAME \ Desktop \ Texture Creation Kit \ Conversion Tools \ XNB to PNG Converter \ Input
- Run XNB_to_PNG_Converter.exe
- After the CMD popup states the process has "Finished!", focus the window and press any key to close it.
- Grab the files from the "Output" folder and proceed to the next step in the tutorial. The folder is found within this directory:
C: \ Users \ YOURNAME \ Desktop \ Texture Creation Kit \ Conversion Tools \ XNB to PNG Converter \ Output
Step #3: Editing the .PNG Files
There's not much to this step since it heavily relies upon your artistic vision. I'll go through the generic texture editing process and touch on some technical aspects required to make the textures look and work properly.
The .PNG files you obtained in step #2 are now ready to be tinkered with; they're 32x32 sprites (smaller sprites for magazines and misc items) named in a certain pattern corresponding to the sprite's "role" in-game. Here's a list of some of the more common "roles" you'll encounter:
- WeaponD.png - Drawn. The sprite you see when the weapon is equipped/held and is also shown when hipfiring.
- WeaponDReload.png - Weapon is Drawn and being Reloaded. The sprite you see when you reload the weapon (usually WeaponD.png without its magazine).
- WeaponM.png - Model(?). The sprite you see when:
a) the weapon is dropped out of a supply crate;
b) you drop the weapon on the ground;
c) the weapon is inside your hotbar.
- WeaponS.png - Sheathed. The sprite you see when a different weapon is equipped and the modded one is sheathed on your fighter's back.
- WeaponH.png - Holster. The holster of the weapon shown on the fighter whenever the weapon inside it is being held (equipped).
- WeaponThrowing.png - Throw mode toggled. The sprite used when the fighter holds the weapon out in order to throw it. Usually WeaponM.png tilted 90° to the left or right.
- MeleeDebris1.png / MeleeDebris2.png - The sprites of a broken melee weapon. Usually two broken halves.
- EquipmentT.png - Thrown. The sprite of a primed piece of equipment. Also used when simply holding the item, similarly to WeaponM.png.
- MagWeapon.png - Magazine. The sprite of the weapon magazine, should match the one shown in WeaponD.png since it drops to the ground upon reloading.
There are some special cases such as M60F.png (F for Firing) and SwordMH.png (MH for Model Holstered), but usually the pattern will stay the same. A (ranged) weapon can be considered fully modeled once the following sprites have been manually modified:
- WeaponD.png
- WeaponDReload.png
- WeaponS.png
- WeaponM.png
- WeaponThrowing.png
- MagWeapon.png
Since each name fulfills a different role, the names must
NOT be changed otherwise the texture will not work
at all.
Changing "WeaponM.png" to something like "myweapon.png" will break the texture for that weapon, so don't do it. Additionally, it may seem like the background of the texture is white in some image previews, but it's actually transparent. Changing it to white, forgetting to remove white eraser marks after editing the texture, or not saving the file properly will cause the sprite to have a white square around it in-game.
To prevent that, manually change every pixel that's not part of the sprite/around the sprite to be transparent via the Magic Wand tool or the Eraser tool if you're using paint.NET.
Here's a short tutorial explaining how to do it.
Alternatively, change the pixels you want to be transparent to
Magenta. I would not recommend doing that because it strains your eyes over a period of time and looks bad in image previews, but the game will read that color as if it were transparent in a case where you do not want to use external tools or software to make them so yourself.
Another key thing to note is the position of the weapon model inside the sprite itself. You may wonder why the model isn't centered or isn't clipped to one of the corners of the 32x32 sprite, and may want to change it so your texture set looks more organized or becomes easier to edit. The position of the weapon inside the sprite sheet plays a significant role and shouldn't be changed unless you know the sprite needs spacing adjustments beforehand.
Imagine your in-game fighter standing in the background of the sprite holding the weapon. It will (hopefully) help you visualize where the texture should be positioned and adjust its height/length accordingly. If you'd rather play it safe don't delete the old model when you create a new one (assuming you're not simply recoloring the original texture); draw it below/above the original, or on a separate draft file. When you're done, simply replace the old texture with the new one, trying to put the corners of the new weapon right on top of the old one (using the weapon's trigger guard or stock placement as guidelines).
Test the textures in-game - if the model is too high/low or is placed too far to the right/left of the character, go back to your sprite and move it one pixel in any direction at a time until you get a satisfactory result. Trial and error are key here, so don't get discouraged if each "simple" change is taking as much as a full hour of your time. You'll get used to it and perfect your technique as long as you attempt doing it enough.
Remember: saving files with MS Paint will always convert transparent backgrounds to white, unless they're Magenta.
== This is no longer needed for Steam release version (1.0.0.0.e and up), and newer operating systems. ==
== If you are using a pre-release copy of SFD, this will still be required. ==
► Show Spoiler
Step #4: Saving the Textures As Usable .XNB Files
In this step you'll be reversing the process done in step #1 via the
PNG to XNB Formatter tool. Since you cannot simply play with your modified .PNG files, you'll need to convert them back into .XNB files so the original files can be replaced with them. The tool only works for Windows 7 or operating systems that predate it. If you're running Windows 8, or Windows 10 and 11, download the tool
@TimeWorker uses
in his tutorial.
Gather your modified sprites in one place, like the Desktop. Now run
XNAFormatter.exe from the following directory:
C: \ Users \ YOURNAME \ Desktop \ Texture Creation Kit \ Conversion Tools \ PNG to XNB Formatter
Once the window opens, follow these steps:
- Check the "Compress Output?" and "Log Output?" boxes at the bottom of the window, right next to the 'Convert' button.
- Click the 'Browse' button right next to the 'Source File(s)' field. Navigate to the directory of your modified textures (example: Desktop) and select all the files you wish to convert (either by bandboxing or holding the Ctrl button and clicking on each one separately).
- Ensure that the "Output Directory" field points to the 'Content' folder inside the tool directory. If it doesn't, click 'Browse' and input the following directory in:
C: \ Users \ YOURNAME \ Desktop \ Texture Creation Kit \ Conversion Tools \ PNG to XNB Formatter \ Content
- Click 'Convert' and wait for a "Build Completed" notification. Once the 'Source File(s)' field goes empty close the tool window.
- Navigate to the 'Content' folder you used as the output directory in step #3, and grab your converted file(s).
Step #5: Applying the Textures or Using A Backup
Perhaps the most crucial step in finalizing texture creation, you are now required to imitate the path of each texture file from the game directory inside its sister directory,
C: \ Users \ YOURNAME \ Documents \ Superfighters Deluxe. In the actual game, all sprites are found under a folder named Content, that hosts Data, that hosts Images, and then sub-folders for each type of entity, aptly named Weapons, Objects etc. You will be making a copy of this path.
And so, in
C: \ Users \ YOURNAME \ Documents \ Superfighters Deluxe, extend the directory by making these new folders under it:
\ Content \ Data \ Images \ Weapons
Then, make a folder for the items you modified, e.g Rifles, Handgun, Melee etc. The respective .png files will go inside their respective folders where they are found in the original game directory. For example, a modified M16 texture will go inside
Content \ Data \ Images \ Weapons \ Rifles, a modified Grenades texture will go into
Content \ Data \ Images \ Weapons \ Thrown, weapon magazines will go into
Content \ Data \ Images \ Weapons \ Other etc.
If you no longer wish to use custom textures, replace or remove the individual files you created, or delete the custom folders altogether. The game will always read custom files under the Documents directory first, there is no way to toggle between default and custom textures in-game.
== For Pre-Release versions (1.0.2c and down), and older operating systems: ==
► Show Spoiler
If you were using the same location as a directory for all your modified/converted files, you now have two sets of textures - .XNB files and .PNG files. Save the .PNG files somewhere so you can modify them in the future. Now, take the .XNB files and move them into the directory of the game, which was also used in step #2. Ranged primary weaponry goes into
Content \ Data \ Images \ Weapons \ Rifles, magazines go into
Content \ Data \ Images \ Weapons \ Other, equipment goes into
Content \ Data \ Images \ Weapons \ Thrown etc etc.
Once you move the file(s) you'll be prompted to either move and replace the copies, or keep both. Do
NOT use the "keep both" option, simply replace all the files. If you don't get prompted to replace them you either:
- did not name the file(s) properly (capitalization is important),
- renamed the file,
- accidentally deleted the original file beforehand.
If you've been tinkering with the textures too much and ended up losing/deleting textures or needing to revert the change, use the backup I provided by copying all the files from the XNB folder and pasting them into the directory of the game once again. Alternatively, if you don't want to apply the backup manually and don't mind waiting a little bit, force-update the game and you should be good to start over.
Credits
~~ Thanks for reading! ~~