Skip to content

Swapping costumes and characters using ED8 Inject

eArmada8 edited this page Oct 12, 2023 · 4 revisions

Swapping costumes and characters using ED8 Inject

The asset injector takes the name out of one .pkg file, and inserts it into another .pkg file (and also renames that file, while making backups.)

Swapping costumes

First, let's try swapping costumes! I want to replace Juna's default Thors outfit in CS3 (C_CHR011.pkg) with her Tennis outfit instead.

  1. Download and open the tbled editor by Lukas Himbert, and select your game (Schema Menu -> Use builtin schemas for ______). Open {Cold Steel Game Folder}/data/text/dat_en/t_name.tbl. Find your model. Here I can see I want "Juna" which is C_CHR011.pkg and "Juna: Tennis" which is C_CHR011_C04.pkg WARNING: t_name.tbl has major spoilers for each game - do not carelessly browse this file if you care about spoilers!

  1. (For NISA releases) Grab extract_pka.py and put it in {Cold Steel Game Folder}/data/asset/D3D11, and double-click it. Press enter when it asks you for the pka and it will default to assets.pka. Type in C_CHR011.pkg, and it will extract that package. Repeat, and extract C_CHR011_C04.pkg.

Note: You can also use the command line, which I recommend so that you can see error messages should they occur. Type:

python extract_pka.py assets.pka C_CHR011.pkg
python extract_pka.py assets.pka C_CHR011_C04.pkg

  1. For NISA CS4 and Reverie, you can do the injection directly in this folder. For NISA CS3, for some reason the game reads assets.pka from this folder, but all override .pkgs must be in {Cold Steel III Game Folder}/data/asset/D3D11_us. Put both .pkg files in that folder along with aa - inject model.py.

  2. Execute aa - inject model.py. It asks for the source .pkg, then it asks for the target .pkg. It will make a backup of the target, and then push the source into the target. Again, I recommend the command-line instead, although it is not required.

python aa_inject_model.py C_CHR011_C04 C_CHR011

If there is a backup of the source, it will always use the backup to inject. This means: 1. As long as you only use my tool instead of editing your own files, your original files are safe, 2. You can do easy swaps (inject A->B and then B->A will result in a swap, because it will always use the backup original of B to inject), and 3. You can restore the original model by injecting into itself (inject A->B and then B->B will restore B to original, because again it will always use the backup original of B to inject). It will never overwrite the first backup, so you can literally do A->B, C->B, D->B, and then B->B and you will still end up with B.

NOTE: The injector expects the target to already exist and will refuse to inject into a new file. This is for two reasons: 1. so that it can make a backup, and you won't be confused on re-injections, and 2. to prevent confusing you if you make a spelling mistake (since it wouldn't otherwise cause an error). So extract BOTH source and target, not just source. For CS3, keep your backups in D3D11_us as well so that you can inject back and forth.

  1. Check in-game, the costume should have been replaced!

Character swaps

  1. To do whole model swaps, the process is exactly the same, except you will want to replace name, default_face and face. Be careful, the model parts in face are often shared.

Here are the commands to swap name, default_face and face from Towa (C_CHR041) into Altina (C_CHR015)'s spot: (also the hat!)

python extract_pka.py assets.pka C_CHR015.pkg
python extract_pka.py assets.pka C_CHR015_FC1.pkg
python extract_pka.py assets.pka FC_CHR015.pkg
python extract_pka.py assets.pka C_CHR041.pkg
python extract_pka.py assets.pka C_CHR041_FC1.pkg
python extract_pka.py assets.pka FC_CHR041.pkg
python extract_pka.py assets.pka C_EQU0306.pkg
python extract_pka.py assets.pka C_EQU0307.pkg
python extract_pka.py assets.pka FC_CHR041.pkg
python aa_inject_model.py C_CHR041 C_CHR015
python aa_inject_model.py C_CHR041_FC1 C_CHR015_FC1
python aa_inject_model.py FC_CHR041 FC_CHR015
python aa_inject_model.py C_EQU306.pkg C_EQU307.pkg

Note: This seems to work best when the two characters have similar skeletons (which is usually similar height +/- gender). If you want to do more challenging swaps where the skeletons really do not match well, and the models are distorted, give customTRS a try.