Yakuza 0

Yakuza 0

232 ratings
Yakuza 0 modding info-dump
By Gonzo and 2 collaborators
A collection of info on how to unpack most of the game's files, edit the contents, and insert it back into the game. Not exactly a tutorial, more of an info-dump like the title says.
8
   
Award
Favorite
Favorited
Unfavorite
Introduction
NOTE: You can find more modding guides and info here[docs.google.com].You can also join our Yakuza Modding Community at https://discord.gg/nJgNaXu, where you can find more info, guides, mods and help. This guide is not updated often, so the best way to stay up to date is joining the Discord server. We mod all Yakuza games, not just Yakuza 0.



This guide is a collection of known info on how to modify certain aspects of the game and how to unpack its files, among other things.
It's not exactly a 100% complete tutorial, but it will hopefully help get you started on figuring out how to mod the game.
This won't cover any tweaks like the hidden config options, nor will it cover save editing.
I'll provide links and brief explanations on necessary tools, but it will not be a step-by-step tutorial as explained already. The majority of these tools will come with readme files and other documentation that you can refer to.
Not everything has been figured out yet, so you can expect to see updates to this guide in the future (hopefully).

I shouldn't need to tell you this, but BACKUP YOUR FILES. I don't take responsibility if you break your game, corrupt your save files, or lose your configs.

You can find your save files and configs here:

(steam install)\userdata\(your user ID)\638970\remote\

users\(your account)\appdata\roaming\Sega\Yakuza0

Model Swapping
First off, model swapping. This is one of the easiest aspects of the game to modify, as it simply requires copy and pasting.

Navigate to \Yakuza 0\media\data\chara\w64, and there you will see multiple folders.



Inside these will be more folders pertaining to each model, and for the most part are self explanatory except for two:
adv (Gameplay models), used in adventure/battles and some in-game cutscenes
auth (Cutscene models), used in the major cinematics and some in-game cutscenes
Before anything, I should point out that models of certain types have special skeletons that will crash the game unless you do one extra step. This includes most animals, females, cutscene models, etc. This step is quoted at the end of this section.

Go into a folder in adv\auth and it'll usually look like this. (this is kiryu_d_no_daimon, his rookie model before he gets his new real estate suit.)



While you can swap faces, the "mesh.par" is the most important part here. Copy this mesh file, and paste it into another model folder with the same file. Choose to replace it when prompted. You're done!

So for example if you wanted to replace rookie Kiryu's adventure model with Bob's model, go into adv \c_cm_BOB, copy the mesh file, then go to c_cm_kiryu_d_no_daimon and paste Bob's mesh in there. That Kiryu model should now look like this:



As a side note, Yakuza Kiwami and Ishin (mostly) assets are compatible here. If you have the upcoming port of Kiwami or the PS4 versions of both games, you can replace the mesh files in the same way for any of those games. 5 models have serious rigging issues and the other games tend to crash. Ishin models so far only work in cutscenes, attempts to use them in-game just crash.

MicroKnightmare on Steam found a method to swap skeletons:
Originally posted by MicroKnightmare:
Changing the skeleton via Hex Editing:

Step 1: Open Yakuza0.exe inside HxD.

Step 2: Find c_cm_bone using CTRL+F

Step 3: Change c_cm_bone to c_cw_bone

Step 3.5: If you want to change Kiryu or Majima into any other character with a different skeleton such as a cutscene character, change c_cm_bone to c_am_bone or c_aw_bone.

