[TUTORIAL] Swapping Materials for RE Engine Games
Dec 22, 2020 2:01:18 GMT 10
Night Furious, kTeo, and 2 more like this
Post by thedarkness704 on Dec 22, 2020 2:01:18 GMT 10
Tools:
You might get a warning from your antivirus program for some reason that I don't know but be sure it's safe.
Before using the tool:
Before anything you need to extract game's files, read THIS.
Usage:
Simple In-Game Material Swapping:
1. Run the tool it'll create a folder called "Material Target" and ask you yo put an MDF file in it, copy the material you want to swap the material inside in that folder,
press Enter the tool then creates another folder called "Material Source" in this one you copy the MDF file you want to take the material from then again press Enter (This step only needs to be done the first time ever you run the program and once it has created the folders you just need to change the materials inside)
2. The tool then shows you a list of materials in the Target MDF to select to replace for example here I want to replace the legs material in this MDF with one of the materials in the source MDF file so I input the number of the legs material:
and press Enter
Now the the tool shows you a list of all the materials available in the source MDF to replace the material you just picked from the target MDF with for example I want to swap Dante's legs with one of the Vergil's SDT materials so after putting the MDF related to the SDT in the Source Material folder now I want to use this material so I input the number and press Enter just like I did with the target just now:
3. Now the tool asks me if I want to input custom texture paths for the new material you can say "N" for no if you want the material to use the textures it already has been using but most of the time you have custom new textures you want to use or just want to alter the path so the model that has the source material doesn't share the same textures with your new material so you can edit each one individually so enter "Y" and press Enter
Now the tool goes through every texture map that the material uses one by one and asks you to enter a path for each one like you see above, keep in mind the paths start from a folder inside the x64 folder like for example the "character" folder like this: "Character/Player/pl0100_Dante/pl0100_Body/pl0100_leg_ALBM.tex" alternatively you have 2 other options you can type "org" so the tool uses the original texture the material was using so it won't use a custom path for it or you can type "list" if you want to use a texture path other than the original texture from all of the textures mentioned in both the source and the target material so we are doing that:
Now here I want to use the 4th texture simply because the types match but you can use whatever you want if you know what you're doing
So press Enter and do it for all of the textures mentioned in the source material
5. Now you have successfully swapped a material and the tool asks you if you want to swap another material if you say "Y" you can do it all over again for another material or just simply say "N" so no other material will be swapped.
6. Now close the the tool and you'll have a newly created MDF file with the same name as your target MDF that has all the changes you just applied to it right in the folder of the tool next to the EXE:
Copy and use it as you wish.
Cross-Game Material Swapping:
Before we get into this one keep in mind some transparent and glass materials can't be swapped between games and will cause infinite loading times.
For this one you need to do some extra steps to set up the requirements:
1. There's a "Config.cfg" file compressed with the tool in the rar file open it up in a text editor like Notepad++ like I did here:
There's a directories section under which you'll find the name of the games (Keep in mind RE7 materials can't be used in other RE Engine games) now type the path for the extracted files for example I have DMC5 files extracted in "D:\DMC5 Files\re_chunk_000\natives"
So I do this (Make sure there's a space before and after the "=" sign just like in the picture):
Now make sure both the game you want to take the material from and he one you want to use the material in have their extracted files' directory listed here like I want to take a material from DMC5 and put it in RE3 so I do like the picture above.
2. Now you will need enable this option by removing the "//" before it so the tool will mark the materials from other games so you won't get a name conflict with the materials in the target game:
Now save the config file.
3. Now put the MDF file from the game you want to take the material from in the Source Material folder and the MDF you want to replace the material inside from the other game in the Target Material folder and run the tool the process is the same as shown above for simple in-game material swapping but this time it might ask you what game the Target or the Source material belongs to which you will answer with RE2, DMC5, RE3 or RER.
4. After you're done swapping the materials this time the tool asks you if you want to copy the dependencies (Textures and MMTR files) from the source game into the target game. You do want to say yes to this because if the MDF couldn't find the files it needs it'll just crash the game:
The tool now outputs the new MDF file plus a folder that contains the files it took from the source game:
You can now just put the "stm" (or x64 depending on the game) in the natives folder and copy the new MDF over the one you want to replace and install the mod it's done!
Config File and Command Line Options:
In the Config.cfg file there is section at the beginning of the file called "Configuration" I explain what each one does now:
*To enable each option you must delete the "//" before it otherwise it will use the default value I put in the tool*
No 1. This is the path to the source MDF folder you can change it to anything like if you put "Source MDF" it'll look in that folder instead of the default folder which is "Material Source".
No 2. Same as number 1 but this time for the target folder.
No 3. This is the path in which the output files will be put this one is the the same as the EXE by default.
No 4. This one takes RE2, DMC5, RE3 or RER as input and will output the files for the game you type here, keep in mind enabling this option will also enable the MMTR_Suffix option which I will explain after this, the default format for this one is the same as the target MDF file.
No 5. This option will put a suffix of _RE2, _DMC5, _RE3 or _RER after the MMTR files in the target MDF according to the source MDF version to avoid any name conflict between the two games it can be set to "true" or "false" if set to "true" the tool will ask you if you want to copy the files mentioned in the material from the source game in their new directories to work with the target game. The default value for this one is "false".
No 6. This can be set to either "true" or "false" if set to "true" it will swap the names of the materials' names too (this won't affect anything and is just a way to identify the materials for the tool so you can have it set to false if you want to keep the names). The default value of this option is "true".
At last an example of a customized config file:
Now that I covered the Config.cfg file you can use the options in it with command line as well (Command line parameters are prior to the config file and will override it) to get a list of commands available run the program with the "-help" or "-h" parameter:
The only new option here is "-config" you can run the program to use another config file like this "Material Swapper.exe -config "custom profile 2.txt"" this will make the tool load the options from the "custom profile 2.txt" file instead of the default "Config.cfg" file.