-
Notifications
You must be signed in to change notification settings - Fork 1
Basic Modding Tutorial
Here is a basic modding tutorial for folks who want to get started modding characters in Ys VIII: Lacrimosa of Dana and Ys IX: Monstrum Nox. Here we will do a basic mesh delete, mesh modification (partial delete in this case) and texture replacement. This tutorial does not have any major spoilers, and is basically safe for someone who has played at least part of Ys VIII: Lacrimosa of Dana.
Note that this is not a tutorial on how to use tools like Blender or Paint.NET. I will not be teaching basic universal skills - please refer to other tutorials such as those on YouTube etc. I particularly recommend watching "3DMigoto Costume Mod Tutorial for Fairy Tail (PC)" by Ikaros; while it was made for 3DMigoto, I learned 90% of what I know from that video alone. I will put some basic steps so that you can still follow along, even if you have no Blender skills, but this tutorial will be much easier with some basic skills.
- Install Python 3, if you don't have it already. (Microsoft store, I'm using python 3.9 but any version newer should work.)
- Install Blender (free!) in Steam. Optional: change to 4.2 LTS (right click Blender in steam, select Properties -> Betas -> 4.2 stable LTS).
- Download DarkStarSword's plugin here (Right Click, Save As).
- Install the plugin (Blender -> Edit menu at top -> Preferences -> Add-ons -> Install, click the link for video.)
- Download the Ys8 Model Toolset
- Run the included "install_python_modules.bat" batch file, which will install all necessary python libraries to use the toolset.
First, let's get ourselves a model! I want to mod Dana's default today.
-
I have not found a better way to find models than to just look through the folders. They are all in
{Ys game folder}/chr/pc
. The model we want is c005_p.it3. (c005.it3 is the primary model with animations, and c005_p.it3 is the main costume. There is also a c005b.it3 that you can use, it is the "Noble Shaman" alternate color costume that is purchaseable in the game.) -
Copy your model to a folder, with ys8_it3_export_assets.py, ys8_it3_import_assets.py and lib_fmtibvb.py. Double click ys8_it3_export_assets.py and it will decompile your model. When it is done, you will have a new folder,
c005_p
with the unpacked model, which I will refer to as the work folder.
NOTE: Instead I actually recommend running ys8_it3_export_assets.py from the command line. Press Win-R, type "cmd" and change directories to your work folder, then type:
python ys8_it3_export_assets.py c005_p.it3
Python will not report any errors if the script crashes when you double-click the script, and no one will be able to help you. Run from the command line for helpful error messages.
Inside the work folder, you will see 1. meshes, which has the meshes, and 2. textures, which has the textures. There is a container_info.json file that allows you to explore the other contents of the IT3 file, but this file is not used when rebuilding the model.
Before doing any mods, I am actually going to go through repacking the model. This is a good exercise to make sure you know how to get a working IT3 file from your unpacked model. In addition, all subsequent mods below will refer back to this step.
- Repack the IT3 file by double clicking ys8_it3_import_assets.py.
NOTE: Again I actually recommend running
python ys8_it3_import_assets.py c005_p.it3
from the command line.
- There should now be a shiny new c005_p.it3 file in your folder! Copy that file back to
{Ys game folder}/chr/pc
and load up your game to see your model.
First, we will do a very simple mod - removing an entire submesh. Blender is not involved, but we will use it to preview what will happen.
- Load Dana's meshes into Blender. (File menu -> Import -> 3DMigoto raw buffers (.vb + .ib)) The meshes are in {Work Folder}/meshes/. I am going to skip importing the hit boxes etc and fishing rod, but you can just import everything by selecting all files. Be sure to set import settings on the right to Y Forward, Z Up.
- c005_ps4_main2_08.vb is the translucent weave on her arms and legs, we will delete that. For this mod we do not need Blender at all, except to identify the mesh.
- Go into {Work Folder}/meshes/ and delete c005_ps4_main2_08.vb. I recommend backing up your files first!
- Compile and test your model. Congratulations on your first mod!
Deleting the entire c005_ps4_main2_08.vb is less than satisfactory, since we lose jewelry, the cloth tails in the back, etc. Instead, let's remove just part of the mesh - the translucent weave on the hands. We will keep everything else.
- Select c005_ps4_main2_08.vb, go into Edit Mode, select the parts of the mesh you want to delete in Blender, and delete. (Again, this is not a Blender tutorial, although the basic steps are below. Please watch the video linked above or reference any Blender tutorial you like.)
Step by step: (Video tutorial here)
A. In the Topbar, go into the Layout workspace (tabs at top -> Layout), if you are not already there. Make sure you are in the 3D Viewport (Shift-F5). In the upper left you can see the current mode, which is likely Object Mode. If you are not in Object Mode, switch into Object Mode (from the drop down, or Ctrl-Tab)
B. In the Outliner, aka the box in the upper right with all the meshes and other objects, hide all the meshes except Emma's dress (polySurface4962_06.vb). Select each one and press H (or click the eye icon on the right). Select polySurface4962_06.vb. Emma's dress should now be selected. Change Object Mode to Edit Mode with the upper left dropdown in the viewport.
C. Three icons will appear directly to the right of Edit Mode, which are Vertex Select, Edge Select and Face Select modes. Switch to Face Select mode.
D. Unselect everything (Select menu -> None, or Alt-A.)
E. With your cursor in the viewport (middle of the screen), hold down mouse wheel click (MWC) and move your mouse to pan and tilt the camera around the model. Hold down Shift-MWC and move your mouse to move shift the camera position (i.e. to strafe across the screen). Use Mouse wheel scroll (MWS) to zoom in and out.
F. Switch to Circle select (Select menu -> Circle Select, or press C). MWS to adjust the size of your "brush" for selecting polygons. Hold down the left mouse button (LMB) to select polygons. Hold down MWC to unselect polygons. Click the right mouse button (RMB) to leave circle select mode. You will need to do this to pan the camera.
G. Repeatedly do this until you have selected the polygons you plan to delete. Press C, MWS to adjust size, LMB to select some polygons, MWC to unselect ones you accidentally set, RMB to go back to camera mode, MWC/Shift-MWC to adjust the camera, press C again to select or unselect some more...
H. When you are done, delete those faces. (Mesh menu -> Delete -> Faces, or RMC in the viewport {when not in circle select} and select "Delete Faces") Want to do something else besides just delete? Try transforming! (Mesh menu -> Transform -> Move / Rotate / Scale, or one of the specialized tools like Push / Pull or Shrink / Fatten.) Just remember to consider how your changes will affect pose / animation.
-
Go back into Object Mode.
-
Export the mesh. File menu -> Export -> 3DMigoto raw buffers (.vb + .ib) Overwrite the original c005_ps4_main2_08.vb. (Again, I recommend backing up your files first.)
-
Compile and test your model. Congratulations on your second mod!
This time I will change the color of Dana's outfit, which we can see in Blender is c005_ps4_main2_00.vb.
- Open c005_ps4_main2_00.material in a text editor such as Notepad. We can see that the material is called "c005n_base", and the primary texture (always listed first) is
p0052
. The export tool extracted this already toc005_p/textures/p0052.dds
.
- Open
c005_p/textures/p0052.dds
and make your changes, saving as a new filec005_p/textures/p0052x.dds
. (Again, this is not a Paint.NET tutorial, but the basic steps are below.)
Step by step:
A. Open
c005_p/textures/p0052.dds
in Paint.NET.
B. The texture is on a single layer, duplicate that layer (Ctrl-Shift-D). You will now have two identical images on top of each other. Select the upper layer, by clicking on it in the Layers window. If you do not see the Layers window, press F7. If you still cannot see it, press Ctrl-Shift-F7 to reset it to its default position in the lower right. (Video tutorial on using layers here.)
C. Select the purple parts of the image. Press S to go into select mode, and to cycle between the four select modes (Rectangle select, lasso select, ellipse select and magic wand. Select part of the area that you want to start. Hold down the Ctrl key while selecting to add to your current selection, and the Alt key to subtract from your current selection.
D. Edit -> Invert selection (Ctrl-I), so that it is now selecting all the parts you do not want to change. Edit -> Erase selection (Press Del), so that all those parts are gone. Your image will not change, because those parts are still present on the lower layer! (You can see this in the layers window.)
E. Optional: I have more success doing recolor if I remove the existing color first. Adjustments menu -> Black and White (Ctrl-Shift-G). Even more optional but recommended: Duplicate this black and white layer a few times. You can try making a bunch of different colors, and then just drag the layers up and down and you will have variations to enjoy with minimal effort!
F. Switch to the Recolor Tool (Press R). Increase the brush size to something large, like 500. Increase the Tolerance to 100% (since we have already removed the areas we do not want recolored). In the Colors tool, select a new color. Drag-Click on the texture, and color the texture. (Note: Where you start will determine the color shift. So if your cursor is over a light area when you start, the entire recolor will be darker, and vice versa.) (Video tutorial on Recolor - This is worth a watch, it shows how to properly recolor and makes some of my steps above moot. But I like my method.)
Optional: Save as a pdn file before saving as a dds file. When you save as a dds file, it will need to flatten all your layers back into a single layer. If you have a pdn file, all the layers will be preserved, allowing you to keep making changes and variant textures.
- Save the file in .dds format as a new file. I called mine p0052x.dds, and put it in textures/ with the other textures. Be sure to save in BC7 UNORM (Linear, not sRBG) format, without mipmaps. Ys VIII and IX are weirdly sensitive to this for character models.
Notice that there are some things on this map that I did recolor, that you would think I should not have, such as her hair. It is because this mesh (c005_ps4_main2_00.vb) does not use that portion of the texture, so I did not bother to fix it. That part of her costume will use the original p0052.dds. How can you figure out which parts you need to preserve, and which you can alter with no consequence? Using the UV map. Read this tutorial to see how to obtain the map!
- Edit c005_ps4_main2_00.material, updating the first texture to p0052x.dds. Save your changes.
- Compile and test your model. Congratulations on your third mod, you have made it to the end of the basic tutorial!