(Anything that is in the prefix of a character model's folder works. This includes prefixes such as cm, cw, am, aw, ag, etc.)

Step 4: DONE!

This eliminates the need for the chara/ps4 and ps4/adv folders! You still have to replace the model inside w64/adv, however.

Quick Note: The models that start with c_cw_CF cannot be put on Kiryu, for some odd reason. *FIXED

To get the Cat Fight models (c_cw_CF models) to work with Kiryu, you need to go open the mesh.par, find breast.bpb, and edit the HEX VALUES of that file into 00
So:
62 72 65 61 73 74 2E 62 70 62 -> 00 00 00 00 00 00 00 00 00 00

If you don't have a hex editor, go to the "Editing text strings" section of this guide.
.PAR Files
A majority of Yakuza 0's assets are packaged in .par files. To unpack these and poke around at what's inside, you'll need either:

QuickBMS and the PARC archives plugin[aluigi.altervista.org] (CTRL+F search on the page to find the plugin)
OR this "Gibbed.Yakuza0" tool on github[github.com]

To use QuickBMS:
Run the program after downloading both it and the plugin.
Select the plugin, then the PAR file you wish to extract from, and finally the folder it will output the files to.

To use Gibbed.Yakuza0: (copied from drogean3 on the /r/yakuzagames subreddit)
Extract to a folder somewhere and COPY the .PAR you want to extract to the same one.
Run a command prompt window and do "Gibbed.Yakuza0.Unpack.exe <parfilename.PAR>".
It will then create a folder with all the extracted files in that same location.

Now that you've messed around with the contents, you'll want to insert your edits for use in the game. To do this, you'll need:

PARC Archive Importer on github[github.com]

The github page's README[github.com] contains all the info you need on how to use it.
Once done, simply paste your edited PAR over the original and replace it.

You can also use Gibbed.Yakuza0 to pack the .PAR. Drag the unpacked folder with edits (make sure no files were deleted) onto the Gibbed.Yakuza0.Pack.exe and let it repack it. After that, rename and replace the original PAR with the edited one. With this method you can also add new files to the .PAR file.
.CPK Files
Yakuza 0 stores some of its audio in CPK files, located in \Yakuza 0\media\data\soundcpk.

To unpack any of the two files (bgm and se), you will need this tool:

CriPakTools on github[github.com]

It's a command line app, refer to the README for more information.

Repacking requires CriPackedFileMaker which is licensed software and cannot be distributed for free.

Here's info on repacking from Canzah on Steam:
Originally posted by Canzah:
Unfortunately repacking CPK is a bit of a complex process, especially in case of this game. The repacked archive must be repacked EXACTLY the same way as the original was, Y0 uses IDs instead of filenames for its CPK contents. EsperKnight's CriPakTools thankfully extracts the files properly, as IDs names without any extension so you need to use that to unpack it. The problem arises with repacking, you need to know the Data Align value, File Mode Type, whether directories need to be masked or not and whether all, none or just specific files need to be compressed.

If you have CRI Packed File Maker you can use it to open the original archive and use the "Show CPK file info" to get the info on Data Align and File Mode Type while you can see whether files are compressed or not simply by looking at the filelist of the opened archive in the program in the leftmost column that shows "UC" or "C" for Uncompressed and Compressed respectively.

Once you have all the necessary information you need to build a CSV table for repacking with list of all the files telling the program how to treat each of them, whether to compress them or not, what filename to give them and what ID to give them.
You can read up more on these in the program's User's Manual that comes with it.

Now that the theory is out of the way, I can make it easier for you by simply giving you an already created CSV table as well as necessary parameters for repacking.
First of all, here's the list - just save it as list.csv
https://pastebin.com/2qWH65e3
And the parameters for repacking are these:
cpkmakec.exe list.csv bgm.cpk -align=2048 -mode=ID

Make sure that all the numbered files, list.csv, cpkmakec.exe and its prerequisite cpkmaker.dll are in the same folder. Then just open command window in that folder (Shift+Right Click inside the folder -> Open command window here) and run the command above.

The audio files themselves are .hca files without the extension. Rename them and back them up somewhere for convenience (you can use command prompt to automate this, change the directory to where the files are and enter "ren *. *.hca").

You can playback the audio with this foobar2k component:
http://www.foobar2000.org/components/view/foo_input_vgmstream
.USM Files
Yakuza 0 stores its few pre-rendered videos in USM format. Find them in \Yakuza 0\media\data\movie_w64.

Use VGMToolBox to demux the video (take apart its individual components, like audio and video tracks), and Scaleform encoder to make a new USM video.

VGMToolBox on Sourceforge[sourceforge.net]

Scaleform is licensed software and cannot be distributed for free. However it's apparently no longer being sold as of July 2017... go figure.
Editing text strings with a hex editor (BIN_x, DAT and more files)
Yakuza 0's text and scripts are scattered across numerous files, almost all of which can be edited using any decent hex editor.

File types I've found are BIN_x, DAT, and MSG. There's probably some more which will be added eventually.

In this example I'll be editing explanation_main_scenario.bin_c, which is contained in \Yakuza 0\media\data\bootpar\boot.par (refer elsewhere in the guide on how to edit PAR files).

If you don't have a hex editor, I'm using HxD which can be downloaded here:

HxD website[mh-nexus.de]

A quick explanation of the bin_x files:
bin_c (Chinese), where most English text is stored. Why Chinese? The English localisation was developed on top of the game's Chinese version for whatever reason.
bin_j (Japanese), where most Japanese text is stored.
bin_k (Korean?), almost always blank and seemingly unused.

Use your hex editor to search and edit lines in whatever file you have open.



I haven't really tested this thoroughly, so I don't know if writing larger or shorter text will mess anything up. Just make sure you don't delete anything you're not supposed to.

Here's an example of a pause menu/idle explanation being edited to put something super dumb in it:



(it's just 'heads' replaced with 'nuttt' lmao)
Moveset Swapping
It's possible to swap the Kiryu/Majima movesets with pretty much all other movesets in the game, including bosses and colliseum opponents.

Movesets are located in Yakuza 0\media\data\fighter\fighter_command.cfc

Open the game .exe in a hex editor and search for the moveset you want to replace. The playable character movesets will look something like "p_kiryu_s". Replace this with the moveset you want (more details on what each one is named below). Save the .exe and try it out.



The modding channel on this Discord guild has a pinned reference for all of the moveset names, check here for the latest info.
https://discordapp.com/invite/s7Wxxwf

Interior Swapping
It's possible to swap any interior in the game with another one.

You can find all the interior names in Yakuza0/Media/data/stage folder.

Open the game's .exe in a hex editor (such as HxD) and search for an interior you want to replace, for example if you wish to replace the karaoke place in Kamurocho, search for st_k_karaoke.

Replace it with the interior you want to have. If the new interior's name is shorter, then just zero the unnecessary part, as seen above.

You can swap any interior, including cutscene only interiors.

Texture Editing
Most of the game's textures are .dds files, which can be easily edited. drogean3 on reddit made a great guide for this, so I'll just link that here.

Photoshop or GIMP with a DDS plugin will be required, or any other DDS related tools.

[PC Mod] Modding Guide on the YakuzaGames subreddit
Viewing models with Noesis
The tool Noesis seems to support Yakuza 0's models, but I haven't tested this much myself. You'll need to unpack them with the QuickBMS plugin from above, of course.

Noesis' website[www.richwhitehouse.com]
ReShade
Straight from their website:
"ReShade is an advanced, fully generic post-processing injector for games and video software developed by crosire. Imagine your favorite game with ambient occlusion, real depth of field effects, color correction and more ... ReShade exposes an automated and generic way to access both frame color and depth information and all the tools to make it happen."

ReShade's website[reshade.me]

Basically, it's a shader injector you can use to change the way the game looks. NoSkills on Steam wrote a guide on it for Yakuza 0 so I'll link that here:

https://steamcommunity.com/sharedfiles/filedetails/?id=1463117297
Conclusion, Credits, and Related Stuff
This guide will likely be updated later as new things are found, so keep on the lookout. Again, it's not a 100% detailed simple tutorial for everything, it's just a collection of info to make things slightly easier for people. Feel free to comment your findings below or talk with us on the Subsidiary Discord and the modding Discord (please be nice and check the rules, also make good use of the search feature). Also feel free to yell at me if I made a mistake or could add something to the guide to make it better.

Credit goes to:
drogean3 on Reddit, who I took a brief bit of text from for this guide (and wrote the texture editing guide that I linked to here)
NoSkills on Steam for writing the ReShade guide I also linked to
MicroKnightmare on Steam for posting the female model swap method quoted here
[LSSAH]Canzah on Steam for posting info on how to properly repack the game's CPK files, check out his patch below that restores the original version's licensed opening and credits music

The folks at the Subsidiary Discord, for finding stuff and helping out.
https://discord.gg/yJnGZfM

The guys at the Yakuza Modding Community Discord, who also found a heap of new info.
https://discordapp.com/invite/s7Wxxwf

And Sega, for being cool.

Related guides/mods that you might find useful
https://steamcommunity.com/sharedfiles/filedetails/?id=1461661165
https://steamcommunity.com/sharedfiles/filedetails/?id=1461732841
LODMod by Havoc, fixes the wonky LOD distance in the game for now https://steamcommunity.com/app/638970/discussions/0/1743343017611794579/

Todo:
-add more stuff on criware audio files

(this will probably look better later)
50 Comments
CPU-S Feb 1 @ 2:53pm 
Any way I can mod the terminology for the Mahjong mini-game in this game?
I noticed that the terminology they used in the PC version is completely different from the PS4 and Xbox version, and the PC used the chinese terminology instead. I'm more familiar with the Japanese terminology (like in Yakuza Kiwami 1), so how do I do that?
Boleslau Sep 29, 2024 @ 7:58pm 
Ok so, I may be in a impossible mission there but like Senator Armstrong once said: "I have a DREAM!" That is, to make Yakuza 0 or any Yakuza title from Yakuza series multiplayer co-op, either local or online. I dont know a damn about programming, but I really wanna make it happen. If someone here can give me a advice or a clue to a starting point I will be very happy.
And obviously Im talking about a REAL multiplayer coop, not the goof ahh minigames wich I always lose
kaz Mar 7, 2024 @ 1:05pm 
How do i swap MesuKing stage from Kiwami with Catfight stage from 0?
Parllax Feb 18, 2024 @ 8:16pm 
How to change the image in Bakamitai? The model is so easy in compare in find the file?
jbponce Nov 8, 2023 @ 3:59am 
how do you implement .btl mod files? it seems like i cannot find a way to install this mod
http://store.steampowered.com
GiviCarbone03 Jul 18, 2023 @ 8:41am 
Are Y0 mods compatible with Y Kiwami 1?
Jadus May 12, 2023 @ 1:24pm 
For anyone who scrolls down here, i'm a modder myself and Most of these methods like moveset swapping are long outdated and have better ways. I'd suggest joining the modding discord and asking for help there. Hell feel free to ping me if it's movesets specifically you want help with
https://discord.gg/yakuzamodding
brent917 Apr 14, 2023 @ 1:52am 
How would one go about changing the style icons?
Carlos Drugman Jul 11, 2022 @ 6:54am 
i still don't understand the skeleton changing thing...
SirIzalot Mar 30, 2022 @ 6:29am 
[quote] You can playback the audio with this foobar2k component:
http://www.foobar2000.org/components/view/foo_input_vgmstream [/quote]
Link's dead.