Jump to content

Nioh 2 - Modding Thread and Discussion -


Recommended Posts

On 11/26/2021 at 10:23 AM, bluejay4 said:

hi everyone. in regard to custom armor meshes with the body visible, im not sure if anyone is still trying to do this, but since i struggled a lot with it myself, i thought i should post a guide here for others who might want to try it. i apologize in advance if my format is bad or anything, i dont normally write guides or post on forums. also apologies if my terminology is incorrect. anyway hopefully this is helpful to someone.

 

huge thanks to murabito11 and everyone here for sharing their work and knowledge about modding this game. 

 

How to Make Armor Edits with Visible Body Underneath

armor_mod.png.b32beeb20eba3f63000a40005bad9282.png

note: the custom body and chest armor are mods that already exist from murabito. they can be found here https://www.nexusmods.com/nioh2/mods/166https://www.nexusmods.com/nioh2/mods/171. the leg armor is the end result of this guide.

 

Frame Analysis/Dumping

although frame analysis may be straightforward for some, and it is already covered in etsorhtt's guide, ill start from the top anyway just to fully explain my workflow.

  Hide contents

1. start up Nioh 2 with Mod Enabler installed and find and equip the model you wish to edit. for this guide, i will be using the Sohaya Garb leg armor.

 

armor.thumb.png.dafc8876ecbfcea1cf337a8079d4e9f3.png

 

2. turn on hunting mode (0 key on numpad) and cycle through vertex buffers (numpad / and numpad *) until the piece of equipment you wish to edit turns invisible (it doesnt matter if other things turn invisible as well, as long as the piece u want to edit turns invisible then it is good). copy the hash (numpad -) and paste it somewhere as we will be using it later.

 

armor_vb.thumb.png.ef4960ae24f0f8ff04acb1899d9729b0.png

 

now reset the hunting mode selections (numpad +) and do the same thing for the pixel shaders (numpad 1 and numpad 2, numpad 3 to save hash) of the part of the model you wish to edit.

 

armor_ps.thumb.png.a967ad8c68b4567d619c8ccaaa79467b.png

 

3. now minimize Nioh 2 and navigate to your Nioh2/Mods folder, create a new folder and name it whatever you want to name your mod. i will name mine SohayaGarb.

 

f1.png.2842df315b706045daf196771b051b8f.png

 

4. create a text file in your new folder and name it whatever you want to name your mod. (make sure to save it as "All Files" and with the extension ".ini").

 

5. although not necessary, i will be creating a "meshes" folder and a "textures" in the new folder to keep things tidy.

 

f2.png.c5c918cb287e60a9c9bc9458f69f61dc.png

 

6. now open your .ini file and type the following.

 

[ShaderOverrideSohayaGarb]
hash = a38c98c7c7c31931
run = CommandListN2Dump

 

replace "SohayaGarb" with whatever you want to name it, and for hash put the pixel shader you copied ealier and save the file.

 

7. now go back to your Nioh 2 game window and press F10 to reload the mods (this will also read the new mod folder you just created).

 

8. turn on hunting mode (numpad 0) and reset it (numpad +).

 

9. with hunting mode still on, press F8 to perform frame analysis. this will create a new folder in your Nioh2 directory called "FrameAnalysis-" followed by a date and some numbers. i renamed this folder so i know what it is.

 

10. open this folder. if all goes well, you should see a bunch of .dds and .txt files, among some others. the main ones we are looking for are the .txt files that contain the pixel shader hash that we copied. these are what we will be loading into blender in the next steps.

 

f3-1.png.b8a3128042c2ff00a8e9e6b10cfda381.png

 

11. we can also grab the .dds files while we are here. these are the texture files for the models. you may need a software like paint.net to open/view these files. in my case there are only 3 .dds files, so i know these are the right ones. i will take these files and move them into my new textures folder within my mod. i will also rename them.

 

f5.png.668b7f6bbd45d0011b1f868b099ee2ae.png

 

i am not sure what versions of blender work for this, but i am using v2.79 which can be found here https://download.blender.org/release/Blender2.79/ (i am on Windows 10, 64 bit. i downloaded blender-2.79-windows64.msi).


