Ok, there is no custmesh for eyes. Look for the option example: eye_dark_blue.str2_pcI've seen your mod. But I still would like to find out what to do because the same problem occurs when trying to edit weapon skins. And I would also like to edit tattoos
Your tutorial is more complicated than it should be.So a week ago, I decided to take up the challenge of retexturing a mask in Saints Row IV. How hard can it be, right? Well, it turns out the answer was too damn hard.
After hours of sweat, blood, tears, and general loss of sanity, I finally succeeded in a lone retexture... Why did it take so long? Because most tutorials assume the reader comes equipped with enough knowledge about computers that all the little steps should be common sense. I am not a technological wizard and if you're reading this, you probably aren't either... So hopefully this will get you off to a good start with modding textures.
Welcome to Retexturing Saints Row IV, For Dummies
This tutorial assumes you know nothing about modding and will detail each step from finding the tools to mod with, to getting the new texture to show up in the game.
Specifically, this tutorial will help you modify an item of clothing.
DISCLAIMER: I am not a modding expert, nor do I claim to be. This might not be the best way to do it, but it'll get the job done! Suggestions for improvements are welcomed!
Step 1: Understanding Saints Row Files
What makes modding textures so difficult is the way that Saints Row data files are compressed. You can't simply open up a folder and have the texture file there for the taking. Instead, the data is contained in different compressed groups, each of which require a different program to open. They also eventually need to be recompressed into the appropriate files after editing. It's sort of like a diabolical set of nesting dolls.
The topmost level of compression of Saints Row files is called a packfile, which is the first that we'll work with.
Here's a helpful thread that details some of the file types, if you're interested in learning more. Reading it is not necessary for completing this tutorial, though.
Step 2: Find the Item You Want to Mod
Before you can even think about editing a texture, you need to find the file with the texture in it.
Let's start by finding your Saints Row IV files on your computer. They should be located at, or somewhere similar to:
C: > Program Files > Steam > steamapps > common > Saints Row IV
Find it? Good job.
Alright, now we're going to open up a packfile, so we can see all the item files listed in it. You will need to download the right tool to do this, located here:
The download actually contains several tools, many of which we'll be using. Unzip the downloaded file and save the tools right to your Saints Row IV folder.
Now open the tool titled ThomasJepp.SaintsRow.ExtractPackfileGUI.exe
Click "Extract" and navigate to your Saints Row IV Packfiles folder. Select the file customize_item.vpp_pc, and open it. Save it to your desktop so it's easier to find and work with later.
Open up the "customize_item.vpp_pc" folder that you just created on your desktop. Look at all those files! There are three types of files in there:
Now, decide what item you want to edit. I recommend starting with one where you can obviously tell what it is from the CMORPH_PC file name. Better yet, pick an item you don't like, so you don't have to bother downloading the game again if you mess it up! The texture that I edited was the Skeleton Mask, and I will be using that as the example. The file name for that item is "cm_lp35k_head_m_bonesmask_pc.cmorph_pc"
- CMORPH_PC Files: These are files with somewhat readable names that can help you find the item you're looking to edit.
- STR2_PC Files: Each SR2_PC has a nonsense numerical name, but corresponds with exactly one of the CMORPH_PC files.
- "Customize_Item.ASM_PC" This file specifies the link between the CMORPH_PC and STR2_PC file, so we're going to use it to find the correct texture file!
Note: Each CMORPH_PC file begins with either "cm" or "cf." This denotes whether the file is for the male or female version of the item, respectively.
Alright, so you've picked an item. Now what? Now we need to find its corresponding STR2_PC file.
To do this, open up the "Customize_Item.ASM_PC" file with notepad. When you open it, it's going to look crappy, corrupted, and mostly nonsensical. That's perfectly alright! Now hit CRTL+F, because we're going to search for where your CMORPH_PC file is listed in this mess.
Find it? Hooray!
Now copy the name of the STR2_PC file listed directly before your CMORPH_PC file name in that mess. That's the name of your corresponding file, and the one that we're going to edit! The file that went with "cm_lp35k_head_m_bonesmask_pc.cmorph_pc" turned out to be called "custmesh_1485826803".
Now head back over to your "customize_item" file and copy that STR2_PC file. Paste it in a new folder on your desktop. Now you have the next file that we're going to open!
Congratulations, you survived Step 2!!
Step 3: Opening the STR2_PC File
This step is a lot shorter than the last one, so relax.
Head back over to your Saints Row IV folder and open up the ThomasJepp.SaintsRow.ExtractPackfileGUI.exe tool again.
Navigate to that STR2_PC file you just copied, and open it up with the tool. Save it in the folder you made.
Congratulations, you've opened the STR2_PC file!
But you're not done yet... Rename the folder containing the unpacked STR2_PC file so it doesn't have ".str2_pc" at the end. For example, my extracted files were in a folder called "custmesh_1485826803.str2_pc" and I changed it to just "custmesh_1485826803". Don't change anything about the name except the removal of the ".str2_pc".
Step 4: Finally Finding the Texture File
Now we have one more level of files to extract. Sick of extracting files? Yeah, me too.
We need to download another tool to open the next file. You can find it here:
After you download the file, open the zip and save it in another new folder.
Now, copy two files from your "custmesh" folder you extracted in the last step. You'll need the one that ends in "cpeg_pc" and the one that ends in "gpeg_pc." Paste those bad boys into the folder with the tools you just saved. (To be clear, the cpeg_pc, and gpeg_pc, and exe files you just downloaded should all be in the same folder, right next to each other.)
We are going to extract the "cpeg_pc" file using the "SR3UnpackTextures" tool.
The difficult part here is that you can only use the SR3UnpackTextures tool through command prompt. Command prompt and I are not friends. It was just something I never ended up learning about. Here's what you need to do if you're command prompt impaired like I am:
Now, you finally have that elusive texture file!!
- Open the command prompt. Do this by starting the program "Run," and entering "cmd". This should result in that intimidating black command prompt box. If it helps, pretend you're a hacker in a cheesy movie and you're about to hack into the Pentagon.
- Navigate to the folder that contains the "SR3UnpackTextures" tool. Do this by typing "cd," a space, and then the name of the next folder up the chain. For example, I just needed to get to the folder on my desktop so it'd look a little something like this:
(My user name is my full name, so it has been whited out.)
Bonus: @arkayn suggests, "To get to the folder faster, you can also just type CD and then drag the folder into the command window."
- Now, to run the SR3UnpackTextures tool, type in "SR3UnpackTextures", a space, and the full name of your "cpeg_pc" file. Hit enter. The program should run and create two textures in the folder, and look something like this:
Step 5: Editing the Texture File
In case you're not familiar with the process of editing texture files, I'm including a short introduction on how to go about it. This will not be quite as thorough as the rest of the tutorial, as other excellent tutorials for editing textures already exist and are fairly easy to find.
The file format for Saints Row IV textures is known as DDS, and we can both open and edit it with some free software.
I recommend downloading GIMP, which is a free, open-source image manipulation program. Basically, it's ghetto Photoshop. I'm a big fan.
After downloading and installing GIMP, you will also need to install a plugin in order to open the DDS file format. Here's a link to the download: http://code.google.com/p/gimp-dds/
Alternatively, you could use Paint.NET for simpler edits. It's also free, and you don't need to download anything extra to open DDS files! http://www.getpaint.net/
So, now you can edit the two texture files. You may be wondering why there are two texture files if you have never edited textures before. Basically, one is the image used as the texture, and the other dictates how light interacts with the texture.
When you go to edit the texture, the colors might look silly, and not at all like something you'd use in the game. For example, this is what the Skeleton Mask looks like:
It turns out that this is how the game lets you choose item colors when you purchase it in a shop. So the bright green would be Color 1, and the blue would be Color 2, and anything else you make that color will follow that scheme. If you add any other colors to the texture, those will appear the same regardless of colors selected in the game. For example, if you added a black line anywhere on the Skull Mask texture, it would always show up black no matter the colors you pick while shopping.
Don't forget to flatten the image before saving it!
Step 6: Saving the Texture File
This is a step all by itself because it is super important! When saving the DDS file after you edit it, you must select the proper compression or it will not appear in the game. Compression options should appear as you save your DDS file. Here's what the compression options look like in GIMP:
If you're editing the texture files with the colors (diffuse map), compress using DXT1 format.
If you're editing the texture files with the colors (diffuse map) and you're using transparency or an alpha channel, use the DXT5 format.
If you're editing the texture that interacts with the lighting (normal map/bump map), then use the DXT5 format.
Step 7: Copy the ASM_PC File
Remember that "customize_item.asm_pc" file you had to open earlier to find your STR2_PC file? It's also the file that is going to let the game know you modded it.
If this is your first time modding anything from the customize_item packfile, copy and paste the "customize_item.asm_pc" file into your Saints Row IV program folder. It should be in the same place as the exe file that runs the game.
If there's already a copy there, then just leave it be. Don't overwrite it!
Step 8: Repacking the Texture File (Pt. 1)
Now that you've edited the texture file, it's time to get it back into the game! Basically, we're just doing most of the unpacking steps... but backwards.
First, we need to pack it back into the CPEG_PC file. To do this, take your edited textures and paste them into the folder where you extracted the textures earlier. Make sure they have the same names, and overwrite the old files.
Now, follow the same steps with the command prompt as you did with unpacking the textures... But this time, instead of SR3UnpackTextures, you want SR3RepackTextures. It should look something like this:
Now, your textures have been packed back into the CPEG_PC file!
Next you need to put your CPEG_PC and GPEG_PC files back in the right place. Copy and paste them back into your "custmesh" folder, overwriting the old ones. The "custmesh" folder should now contain all the parts that need to be packed into the "STR2_PC" file.
Step 9: Repacking the Texture File (Pt. 2)
Now, we're going to need one of those tools that you saved in your Saints Row IV folder earlier. Open up "ThomasJepp.SaintsRow.BuildPackfileGUI.exe".
It will now ask you to locate a few files. For "Source files," select your "custmesh" folder that you just updated. These are all the files that are going to be compressed back into an STR2_PC file.
Make sure you have "Update asm_pc?" checked off. Browse for and select the "Customize_Item.asm_pc" file that you copied into your Saints Row IV folder. This will ensure that the asm_pc file is updated as you repack your STR2_PC file.
Click on "Build."
The file should be saved right into your Saints Row IV folder. Its name should be the same as the folder you selected for compression. For example, mine was "custmesh_1485826803". Save type should be Streamed Packfile.
The program will now pack your files into an STR2_PC file and update the ASM_PC file to let it know you made changes.
If everything went right, your new texture should now appear in the game! Celebrate!
If you're not currently celebrating success, please consult Step 10.
(Optional) Step 10: Whoops, You Fucked Up
Did things not go as planned? Is your texture not showing up in the game? Well here's a list of important details to double check:
Still having trouble? Post your problem and I'm sure someone will help. Good luck!!
- Did you update your ASM_PC file?
- Did you save your texture files with the right compression?
- Did you put all your files back together correctly after you edited your texture? There should be no missing or extra files with the files you recompress.
- Did you rename any files? No names should be changed except the removal of the ".STR2_PC" from your "custmesh" file.
- Is your modded file saved in the right place? The ASM_PC file and final STR2_PC file should be in the same folder as your Saints Row IV exe file.
- Did you try to repack the Packfile? Because you shouldn't ever have to do this. Don't do it.
Not in the game files. You would have ti find a uv mapping that has similar aspects of what you are looking for. The n file for every clothing texture is what mostly shows where the predictive image is. It acts as a bump texture and specifies where the wrinkles and texturez should be. Extract some of my body mods for sriv and look at the default female diffuse file and it will give you a general idea as to where things will line up.Trying this for the first time. I'm editing the "Ooey Gooey" suit that I never use in the game. The challenge I'm having is predicting how changes on the DDS image will correspond to the actual game. For example, if I want to make a bikini-type top or something, I feel like I just have to keep doing guess and check in order to cover some parts of the body but not others. I have a general idea of where things will end up, but it's very imprecise.
Is there any sort of uvw body map like this or some other sort of body layout that could be pasted into Gimp as a guide when editing clothing?
That is because the ones that are whit work off a npc_ color_palette. Open the character.xtbl and sfter stream category, add a line like this:I've had some success in retexturing a character that is not Shaundi (trying to alter her makes the game crash, just like it did with SRTT). What's tripping me up is, some clothing that is clearly purple in game is white in the d.tga DDS files, and when I repaint, it shows up as black instead of the color I used.