[SFxT] How to Prevent Same .emo Crashing Issue Workaround
Posted March 22nd, 2021·
3 mins read
This Tutorial will explain how to make 2 or more mods that use the same emo file work in the game without crashing
NOTE - This method is for mods of the same emo that does not involve SkelSwap. This method will still prevent crashing if SkelSwap was involved, but instead of crashing, there is a monkey face issue.
Step 1 - Building the emo
First step is to gather the emo files of all the mods you want to make compatible.
Once you have them all, decide which emo you will use as the base. (preferably the the mod with the most DDS files since it will make you have less DDS re-referencing to do later on).
Then inspect what parts are the same between them (most common are the eyes, tongue, teeth, face, etc). These parts from the other emo files will not be required.
Then check what parts of all the emo files have the same material names between the mods, but have different models. (most common would be skin)
Open the emo files that is not your base in a hex editor and rename those materials to something different (eg. Skin2, Skin3).
When that is done, start taking the emg files from those emos and append it to the base emo using EMGSWAPv3 (remember, same parts like eyes and such don't need to be transferred).
Once that is done, the emo is complete (for now).
Step 2 - Building all the emb files and re-referencing the emo
Now its time to make the emb files.
Start by extracting all the DDS files using asset explorer. (DDS files for the parts that are the same like the eyes and such, don't need duplicates)
Once you have all the DDS files, use kensous tool to build the emb file (recommended that the dds files from the base mod are first and have the same order so it will be less work re-referencing them)
Now that the emb is done, use DDSREFEDIT to re-reference the parts you appended in the emo to the right dds files.
After that, make copies of the emb file for all your mods.
For each of those emb files, extract the dds files that will not be used by that particular mod and make its alpha channel completely black in photoshop and re-inject it back to its emb.
When that is complete for all your emb files, its time to move on to the emm files.
Step 3 - Building the emm files
Now its time to make the emm files.
Open up the emm file from your base mod and begin adding the materials from the other mods.
When all the materials are made, make copies of them for each of the mods for and make the necessary adjustments of colours for each of them.
When all the emm files have all the right colours for their mods, start adding the AlphaTest parameter to all the materials that are not being used in each mod.
when that is complete, export the material count to the emo file and copy that emo for all your mods (This one emo will be used for all mods).
When that is complete, open up the pdr.emm from your base mod and add all the materials from the other mod to it.
When that is done, make copies of it for all your mods.
Now for each of those pdr files, on the skin materials (or any material that uses SpcBumpBrushEmiMaskARGB_UV1_W or RedEye_W) that is not being used by that particular mod, change the shader name to SpcBumpBrushEmiRGB_UV1_W or else unwanted parts will show up in pandora.
When that is complete, all that is left is to do is to make the minor adjustments of the lua files to be updated with the new material names you had renamed in the first step and you are done.
Reason why this works
The reason why this workaround works, is because when you hover over a costume in the select screen, that costume's emo file gets loaded in the computers memory. So when you move the cursor to a different mod that uses the same emo, the game will think its the same costume and use the emo it had loaded in memory and since the material and dds count are different from the emo in memory, the game crashes. So with this workaround, we built one emo that has all the parts from each mod, so when we hover over a different mod with the same emo file, all the correct parts are still there and that particular mods emb and emm files hides the unwanted parts making the mods work.