before you can import/export these files in blender, you need to have the 3dmigoto blender addon which can be found here https://github.com/DarkStarSword/3d-fixes/blob/master/blender_3dmigoto.py

 

download this file and place it in your equivalent of this path C:\Users\YOURNAME\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons.
now open up blender and go to file -> user preferences -> add-ons and find the Import-Export:3DMigoto addon and click the checkbox to enable it. now blender should be good to go.

 

Importing/Exporting in Blender

  Hide contents

1. go to file -> import -> 3DMigoto frame analysis dump

 

bm1.png.9a97ec5fd0a425402aab836b52645c44.png

 

2. navigate to your FrameAnalysis folder and look for the .txt files that ends in the pixel shader hash you copied earlier. select all these files and import.

 

bm2.png.a70a9dee8b1597f24b6eb7c19845a28a.png


3. import the body model you wish to use. i am using murabito's body model (specifically i am using the body meshes found in murabito's Nyotengu Schoolgirl Strikers mod since they are already conveniently grouped. it can be found here https://www.nexusmods.com/nioh2/mods/189). since this model is not from a FrameAnalysis, i will use the 3DMigoto raw buffers import option.

 

bm3.png.21ee3d50e9ca8040a68b6f8836fe314f.png


4. edit the mesh how you would like. i just removed the pants part

 

be1.png.291b6a7b012d201f63d7f9ea13b4f4d8.png


5. once you are satisfied with your changes, export the model (just the equipment, not the body). to do this, go to object mode and select the model then go to file -> export -> 3DMigoto raw buffers. export this file to the meshes folder within your new mod folder.

 

f4.png.2e22062dc432bd5eb7097340d310ae22.png

 

Transferring Weights for the Body

 

this is a bit of a tedious process which involves comparing the original armor mesh's weights to the body mesh's weights and then shifting around the body mesh's weights to match the armor. i find it easiest to have 2 instances of blender open, one for the armor and one for the body.

  Hide contents

1. open up a new instance of blender and import the armor from the FrameAnalysis folder (the original model, not the modified one that you exported earlier).

 

2. open up another instance of blender and import the body that you will be using.

 

bd1.thumb.png.7e2be2c53ff6935dbc7da914a25618fd.png

 

do the following for both new blender instances:

 

3. select the model and then change from Object Mode to Weight Paint.

 

bw1.png.e89e177c8dbe2a8ac2da2d3ca92e0462.png

 

4. on the right side, in the properties toolbar, click on the Object Data tab.


5. under the vertex groups section, scroll up and select the top vertex group (it should be 0).

 

bw2-1.png.0b20f40e889ca2002e6e53d432485ada.png

note: actual weights are only found every 3rd vertex group (ex: 0, 3, 6, etc...), but all empty vertex groups between actual weight vertex groups are necessary.

 

6. this is where it gets tedious. you will have to manually compare the weights by eye between the armor and the body, and then rename and reorder the body weights to match as close as possible to the armor weights. the armor will most likely always have more vertex groups than the body, but that is ok.

 

bd2.thumb.png.37ee99d514f80f8e73991f1be502dca9.png

the above image demonstrates the goal of the weight transferring. as you can see, the vertex group 0 for both the pants (left )and the body (right) share the same region of weights.

 

bd3.thumb.png.9c9b16d8174d9bbf2d4b9b25b058234c.png

this image demonstrates a mismatch which will cause the bones to freak out in game if left as they are.

 

bd4.thumb.png.384545c1bd5680c90ff430f89f3c1206.png

here we can see that the vertex group 18 for the body contains the weights that are in vertex group 21 for the Sohaya Garb leg armor. we will need to adjust the body vertex group (right side) to match the leg armor (left side).

 

to do this, we can simply double click on the vertex groups that we need to shift around and rename them appropriately. after renaming, we can then shift them up and down using the arrows on the right side.

 

bw31.png.465a2d5f4076110a2e4fb7270ac20f4e.png

