Advertisement
Besrodio

DDDA PC Model Swapping v1: I have only done this once before

Jan 12th, 2016
6,388
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.81 KB | None | 0 0
  1. If you wants to swap models v1: I have only done this once before
  2.  
  3. Resources you will need=======================
  4. 1. .arc file Unpacker/Repacker
  5. ARCtool.exe
  6. This is going to be the actual workhorse behind unpacking the game's resource files, and repacking them to be able to utilize. Grab it from FluffyQuack's post here: http://residentevilmodding.boards.net/thread/481/arc-unpacker-repacker-v0-26
  7. And a batch file to actually interface with ARCtool.exe. Mine is as following:
  8. arctool -dd -texRE6 -alwayscomp -pc -txt -v 7 %1 %2 %3 %4 %5 %6 %7 %8 %9 -tex
  9.  
  10. 2. A text or hex editor
  11. I did not have to do much on this front, but having a Hex Editor might be wise just to make sure you're not accidentally adding any data to the files you'll need to edit.
  12. Just google hex editor and grab one, I use HxD, can't really say it's of any value over any other one.
  13.  
  14. 3. Again, back everything the fuck up.
  15.  
  16.  
  17. THE EASY SMART WAY by BakedlCookie===================
  18. https://www.reddit.com/r/DragonsDogmods/comments/42iws8/a_guide_of_sorts_on_model_swapping/czgors7
  19. "It's also possible to do swaps without ever hex editing anything. What you need to do is to put the texture files in a separate folder that points toward the model you're swapping for. If this sounds confusing here's a picture that will make it all clear. Also remember to update the .txt for the arc you're repacking.
  20. http://i.imgur.com/5logV8n.png"
  21.  
  22. This method requires no hex editing, and works just as well for doing your own model swaps - I would highly recommend this if you are working on your own stuff for personal use.
  23.  
  24. The only drawback to this is that it alters the .arc file's repacking and internal structure - what this means is that it's great for making .arc files that you can distribute, but this method is not compatible with current mod managers, or simple .bat installation methods, because it will make the .arc files bigger due to not deleting the old, unused textures from the .arc files.
  25.  
  26. Use the below information if you want to make sure your model swap will be an efficient mod manager useable format, or if you want to learn about the structure of an .mrl so you can experiment with weird stuff (like I'm fairly certain if you took certain parts of the .mrl of Abyssal gear you could replicate the pulsing effect on other equipment)
  27.  
  28. In any case, please visit the link above and thank the man/woman who figured out a much easier way to do this.
  29.  
  30. -- a minor warning: watch your packing order in ARCTool when utilizing this method. When hex editing, you are replacing the files the .arc file already uses so you are maintaining a proper packing order, but when you're introducing new files, the common practice would be to put your new files at the end of the packing list - This is incorrect and can cause irregular crashing, textures need to be packed higher in the list than mrl / mod files - essentially you should try to match the packing order it was in before - so in the example picture BakedlCookie has above, you'd want to move all the arm201_b texture files above the mrl/mod files in that .txt file before repacking the .arc file.
  31.  
  32. The Nitty Gritty=======================
  33.  
  34. 1. Unpacking/Repacking
  35. Get your ARCTool and batch file in your editing folder, then grab your source and destination .arc files. I would not suggest trying to put a model of pants onto an arm model, but I guess you could try it.
  36. Unpack your arc files and navigate into the resulting folders, [eqname]\model\pl\[gender]\[armor type]\eq_name. The first swap I got to work successfully was putting the Gryphic Gauntlets (f_a_arm0500/f_arm_a005) onto The Lion's Spine (f_a_arm8200/f_arm_a802) so I'll be using these as an example.
  37.  
  38. Once you're in the folder with your textures, you're going to want to remember the filenames of your destination texture/mod/mrl files, just write down the identifier, in this case: f_arm_a802 - the difference from Gryphic's being the 802 over the 005 Gryphic has. Delete all of the destination files, then copy over the source files, and rename them all to match the old destination files, so you have a new set of f_arm_a802 files.
  39.  
  40. After this you need to open up the .mrl file in your hex editor or notepad, and replace all instances of the source files with the destination files. This should only be references to each of the .tex files, in the example case a005_CMM, a005_NM_HQ, and a005_NUKI. Just replace the 005 with 802 and save the file.
  41.  
  42. Repack your newly edited destination file, and slide it in to the game files (back up your original).
  43.  
  44. If all went well, you should have the model of your source on the destination item.
  45.  
  46. A further note since I have not tested this very thoroughly, you may run into checkered problems if the MIP maps do not match between textures for the source and destination, or the formats. Refer to the texture guide if you have issues.
  47.  
  48. In order to actually see changes, while you don't need to load the game, you need to get the game to unload and reload the item in question. For equipment, if you change your equipment and make the model go away, exit the menu, then go right back in, this seems to be enough to reload the new .arc file. For other stuff, you might need to transition areas, or in some cases save and quit to title, then reload.
  49.  
  50. And now to get very in depth about how to model swap some of the weirder things. At the request of another anon in the steam group I found the object file om10715.arc, which is the longer Godsbane used in the ending cutscene: https://www.youtube.com/watch?v=umptGEkAsHo and attempted to swap that file onto Devilsbane, a one handed sword. This was not an easy or clean process, but it shed a lot of light on the .mrl files for equipment. This is going to go pretty deep into hex editing hell, so if you want to keep it easy, stay with the easy swaps - helmets to helmets, swords to swords, that sort of thing.
  51.  
  52. So first off, let's look at our om10715.arc's mrl file to kind of divvy up the sections, as for whatever reason this object had the simplest set of data. Until further notice all numbers are going to be referring to hex.
  53.  
  54. ----
  55. Section #1 - texture identification. This is going to be a common section between all mrls, though the length can differ depending on the number of textures the model uses. In om10715.arc's case, and this is true for a lot of weapons, 4 textures - _BM, _CMM, _NM, _TM - another texture that is pretty much everywhere is scr\sky\DDCube2_CM, so 5 in total, though one is pretty much a constant.
  56.  
  57. Starting at address 0x1C, each texture has 4C bytes for ID, starting generally with "ë].$........" [EB 5D 1F 24 00 00 00 00 00 00 00 00] though DDCube2_CM's section starts with ".ê.x........" [10 EA 08 78 00 00 00 00 00 00 00 00] - following these headers comes the actual ID, ending with a "." [00] - as an example, "model\om\om10715\model\om10715_001_NM." - the remaining space in the 4C section is filled with "Í" [CD] bytes, before starting the next ID or concluding the section.
  58.  
  59. ----
  60. Section #2 - I no longer have any names for these sections because I don't know what they actually are
  61.  
  62. This section is comprised of a few sub sections, the first being a 20 byte long area, in om10715's case: "³1+}Š£IÐp...gѲbš‘.¸£ñŒ.$ÀM€..€‹" [B3 31 2B 7D 8A A3 49 D0 70 03 00 00 67 D1 B2 62 9A 91 13 B8 A3 F1 8C 10 24 C0 4D 80 00 00 80 8B] then 14 empty bytes, so all values of [00], then two bytes with some form of information, again in om10715's case: "à." [E0 01] then 6 more empty [00] bytes. This is where the section can vary in odd ways, om10715 ends the section with C more empty [00] bytes before going to the next section, while other .mrls repeat or vary the preceding section, then proceed straight into the next section without the C empty bytes. I believe the empty bytes following the 2 byte range are simply to add empty space so that the next section starts on a 0 in the ones digit address (0x210 as opposed to 0x20A), but I can't really verify this.
  63.  
  64. Now, when it comes to this section, you want to match the number of repeating sections and formatting of the target .mrl, but use the 20 byte long first section of the source file - so in om10715 to one031's case, I'd be taking the section as a whole from one031's .mrl, length should match, and then replacing the 20 byte long sections (there are two) with "³1+}Š£IÐp...gѲbš‘.¸£ñŒ.$ÀM€..€‹" [B3 31 2B 7D 8A A3 49 D0 70 03 00 00 67 D1 B2 62 9A 91 13 B8 A3 F1 8C 10 24 C0 4D 80 00 00 80 8B] - the two byte sections need to be the same as they were before, so unchanged from one031's original .mrl.
  65.  
  66. f000.mrl (female base model) has 8 repeated subsections, sld011 (Dragon's Roost shield) has 3, so this section can be pretty variable.
  67.  
  68. ----
  69. Section #3 - This section is bigger and I also have no idea what it actually is
  70.  
  71. This section's only real common feature seems to be starting with "ÀÍ" [C0 CD] and ending in some variation of "..€?" [00 00 80 3F] followed by empty bytes to lead up to the next section in a way that starts the next section on a 0 for the ones digit.
  72.  
  73. The section can be of varying length (370 on om10715/one031, varying for f000), and varying quantity, even varying in content/length for subsections such as in f000. The number of appearances of this type of subsection seems to correlate to the number as seen in the above section, so 8 again for f000, 2 for one031, 1 for om10715, 3 for sld011. The NUMBER of these sections should match your target file, so in our example of om10715 > one031, two subsections. The CONTENT of these should match your source file, in this case I just repeated the whole section from om10715's mrl twice in a row.
  74.  
  75. And that's it, that's the end of the file.
  76.  
  77. If you have any questions or comments (ie pointing out what these sections actually are, or if I'm totally wrong somewhere), my Steam ID is the same as my Pastebin one, so drop a line.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement