Post by Creelien on Sept 13, 2019 8:30:33 GMT
Original post by Vertigo
Model swapping in DMC4 is a lot easier than in DMC3, and I put it down to the fact that there's no need to repack anything or mess around with AFS file capacities.
Edit: I might add some screenshots to the Hex Editing part later to make things a bit easier to understand.
To do this, you will need:
A hex editor (I use XVI32. Google it.)
RPGViewer (Again, google will throw up a bunch of download links, just pick one)
Siren, a file renaming tool (You don't need this, but it'll make your life a helluva lot easier)
This tutorial is going to run through how to replace Dante with Nero (Oh God), but can be used for other models too. Note that there are a number of limitations at the moment, which I will note down at the end of the tutorial.
Extracting the models
First, open up RPGViewer and go to File > Open > Japan & Korea > CAPCOM > Devil May Cry 4. A navigation box will come up, and direct it to your game's nativePC\rom\player directory.
In the file tree on the left hand side of the window, you should see three .arc files. The ones we'll be using for this tutorial are the uPlayerDante.arc and uPlayerNero.arc files.
Click on uPlayerDante.arc and go to Addon > Archive > Extract..., and extract these files to your nativePC directory. Do the same with uPlayerNero.arc.
Preparing the models
In your nativePC directory, you should now have a bunch of folders called chartbl, Collision, effect and so on. The only one you should have to bother with at the moment is the folder named "model". Browse to model\game\pl000. This folder contains all of Nero's model and texture files.
You'll notice that none of the files have any formats. From here, we need to separate the model files from the textures. In Nero's case, the models are pl000, pl000_01, pl000_02 and pl000_03. Rename these files, adding the extension .mod at the end. For example:
pl000 -> pl000.mod
pl000_01 -> pl000_01.mod
As for the remaining files, if they end in _BM, _NM, _MM or something similar, add the extension .tex to them. These are your texture files. For example:
pl000_coat_BM -> pl000_coat_BM.tex
You will have to leave the textures in the pl000 folder, because even though you're replacing the pl006 .mod files, they'll still look for Nero's textures in the pl000 folder.
In this case, it may be helpful to download Siren, a freeware file renaming program to help you out. I will not include a guide as to the usage of Siren, those can be found elsewhere, and you could probably work it out on your own anyway.
Replacing the models
Now, copy all of Nero's four .mod files into the models\game\pl006 folder. This is Dante's model/texture folder. Rename your .mod files, replacing pl000 with pl006. E.g.:
pl000.mod -> pl006.mod
Older File Invalidation
This is the final step, and if you've done everything to the letter so far, it should work without issues. What this step does is to stop the .arc file from obtaining the Dante gamefiles from within itself, and therefore force it to look in the nativePC folder for it, thereby using your modified copies of the files instead of the originals.
However, before you do this,
BACK UP YOUR uPlayerDante.arc FILE.
Done? Good. Open up uPlayerDante.arc in your hex editor and search for one of Dante's .mod files (without including the extension). For example, search for:
pl006_01
pl006_02
If you know the full path, you can narrow down your search further by searching for that. E.g.:
model\game\pl006\pl006_01
Don't search for something general like pl006, since there are multiple occurrences of that in the file. The more specific you can be about your search, the better.
Now, if you've done the search properly, your hex editor should have taken you to an area in the code with a bunch of filepaths. Identify the ones that contain references to Dante's mod files. In Dante's case:
model\game\pl006\pl006
model\game\pl006\pl006_01
model\game\pl006\pl006_02
model\game\pl006\pl006_03
All you now have to do is change just one of the characters in each of these filepaths to make them invalid (causing the game to look in the nativePC folder instead). I'd suggest that when you do this, you change the same character consistently, in case you need to undo any changes in future. For instance:
xodels\game\pl006\pl006
xodels\game\pl006\pl006_01
xodels\game\pl006\pl006_02
xodels\game\pl006\pl006_03
Here, I've replaced all the "m"s in "model" with "x".
Save the hexed .arc file, and you're done.
However, take note that there are some caveats and additional notes that I have to mention. I'm tired, so I'll be adding them to the bottom of this post later today. This is Vert, signing off.
Additional Notes:
- Apparently even if you replace models with ones with different skeletons, it won't crash the game, but be prepared for some strange results. (Thanks, omni)
- If you're having trouble identifying which file is a model and which is a texture, keep in mind that any files ending in two letter codes such as BM, NM or MM are textures. If they end in a number, they're most likely models. (Thanks, omni)
- Some .arcs contain duplicate files. For instance, Nero and Dante both have a copy of Yamato that overwrites any instances of itself in the NativePC folder when extracted. Therefore, if you need to extract an .arc that might replace files you don't want replace, use the Advanced Extraction tool instead of the regular extraction option. (See above)
- This tutorial will leave you with a bunch of files that aren't actually necessary for the conversion. These include the Dante files, as well as all the other folders such as the Collisions, sound, chartbl and etc. You can remove them if you like, although I would recommend that you leave them there in case you need to troubleshoot your models in some other way (Maybe messing with the motion configs. I don't know.).
DMC4 Special Edition Model SwapEasy example. Changing Vergil's body to Dante's in cutscenes:
♦ Rename pl006.mod to pl030.mod, and pl006.mrl to pl030.mrl.
♦ Overwrite the original pl030.mod and pl030.mrl file with the renamed files.
♦ Open the renamed .mrl file in Hex Editor.
♦ Change the every texture path, like renaming/replacing this ->model\demo\pl006 to this model\demo\plDte for example.
♦ Copy Dante's textures (both .dds and .tex files) to here model\demo\plDte.
♦ Now open pl030_demo.arc.txt and add the path of every Dante texture, like model\game\plDte\pl006_arm_BM.tex, etc.
♦ Save it.
♦ Now, repack the .arc file. Then make backup of your original pl030_demo.arc file and copy the newly repacked one to nativeDX10\rom\demo\player.
♦ Start the game and see what you did.
Model swapping in DMC4 is a lot easier than in DMC3, and I put it down to the fact that there's no need to repack anything or mess around with AFS file capacities.
Edit: I might add some screenshots to the Hex Editing part later to make things a bit easier to understand.
To do this, you will need:
A hex editor (I use XVI32. Google it.)
RPGViewer (Again, google will throw up a bunch of download links, just pick one)
Siren, a file renaming tool (You don't need this, but it'll make your life a helluva lot easier)
This tutorial is going to run through how to replace Dante with Nero (Oh God), but can be used for other models too. Note that there are a number of limitations at the moment, which I will note down at the end of the tutorial.
Extracting the models
First, open up RPGViewer and go to File > Open > Japan & Korea > CAPCOM > Devil May Cry 4. A navigation box will come up, and direct it to your game's nativePC\rom\player directory.
In the file tree on the left hand side of the window, you should see three .arc files. The ones we'll be using for this tutorial are the uPlayerDante.arc and uPlayerNero.arc files.
Click on uPlayerDante.arc and go to Addon > Archive > Extract..., and extract these files to your nativePC directory. Do the same with uPlayerNero.arc.
Preparing the models
In your nativePC directory, you should now have a bunch of folders called chartbl, Collision, effect and so on. The only one you should have to bother with at the moment is the folder named "model". Browse to model\game\pl000. This folder contains all of Nero's model and texture files.
You'll notice that none of the files have any formats. From here, we need to separate the model files from the textures. In Nero's case, the models are pl000, pl000_01, pl000_02 and pl000_03. Rename these files, adding the extension .mod at the end. For example:
pl000 -> pl000.mod
pl000_01 -> pl000_01.mod
As for the remaining files, if they end in _BM, _NM, _MM or something similar, add the extension .tex to them. These are your texture files. For example:
pl000_coat_BM -> pl000_coat_BM.tex
You will have to leave the textures in the pl000 folder, because even though you're replacing the pl006 .mod files, they'll still look for Nero's textures in the pl000 folder.
In this case, it may be helpful to download Siren, a freeware file renaming program to help you out. I will not include a guide as to the usage of Siren, those can be found elsewhere, and you could probably work it out on your own anyway.
Replacing the models
Now, copy all of Nero's four .mod files into the models\game\pl006 folder. This is Dante's model/texture folder. Rename your .mod files, replacing pl000 with pl006. E.g.:
pl000.mod -> pl006.mod
Older File Invalidation
This is the final step, and if you've done everything to the letter so far, it should work without issues. What this step does is to stop the .arc file from obtaining the Dante gamefiles from within itself, and therefore force it to look in the nativePC folder for it, thereby using your modified copies of the files instead of the originals.
However, before you do this,
BACK UP YOUR uPlayerDante.arc FILE.
Done? Good. Open up uPlayerDante.arc in your hex editor and search for one of Dante's .mod files (without including the extension). For example, search for:
pl006_01
pl006_02
If you know the full path, you can narrow down your search further by searching for that. E.g.:
model\game\pl006\pl006_01
Don't search for something general like pl006, since there are multiple occurrences of that in the file. The more specific you can be about your search, the better.
Now, if you've done the search properly, your hex editor should have taken you to an area in the code with a bunch of filepaths. Identify the ones that contain references to Dante's mod files. In Dante's case:
model\game\pl006\pl006
model\game\pl006\pl006_01
model\game\pl006\pl006_02
model\game\pl006\pl006_03
All you now have to do is change just one of the characters in each of these filepaths to make them invalid (causing the game to look in the nativePC folder instead). I'd suggest that when you do this, you change the same character consistently, in case you need to undo any changes in future. For instance:
xodels\game\pl006\pl006
xodels\game\pl006\pl006_01
xodels\game\pl006\pl006_02
xodels\game\pl006\pl006_03
Here, I've replaced all the "m"s in "model" with "x".
Save the hexed .arc file, and you're done.
However, take note that there are some caveats and additional notes that I have to mention. I'm tired, so I'll be adding them to the bottom of this post later today. This is Vert, signing off.
Additional Notes:
- Apparently even if you replace models with ones with different skeletons, it won't crash the game, but be prepared for some strange results. (Thanks, omni)
- If you're having trouble identifying which file is a model and which is a texture, keep in mind that any files ending in two letter codes such as BM, NM or MM are textures. If they end in a number, they're most likely models. (Thanks, omni)
- Some .arcs contain duplicate files. For instance, Nero and Dante both have a copy of Yamato that overwrites any instances of itself in the NativePC folder when extracted. Therefore, if you need to extract an .arc that might replace files you don't want replace, use the Advanced Extraction tool instead of the regular extraction option. (See above)
- This tutorial will leave you with a bunch of files that aren't actually necessary for the conversion. These include the Dante files, as well as all the other folders such as the Collisions, sound, chartbl and etc. You can remove them if you like, although I would recommend that you leave them there in case you need to troubleshoot your models in some other way (Maybe messing with the motion configs. I don't know.).
DMC4 Special Edition Model Swap
♦ Rename pl006.mod to pl030.mod, and pl006.mrl to pl030.mrl.
♦ Overwrite the original pl030.mod and pl030.mrl file with the renamed files.
♦ Open the renamed .mrl file in Hex Editor.
♦ Change the every texture path, like renaming/replacing this ->model\demo\pl006 to this model\demo\plDte for example.
♦ Copy Dante's textures (both .dds and .tex files) to here model\demo\plDte.
♦ Now open pl030_demo.arc.txt and add the path of every Dante texture, like model\game\plDte\pl006_arm_BM.tex, etc.
♦ Save it.
♦ Now, repack the .arc file. Then make backup of your original pl030_demo.arc file and copy the newly repacked one to nativeDX10\rom\demo\player.
♦ Start the game and see what you did.