in this image i have renamed the vertex group 21 to 21_temp, and then renamed 18 to 21. the next step will be to click the down arrow to move the new 21 into its proper place. after that i will create an empty vertex group and rename it to 18.

 

you will have to repeat this process for all of the body's vertex groups that contain weights. if there are any weight regions that appear on the body that do not appear on the armor, you are likely safe in simply deleting them and replacing them with a new, empty vertex group.

 

if a body vertex group ends up being a very high number, for example say that the leg armor vertex group was 90, and the matching body vertex group was 18, you would have to rename 18 to 90 and then create vertex groups all the way up to 90, leaving them empty if there are no matching weight regions.

 

alternatively, if the highest matching vertex group is 30, and no groups above that match any weight regions, then 30 is the highest group you need for the body, even if the armor has 100+ vertex groups.

 

note: we dont need to adjust the armor's vertex groups. only the body's vertex groups.

 

once you have matched the vertex groups, you can then export the body mesh. file -> export -> 3DMigoto raw buffers. export this file to the meshes folder within your new mod folder.

 

Making the .ini File

  Hide contents

it may be easiest to just share the .ini file that i have. for the most part you can probably just copy-paste this and just change the parts that you need to (hashes, names).

 

as murabito discovered and stated earlier in this thread, you can display different meshes with different textures within the same hash by using the format seen below.

 

also you may notice that the ResourceBody lines reference another folder. this is because i have murabito's body mod installed and am referencing that. you could alternatively just copy the textures into your texture folder and reference them there.

[ShaderOverrideSohayaGarb]
hash = a38c98c7c7c31931
run = CommandListN2General
checktextureoverride = ib
allow_duplicate_hash = true

[TextureOverrideSohayaGarbLower]
hash = 2a8f4afe
match_first_index = 0
handling = skip
vb0 = ResourceSohayaGarbLowerVB
ib = ResourceSohayaGarbLowerIB
ps-t0 = ResourceSohayaGarbLower_t0
ps-t1 = ResourceSohayaGarbLower_t1
ps-t3 = ResourceSohayaGarbLower_t3
drawindexed = auto

vb0 = ResourceBodyLowerVB
ib = ResourceBodyLowerIB
ps-t0 = ResourceBody_t0
ps-t1 = ResourceBody_t1
ps-t2 = ResourceBody_t2
ps-t3 = ResourceBody_t3
drawindexed = auto

[ResourceSohayaGarbLowerVB]
type = Buffer
stride = 48
format = DXGI_FORMAT_R16_UINT
filename = meshes\SohayaGarbLower.vb

[ResourceSohayaGarbLowerIB]
type = Buffer
stride = 48
format = DXGI_FORMAT_R16_UINT
filename = meshes\SohayaGarbLower.ib

[ResourceBodyLowerVB]
type = Buffer
stride = 48
format = DXGI_FORMAT_R16_UINT
filename = meshes\BodyLower.vb

[ResourceBodyLowerIB]
type = Buffer
stride = 48
format = DXGI_FORMAT_R16_UINT
filename = meshes\BodyLower.ib

[ResourceSohayaGarbLower_t0]
filename = textures\SohayaGarbLower_t0.dds
[ResourceSohayaGarbLower_t1]
filename = textures\SohayaGarbLower_t1.dds
[ResourceSohayaGarbLower_t3]
filename = textures\SohayaGarbLower_t3.dds

[ResourceBody_t0]
filename = ..\00_FemaleBodyReplacer\textures\equipbody_t0.dds
[ResourceBody_t1]
filename = ..\00_FemaleBodyReplacer\textures\body_t1.dds
[ResourceBody_t2]
filename = ..\00_FemaleBodyReplacer\textures\equipbody_t2.dds
[ResourceBody_t3]
filename = ..\00_FemaleBodyReplacer\textures\body_t3.dds

 


another important thing to note is that, as far as i can tell, you can only add the body mesh to armors that have a stride value of 48. if you try to add a body (stride 48) to armor that has stride 60, for example, the body will just glitch out. unfortunately this is quite a big limitation as much of the armor does not have a stride value of 48. im not sure if there is a workaround for this, but so far i have been unable to solve it.

 

