Transferring a costume from one character to another - eArmada8/Ys8_IT3 GitHub Wiki
Transferring a costume from one character to another
Tutorial time! Today let's give Dana a Thors Branch Campus uniform. In this tutorial, I will use the Ys VIII modding toolset to take the uniform from Juna, and give it to Dana. This tutorial will use automatic weight transfer. This is a longer tutorial, but it's worth your time to try it, as we will cover a lot of ground!
NOTE: This tutorial has now been updated for v1.1.0. Material data is now stored in a file called material_metadata.json, so keeping the order of the meshes is no longer important for the most part. .material files generated by ys8_gltf_to_meshes.py can be directly used.
You want to know how to get a model into Blender and through the compilation process in the first place. Please try this tutorial at least once, then come back.
Please understand that this is an advanced skill and you should already know how to use Blender and make basic modifications; I recommend also learning how to make basic texture modifications although this is not strictly needed. Also, I highly recommend understanding the basics of skeletal animation and weight transfer, or parts of this tutorial will seem like black magic and troubleshooting will be difficult. If you've never watched "3DMigoto Costume Mod Tutorial for Fairy Tail (PC)" by Ikaros, watch it.
NOTE: This tutorial relies on performing every step correctly. Be sure to save often. I recommend saving into a new .blend file every major section or so, because Blender's undo history does not go back very far when working on big projects like this.
Importing the models
For this tutorial, I am going to use Dana's Tropic Swimwear DLC outfit c005y.it3 as my recipient model, as she has enough of an intact body in this outfit that I can simply transfer the clothes that I want. Run both python ys8_it3_export_assets.py c005y.it3
and python ys8_it3_to_basic_gltf.py c005y.it3
to obtain the base working folder with meshes / textures, and c005y.gltf, respectively.
Optional but encouraged: Download texconv.exe
from here. Copy it into your c005y/textures/
folder and run texconv.exe -r *.dds -ft png -y
. Move all the .png files that texconv created into a new folder /textures/
which should be a subdirectory off the folder where your .it3 and .gltf files are (not /c005y/textures
).
Import c005y.gltf into Blender.
If you did the optional step, you should be able to see Dana with textures by selecting "Material Preview" in Viewport Shading (the third of four sphere icons) from the top right corner of the 3D viewport. This will make editing and sculpting easier, but is not necessary. Here you can see I've hidden the skeleton and most nodes, as well as her fishing rod (by clicking the eye icon on those objects in the Outliner).
Hide all of Dana for now.
Next, I'm going to obtain and import my donor model, Juna's Thors uniform (C_CHR011.pkg). Obtain and decompile the model from CS3, CS4 or Reverie. Import chr011.glb into Blender. (I am not going to go over how to make Cold Steel models show textures, see my relevant tutorials on that wiki if you are using Cold Steel models.)
Note: It is important that you always import the recipient model before you import the donor model.
Here I have hidden the skeleton and nodes for Juna, so I can evaluate her meshes. I can see I only need to keep polySurface3915_00
, polySurface3915_01
, polySurface3915_03
, and polySurface3915_10
, so I will delete the other meshes by selecting them in the Outliner, right-mouse-clicking, and selected Delete Hierarchy.
Note: Depending on the donor model you are using, all the meshes (technically submeshes) may be joined into a single mesh. In this case, you will need to separate them before you can delete parts. I go over this later in the tutorial here.
Select all the remaining meshes in Object Mode and join them together (Object menu -> Join).
Note: The techniques used in this tutorial rely on every submesh having its own unique material, so we can easily separate the submeshes back into individual meshes later. If you are using glTF models from my Ys8, Cold Steel or Daybreak tools, this will already be done for you. Otherwise assign them in the Shading workspace.
Scaling and posing the donor meshes
Unhide Juna's entire model including her VisualSceneNode
and her skeleton. Unhide Dana's main mesh (but keep her skeleton hidden so you are not confused).
Select VisualSceneNode
in Object Mode, and scale her model (Object Menu -> Transform -> Scale) to Dana's size. Use the shoulders and neck as a guide.
At this point, I noticed a problem with Juna's model (actually we've know about this a loooong time ago) - Juna's skirt looks distorted, because her skeleton is not properly in the resting bind pose in C_CHR011.pkg.
Select up_point (the Armature), and go into Pose Mode. Select all the bones (Select Menu -> All). All the bones should now be outlined in blue. (If they are all outlined in orange, you are in the wrong mode.)
Clear the transforms. (Pose menu -> Clear Transforms -> All) Her skirt should have returned to normal.
Now we will apply a pose to Juna's outfit so that it matches Dana's body. We need to rotate her shoulders upward (abduction) first. (Unintuitively, the nodes we will rotate are LeftArm
and RightArm
.)
First, turn on X-axis Mirror in the Pose Options in the upper right (The little X icon is a shortcut you can click).
Select LeftArm
by clicking it either in the 3D Viewport or in the Outliner.
Select the Rotate tool (Press Shift-Spacebar followed by R, or select the tool from the toolbar on the left). You should see 4 circles surrounding the joint. Put your mouse over the green circle (X-axis) and clicking/dragging, which will let you rotate the mesh. If Blender is able to detect the model symmetry, you should see both arms rise at once.
Note: You might notice in my screenshot above that only one arm is raising... That's because I literally discovered X-axis Mirror as I'm writing this. BUT it is useful to know how to do precise movements when the mirror doesn't work. Whenever you perform any sort of transforms (translate aka move, rotate, scale), you'll see the degree of movement in the upper left. You can type in how much you want to move. For example, in this case, I would type -16.8 degrees on the left and 16.8 degrees on the right to have perfectly symmetrical movements. This is also very useful for transferring multiple costumes, as you can repeat the same movements across multiple models without having to measure repetitively.
You will notice when viewing from the side that Juna's body is also too far forward (on the Z axis). Let's move her body backwards. To view the body perfectly from the side, we can use one of the 2D presets. Press Ctrl-Numpad3, or click on the -X red bubble in the upper right corner of the 3D Viewport.
Select the Root
bone. Select the Move tool (Press Shift-Spacebar followed by G, or select the tool from the toolbar on the left). This time you should see 3 arrows (actually only 2 since you are viewing in 2D mode). Pull the model backwards along the Z axis by clicking and dragging the green arrow.
Note: Here I'm using the mid-torso and waistline as a guide. Since the body shape is different, there is no perfect position, but I chose a position that will minimize sculpting. I do not plan to transfer the thigh holster so I ignored it (but of course you can transfer that detail if you like) and I also ignored the boots because we will move those separately later.
The costume is now ready to be separated from Juna's model.
Go back into Object mode, and select the mesh (it will be polySurface3915_00
or whichever one you joined all the submeshes into). Separate it from Juna's node tree (Object menu -> Parent -> Clear and Keep Transformation).
Apply the pose transforms. Go into Modifier Properties (the blue wrench icon) on the side bar, and you should see an Armature modifier already there. Apply the transform (Ctrl-A, or select Apply from the dropdown menu).
You can now delete whatever remains of Juna's model. Select VisualSceneNode in the Outliner, right-mouse-click, and select Delete Hierarchy.
Finally, apply the scale we originally set at the beginning of this section (Object menu -> Apply -> Scale).
Preparing the recipient model for weight transfer
Before we go on to sculpting the costume, we will prep Dana by removing her bikini, skirt and tails. We also need a combined body model specifically for weight transfer. Hide Juna's mesh for now.
Select Dana's body mesh c005y_mesh
, and go into Edit Mode. (You can press Tab to quickly switch back-and-forth between Edit Mode and whatever mode you happen to be in). Her entire mesh should already be selected, but just in case, select everything (Select Menu -> All). Everything should be glowing orange.
Separate her mesh into all its submeshes. (Mesh menu -> Separate -> By Material)
Blender will have separated the mesh in to all of its component submeshes, now named c005y_mesh
, c005y_mesh.001
, c005y_mesh.002
, c005y_mesh.003
, etc. For some unknown reason, c005y_mesh.001
is the first submesh, and c005y_mesh
is the last submesh. You can verify this by opening c005y_mesh_00.vb
which will correspond to c005y_mesh.001
, c005y_mesh_01.vb
is c005y_mesh.002
, and so on.
To prevent us from having to rename a whole bunch of files later, rename c005y_mesh
to c005y_mesh.007
now to remind ourselves of the final order of the submeshes. (In most cases this is optional, but for reasons of alpha blending, keeping the original order is useful.)
First, let's make a copy of her body without the skirt, jewelry, etc, for weight transfer. We need as close to a base body as we can get, and we do not want her hair. The combination of 1,5,6,7 looks suitable (we can remove the hair ties for better transfer). Select all 4 submeshes and duplicate (Shift-D, or Object menu -> Duplicate). Press Esc when the duplicates appear so that they do not move.
Join the duplicates into a single mesh (Object menu -> Join). Rename that mesh "body_for_weighting" or whatever you like.
In edit mode, select the hair ties and delete them. (If you did not hide the original submeshes 1,5,6,7, you might be confused to see that the hair ties did not disappear when you deleted them, but that's because you only deleted them from the weighting model, not the original model.)
Go ahead and hide the weighting model. Now we can work on the actual recipient model submeshes. I'm going to remove her swimsuit and tails. Select submeshes 1,2,4 and go into edit mode. Select the faces we do not need and delete.
Sculpting the donor meshes
Now we can return to Juna's mesh. Unhide her mesh, and select it in Object Mode. Go into Sculpting Mode.
Note: I find it is easiest to select Sculpting Mode from the 3D Viewport in the Layout Workspace, where we have been the entire time. But there is also a Sculpting workspace, which you can try. This is not very different from Sculpting Mode in the Layout Workspace, but I personally find it confusing to use two different workspaces and I also find the sculpting workspace has some strange default settings that I personally do not like.
Select the Elastic Deform tool (Press Shift-Spacebar followed by 8, or select the tool from the toolbar on the left).
Turn on X-axis Mirror in the upper right, and right click the viewport to set the options. I like Auto-Smooth set to 0.5, and Normal Weight set to 0.75 - this makes sculpting very easy as Blender will push and pull along the trajectories of the vertices. I generally start with a radius of 50-100, with 100 for big movements and 50 for fine shaping.
Click and drag on the mesh to shape it to Dana. This is not meant to be a tutorial on Blender itself, so please check out tutorials on Youtube such as this one or elsewhere, but you can see the effect of the tool here.
Do not attempt to do everything with Sculpt mode; you often will want to use Edit mode as well. For example, the boots are really off-position, and trying to sculpt them into position will result in horrible deformities. Go into Edit Mode, select the boots, and move them using the Move tool.
To move the boots forward on the Z axis, you can move them together.
To move the boots outward on the X axis, you will need to move them separately. You can try to use X-axis Mirror, but I found it did not work because the boots are not perfectly symmetrical. Instead, I moved them individually using typed values (0.015 and -0.015) to match the movements perfectly.
I used the ankles to determine the best location, even though I plan to delete her original feet. This is for weight transfer - I want her boots to properly animate with normal flexion and extension of her ankle! Once they are roughly in the correct location, I used Elastic Deform to shape the top of her boots.
Delete the feet and shoes from Dana's meshes, as you do not need them anymore. (Be sure not to delete them from your body for weight transfer though!) Optional: You may also want to delete parts of Dana's body that are hidden by the shirt, since they are not necessary and may clip through the clothing.
Finally, I also deleted the thigh holster. As I stated before, this was a personal choice (I don't want her to look just like Juna) but you can keep it if you want.
Transferring vertex color properties
As far as I know, Blender does not allow you to see or directly edit the secondary vertex colors, so this step may be a bit unintuitive. Ys VIII / IX models have two vertex colors, and Cold Steel models have none. More annoyingly, Ys VIII uses those colors for a very specific purpose related to model lighting. Vertex colors does not seem to be very standardized in general in DirectX 11 games; for example in Atelier games (Gust, KT engine) games, the vertex colors define model outlines.
Unfortunately, when directly transferring the meshes in Blender, Blender will assign white (neutral) to both vertex colors, but the secondary color must be black or the lighting will destroy the meshes. This is what would happen if we skip this step:
Fortunately, fixing this is easy. We will transfer the colors from one of Dana's native meshes to the uniform. This mainly works because every vertex in a costume mesh is exactly the same (opaque white on color 0, opaque black on color 1).
Select the uniform mesh in Object Mode. Go into Modifier Properties (the blue wrench icon) on the side bar, click Add Modifier, and click Data Transfer.
Match the settings below. Source should be one of the submeshes from Dana's primary mesh (c005y_mesh
), keep mix mode on Replace, select Face Corner Data, select Colors, make sure under Colors that layer selection is All Layers and mapping is By Name. The Mapping does not matter in this case, because as we noted earlier, every single vertex has the same color combination (white/black).
Be sure to apply the modifier (Ctrl-A, or select Apply from the dropdown menu).
Transferring vertex weight groups
Before we can join the uniform to Dana's model, we need to add vertex weighting. The weight paint is a set of numbers used by the game engine to know how to move the mesh in 3D space. For example, if a vertex at the base of the neck has weights of 80% chest and 20% neck, then its position in space and motion will be 80% determined by the movement of the chest node and 20% by the neck node.
Note: You do not necessarily need to understand how 3D skeletal animation works, per se, but it may be easier to troubleshoot later when the model doesn't move as you like. I recommend watching videos on skeletal rigging and weight painting if you find the model distorts more than you like.
Note: Also, this tutorial will use automatic weight transfer. I recommend manual weight transfer any time you are moving assets within the same game, like Laxia to Dana or something like that. See this spoiler-free tutorial from Trails to Daybreak.
First, remove all the prior weight data from Cold Steel. Object Data Properties (the upside down green triangle icon) on the side bar, vertex groups, and select Delete All Groups.
Unhide the body_for_weighting
mesh. Select the uniform mesh and go into weight painting mode. Click on body for weighting, and it should show up outlined in red. Your outliner should look like this, with body_for_weighting
in red and the caliper icon next to the uniform mesh polySurface3915
, indicating the weights will go from body_for_weighting
to polySurface3915
. (Ignore that I have only one c005y_mesh mesh, I had to go back to take this screenshot.)
Transfer weights (Weights menu -> Transfer Weights). In the lower left corner of the workspace, there should be a new option menu that says > Transfer Mesh Data
. Click on the > symbol to expand it. Set Source Layers to "By Name", Destination Layers to "All Layers", and Vertex Mapping to "Nearest Face Interpolated."
The costume is now weighted! Optional: I highly recommend a quick look through the model's vertex groups to evaluate its weighting.
Merging the models
We now need to combine all the submeshes into a single mesh. All of these submeshes will share a single node, with a single shader and a single bone palette. (The bone palette tells the GPU which nodes the vertices in the mesh will use for animation. If the list is wrong, then the model will be horribly distorted because the GPU will move the vertices incorrectly when attempting to animate the model.)
First, remember how we renamed c005y_mesh
to c005y_mesh.007
? This is because we will need to assign materials, and it is useful to retain the original order. As you can see, on the left are the materials as they were extracted from the .it3 by ys8_it3_export_assets.py. On the right, the list of the submeshes with their assigned materials in Blender.
We now need to combine all the submeshes that we had separated. Click c005y_mesh.001
in the Outliner, then Shift-click on c005y_mesh.007
. All the meshes should be selected now, with c005y_mesh.001
highlighted in orange. Press Ctrl-J on the workspace to merge the objects.
OPTIONAL: All the materials should be in the correct order, but if not, you can use "Move Material" in the Materials Properties tab to restore the correct order.
NOTE: The order is generally not important, but in certain circumstances it is important because materials are drawn in order, and thus transparent materials must be drawn after solid materials. If you are unsure, restore the original order by using Move Material.
Next, rename c005y_mesh.001
back to c005y_mesh
. Rename both the node and its mesh (the two red circles). Notice, the seven materials are present and in order, signifying that the seven submeshes are still assembled in order.
Finally, it is time merge the Thors costume mesh to Dana's main mesh. (Check yourself - did you transfer vertex colors, delete the old weights, and transfer new weights?) Select the uniform, then select Dana's main mesh c005y_mesh
, then join the two.
Be very careful with the order here! Merging A->B is NOT the same as B->A! When you are done, polySurface3915_00
should be gone and c005y_mesh
should remain!
Note: It is still possible to undo and redo some of the steps above, for example if you forgot to transfer vertex colors or if you need to fine-tune your sculpting. Simply select your mesh, go into Edit Mode, select everything, and separate by materials. Your mesh should come back apart into all its components, allowing you to make adjustments. If you need to sculpt the uniform, separate the big mesh, merge all the uniform submeshes, then sculpt.
Extracting the model and assigning materials
Next, we will export our model back to glTF; the remainder of the work will not be in Blender. (Check yourself - did you delete all your remaining donor meshes and nodes? Nothing should be left in the outliner other than Dana's model. For sure there should only be one root object in the Outliner!)
Export the model as a .glb (or .gltf). Under Import options, be sure to check +Y Up and turn on Tangent export. (You may remember that Ys VIII/IX uses +Z up - but my script re-orients the axes so +Y up is the correct option! Be sure to use a new filename - here I am using untitled.glb
.
Run python ys8_gltf_to_meshes.py untitled.glb
to extract all the mesh assets from the .glb file.
For this mod, we will only copy the c005y_mesh
files. There is no reason to copy over parts of the model we are not changing (for example the hair, eyes, fishing pole, hit boxes, etc). The files we copy over can be used without modification, but we need to apply materials. If you open the material files, you will find nothing except a name. They are pointers, and the materials they point to are in materials_metadata.json
in the model work folder.
Creating new materials and textures
All of the original materials, for example n_c005y_base
, can be used without modification. For the final four, c005y_mesh_07
through c005y_mesh_10
- these are the new submeshes from Juna. We will need to create new materials for them.
First, let's take care of the textures themselves. Notice for the body shader, textures require both a color texture (the primary texture, outlined in a red square) and a dark greyscale texture outlined with a red circle (emission texture??). Cold Steel does not use the dark texture, so we will need to make those.
We need to figure out which textures that we need. Look in the Shading workspace, and click on each individual material in the Outliner. Notice here for chr011_kinzoku_collada-Skinned
(used for c005y_mesh_07
), in the "BASE COLOR" node, that the material uses chr011_02_conv.dds
. Also notice that the material uses "Ping Pong" (MIRRORED_REPEAT) on the X-axis, and "Wrap" (REPEAT) on the Y-axis - we will need this for later.
Open chr011_02_conv.dds
, and save it as a new .dds file. I named it p005x2.dds
as Ys VIII does not seem to like long filenames for some reason. Use these settings: BC7 UNORM (Linear, not sRBG) format, without mipmaps.
To create the dark texture, first remove color (Adjustment menu -> Black and White, or Ctrl-Shift-G). Then adjust the levels (Adjustment menu -> Levels, or Ctrl-L). Two settings that have worked for me include:
- Setting Output white point to 100, all other settings the same
- Setting Output grey point to 1.80, all other settings the same
Save the dark texture as p005x2s.dds
. Looking through the three other materials, two others also use chr011_02_conv.dds
but chr011_zubon_collada-Skinned
uses chr011_03_conv.dds
. Repeat the steps above with chr011_03_conv.dds
, saving the color textures as p005x3.dds
and the dark texture as p005x3s.dds
. Copy all four of your new textures into c005y/textures/
.
Finally, we will need to create new entries in materials_metadata.json
to point the submeshes to the textures. I copied n_c005y0af
to use as a base. I changed the first texture and last texture to p005x2.dds
and p005x2s.dds
for chr011_kinzoku_collada-Skinned
, chr011_uwagi_collada-Skinned
and chr011_monyou-Skinned
, and p005x3.dds
and p005x3s.dds
for chr011_zubon_collada-Skinned
. For those textures I changed the flags to [1,0,2,0]
. The first two numbers are always 1 and 0; the second two numbers correspond to MIRRORED_REPEAT on the X-axis and REPEAT on the Y-axis which match the materials in Blender.
Here is a full copy of the chr011_kinzoku_collada-Skinned
material for your reference:
"chr011_kinzoku_collada-Skinned": {
"MATM_flags": 65793,
"MATE_flags": 65793,
"unk0": [
92,
0,
1,
0,
1,
3,
0
],
"parameters": [
[
0.8820000290870667,
0.637255847454071,
0.5018579959869385,
2.0
],
[
0.0,
0.0,
0.0,
0.0
],
[
0.0,
0.0,
0.0,
0.0
],
[
0.0,
1.0,
1.0,
1.0
]
],
"textures": [
{
"name": "p005x2",
"flags": [
1,
0,
2,
0
]
},
{
"name": "ch_t_00b",
"flags": [
1,
0,
1,
1
]
},
{
"name": "ch_g_00",
"flags": [
1,
0,
1,
1
]
},
{
"name": "p005x2s",
"flags": [
1,
0,
2,
0
]
}
]
},
Only the name and the first and fourth textures are changed, everything else is identical to n_c005y0af
.
Note: You can use an identical .material file with identical names for c005y_mesh_07
, c005y_mesh_08
and c005y_mesh_10
if you want - the import script will be smart enough to import the material only once and link all three submeshes to it.
Now, copy all the c005y_mesh
files from /untitled/meshes/
over to /c005y/meshes/
.
Be sure to include c005y_mesh.bonemap
as well. This is a file that tells the import script to generate a new bonemap (the .bonemap file is in JSON format, identical to the .vgmap files). All your c005y_mesh
submeshes are using this new map (written by Blender).
You will notice in /c005y/meshes/
that there is also a file called c005y_mesh.rty2
that was not in /untitled/meshes/
. This file is generated by ys8_it3_export_assets.py, and contains the shader assignment. We don't need to change anything in this file (as of the current version of this tutorial anyway, which unfortunately leaves out the Thors emblem because that uses a secondary UV - maybe one day I'll come back to update this if I find a solution).
Repacking the model and testing in-game
With all the new meshes and textures in place, we can finally pack the model to test! Remember, we replaced only c005y_mesh
and inserted 4 textures; the rest of the /c005y
folder is untouched. If you like, you can delete the c005_emb_mesh
mesh, but it won't be visible anyway.
Run python ys8_it3_import_assets.py c005y.it3
.
The script will make a backup of c005y.it3, and spit out a new c005y.it3. Later we will create a proper new DLC, but for now, rename that file c005_p.it3. Backup the original {Ys VIII folder}/chr/pc/c005_p.it3
then replace it with the new file we just made. Load up Ys VIII, and if all goes well, Dana's default costume will have been replaced with the new custom model!
Creating a new costume DLC item
Replacing costumes works fine, but it is nicer to create a new item. Let's create a new custom DLC item that can be activated from within the menu. These instructions were written with Ys VIII but Ys IX instructions will also be placed in-line.
We will need 2 tools for this, YsVIII-tools by yosh778 and Septluxian Scope by Kyuuhachi.
Additionally, (for the Steam version only, not the GOG version), we will need to defeat the protection against custom DLC in Ys VIII. Back up ys8.exe, then load it into a hex editor such as HxD. Search for the following hex sequence: 0F 84 B8 00 00 00 89 5C
(there should be only one such sequence in the entire executable). Change 0F 84 B8 00 00 00 89 5C
to 90 90 90 90 90 90 89 5C
, and save.
Note: If you are using the DLC unlocker mod from Nexus, then you already have the modified ys8.exe.
No such modification is needed for Ys IX (ys9.exe).
We will need two item IDs, and a DLC ID. First, let's obtain the item IDs. Open up {Ys VIII folder}/text/en/item.csv
. You will see all the item entries.
For Ys IX, open
{Ys IX folder}/text_en/item.csv
. Note that while it is possible to edit Ys VIII's item.csv and see the changes reflected in-game, Ys IX actually uses item.tbb which is the compiled binary form of item.csv. I have not checked but it is possible that Ys IX's item.csv is not fully accurate to item.tbb.
These items say DLC, but they are already in use by assigned DLC (well, most of them).
Here are some truly empty item IDs. They are scattered all over the table. We will use 831 and 832. 831 will be our Costume item ID, and 832 will be our consumable DLC item. (832 will appear in the DLC menu, and when the player uses that item, our DLC will give them the 831 costume item.)
Next, we need a DLC ID, and we also need a template DLC. Here in {Ys VIII folder}/dlc
we can see all the DLC, which are named YS08JPDLC00Nxxxx
. We need a new Nxxxx number, I will use N0032 for my example mod.
For Ys IX, the DLC are located in
{Ys IX folder}/debug/dlc_us
, or{Ys IX folder}/debug/dlc
if you are playing in the Japanese language.
We also need a sample folder to work from. I will copy YS08JPDLC00N0000
to use. Copy that folder into a temporary work folder. Rename it to your new DLC ID, in my case YS08JPDLC00N0032
First, notice this folder has three folders, en
, fr
and jp
. We will deal with those last. Next, there is an init.txt
. Delete that file, we do not need it.
For Ys IX, instead of three folders, the init.txt files are in the base folder, named
init.txt
for Japanese,init_en.txt
for English, andinit_fr.txt
for Japanese.
We will work on the dlc.xai
next. These steps will seem a bit funny, but YsVIII-tools is not capable of truly unpacking and repacking these files in a way that the game will accept, so we need to preserve the header of the original file.
Rename dlc.xai
to original_dlc.xai
. Load it into your hex editor (HxD or other). Find the .it3 filename.
Change it to a new unique name, I'm choosing c005d.it3. Be sure not to change the string length or you risk corrupting the archive!
From YsVIII-tools, put xai.exe and unxai.exe in the folder with dlc.xai. Run unxai.exe original_dlc.xai dlc
and it will dump the files into a folder called dlc.
Inside the dlc folder, there are 3 folders, chr/pc/
, script
and text
.
For Ys IX, depending on which file you are modifying, instead of three folders, there are four. In the English / French DLC file, there is a
script
andscript_fr
. In the Japanese DLC, there is ascript
folder only.
First, the easy thing. Delete /dlc/chr/pc/c005d.it3
which is Adol in Silver Armor (remember we changed the name with hex editing). Rename the c005y.it3
file that we made (which we first renamed to c005_p.it3
for testing), which is the true Dana in Thors Uniform model, and put it in /dlc/chr/pc/
.
Next, edit dlc/text/eqpath.txt
. You can see it binds item 330 (the Silver Armor) to c000f.it3
, when item 330 is equipped by Adol.
Let's change it to bind item 831 (our new costume) to c005d.it3
, when equipped by Dana. (Her name must be in upper case. All the names are defined specifically in {Ys VIII folder}/inc/mons.h
.)
For Ys IX, know that
mons.h
uses true names, not Monstrum names. The true names are spoilers, although I would think that anyone making DLC costumes for a character would have gotten far enough into the game to know the true name of that character.
Extract Septluxian Scope into a working directory somewhere. Copy dlc/scripts/item_dlc.bin
to your Septluxian Scope directory. Run python main item_dlc.bin
and it will decode the script into a file called item_dlc.7l.
Edit item_dlc.7l. You will see a function that consumes the DLC item 840 and grants the item 330.
Replace the two locations with item 840 with our new DLC item 832, and the two locations with item 330 with our new costume item, 831. If you like, you can also replace the messages, as I have here.
Run python main.py item_dlc.7l
and Septluxian Scope will compile the script back into binary form (item_dlc.bin). Copy item_dlc.bin back into dlc/scripts/
, overwriting the original.
For Ys IX, also replace the file in
dlc/scripts_fr/
.
The xai file is ready to be repackaged. Run xai.exe dlc dlc.xai original_dlc.xai
, which will repack the dlc
folder into dlc.xai
and copy the functioning header from original_dlc.xai
into the new archive.
You can delete original_dlc.xai at this point.
Finally, let's edit YS08JPDLC00N0032/en/init.txt
We need to edit all the red boxes (item number, item name, effect description, item description, equip restriction, DLC ID). Also notice that there is a call to the script we modified, item_dlc:it_get_dlc00
- we do not need to modify this because we did not change the name of the function.
Note: Take care with this file! 99% of my non-working DLC headaches have been issues with init.txt.
Here is my modified init.txt
.
Copy the file to /fr/init.txt
and /jp/init.txt
, overwriting the originals. (If you are feeling kind, feel free to translate them.)
For Ys IX, edit
/init_en.txt
instead of/en/init.txt
. Copy that file to/init_fr.txt
and/init.txt
, again you can translate your files into French and Japanese if desired.
Your DLC is done! Copy it into {Ys VIII folder}/dlc/
and load up your game. If everything worked, you will be able to redeem and use your DLC costume!
For Ys IX, copy into
{Ys IX folder}/debug/dlc_us
and{Ys IX folder}/debug/dlc
.
Congrats on making it to the end of this tutorial!