amorrow28 Posted March 8, 2023 Posted March 8, 2023 Mod tools updated to 2.1.5, now with multiple UV support! While this is most obvious with large layered meshes like Sharon's bandages in CS3 (see above), it actually impacts every character because facial expressions use this feature. (Also, you can see it on the shoulder patches of the Thors uniform.) Updating is highly recommended. The new ed8pkg2gltf.py will create .uvmap files that are used by build_collada.py to map textures to their texcoords; be sure to backup and then re-extract your meshes to get the new .uvmap files. The upload and guide to usage can be found here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707 1
NotAZebra Posted March 12, 2023 Posted March 12, 2023 (edited) On 3/1/2023 at 9:07 PM, amorrow28 said: Sorry, I hadn’t noticed that in your previous post! Weird that I haven’t had those access errors but they’re harmless. It’s just me trying to clean up all the temporary files. In the next release I’ll move the commands around so that temporary files are removed at the end instead of right after use. More importantly, any progress on Alfin’s little black dress?? ??? It took me a while to figure out why my previous attempts to add a mesh failed, but I did it, so here is some actual progress that is not just using a shortened towel! There is still more to do (like dealing with the sunburn on her neck, replacing the tights, reshaping the skirt, and lightening the button shadows). Spoiler Here is the file for this (very incomplete) version in case anyone wants to mess with it: C_CHR063_C00.pkg Edit: I should have put this in the Hajimari thread. I thought some of the pkg files were working across games, but now I am unsure. Any design ideas are welcome. Edited March 12, 2023 by NotAZebra 2
mercury_D Posted March 12, 2023 Posted March 12, 2023 Is it possible to combine two or more character clothing files into a single .pkg ?
NotAZebra Posted March 12, 2023 Posted March 12, 2023 7 hours ago, mercury15882 said: Is it possible to combine two or more character clothing files into a single .pkg ? Yes
amorrow28 Posted March 12, 2023 Posted March 12, 2023 7 hours ago, mercury15882 said: Is it possible to combine two or more character clothing files into a single .pkg ? Depends on what you are asking. Are you asking if you have two separate costumes that the user can choose between? If so, I'm pretty sure the answer is no. If you are asking if you can take elements from two different costumes and combine them into a single costume, then the answer is yes, although it is complicated. You can see that @NotAZebra did it above with his Alfin in a little black dress outfit!
amorrow28 Posted March 12, 2023 Posted March 12, 2023 Mod tools updated to 2.1.6, now with preservation of the original heirarchy matrices! This is a feature that shouldn't even need to exist, but some models have heirarchy matrices that do not match properly-calculated inverted bind matrices for some reason. Above you can see what happens when the matrices are incorrect in the photo above. Thank you to @fakecheng for catching this error. The upload and guide to usage can be found here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707
NotAZebra Posted March 13, 2023 Posted March 13, 2023 (edited) Most recent version: For CS4 For CS3 Old (Unfinished) CS3 pkg file for Musse‘s Astraia little black dress: C_CHR013_C05.pkg ← Obsolete and only for CS3 Update: Pulled the front of the dress up higher and kept buttons but in dark grey: C_CHR013_C05.pkg ← Obsolete and only for CS3 Preview (tights are changed by the Unskirt mod): Spoiler In addition to keeping the white frill (a trivial edit), I tried something a little different at the top of the dress with Musse than with Alfin. It is worse (the texture is much harder to get right—which is why the bust of the dress looks like crap). If anyone can explain to me how to separate a vertex into two (for different faces) in the UV Editing view in Blender, it will be better, though. Edited July 29, 2023 by NotAZebra Updated pkg file 6
amorrow28 Posted March 13, 2023 Posted March 13, 2023 1 hour ago, NotAZebra said: (Unfinished) CS3 pkg file for Musse‘s Astraia little black dress: C_CHR013_C05.pkg 16.49 MB · 0 downloads Preview (tights are changed by the Unskirt mod): Reveal hidden contents In addition to keeping the white frill (a trivial edit), I tried something a little different at the top of the dress with Musse than with Alfin. It is worse (the texture is much harder to get right—which is why the bust of the dress looks like crap). If anyone can explain to me how to separate a vertex into two (for different faces) in the UV Editing view in Blender, it will be better, though. Here is a mini-tutorial! (Assuming I understood you correctly.) Quote To demonstrate vertex separation, I'm going to work with this vertex: Spoiler To separate the vertices, first switch to Edge selection mode (the three buttons next to Edit Mode in the upper left). Select the edge that will come apart when you have separated the two faces that you want to separate. (The vertices will be touching again at the end, do not worry.) Go to Mesh->Split->Faces by Edges. Spoiler Go back to vertex mode, and temporarily pull the vertex away. (It should have only separated the vertices that are controlled only by that edge, but you might want to check the other vertices. If those have separated, then select the faces around that vertex - while your temporary vertex is still pulled away - and use Mesh -> Merge -> Merge by Distance.) Spoiler Now while your vertex is pulled away, look at your UV map. Select the faces one at a time as well as together to figure out which point on the UV map is the vertex of interest. Spoiler Here you can see I figured out which vertex is the one I want to move on the UV map (arrow). Move the vertex on the UV map. Spoiler Now you will want to move the actual vertex back to its proper position in 3D space. Turn on snap to vertex at the top middle of the layout view. (make sure the magnet is turned on, and the option is set to Vertex.) Spoiler Finally, move your vertex back into place. Spoiler I hope that helps! 1
mercury_D Posted March 13, 2023 Posted March 13, 2023 16 hours ago, amorrow28 said: Depends on what you are asking. Are you asking if you have two separate costumes that the user can choose between? If so, I'm pretty sure the answer is no. If you are asking if you can take elements from two different costumes and combine them into a single costume, then the answer is yes, although it is complicated. You can see that @NotAZebra did it above with his Alfin in a little black dress outfit! Because I found that some of the character DDS files are actually shared when viewing the files, it would reduce file size if multiple characters' clothing could be combined into the same pkg. However, from what you said, it seems that this cannot be achieved. ================================================ When I tried to modify LAURA's 3D model, I found that the position of her thigh bone skeleton was too low, causing some strange movements, as shown in the picture below. Is there a way to write the modified skeleton (just the modified bone position) into the pkg file? Spoiler what I expected the actual result
amorrow28 Posted March 13, 2023 Posted March 13, 2023 5 hours ago, mercury15882 said: Because I found that some of the character DDS files are actually shared when viewing the files, it would reduce file size if multiple characters' clothing could be combined into the same pkg. However, from what you said, it seems that this cannot be achieved. This is already achieved in the assets.pka file. We cannot do this for our mods unless we repack the .pka file, however. 5 hours ago, mercury15882 said: ================================================ When I tried to modify LAURA's 3D model, I found that the position of her thigh bone skeleton was too low, causing some strange movements, as shown in the picture below. Is there a way to write the modified skeleton (just the modified bone position) into the pkg file? Hide contents what I expected the actual result Yes, you can change the positions of the bones if you are using my mod tools. However, if you do that, you will need to make custom animations, and there are a lot of custom animations per character, maybe 80 or more. Doing this is beyond what I know, but you can ask at the Kiseki modding discord. I would recommend not changing the bone positions.
amorrow28 Posted March 15, 2023 Posted March 15, 2023 (edited) Here is my Trails of Cold Steel IV UnSkirt Mod, ported to the PKG format! Upload replaced for Towa hot-fix, most current is v1.0a. CS4_UnSkirtMod_PKG_version_1.0a.7z This version of my mod does not require the use of 3DMigoto, as it replaces the pkg files that come with the game. Who might want to use this, instead of the 3DMigoto version? Steam Deck / Linux players (and possibly Nintendo Switch players, see here!) Anybody who does not like 3DMigoto, or anybody who really likes Steam Overlay / Steam Input Anybody who finds the weird shader problems distracting, or who finds it annoying that costumes don't preview properly in the equip menu when using 3dmigoto Since this version overwrites the pkg files that come with your game, PLEASE backup your files first. You do not need to back up the .pka file, but consider backing up the {CS4}\data\dlc\asset\D3D11 This version does not include 3DMigoto. Please see here for the same mod, using 3DMigoto instead. How to use: Quote Open the Unskirt folder in my archive, then copy the "data" folder directly into your Trails of Cold Steel folder. That is all. Spoiler Please note: You can use PKG mods and 3DMigoto mods together, but PKG mods will generally override 3DMigoto mods because 3DMigoto depends on identifying unmodified assets to know when to inject. Enjoy! Edited September 9, 2023 by amorrow28 7
amorrow28 Posted March 16, 2023 Posted March 16, 2023 (edited) Ugh, found a bug with UnSkirt pkg version already, with Towa no less. New version 1.0a uploaded. Edited March 16, 2023 by amorrow28
NotAZebra Posted March 16, 2023 Posted March 16, 2023 On 3/13/2023 at 5:32 PM, amorrow28 said: This is already achieved in the assets.pka file. We cannot do this for our mods unless we repack the .pka file, however. Yes, you can change the positions of the bones if you are using my mod tools. However, if you do that, you will need to make custom animations, and there are a lot of custom animations per character, maybe 80 or more. Doing this is beyond what I know, but you can ask at the Kiseki modding discord. I would recommend not changing the bone positions. I suppose this also means that I cannot add a mesh that uses bones that are not in the original model. Even if the build_collada.py script supported this (and it appears not to), the new bones would require new animations. Is that right?
amorrow28 Posted March 16, 2023 Posted March 16, 2023 56 minutes ago, NotAZebra said: I suppose this also means that I cannot add a mesh that uses bones that are not in the original model. Even if the build_collada.py script supported this (and it appears not to), the new bones would require new animations. Is that right? You can, but the new bones won’t do anything without animation.
fakecheng Posted March 16, 2023 Posted March 16, 2023 (edited) --------Trails of Cold Steel 4 Juna Underwear Mod-------- Most of Juna's outfits are replaced with custom textures underwear. Preview(with skirt): Spoiler Preview(no skirt): Spoiler C_CHR011_C60 only come with one version so it doesn't matter you use no skirt or with skirt version. ----------Download---------- JunaUDW_CS4.rar Installation: Put the pkg file from Main outfits into game install location\data\asset\D3D11. Put the pkg file from DLC outfits into game install location\data\dlc\asset\D3D11 and replace. Backup the file before replacing incase something go wrong. Report to me if you find any issues. You can find CS3 version here and Hajimari version here. Huge thanks to @amorrow28 for create ED8 Mod Tools and troubleshooting when making underwear mod! ----------My Kiseki mods list---------- Kuro no Kiseki (Trails through Daybreak): Underwear Kilika replace Van Underwear Mod Renna Grim Kitty Mod(Kuro 1) Underwear Mod(DLC version)(Eng version only) Kuro no Kiseki 2: Underwear Kilika replace Van Z-1 Queen Type B Panties Removal Z-1 Queen Type A Chest X Removal Underwear Mod All-In-One v1.1 Renna Grim Kitty Mod(Kuro 2) Trails of Cold Steel 3: Juna Underwear Mod Trails of Cold Steel 4: Juna Underwear Mod Hajimari no Kiseki: Juna Underwear Mod Edited July 11, 2024 by fakecheng 9
mercury_D Posted March 17, 2023 Posted March 17, 2023 (edited) On 3/13/2023 at 7:57 AM, amorrow28 said: Spoiler Mod tools updated to 2.1.6, now with preservation of the original heirarchy matrices! This is a feature that shouldn't even need to exist, but some models have heirarchy matrices that do not match properly-calculated inverted bind matrices for some reason. Above you can see what happens when the matrices are incorrect in the photo above. Thank you to @fakecheng for catching this error. The upload and guide to usage can be found here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707 My current tool version is 2.16. Possible bug: After using "ed8pkg2gltf.py" to export the contents of C_CHR019_C02.pkg, without making any modifications, I immediately used "build_collada.py," but "RunMe.bat" could not be generated. The same process was tested on other characters and "RunMe.bat" was generated successfully. Edited March 17, 2023 by mercury15882
amorrow28 Posted March 18, 2023 Posted March 18, 2023 5 hours ago, mercury15882 said: My current tool version is 2.16. Possible bug: After using "ed8pkg2gltf.py" to export the contents of C_CHR019_C02.pkg, without making any modifications, I immediately used "build_collada.py," but "RunMe.bat" could not be generated. The same process was tested on other characters and "RunMe.bat" was generated successfully. Yeah, that is not a bug in the decompiler, Angelica's skeleton is broken. L ArmPoint and R ArmPoint have matrices of [0,0,0,0][0,0,0,0][0,0,0,0][x,y,z,1] which is totally invalid. Correct is [1,0,0,0][0,1,0,0][0,0,1,0][x,y,z,1]. Go into the heirarchy section and fine those two nodes, and change the 1st, 6th and 11th values from 0.0 to 1.0 and the model will build correctly. Btw I have no idea how this could possibly happen if using software. I have to think Falcom coded those values by hand. ? 2
fakecheng Posted March 18, 2023 Posted March 18, 2023 46 minutes ago, amorrow28 said: I have to think Falcom coded those values by hand. ? I have zero doubt about it after over half of the bugs I report to you are actually caused by Falcom handle their code in a way you can't expect ?. 1
amorrow28 Posted March 19, 2023 Posted March 19, 2023 Mod tools updated to 2.1.7, minor bugfixes. The upload and guide to usage can be found here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707 2
mercury_D Posted March 25, 2023 Posted March 25, 2023 (edited) Sharing costume transferred from DOA5, with body texture and mesh created by @holden_mcclure, also thanks to @amorrow28 for providing the tutorials and tools that made these mods possible. install: Replace the relevant file in "The Legend of Heroes: Trails of Cold Steel IV\data\dlc\asset\D3D11". *Make sure to backup the original file before replacing it. Juna: Spoiler require DLC this mod is replaced by "Juna's Swimsuit" *v2 Add a transparent effect to the frayed edges of a pair of denim shorts. C_CHR011_C65_v2.zip Musse: Spoiler require DLC this mod is replaced by "Qilin Dress" C_CHR013_C60.zip Shirley Spoiler place the file at the following path.(replace her school uniform) game folder\data\asset\D3D11\ C_CHR031_C00.zip I simply feel that she would look great in a Christmas outfit, so I made this MOD. :) Edited April 18, 2023 by mercury15882 12
amorrow28 Posted April 9, 2023 Posted April 9, 2023 Mod tools updated to 2.1.8, minor bugfix. The upload and guide to usage can be found here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707 3
mercury_D Posted April 17, 2023 Posted April 17, 2023 On 4/10/2023 at 7:58 AM, amorrow28 said: Mod tools updated to 2.1.8, minor bugfix. The upload and guide to usage can be found here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707 You have written an extremely impressive and convenient program! 1
amorrow28 Posted April 18, 2023 Posted April 18, 2023 14 hours ago, mercury15882 said: You have written an extremely impressive and convenient program! Thank you! Many people helped me and did a lot of research. And thank you for sharing mods, the mods make my work worthwhile. ? 2
amorrow28 Posted May 2, 2023 Posted May 2, 2023 Mod tools updated to 2.2.0. 2 major quality-of-life features: 1. No more images section at the top of the metadata! The build script will construct it when writing the collada file automatically now. If the new build script is used on old metadata, it will just ignore the images section. 2. The pkg builder will now add only files that are actually used by the model (as listed in the auto-generated asset_D3D11.xml file), so it no longer matters if you leave behind old shaders or textures when making your mod. The upload and guide to usage can be found here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707 1
amorrow28 Posted May 2, 2023 Posted May 2, 2023 (edited) Index of my CS4 tutorials and where to find my mod: Hide contents My first post linking to Fairy Tail mod video and how I adapted for CS4: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3730952 How to edit existing mods (and how to setup Blender): https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3757792 How to get a model into Blender (basic modding part 1): https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3767886 How to get a mod back into the game (basic modding part 2): https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3771501 How to work with textures in CS4: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3779614 How to work with weights: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3786873 How to use my modding toolset for making .pkg mods: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707 How to transfer a costume from one character to another using my .pkg toolset: {that's this tutorial} If you don't care about tutorials and just want the mod I made, here it is: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3775051 Info on how to use the nude mods with my mod here: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=3832221 Tutorial time! Today let's give Tita a swimsuit. In this tutorial, I will use the ED8 modding toolset to take the swimsuit from Elise, and give it to Tita. @NotAZebra wrote a basic tutorial on this that is geared towards nude modding, but someone at the discord asked for a more detailed instruction set so here it is! (The finished model is available at the bottom of the post.) Setup / Requirements: Quote Setup: 1. Install Python 3, if you don't have it already. (Microsoft store, I'm using python 3.10 but any 3.xx should work.) 2. Install Blender (free!) in Steam. Change to 3.33 LTS (right click Blender in steam, select Properties -> Betas -> 3.33 stable LTS). 3. Download DarkStarSword's plugin here (Right Click, Save As) 4. Install the plugin (Blender -> Edit menu at top -> Preferences -> Add-ons -> Install) 5. Also install the following two plugins: blender_lock_groups_with_vgmap.py and blender_delete_empty_vertex_groups.py (Right Click, Save As) 6. Obtain the latest version of ED8 Mod Tools and ED8 Inject Tools. In this tutorial I am using mod tools v2.2.0 and inject tools v2.0.1. You want to know how to get a model into Blender and through the compilation process in the first place. Please try this tutorial here at least once, then come back: https://www.loverslab.com/topic/166239-trails-of-cold-steel-4-mod-request/?do=findComment&comment=4010707. 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 the Fairy Tail modding video, watch it. Please note these older tutorials use 3dmigoto; you can skip all the parts that are not relevant (frame dumping, splitting buffers, etc - basically anything that is not in Blender). Step 1: Preparing the recipient model Quote First, let's get the models we need. See here for a list of models in CS4. First I'm going to get Tita (C_CHR027.pkg) from assets.pka by running extract_pka.py. Spoiler NOTE: For Elise's swimsuit (C_CHR043_C65.pkg) from Trails into Reverie, I'm cheating as I have a version already modified for CS4 that I got from the Kiseki modding discord. You can use the version from Hajimari no Kiseki (or Trails into Reverie when that comes out), but you will need to replace the shaders with CS4 shaders. Or just stick to the models available in CS4, or do this mod in Hajimari instead, etc. Or (HIGHLY RECOMMENDED) - join the Kiseki modding discord server and try the amazing Costume Restoration Mod that I got this from, it adds ~100 costumes to CS4, activated by custom DLC scripts! Put both C_CHR027 and C_CHR043_C65.pkg into a folder with ed8pkg2gltf.py and lib_fmtibvb.py, and run ed8pkg2gltf.py. It will decompile both models. Spoiler Let's examine Tita (the recipient model) first. You can see she has 13 submeshes, and one of them (the shadow) overlaps the rest. Spoiler Let's figure out which meshes we will delete - basically the entire body. Mesh 12 is the shadow, so we will keep that (but delete it in Blender). Meshes 6-11 we will just delete. Mesh 5, which is the skirt, lapel and hair ribbon - we want to keep just the ribbon. Spoiler Let's get rid of 6 through 11. You can just delete the .fmt/.ib/.vb and .uvmap files, but make sure to keep the .material and .vgmap files (in a different folder). I just stuffed all of them into a backup folder, in case I wanted parts of them later. (The screenshot shows me also getting rid of 12, but that was an accident; I forgot it was the shadow and I restored it later.) Spoiler You will want all the .vgmaps available in one place, so if you moved the meshes like I did, copy the .vgmap files into that backup folder. (Copy, do not move - the original meshes still need those files!) Spoiler For mesh 5, I'll select and delete the parts I don't need in Blender. (Make sure to export the buffers after! File->Export->Raw Buffers) Spoiler Step 2: Copying assets from the donor model Quote Ok, on to the swimsuit! Here I have imported all of Elise (the donor model). Spoiler Figure out what you are keeping, and delete the rest. Here I figured out I am keeping 1, 2 and 8. Spoiler IMPORTANT: We are now going to copy over the meshes that we will use (1,2,8), and rename them. Do not do this in Blender, because Blender will not save all the files you need (.uvmap and .material are not preserved by Blender). I am renaming polySurface5865_01 to polySurface4820_06, polySurface5865_02 to polySurface4820_07, and polySurface5865_08 to polySurface4820_08. Rename all 6 files for each mesh (.fmt, .ib, .material, .uvmap, .vb and .vgmap). (NOTE: If you are an experienced modder and have used other tools with vgmaps, you may be used to vgmaps being discarded at the time of asset repacking. We are NOT repacking - we will compile a new model, and my tool is designed to read the vgmaps. That means they can be changed, and they can be copied from other models. BUT they are still just maps, and the nodes they represent must already exist in the skeleton!) Spoiler Now we need to evaluate the weight groups, to make sure the donor model meshes are compatible with the recipient skeleton. We will do this for each mesh. First, in object model, go to Object Data Properties (the upside down green triangle icon) on the side bar, vertex groups, and select Lock groups using VGMap (this is one of the plugins above). Select all the recipient vgmaps from the backup folder. Spoiler Before scanning for missing groups, go ahead and delete any unneeded groups by going to the same menu and selecting Delete empty (unlocked) vertex groups. Spoiler Looking through the list, almost every bone is available from Tita's skeleton, but LeftChest and RightChest are missing. (Tita's model does not have breast physics.) We will have to remove those from the swimsuit model. Spoiler Looking at Elise's skeleton (import the gltf), you can see that the parent of LeftChest and RightChest is Spine2. (and looking at Tita's skeleton, you can see those bones are absent) NOTE: Do not edit or work with the meshes in the gltf, you will be wasting your time! Just use the gltf to see the skeleton! Spoiler Elise: Tita: This is our goal, moving the weight of LeftChest and RightChest to Spine 2. Then we should be able to safely delete LeftChest and RightChest. Spoiler Unlock all the weight groups. In the sidebar, click Modifier Properties (the wrench icon), then Add Modifier, then Vertex Weight Mix. Set A to the bone we keep (Spine2), B to the bone we will delete (RightChest), set Vertex Set to VGroup A or B, set Mix Mode to Add. Repeat for Left Chest. Apply the modifiers (it is in the drop down menu next to the camera icon). Spoiler Check in weight paint mode to make sure that Spine2 has the weight. Now it is safe to delete the weight groups. Delete both groups. Repeat for each mesh you are transferring. So I did this 3 times for the swimsuit, necklace and body (all three had LeftChest and RightChest). Step 3: Connecting the recipient and donor meshes Quote Next, let's connect the body to the head. I'm going to go through this quickly because I've detailed this in the Kuro Shizuna bikini tutorial and it's the same process - if this version is too fast then look at that tutorial. (and yes, this version expects you to either know the process or read about it in my other tutorial because it is just too tedious to write twice.) First, scale the model, since Elise is taller than Tita. Select all three meshes (swimsuit, necklace, body). Object -> Transform -> Scale, then pull the mesh until neck lines up with the head (I use the chin here to make sure I'm accurate). Then apply your changes (Object -> Apply -> Scale). Spoiler Tita's face has overlap with the neck, so here you can see I'm deleting part of Tita's mesh 3 that I do not need. (Do not forget to export your modifications to mesh 3! I forgot, and my first draft had 2 necks.) Spoiler Now I will move the vertices from mesh 8 (body, including neck) so that they are at the same place as mesh 3 (head, including face). Be sure to turn on Snap To Vertex. Move the vertices at the edge of mesh 8 to connect to mesh 3. Spoiler Make sure the vertex weights at the edge of mesh 8 are identical to the weights at the edge of mesh 3. DO NOT SKIP THIS STEP!!! (Again, I go through this step-by-step in my Shizuna bikini tutorial.) Step 4: Copying materials from the donor model (textures and shaders) Quote Now we need to edit the metadata and assign the materials. First, open up the material files in the recipient mesh, and make a list of the materials you will keep and those you will delete. For example, mesh 0 from Tita is "new_face2_collada", which you can see when you open polySurface4820_00.material. Also open the material files from the donor meshes to see what you will be adding. Spoiler This is my final list: Spoiler Keep: "material": "new_face2_collada" "material": "chr027_kami01_collada" "material": "new_faceparts_collada" "material": "new_face_collada" "material": "new_eyes_collada" "material": "chr027_uwagi_collada" "material": "kage01" Delete: "material": "chr027_zubon_collada" "material": "chr027_hada01" "material": "chr027_kinzoku_collada" "material": "chr027_renzu" "material": "chr027_haori_collada" "material": "chr027_monyou" Add: "material": "chr043_mizugi" "material": "chr043_mizugi1" "material": "chr043_hada" Open up metadata.json in your recipient folder (Tita folder, C_CHR027). Remove the unneeded sections. You can see I've highlighted them here (they are collapsed). I am using Notepad++, but if you are new to editing JSON, I HIGHLY recommend using a dedicated JSON editor like jsoneditoronline.org. If you mess up even a single comma or bracket, python will reject your JSON and your build will fail! Spoiler Paste in the new materials from the donor model. Spoiler Each material comes with 2 shaders and a number of textures. Copy those from the donor to the recipient. For example, chr043_mizugi uses ed8_chr.fx#1CF5534294A8B908C228317E7652D936, so copy that file from Elise's build folder (C_CHR043_C65\C_CHR043_C65) to Tita's build folder (C_CHR027\C_CHR027). Note that shaders are NOT in the shaders folder! (that folder is for a special dummy shader used by the compiler, not for the real shaders) Also copy the textures. Note if you are going to modify any textures, they need to have new unique names, or CS4 will pull the original texture from assets.pka. I changed the swimsuit color to match Tita's eyes, so I renamed chr043_c65_03_conv.dds to swimsuit_blue.dds as you can see in the image above. Step 5: Building the model Quote Make sure you have the compiler files in your folder, and run build_collada.py, then run RunMe.bat. Spoiler Test your new package. If all went well, you have a new mod! Spoiler Step 6: Making a DLC package Quote Since this is a new costume for Tita, it would be nice to have it as an installable DLC package so that we do not have to replace an existing costume to use it. Note that the steps here work for CS3, CS4 and Trails into Reverie, but only if a costume menu exists for the character. So while I could make a DLC package for Tita in CS3, it would be useless since she does not appear in the costume menu. Also note, inevitably mods will start to conflict with each other if ID numbers overlap. That is a disadvantage of this method, so mod authors should be prepared to change their mods if those mods conflict with popular mods. First, download my DLC table tools package here: (latest version always at my github) dlc_tables_v1.0.1.zip To make a DLC, we will need to recreate this folder structure: Trails of Cold Steel IV +---data +---dlc +---asset ¦ +---D3D11 ¦ C_CHR027_C65.pkg +---chr ¦ +---chr ¦ +---chr027_c65 ¦ chr027_c65.inf +---text +---0018 +---dat ¦ t_attach.tbl ¦ t_dlc.tbl ¦ t_item.tbl +---dat_en t_attach.tbl t_dlc.tbl t_item.tbl First, the .pkg itself must be factored for DLC. Optional: Tita's original C_CHR027.pkg has one image that is BC1 instead of BC7 - which means it must be converted to BC7 or be flipped upside down before compiling. This was not an issue before, since the game will preferentially pull the image from assets.pka to improve performance, so we were not getting the upside down texture. Since we are preparing a proper dlc though, let's fix that. Open chr/images/chr027_eyes_a.dds in Paint.NET or GIMP, and save as BC7 UNORM, overwriting the original. Let's convert the .pkg to DLC. I'm going to rename the PKG to C_CHR027_C65 since that doesn't exist (and all the other C65's are swimsuits). Rename the build folder from C_CHR027 to C_CHR027_C65. Spoiler Edit metadata.json. Change the name to "chr027_c65" and the pkg_name to "C_CHR027_C65". Spoiler Edit C_CHR027_C65/asset_D3D11.xml. Change the asset symbol to "C_CHR027_C65" and the cluster path of the .dae.phyre to "data/D3D11/dlc/chr/chr/chr027_c65/chr027_c65.dae.phyre". (Be sure to get the path correct! Notice how the directory, minus the D3D11, matches the location of .inf file in the folder tree above.) Spoiler Run build_collada.py, then run RunMe.bat, as before. Now you should get a C_CHR027_C65.pkg. That file goes into {CS4}/data/dlc/asset/D3D11. Spoiler The next file in the tree is {CS4}/data/dlc/chr/chr/chr027_c65/chr027_c65.inf. I just copied chr027.inf from {CS4}/data/chr/chr/chr027 and renamed it. Finally, you need the three tables in the text folder, t_attach.tbl, t_dlc.tbl and t_item.tbl. You will also need a unique DLC IDs and a unique item ID. Copy dlc_id_checker.py and item_id_checker.py into your Trails of Cold Steel IV folder (the root folder with the bin and data folders in it). Run dlc_id_checker.py, and pick a number that is not in use and close to the range of numbers there. The easiest is to pick something slightly above the upper number. (Here you see I've picked the number 18, because I know it works on my install.) Spoiler Repeat with item_id_checker.py, grabbing enough ID numbers for all your items. Since this package will only have a single item (the swimsuit), I only need one unique ID. I ended up with 3888. (Note that you cannot just use a crazy high number, the game will refuse to accept it. I tried 8000 and it ignored my item.) Spoiler Now put C_CHR027_C65.pkg in a folder with make_dlc_tbls.py and the .csv files. Run make_dlc_tbls.py. It will ask you a bunch of questions. For which game, answer "3" for CS3. When it asks item type, answer "193" for costume (or just press enter). Spoiler It will generate the .tbl files. Notice that it also generates a bunch of .json files, saving all your answers. That way, the next time you run the script, it will make the .tbl files without asking for any input. If you want to change any of your answers, edit the .json files in a text editor such as Notepad, or a JSON editor such as https://jsoneditoronline.org/ Put the .dat files in {CS4}/data/dlc/0018/dat and {CS4}/data/dlc/0018/dat_en. (Note that the numbered folder is the same as the DLC ID, with leading zeros so that it is always 4 digits. Note that CS3 and Reverie have slightly different structures compared to CS4, just look in the existing folders to see examples.) Test your DLC! Spoiler Congrats! You now have your own custom DLC! Here is the final mod: (along with swimsuits I made for Estelle and Renne for Trails into Reverie, backported!) Spoiler SkySwimsuitsCS4.7z Enjoy! And as always, if you make something you like, I hope you share. Edited January 17, 2024 by amorrow28 10
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now