you can find out the stride of a model by opening the .fmt file in a text editor.

 

Edit: actually i think i just realized a workaround for this stride mismatch issue: simply join the body mesh to the armor mesh in blender (select body first then select armor and press ctrl+j), and then in edit mode delete the armor mesh so that just the body mesh is remaining. then you can export this mesh as the body, and i believe it should now have whatever stride value the armor had.

 

anyway after editing and saving the .ini file, you should be able to press F10 in game to reload the mods and F2 to toggle mods on and if all went well, it should work. if the textures look off, you may need to mess around with them in the .ini file (sometimes you need to remove ps-t1 or rename ps-t3 to ps-t4 or vice versa).

 

if i was unclear at any part or didnt go into enough detail, let me know and ill see if i can fix it.

 

hope this helps, and again huge credit and thanks to murabito11

Referring to the Weight section, I assume you would delete the _temp vertex groups?

Link to comment

It isn't exactly the same engine, might be a newer version based on dx12.  Which will make thing a lot more difficult.  It's sad because I much prefer Nioh 2 character creation over it.  

 

Best I could make after messing with it for a while:

Spoiler

image.thumb.png.f915597ec380d993513d72a818afaf69.png

 

Vs like:

 

Spoiler

image.thumb.png.4534ab19019482b66e5abbf47b43e495.png

 

Seems like lighting and skin texture are different and the Wo long was done in the screen shot mode no reshade lol.

For comparison I used this template, which is similar to this template from Nioh 2:

 

Spoiler

def9r77-a2e997b4-5e12-42c8-a800-284a61b43f16.png?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvNWQ2OTQ4ZmEtMTM2YS00YzQ2LThlNTItNzM4N2Q4ZjczYjEwXC9kZWY5cjc3LWEyZTk5N2I0LTVlMTItNDJjOC1hODAwLTI4NGE2MWI0M2YxNi5wbmcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.3BqA531iyXcDoWY36OrFcvwOlEAXi76ih-pRSpzXIGg


Wo Long

 

Spoiler

image.thumb.png.c3c8fab71d252b656d0f02c2b650d682.png


Both are on about the same settings.  High textures and 4k res.

Edited by Silvist
Link to comment

I finally found a good preset for Wo Long...and its starting to look like Souls games.  As in whatever you do in the character creator doesn't reflect the same in game.  Literally the first game i've ever seen brow depth set to a positive value to look good LOL.

Example of what someone posted:

h5m5t6omyqla1.png

Now this looks alot more like Nioh 2 style. 

Source:
https://www.reddit.com/r/wolongfallendynasty/comments/11i3oow/all_hail_the_fire_lord_azula_from_atla/

Link to comment
5 hours ago, MemoryH said:

I read there is a Cheat Engine that alters the character's proportions. Does anyone know about that?

i havent found a cheat engine table but you can use value search to do it yourself. just set the slider you want to edit to 20 and then search for 20, then set it to 19 and search for 19, etc etc until you only have a value (or sometimes as with the breasts, a few values) that change when you change them in game

 

then you can just set the value at the address to whatever you want. it even saves when you save your character. once a slider is over the limit, you can move it back towards 0 without cheat engine

unfortunately the address seems to change each time you go into the character creator so i cant make a table

Link to comment
12 hours ago, hilbo75 said:

i havent found a cheat engine table but you can use value search to do it yourself. just set the slider you want to edit to 20 and then search for 20, then set it to 19 and search for 19, etc etc until you only have a value (or sometimes as with the breasts, a few values) that change when you change them in game

 

then you can just set the value at the address to whatever you want. it even saves when you save your character. once a slider is over the limit, you can move it back towards 0 without cheat engine

unfortunately the address seems to change each time you go into the character creator so i cant make a table

Thanks for helping. It seems to reset everytime I leave the character creator, and there seems to be a hard limit on the scaling. Welp, so much for that.

Link to comment
1 hour ago, MemoryH said:

Thanks for helping. It seems to reset everytime I leave the character creator, and there seems to be a hard limit on the scaling. Welp, so much for that.

 

