SMTVV ‐ Porting SMTV models - mugenrei/mugenrei.github.io GitHub Wiki
Step 0: Programs you need
- Unreal Engine 4.27, you can get it on the Unreal Engine Downloader Launcher.
- Tip: You can install to any folder, create a shortcut to the UE4Editor.exe then remove the launcher later.
- Blender, I've used Version 3.6.
- FModel.
- UAssetGUI.
- Both SHIN MEGAMI TENSEI V Base Game and SHIN MEGAMI TENSEI V VENGEANCE
- An emulator set-up with the keys, either Ryujinx or Yuzu, to extract the game's files.
Step 1: Locating game's files
PC
- On Steam:
- Right click the game on your
Steam Library > Manage > Browse Local Files
. - The game folder, SMT5V will open, keep it open and jump to step 2.
Emulators
- On Ryujinx:
- Add a game folder with SMTV's .NSP inside.
- Right click the game > Extract Data > RomFS.
- Select the folder, click OK and wait.
- On Yuzu:
- Add a game folder with SMTV's .NSP inside.
Right click the game > Dump RomFS
.- Select Program, click OK.
- Full, click OK.
- It will should extract the game to
%APPDATA%/Yuzu/dump/010069c01ab82000/romfs
.
Step 2: Prepare SMTV Files
- You need SMTV base game because model swap mods don't have skeleton when shipped, it uses the demons vanilla skeleton, you need a skeleton to be exported as well.
- Open
romfs/Project/Content/Paks/~mods
and paste your mod there.
Step 3: Export Character
- Do this two times, one for SMTV (VNX) and SMTVV (VPC).
- Extract FModel.
- Open FModel.
- Click
Directory > Selector
. - Click the arrows icon under ADD UNDETECTED GAME.
- On Directory, select:
- (VVPC)
Path/to/SteamLibrary/common/SMT5V
. - (VNX)
Path/to/SMTV/ExtractedRomFS
.
- (VVPC)
- Click the
+ button
. - On the Top Section change UE Versions to:
- (VVPC)
GAME_UE4_27
. - (VNX)
GAME_UE4_23
.
- (VVPC)
Step 4: Exporting the mod's Model
- Open the SMT V profile
- On the Top Bar click on
Settings
. - In Texture Platform select
Nintendo Switch
. - In the Side Bar change Mesh Format to PSK
- Change the pak loading method to ALL
- Load the PAK
- Go to the replaced character folder:
- If it's Chadhobino, the protagonist as Nahobino, go to
Game/Design/Character/Player/pla603_hero_union
.
- If it's Chadhobino, the protagonist as Nahobino, go to
- Right click
pla603_hero_union
folder, then:- Export Folder's Packages Raw Data (.uasset)
- Save Folder's Packages Textures (.png).
- Save Folder's Packages Models.
- On the Top Bar click on
Settings
. - In the Side Bar change Mesh Format to glTF 2.0 (binary)
- Right click
pla603_hero_union
folder, then:- Save Folder's Packages Models.
- Output will be on
FModel Folder/Output/Exports/Project
. - Go to that output path and change
Project
toProjectMod
otherwise it will be overwritten later.
Step 5: Exporting the unedited's Model
- This step is crucial for a mod that alter Nahobino, because there were skeleton changes from base SMTV, if you're unsure your character had changes to the skeleton either compare the skeletons or just do this step anyway, it's not harmful.
- Open the SMT VV profile
- On the Top Bar click on
Settings
. - In Texture Platform select
PC
. - In the Side Bar change Mesh Format to PSK.
- Change the pak loading method to ALL
- Load the PAK
- Go to the unedited character folder:
- If it's Chadhobino, the protagonist as Nahobino, go to
Game/Design/Character/Player/pla603_hero_union
.
- If it's Chadhobino, the protagonist as Nahobino, go to
- Right click
pla603_hero_union
folder, then:- Export Folder's Packages Raw Data (.uasset)
- Save Folder's Packages Textures (.png).
- Save Folder's Packages Models.
- No need for glTF for ports since we will not use this mesh later.
- Output will be on
FModel Folder/Output/Exports/Project
.
Step 6: Import and Combine Files in Blender
- For the modded character export:
- Click Import PSK and import the base game mod character's mesh.
- Go to
File > Import > glTF
and import the base game mod character's mesh.- If the glTF skeleton gets upside down, ignore it, follow the steps.
- Click on the Armature Object[1] of the imported glTF then hold
CTRL
and click the Armature Object[3] of the imported PSK.
- Click on Combine PSK and GLTF[3] in the PSK addon.
- Why do this?: PSK usually don't preserve smoothing groups, making the mesh not be preserved, so you use the glTF mesh with the PSK Armature.
- Click Import PSK.
- Import the unedited model.
Step 6.1: Changing skeletons in Blender
- Click the modded mesh[1] inside the armature, hold
CTRL
, click the VV's unedited model[2] then hover your mouse to the viewport and pressCTRL + P
and select Armature Deform[3].
- Delete the modded mesh's old Armature.
- Select the modded mesh on the new Armature[1], go to Modifiers[2] and remove the old Armature's modifier[3].
- Select the Armature and enter Pose Mode, select some bones, mainly the spine and legs and do some movement to see if it's all right,
CTRL + Z
back to the t-pose after that.
Step 6.2: Dealing with new mesh additions
- You may notice that nahobino has 4 new swords, totaling 6 along with the old pair, you may want to keep them!
- Return to Object Mode and select the VV's unedited Mesh, enter Edit Mode.
- Unselect everything by click on an empty part of the viewport.
- Hover over each of the Swords and press
L
on each of them,Right Click Viewport > Separate > Selection
- You'll notice a new object appeared under the Armature, enter Object Mode and delete the mesh of the VV's unedited Body.
- That will leave you with 2 meshes, the swords and the modded mesh.
Step 6.3: Checking material names
- FModel seems to not keep all the material names, fix that! (Section done afterwards so that's why the extra sword meshes aren't on the screenshot, imagine they are)
- Return to Object Mode and select the modded Mesh[1], enter Edit Mode[2] go to Materials[3], and see if any entry is called
material_n
.
- If true then you'll have to fix it, go to the modded character's Mesh folder on the ProjectMod Output folder and open the mesh.uasset (eg. SK_pla603.uasset) with UAssetGui.
- In Name Map check the paths with "Material" on it, compare to see what's missing on Blender's materials.
- If it's more than one and if you don't know which part the material covers:
- Still in Edit Mode unselect everything[1], Select the unnamed material[2] and click Select[3], the part of that material is now selected[4].
- Rename the material by double clicking on it.
Step 6: Export from Blender
- Enter object mode and save the project.
- Select the Armature object.
- Make sure it is named Armature.
- Click export as FBX in the PSK addon.
Step 7: Import to Unreal Engine 4.27
- Open Unreal Engine 4.27 and create a blank project called Project, optional name.
- Create the character's Mesh folder structure.
- For Chadhobino it is
/Content/Design/Character/Player/pla603_hero_union/Mesh
.
- For Chadhobino it is
- Rename the FBX you exported from Blender to match the character's uasset name (e.g.,
SK_pla603.fbx
). - Drag and drop it into the UE4's Mesh folder.
- Tick these import settings: Use T0 As Ref Pose, Import Normals and Tangents.
Step 8: Prepare for Cooking
- If the model have custom textures, see where they are located on the ProjectMod folder.
- Recreate the Texture folder on UE4 and move them there.
- Select them,
Right click > Assets Action > Bulk Edit via Property Matrix...
. - Tick Compress Without Alpha and on Mip Gen Settings select
NoMipmaps
. - Go to
File > Save All
. - Close the window.
- Create the Material folder.
- Move the materials created by UE4 to the Material folder.
Step 8.1: Creating PostAnimBP (Pla601 or Pla603 only)
-
On the Mesh Folder right click
SK_pla603 > Create > Anim Blueprint
. -
Name it
Pla603_PostAnimBP
. -
Create the The following folder:
/Content/Blueprints/Character/Player/Pla603/
.
-
Move
Pla603_PostAnimBP
to the Pla603 folder. -
On the Mesh Folder double click
SK_pla603
. -
In the
Asset Details
side bar, scroll down to the Skeletal Mesh section. -
Find
Pla603_PostAnimBP
in the Post Process Anim Blueprint dropdown. -
Close the
SK_pla603
window.
Step 8.2: Setting up the Physics Asset (Fix camera jamming into the body)
- This is the values for the Hero, Pla603, for other characters: Learn how to get them.
-
On the Mesh Folder rename
SK_pla603_PhysicsAsset
toSK_pla603_PhAT
and double click it. -
In the
Skeleton Tree
side bar, select any bone, pressCTRL + A
and unselect theb_pelvis
bone. -
Right click the selection and select
Delete
. -
Select the
b_pelvis
bone and in the Details Tab on the right side bar:- Under Collision change Collision Response to
Disabled
. - Under Physics change Physics Type to
Kinematic
. - Under Body Setup expand Primitives, Capsules and 0:
- Set the X on Center to
-10
- Set the Y on Center to
90
- Set the Radius to
70
- Set the Length to
70
- Set the X on Center to
- Under Collision change Collision Response to
-
Close the
SK_pla603_PhAT
window. -
Go to
File > Cook Content for Windows
.
Step 9: Create Mod Folder
- Create the mod's working folder, in this case the example folder.
- Inside this folder you:
- Extract the
UnrealPak.exe
and theBAT file
accompanying it. - Create a folder for the pak, in this example the exahero folder.
- Extract the
- Create the mod's folder structure from UE4 inside the exahero folder.
- No need for the Material or Blueprints folder.
- Move the mesh and physics asset files from the cooked's Mesh folder to the mod's Mesh folder, same for the textures.
- Should be inside
D:\Documents\Unreal Projects\ProjectName\Saved\Cooked\WindowsNoEditor\ProjectName\Content\Design\Character\Player\pla603_hero_union
- Don't move the Skeleton uasset, otherwise it will break the game.
- Should be inside
Step 10: Dealing with extra Materials and Textures
-
This is here more as a rundown/barebones on materials because I'm lacking ideas on how to properly explain material editing right now (if you want to improve it follow the GitHub wiki link at top of the page and change it, I would appreciate).
-
You (probably) can't just copy the base game materials, you need one cooked on UE 4.27, so you use one from the game.
-
Check if the base game mod has textures with different names from the vanilla character.
-
Check if there are extra materials in the base game mod compared to the vanilla folder.
-
If neither of the cases:
- Maybe it's a mod that changes our man Nahobino shape to become the Giga Chadhobino, then probably no materials were changed:
- You're done, move to the packaging step
-
If first case:
- Lets say you're porting a Nahobino mod that attached something to him or replaced him with another model, that would need a different material as well.
- Go to the vv character Material folder.
- Copy a vv material that you think might fit the part the previous material was located (eg. If it's skin, choose a skin, hada, body or face, material) to the equivalent ported mod Material folder.
- You'll need to rename it both outside and inside the file, as well as adjust path, to do so:
- Rename to the extra material's name from its original name to the base game mod's.
- Open it with UAssetGui.
- On Name Map, find the path with the vv material's name on it.
- Click on the entry, copy it, right click and select
Replace all references...
; PS: Don't just change it without doing this. - Paste the path and change the material name at the end of the path, the path should match where the Material is currently located, starting from
/Game/
. - Still on Name Map, scroll down to find the vv material's name without a path.
- Click on the entry, right click it and select
Replace all references...
, change it as well. - Do the same for the textures, rename both the paths and their isolated entries to the ones from the base game mod.
- Save it and close it.
Step 11: Package and Install Mod
- Drag the mod's exahero folder to unrealpak's BAT.
- Copy the
mod.pak
to the game's ~mods folder.- Refer to my Mod installation guide if you have inexperience installing mods.
- Fire up the game.
Open the game
- You should notice the changes you did!
Enjoy your modding!