Bayonetta Guide

Texture Modding Guide for UI/Menu Elements for Bayonetta

Texture Modding Guide for UI/Menu Elements

Overview

Learn how to extract, edit, and re-insert textures relating to the game’s user interface.

Introduction & Tools Needed

This guide will give you a step-by-step tutorial on how to extract, edit, and re-insert textures used in Bayonetta’s user interface. This will not cover editing textures for models, since the game uses a different method to store those textures and I’m not familiar with how to modify them.

What You’ll Need

  • CPK Tools (link in next section)
  • A hex editor
  • An image editor capable of editing .DDS files

Extraction

Step One: Extracting from CPK Files

All of Bayonetta’s textures are stored inside of .CPK files located within (Steam install directory)steamappscommonBayonettadata. Our first order of business is to extract the archives from these CPK files.

The easiest way to get access is to use the Alpha Localization Team CPK Tool, which you can find a link to here[s1.zetaboards.com], as well as a tutorial which explains editing the textures used for models.

The UI textures are stored in the data00 CPK files. There’s six of them, one for each language the game can be played in. From what I can tell, archives that didn’t need to be edited during the translation process were not included in the non-Japanese data00 files. So when looking for what you want to edit, check the CPK for your language first (for example, data00_us.cpk for English), and if it is not there check the Japanese data00, data00_jp.cpk, next.

Unpack the CPK you want using the CPK Tool. You can completely ignore it’s ‘Build CPK’ functionality, we don’t need it, and I’m not sure if it even works for Bayonetta.

Step Two: Extracting Textures from IDD Files

Inside of the CPK files will be many .idd files. These are collections of textures, and to be able to look at each texture individually, we will need to extract them manually.

Take the .idd you want to edit and open in a hex editor, if you don’t have one, I use HxD[mh-nexus.de]. For this example, I will be using core.idd, taken from data00_us.cpk.

Like I said, each IDD file contains multiple textures. The easiest way to locate each one is to search for the text string DDS. Each texture begins with DDS, and there is no padding between the textures so simply find an instance of DDS and copy from there, all the way until right before the next instance of DDS.

For example, the first texture in core.idd starts at 192000, and ends at 2E7FFF, right before the next instance of DDS, which is the start of the next texture. HxD has a handy shortcut to make selecting blocks of data like this very easy (Edit -> Select Block, or Ctrl+E).

After you have copied the block of data for the texture you want, copy it into a new file and save it with a .DDS extension. You’ll also want to make a note of some sort to remind you which .idd file this texture is from and at what offset it was located, this will be important when re-inserting later. I usually name the extracted textures “[name of idd file]_[offset].dds” to make life easier. In this example, I’d name it “core_192000.dds”.

Open your .DDS file up in the image editor of your choice, and you should see your texture. Here’s what core_192000 would look like if you extracted it correctly.

Editing & Re-insertion

Editing the Textures

I won’t be going into the nitty-gritty of how to edit the textures, but I will note that it is important to save them as DXT 5, as this is the same type of compression the vanilla textures use, from what I can gather.

Furthermore, your edited texture must be the same dimensions as the one you plan to replace. This likely won’t become a problem since Bayonetta’s textures on PC are already quite big to begin with.

Re-Inserting

Save your edited .DDS file somewhere and open it in your hex editor again. Select the entire file and copy it to the clipboard. Now, you will need to open the .idd file you got this texture from in a hex editor as well. We’ll be editing it, so you should probably make a copy of the .idd so you don’t have to re-extract it should you make any mistakes.

Go to the offset where you found the texture and Paste-Write it into the file over the old version. It’s important to Paste-Write (Ctrl+B in HxD) rather than Paste-Insert (Ctrl+V in HxD) since we don’t want to change the size of the .idd file. Once you’ve re-inserted your texture(s) into the .idd, save it and close it.

Thankfully Bayonetta will load stray .idd files in the install directory, if they are present, instead of the ones in the .cpk files, so there’s no need to re-make or edit the .cpks.

Go to (Steam install directory)steamappscommonBayonettadata and make a new folder called id. Inside of that you want to make another new folder with the language tag of the data00 cpk that the .idd is from. So if you got your .idd from data00_us.cpk, name this folder us. If you used the Japanese data00, name this folder jp, etc etc.

Now just place your edited .idd files in this new folder, and the game should load them in place of the vanilla ones!

tl;dr

1. Extract .idds from .cpk files
2. Find textures in .idd files using a hex editor and extract them (they all start with DDS)
3. Edit them, save them as DXT 5. They must be the same dimensions as the originals.
4. Re-insert them at the offset you found them
5. Put edited .idds in steamappscommonBayonettadataid(lanuage)

SteamSolo.com