i personally only used it for body size and it seemed permanent there but i guess it depends on which slider it is

everything seems to be set to normal parameters temporarily in cutscenes but they go back afterwards

Link to comment
  • 1 month later...
  • 1 month later...
  • 1 month later...
  • 2 months later...

I have a problem when press f8 to load the frame analysis it doesn't have the texture or the meshs that I want to edit

 

this my ini file:

;Mask
;VB Code: : 50114c76
;PS Code: : 2b4f1e31175e9cbc
 
[ShaderOverride_myMask]
hash = 2b4f1e31175e9cbc
run = CommandListN2Dump
;run = CommadListN2General
 
please I need help
Link to comment
  • 4 weeks later...

I'm new to modding and wondering how to fix this (I think it's some kind of reflection):

Spoiler

Screenshot2023-11-04052414.thumb.png.f6f

For the weathered bone & bleached twig dual swords I changed the meshes and textures (ps-t0 to ps-t2) to that of the soshu dual uchigatanas, but there is still this artifact.

 

EDIT: I found out the issue was caused by the ps-t4 (even though it didn't show up from any of the frame analysis dumps for the wb&bt)

Edited by kayellle
Link to comment
  • 1 month later...
  • 3 weeks later...

Has anyone successfully done any modifications to the head? I tried on one unique NPC and got terrible effects. Even importing and exporting the head without any change has the same result. I tried the 3dmigoto plugin on Nov.20 this year and the one edited by Mawpius last year.

200926j0evlpj240w7s0c4.jpg

Link to comment
23 minutes ago, reko34 said:

Has anyone successfully done any modifications to the head? I tried on one unique NPC and got terrible effects. Even importing and exporting the head without any change has the same result. I tried the 3dmigoto plugin on Nov.20 this year and the one edited by Mawpius last year.

200926j0evlpj240w7s0c4.jpg

you have to normalize all the weights or smooth - All Groups in the weight paint  section with the face highlighted then export - may have to do it a couple times - but there still may be some issues during some expressions 

Link to comment

Ive been trying to merge these two mods, who're replacing the shinobi robe and koroku armor respectively, together.  That way the sleeves will be grafted onto the tube top, adding them to the koroku mod essentially (visualized in the screenshot below). However, over the course of the last month ive been trying to do this i realized i am utterly inept to comprehend the stuff this complex process entails.

Is there anybody able to do that? Just the mesh, not textures or anything

Files: https://www.mediafire.com/folder/afc2mzrjof8cz/Meshes+and+ini+files

I need a hero... >.<Screenshot-465.png

Link to comment
On 12/27/2023 at 8:59 PM, True_Might said:

you have to normalize all the weights or smooth - All Groups in the weight paint  section with the face highlighted then export - may have to do it a couple times - but there still may be some issues during some expressions 

Thanks! I'll give it a try. It sounds difficult.

Is the mod enabler unable to capture the model totally? Besides this weight issue, it gives me maximum 4 textures, but some models have more than that.

 

And is it possible to modify the bones? Fuku's long face doesn't fit her height. A simple height change can make the model more naturally. It's a simpler solution than head edit if it's possible.

 

Edit: I normalized the weights of the head vertices and the result is nearly the same. I wonder why do the head vertices have abnormal weights(sum <1) while the other body part seem to be OK. I can only hope to find a way to change bone positions. Does anyone know a way to make NPCs taller?

Edited by reko34
update the status of my problem
Link to comment
  • 4 weeks later...

Hello guys,

 

I've been playing nioh 2 for a while but since i'm colorblind, the Kodama sensor is not very helpful.
I've been trying to help me and other colorblind player by doing a mod that could change the small "green spot" on the map with icon.

i'm struggling so far. I've the hash for the HUD of the pixel shader 6b7204f6f93fc214 and i've found that all the image are sharing the same hash : c4230e62

(image name after the dump "002233.0-[commandlistn2dump]-ps-t0=31f8df9c.dds".

I can't find a way to only affect Kodama dots/Enemy Dots independently.

I've tried to use match_first_index = xx but it seems to be changing a lot...

 

Any help ?

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use