Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

[GUIDE] How to Create Custom Weapon Textures

Custom textures and sounds
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
KliPeH
Moderator
Moderator
Posts: 914
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

[GUIDE] How to Create Custom Weapon Textures

Post by KliPeH » Tue Jun 14, 2016 3:22 am

 ! 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

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

 
► Show Spoiler
          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
 

                                 == 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 #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 #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
          Credits               ~~ Thanks for reading! ~~
12 x
 
Image

Scarface
Superfighter
Superfighter
Posts: 150
Joined: Sat Mar 19, 2016 11:00 am
Gender:

Post by Scarface » Tue Jun 14, 2016 11:43 am

I'm glad you made this thread. It will be easier for people to make weapon textures. By the way, some people like Raline made barrel, crate parachute textures etc. It would be good if you could explain how to make them. They are edited quite similarly, I just don't know which files they use and how many frames they have.
1 x
Decisions, decisions.

User avatar
Splinter
Superfighter
Superfighter
Posts: 314
Joined: Sat Mar 19, 2016 5:03 pm
Title: Grenade chef
Started SFD: 1.1.6
Location: Brazil
Gender:

Post by Splinter » Tue Jun 14, 2016 4:04 pm

Good job on the tutorial, just a correction though: Shark speaks portuguese, hehe.
3 x
Hold your breath.

User avatar
KliPeH
Moderator
Moderator
Posts: 914
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

Post by KliPeH » Tue Jun 14, 2016 5:06 pm

Scarface wrote:By the way, some people like Raline made barrel, crate parachute textures etc. It would be good if you could explain how to make them. They are edited quite similarly, I just don't know which files they use and how many frames they have.
The process for editing various weapons and items is the same for editing objects and supply crates. They can be found in the following directories:
  • Supply Crates
    Content \ Data \ Images \ Objects \ Supplies
    | SupplyCrate00Medic.xnb
    | SupplyCrate00Melee.xnb
    | SupplyCrate00Primary.xnb
    | SupplyCrate00Random.xnb
    | SupplyCrate00Secondary.xnb
    | SupplyCrate00Supplies.xnb
    | SupplyCrateParachute.xnb
  • Barrels
    Content \ Data \ Images \ Objects \ Metal
    | Barrel00.xnb
    | BarrelExplosive.xnb
    | BarrelWreck.xnb
  • Crates
    Content \ Data \ Images \ Objects \ Wood
    | Crate00.xnb
    | Crate01.xnb
    | Crate02.xnb
    | HangingCrate00.xnb
    | HangingCrate01.xnb
  • Various UI Elements
    Content \ Data \ Images \ misc
    | crosshair.xnb
    | cursor.xnb
    | PlayerArrow.xnb
    [...]
