Re‐texturing a Supply Box - chocmake/MGSV-Custom-Texture-Path-Hex-Replacer GitHub Wiki
This guide covers creating a re-texture mod for the supply drop box in Metal Gear Solid V: The Phantom Pain from start to finish using the lean and flexible custom texture path method, and assumes beginning from scratch with little to no prior MGSV modding knowledge.
The technique used in this guide is particularly of value to those already familiar with the PFTXS method of texture packing, as it has several advantages, including: smaller mod filesize, reduced redundancy, avoids the PFTXS texture filesize limit (which can lead to glitches and at worst game crashes), and makes subsequent re-texturing easier. If you happen to be familiar with some aspects already feel free to skim through them, checking out the relevant points.
For an expanded comparative list of advantages of this method to the more commonly used PFTXS packing see this page of this wiki, which includes a real example of an existing re-texture mod that was reduced in size by 41% using this method alone, and a further 42% using the texture export settings suggested in this guide.
Note: for a more advanced implementation of this approach one can alternatively use FMDL Studio, a Unity-based Fox Engine model editor made by members of the MGSV modding community. The primary benefit in comparison to the steps in this guide is the model editor's ability to automatically detect the original texture path(s) from a model file, saving the need to locate the texture path(s) separately (which is about the only drawback to doing this otherwise).
Contents
- Tools used
- Unpacking the data files
- Working with directories
- Creating the texture file
- Tweaking the model file
- Packing the mod archive
- Testing the mod in‐game
- (Optional) Creating re-texture variants
- Credits and links
Tools used
First follow the installation page on the wiki, grab the batch script and set up the two required tools it uses, then continue by downloading the following:
- FtexTool
- Converts between FTEX texture files used by the game and DDS texture files openable in an image editor.
- Nvidia's texture tools for Photoshop
- A DDS texture file export plugin.
- A DDS exporter for GIMP is also available and can be used alternatively if necessary. Based on one modder's experience it produces texture filesizes considerably larger than the Nvidia exporter, though YMMV.
- SnakeBite Mod Manager
Similar to the required programs of the batch script, unzip FtexTool to a more permanent location where you can keep such programs handy. For the simplification of this guide I placed all the programs within C:\Modding\Tools\
, since the Windows' Program Files
directory requires extra write permissions.
Note: keep in mind both the MGSV tools and the hex editor lack support for Unicode characters in paths so place the tools in locations that don't contain Unicode characters.
Unpacking the data files
The first thing we'll need to do to actually see the files we want to mod is extract them from within the huge data files used by the game.
Find your install directory of the game. For me it happens to be G:\Steam\steamapps\common\MGS_TPP\
. Within it open the master
directory.
In this guide we only need to unpack texture0.dat
and chunk0.dat
since those are where the particular files we'll be using are located.
Broadly speaking raw FTEX texture files are located in the 'texture' DAT files (texture0.dat
, etc) and 3D models and PFTXS texture containers within the 'chunk' DAT files (chunk0.dat
, etc). These DAT files are located in the master
directory of the game's install directory.
To unpack the files drag each of those two DAT files, one at a time, onto GzsTool.exe and a console window will appear and begin unpacking each file to a directory of essentially the same name (chunk0_dat
and texture0_dat
), located in the same place the original file was unpacked from. This can take some minutes to complete. When done the console window will close.
Note: the above GIF is cut for brevity. Normally the time it takes to unpack is several minutes.
Excellent! The initial modding step is complete. Next we'll locate the files we need.
Identifying the model and texture files
For this guide we're after the supply box model and albedo (color) texture files. Thanks to pointers from the MGSV modding Discord community these were easy to locate, and can be found in the following locations within the newly unpacked DAT directories:
- The FPK that the model file is contained within:
chunk0_dat\Assets\tpp\pack\collectible\common\col_common_tpp.fpk
- The albedo FTEX texture and associated FTEXS files:
texture0_dat\Assets\tpp\item\cbx\Pictures\cbx1_main0_def_c00_bsm.ftex
texture0_dat\Assets\tpp\item\cbx\Pictures\cbx1_main0_def_c00_bsm.1.ftexs
texture0_dat\Assets\tpp\item\cbx\Pictures\cbx1_main0_def_c00_bsm.2.ftexs
texture0_dat\Assets\tpp\item\cbx\Pictures\cbx1_main0_def_c00_bsm.3.ftexs
For visual reference, within Windows this looks like:
As you can see from the texture filenames the supply box is named after the cardboard box (cbx...
), and has a bsm
suffix denoting it's an albedo texture, though this wouldn't be obvious if we were trying to search for it without any clues.
For a helpful list of game file abbreviations for characters, items, weapons, etc, see this page from the MGSV modding wiki. For narrowing down where a file you might be looking for is located see also this page from the same wiki, which lists the identifying numbers the game uses for files related to a specific mission/side-op.
Often FTEX files will be packed within PFTXS files which require unpacking as well (using a tool like GzsTool), but in this case the textures happen to be standalone, saving an extra step for the purposes of this guide.
Next
In the next section we'll create some new directories that we can then copy the above files above to. Onward!
Footnotes
Tip: occasionally files you're looking for will be located within the DAT files of the
0
and1
subdirectories withinmaster
. These directories contain the game patches, including the DLC. Ideally you'd want all the DAT files withinmaster
unpacked so you can easily search through them but in this case we already knew the location of the necessary files.
Tip: something to keep in mind about FTEX texture files contained within PFTXS files is frequently they're just references to the FTEX and not the entire texture, so searching for the filename separately within the texture DAT files is usually necessary in those cases to either find the full set of files or complete an incomplete set found in the PFTXS. You'll know when its the full texture set when all the associated
.ftexs
files are present (ie:.1.ftexs
,.2.ftexs
and.3.ftexs
, though for very small textures it may be only the first two)
Tip: sometimes locating the files you need for a particular re-texture can be tricky. It's common to find FPK files that share the same filename as the PFTXS that contains the desired FTEX textures (eg:
plparts_battledress.fpk
+plparts_battledress.pftxs
) but it's not always as straightforward, and like modding in general there can be some trial and error involved.
Tip: if you're having trouble finding the files for a particular model you want to re-texture you may need to refer to existing mods from the Nexus or ask around places like the Discord chat.
Note: this guide focuses on modding an FMDL model file, as that's what the supply box uses to reference the texture path. However you may discover in some cases a texture path instead referenced in a FV2 file. There isn't to my knowledge a handy list of which textures are referenced in FV2 though it's been mentioned the format is utilized most often for camouflage textures. Both file types are supported by the process outlined in this guide.
Note: while more advanced and comprehensive than the simple re-texturing covered in this guide the Unity-based FMDL Studio Fox Engine model editor can automatically detect the original texture path from any model file. Potentially in the future a standalone tool to detect texture paths might become available, should someone from the community decide to create it.