Find any of the following .XNBs in your game folder and convert them into .PNG files. After being converted (step #2), they can be edited freely (step #3) and converted back into .XNB files (step #4) to be used in your texture pack or game. Editing the object images is the same as editing weapon textures so you shouldn't run into any problems after the conversion. I won't be mentioning this in the OP because the thread focuses on weapons, but anybody looking to go beyond that can use this post as a reference for further file editing.
Splinter wrote:Good job on the tutorial, just a correction though: Shark speaks portuguese, hehe.
Thanks for the correction! Fixed the post to state the correct language of the commentary.
1 x
 
Image

User avatar
Jedi75
Fighter
Fighter
Posts: 33
Joined: Wed Mar 23, 2016 3:06 pm
Title: Force Fighter
SFD Alias: Jedi75
Started SFD: 1.8.0
Location: A galaxi far away
Gender:
Age: 21

Post by Jedi75 » Sun Jun 19, 2016 4:43 pm

Thank you thank you thank you. I realy neaded help. Best tutorial ever.
1 x

hxnter
Meatbag
Posts: 5
Joined: Sun May 29, 2016 12:09 pm
Gender:

Post by hxnter » Sun Nov 20, 2016 7:55 pm

To make custom weapon textures, I go to: (Superfighters Deluxe > Content > Data > Images > Weapons).
I use a XNB to PNG converter, edit the PNG image with GIMP, then use a PNG to XNB converter.
This works with everything in the "weapons" folder, but I get an error message when I try to convert XNB to PNG in (Images > Effects).
This happens with everything in the "Effects folder. for example, when I insert "MuzzleFlashAssaultRifle.xnb" into the XNB to PNG converter, the command prompt reads : "Error loading "MuzzleFlashAssaultRifle.temp.644". Cannot find ContentTypeReader SFD.Content.Texture2DBContentTypeReader, SFD.Content." Because of this, I cannot customize anything in "Effects"

Basically, this limits the range of texture customization significantly. A reply would be appreciated.

Thanks.
0 x

User avatar
KliPeH
Moderator
Moderator
Posts: 914
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

Post by KliPeH » Sun Nov 20, 2016 8:59 pm

hxnter wrote:This works with everything in the "weapons" folder, but I get an error message when I try to convert XNB to PNG in (Images > Effects).
This happens with everything in the "Effects folder. for example, when I insert "MuzzleFlashAssaultRifle.xnb" into the XNB to PNG converter, the command prompt reads : "Error loading "MuzzleFlashAssaultRifle.temp.644". Cannot find ContentTypeReader SFD.Content.Texture2DBContentTypeReader, SFD.Content." Because of this, I cannot customize anything in "Effects"
I don't believe you can customize anything other than weapons and objects. That includes not being able to customize effects, animations, skins and vanity items etc. The tool is quite limited with what it can do.
0 x
 
Image

User avatar
DippyDaDewott
Fighter
Fighter
Posts: 46
Joined: Mon Apr 04, 2016 2:21 pm
Title: Just a guy who loves SFD.
SFD Account: RealDippyDaDewott
SFD Alias: (SPZ)DippyDaDewott
Started SFD: 1.1.2 Around september 2012
Gender:

Post by DippyDaDewott » Sun Nov 20, 2016 10:39 pm

Kilpeh,

Everytime i try to convert something, i get this error:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553' or one of its dependencies. The system cannot find the file specified.
File name: 'Microsoft.Xna.Framework.Content.Pipeline, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553'
at XNAFormatter.XNAFormatter.convert()
at XNAFormatter.XNAFormatter.convertButton_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
XNAFormatter
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Keith%20Grimes/Desktop/Games%20Folder/SFD%20Texture%20pack/Conversion%20Tools/PNG%20to%20XNB%20Formatter/XNAFormatter.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.6.1586.0 built by: NETFXREL2
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
xnbbuilder
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Keith%20Grimes/Desktop/Games%20Folder/SFD%20Texture%20pack/Conversion%20Tools/PNG%20to%20XNB%20Formatter/xnbbuilder.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Help?
0 x
"I've never saw a greater example of horse shit then real fucking horse shit."

User avatar
StephenR3
Meatbag
Posts: 2
Joined: Sat Aug 20, 2016 4:05 am

Post by StephenR3 » Sat Dec 10, 2016 6:30 pm

If you dont see this location in your folder
C: \ My Games \ (Superfighters Deluxe) \ Content \ Data \ Images \ Weapons

You may want to search into this
C: \ (Program Files (x86)) \ [Superfighters Deluxe] \ Content \ Data \ Images \ Weapons

'( )' Marks should what should be there to go

'[ ]' Find this in "Program Files (x86)"
0 x

User avatar
Foster
Fighter
Fighter
Posts: 13
Joined: Fri Dec 16, 2016 6:00 pm
Title: GP-5
SFD Account: Foster
SFD Alias: Foster
Started SFD: Pre-alpha 1.1.6b
Gender:

Post by Foster » Fri Dec 16, 2016 8:05 pm

Looks like you made a far better tutorial than I did, and you certainly covered all bases. Fantastic job.

Added in 1 hour 27 minutes 22 seconds:
Well, unfortunately the PNG to XNB converter no longer works for me. I was planning on updating old skins like my steampunk pack and making new ones
1 x
Only two things in life are certain: Death and LENGTHENING

User avatar
KliPeH
Moderator
Moderator
Posts: 914
Joined: Sat Mar 19, 2016 3:03 pm
Title: [happy moth noises]
SFD Account: KliPeH
Started SFD: Pre-Alpha 1.4.2
Gender:
Contact:

Post by KliPeH » Fri Dec 16, 2016 8:49 pm

Foster wrote: Well, unfortunately the PNG to XNB converter no longer works for me. I was planning on updating old skins like my steampunk pack and making new ones
I believe one of the tools only works for Windows 7.
What OS are you using? If that's really the case, I'll update the thread with a corresponding notice.
0 x
 
Image

User avatar
Foster
Fighter
Fighter
Posts: 13
Joined: Fri Dec 16, 2016 6:00 pm
Title: GP-5
SFD Account: Foster
SFD Alias: Foster
Started SFD: Pre-alpha 1.1.6b
Gender:

Post by Foster » Sat Dec 17, 2016 3:21 am

KliPeH wrote: I believe one of the tools only works for Windows 7.
What OS are you using? If that's really the case, I'll update the thread with a corresponding notice.
I'm using Windows 10, had to upgrade from Windows 7 because of my motherboard.

Added in 6 hours 30 minutes 33 seconds:
TimeWorker's made a thread that contains alternate converters.
My problem with the PNG to XNB converter from this thread isn't present with the one from that thread, I can actually use that one on my OS.
You might want to edit the original post to point others who might be having the same problem as me and I believe a few other users have to the version that works for them.
0 x
Only two things in life are certain: Death and LENGTHENING

User avatar
Motto73
Superfighter
Superfighter
Posts: 316
Joined: Mon May 09, 2016 7:35 am
Title: Lazy ass
SFD Account: Motto73
Started SFD: Multiplayer Test Demo
Location: Sunny City
Gender:
Age: 24

Post by Motto73 » Tue Dec 04, 2018 12:17 pm

@KliPeH How about uploading this guide to the SFD Steam? (Updated version of course, since SFD now supports png in documents folder)
2 x
Image

Post Reply