Jump to content

Beginners Modding Tutorial


Recommended Posts

  • 2 weeks later...

Thank god! This will help a lot!

EDIT:
Actually, maybe you can help me. Your tutorial doesn't seem to cover what I'm looking for.
I'm trying to get Leifang to just have her shoes and gloves based on Saafrats nude mod as a base.

 

I can edit, import/export, and get the thing running just fine. It works in-game.
I've deleted the hands/feet meshes and merged the gloves and shoes mesh.

Problem:

The gloves/shoes use the skin base texture/material, not the gloves. I need to figure out how to get the gloves/shoes to reference the original textures (COS_004, first costume).

Do you know what's gone wrong? Any help would be greatly appreciated!

 

Spoiler

Both wrong:
20210201035422_1.thumb.jpg.b69890ec352e9e9ec01da189bb69ed4d.jpg20201008202945_1.thumb.jpg.5e7c40473036e9a721d2c70f0c2bf45f.jpg




 

Link to comment
12 hours ago, woohoolink said:

Thank god! This will help a lot!

EDIT:
Actually, maybe you can help me. Your tutorial doesn't seem to cover what I'm looking for.
I'm trying to get Leifang to just have her shoes and gloves based on Saafrats nude mod as a base.

 

I can edit, import/export, and get the thing running just fine. It works in-game.
I've deleted the hands/feet meshes and merged the gloves and shoes mesh.

Problem:

The gloves/shoes use the skin base texture/material, not the gloves. I need to figure out how to get the gloves/shoes to reference the original textures (COS_004, first costume).

Do you know what's gone wrong? Any help would be greatly appreciated!

 

Hmmmm, without seeing the blend file, I'm going to have to assume you placed the body parts in the wrong .vb # because you merged the glove & shoes mesh together with her body.  

 

Let's talk about your first one (LEI_COS_004).  Each .vb reads a certain texture file. Her 9.vb reads her skin texture file.  From the looks of it, I think you placed her nude body in her 3.vb, which is reading her costume texture file.  Keep her body .vb separate from her gloves/shoes .vb.

 

I was able to replicate the mod you're trying to accomplish. But, this is without softbody physics.

 

But in order to integrate the softbody physicis correctly, I think you would need to use saafrat's original nude model, copy & paste LEI_COS_004 gloves & shoes to it.  Make your edits.  Export...etc.  Adjust the .ktid file.  Maybe adjust the XML file, and use the renaming method to make it fit her slot LEI_COS_004.

 

I'm sorry if that was a little overwhelming, but let me know if you have any questions when making this mod.  

Best of luck to you.

 

Spoiler

838380_20210405201416_1.thumb.png.9436886413004aa8a14fd0adae0a06c1.png

 

Link to comment
17 hours ago, wingzg said:

 

Hmmmm, without seeing the blend file, I'm going to have to assume you placed the body parts in the wrong .vb # because you merged the glove & shoes mesh together with her body.  [...] [...] [...]

Yes, I believe that's exactly what happened. I do still want to retain softbody physics if possible, so I am building off saafrat's nude base.

I have done as you're suggesting only with the issue being I don't know which .vb I need to be working with or which I can replace. Since the gloves/shoes need their own textures separate from saafrat's nude base, I'll need to mess with the .xml or .ktid (which I don't fully understand), I think.

I'm linking to the conversation I had with @fgh1t6 about this endeavor, but I replied too late and they didn't get back to me after a while. I tried to document as much as I could about my process.

Also, attached is my .blend file. This is a backup before I deleted the hand/feet. The weights should also be applied correctly, but I'm not 100% sure.

Thanks so much for even just reading this whole thing, it's a lot.

 

 

NudeShoes.blend

Link to comment
2 hours ago, woohoolink said:

Yes, I believe that's exactly what happened. I do still want to retain softbody physics if possible, so I am building off saafrat's nude base.

I have done as you're suggesting only with the issue being I don't know which .vb I need to be working with or which I can replace. Since the gloves/shoes need their own textures separate from saafrat's nude base, I'll need to mess with the .xml or .ktid (which I don't fully understand), I think.

There is a quick way to tell which mesh is safe to work with:

in Blender, expend the "properties" tab ( 3D view, N key, "properties" is at the end, or for 2.82, open the "Item" tab. Check the "3DMigoto:VBStride", if it is 44, the mesh is a normal mesh that you are safe to bully with. 

Remember, after the mesh editing work, you need to clean up unused bones (you can get a plugin to do it: https://blenderartists.org/t/batch-delete-vertex-groups-script/449881) and run script "Assign new 3DMigoto vertex groups".

g1m_import your new mesh and test in game before going into xml editing. When every thing is good, convert the g1m to xml. Don't be scared, xml part is much easier than you though. 

Link to comment
6 hours ago, woohoolink said:

Yes, I believe that's exactly what happened. I do still want to retain softbody physics if possible, so I am building off saafrat's nude base.

I have done as you're suggesting only with the issue being I don't know which .vb I need to be working with or which I can replace. Since the gloves/shoes need their own textures separate from saafrat's nude base, I'll need to mess with the .xml or .ktid (which I don't fully understand), I think.

I'm linking to the conversation I had with @fgh1t6 about this endeavor, but I replied too late and they didn't get back to me after a while. I tried to document as much as I could about my process.

Also, attached is my .blend file. This is a backup before I deleted the hand/feet. The weights should also be applied correctly, but I'm not 100% sure.

 

Unfortunately, I wasn't able to open your .blend file.  But I was able to create the mod with soft body physics.  It's actually a lot simpler than anticipated.

 

So, if you haven't already known, saafrat's nude mod is based off of PHF_COS_007.  And we want to put in the glove & shoes mesh from LEI_COS_004 into PHF_COS_007.

 

The glove & shoes mesh are from 3.vb (LEI).  I want to place them into 2.vb (PHF).  I'll explain why in a bit.

 

1. Copy and paste LEI's gloves and shoes into 2.vb (PHF)

2. Apply VGMAP from 3.vb (LEI) into 2.vb (PHF)

3. Assign Vertex Groups -> "3"

4. Export your 2.vb (PHF)

 

Spoiler

lei.thumb.jpg.489a8f509404f965dc6cd178cefe1867.jpg

 

When you're doing your imports, I recommend using an original PHF_COS_007.g1m as you cannot import already hidden meshes back into the .g1m.  The hidden meshes will cause the costume to fail to load in game.

 

After using g1m_import, I rename the file from PHF_COS_007 to LEI_COS_004.

 

The reason I placed the gloves & shoes into 2.vb (PHF) is because that 2.vb reads PHF's costume texture.  When you open a .g1m's XML file, you can see which .vbs read what texture.  @fgh1t6 explains this much better than I do as he referenced it during your chat wit him. 

 

But in this case, <Submesh idx="2"> (our 2.vb from PHF) is reading the texture code "0".

 

You can see this in the .g1m's .MTL file.  Each texture is given a code for the costume to read.  Fortunately, 2.vb (PHF) reads the same texture code as 3.vb (LEI).

 

Spoiler

lei2.thumb.jpg.f73cf61764923d82c315af0899f9268d.jpg

 

So when you rename the file from PHF_COS_007 to LEI_COS_004, you are now using PHF_COS_007's XML to read LEI_COS_004's .MTL.  Fortunately, the textures match and it is working as intended.  

 

Of course, in case when the textures don't match, you would need to manipulate the values in the XML file.

 

 

If I explained this incorrectly, @fgh1t6 , please let me know.

Link to comment
Quote

So, if you haven't already known, saafrat's nude mod is based off of PHF_COS_007.

I didn't! That puts this a lot more in perspective.
 

Quote

1. Copy and paste LEI's gloves and shoes into 2.vb (PHF)

2. Apply VGMAP from 3.vb (LEI) into 2.vb (PHF)

3. Assign Vertex Groups -> "3"

4. Export your 2.vb (PHF)



I tried putting it together as you've described, but I think I might need a little more detail.

- Exported meshes LEI_COS_004 and PHF_COS_007.
- Imported LEI_COS_004 (via 3DMigoto raw buffers) in Blender 2.79.
- Edited 3.vb and exported as gloves_shoes.vb and gloves_shoes.ib.
- New project in Blender; imported saafrat's nude edit of PHF_COS_007.

- Imported gloves_shoes.vb/.ib and into project.

- Selected gloves_shoes.vb and shift-clicked 2.vb and Joined meshes. [this is not copy/paste as you said, did I do it wrong?]

- Deleted feet vertices from 10.vb to avoid clipping with shoes. (I will export it separately as 10.vb later.) 

- Applied VGMAP from 3.vb (LEI) to current project's 2.vb (PHF) VGMAP (via Import --> Apply 3DMigoto vertex group map to current object (.vgmap))

- [this bit seems wrong] Assigned 2.vb vertex groups to 3.vb (via Data Object data tab --> drop down menu "mesh data-block defining geometric surfaces" and selecting 3.vb)
        This causes the mesh to appear as 3.vb. This doesn't seem right.



Apologies, I'm not very familiar with Blender yet beyond the scope of some very basic modeling so I may have interpreted your instructions incorrectly.
I'm also using Blender 2.79 which is the latest version that support the 3DMigoto plugin that I'm aware of. From your screenshot, you seem to be using a later version.
I've attached my new .blend file in case it works this time. I have no done anything regarding assigning vertex groups yet, only up to applying the VGMAP.

nude_gloves-shoes.blend

Link to comment
3 hours ago, woohoolink said:

- Applied VGMAP from 3.vb (LEI) to current project's 2.vb (PHF) VGMAP (via Import --> Apply 3DMigoto vertex group map to current object (.vgmap))

- [this bit seems wrong] Assigned 2.vb vertex groups to 3.vb (via Data Object data tab --> drop down menu "mesh data-block defining geometric surfaces" and selecting 3.vb)
        This causes the mesh to appear as 3.vb. This doesn't seem right.

 

I don't think he mean "Assigned 2.vb vertex groups to 3.vb ". It should be " run the "assign new 2Dmigoto vertex group" and set the step to 3" . The script is to update the look up map between bone name and bone index to ensure every bone used by the mesh has a valid index. If you have applied Lei's vgmap to PHF, the bone list should have been set, then you don't need to run that script. Though I am not sure if this will cause a mismatch of bone index , so I would suggest you to use the script rather than the "Apply 3DMigoto vertex group to current object" function.

 

 

Link to comment
On 4/7/2021 at 10:41 AM, woohoolink said:

- [this bit seems wrong] Assigned 2.vb vertex groups to 3.vb (via Data Object data tab --> drop down menu "mesh data-block defining geometric surfaces" and selecting 3.vb)
        This causes the mesh to appear as 3.vb. This doesn't seem right.

 

Yes, that's wrong. Like fght16 mentioned, I meant to say to run "assign new 3dmigoto vertext groups" and set the group step to "3".

Link to comment
  • 1 month later...

This was so very helpful to get started trying to do some basic experiments.  Thank you for the start.

I am confused on how to do a breakable mod though.  What triggers the destruction model?

For a very basic test, I used g1m_hide to hide a couple of meshes on KAS_COS_002,  When I load it into the game, I can see that the meshes are not visible, works fine.  How do I get this file with the hidden meshes to be the result of the break blow?  I tried to call it KAS_COS_002a.g1m (just following what I see with other mods) and putting in the same layer2 folder as KAS_COS_002.g1m.  This is probably too simplistic? How does the break blow conversion from one costume type to another work exactly?

 

 

Link to comment
On 5/31/2021 at 2:00 PM, ShockTrop said:

This was so very helpful to get started trying to do some basic experiments.  Thank you for the start.

I am confused on how to do a breakable mod though.  What triggers the destruction model?

For a very basic test, I used g1m_hide to hide a couple of meshes on KAS_COS_002,  When I load it into the game, I can see that the meshes are not visible, works fine.  How do I get this file with the hidden meshes to be the result of the break blow?  I tried to call it KAS_COS_002a.g1m (just following what I see with other mods) and putting in the same layer2 folder as KAS_COS_002.g1m.  This is probably too simplistic? How does the break blow conversion from one costume type to another work exactly?

 

 

 

So you're on the right track that the "broken" costume uses "a" at the end of the name.  But breakable costumes only work on costumes if they are breakable by default.  So adding an "a" at the end of KAS_COS_002 will not work because that costume is not breakable to begin with.

 

You would need to work on a mod such as, for example, KAS_COS_004 as a base if you want to add a breakable variation. 

It is possible to designate KAS_COS_002 into the KAS_COS_004 slot, and make a breakable version, but that might require XML editing, renaming, texture slot matching, etc.  It's not that complicated once you understand how to read the files, but it might take some time to get it right.

 

And how break blows work in game, is when you break blow another character, the character just switches to a "different" costume.  Think of it as two costumes.  One costume is normal.  The other has different meshes.   

 

For example, Kasumi is wearing her normal KAS_COS_004 costume, after she is break blown, the game now reads her KAS_COS_004a costume.

Edited by wingzg
Link to comment
14 hours ago, wingzg said:

 

So you're on the right track that the "broken" costume uses "a" at the end of the name.  But breakable costumes only work on costumes if they are breakable by default.  So adding an "a" at the end of KAS_COS_002 will not work because that costume is not breakable to begin with.

 

You would need to work on a mod such as, for example, KAS_COS_004 as a base if you want to add a breakable variation. 

It is possible to designate KAS_COS_002 into the KAS_COS_004 slot, and make a breakable version, but that might require XML editing, renaming, texture slot matching, etc.  It's not that complicated once you understand how to read the files, but it might take some time to get it right.

 

And how break blows work in game, is when you break blow another character, the character just switches to a "different" costume.  Think of it as two costumes.  One costume is normal.  The other has different meshes.   

 

For example, Kasumi is wearing her normal KAS_COS_004 costume, after she is break blown, the game now reads her KAS_COS_004a costume.

Nice, thanks @wingzg

This is a revelation, now I understand why on some mods the character and material files are from other characters.

So I tried your idea with a Mila test, and it worked!  Did some hiding of meshes on a known destructible costume, created a new Layer2 and added the "a" file and viola, all good.  My changes come through when the break blow happens.

Now on to slowly learning more and more by poring over these forums on how all these files work together to render a character.  Can't wait to experiment some more.

Link to comment
5 hours ago, ShockTrop said:

Nice, thanks @wingzg

This is a revelation, now I understand why on some mods the character and material files are from other characters.

So I tried your idea with a Mila test, and it worked!  Did some hiding of meshes on a known destructible costume, created a new Layer2 and added the "a" file and viola, all good.  My changes come through when the break blow happens.

Now on to slowly learning more and more by poring over these forums on how all these files work together to render a character.  Can't wait to experiment some more.

 

Glad to hear!  If you need help, I'll be here.  And I'll do my best to respond in a timely manner.

Link to comment
On 6/3/2021 at 3:30 AM, wingzg said:

 

Glad to hear!  If you need help, I'll be here.  And I'll do my best to respond in a timely manner.

 

Back for some very basic help ?

I must be missing something simple, but I am unable to edit or delete a mesh and then export it out to where it is working in game.

Following the directions in Tab 5 for the tutorial file, working with KAS_COS_002.g1m

I import into Blender, select for example, 8.vb, which is the sheath over her knife on the back.  I go to edit mode and delete vertices.  I keep 8.vb selected in the right panel, do the export, as 8.vb in the same folder (I've also tried to export to a different folder and copy the generated files into the main folder).

Then I do the g1m_import part.  I take the new .g1m file and put it into Layer2 and the mesh is still there on the costume in game.  I tried this with a few characters and run into the same issue.

Same problem occurs if I try to do a small edit to a mesh, not delete the whole thing.

Probably missed a step somewhere or am not understanding exactly how the import/export process works.  I am using Blender 2.79b.  Thanks for any advice.

 

 

Link to comment
On 6/4/2021 at 7:19 PM, ShockTrop said:

 

Back for some very basic help ?

I must be missing something simple, but I am unable to edit or delete a mesh and then export it out to where it is working in game.

Following the directions in Tab 5 for the tutorial file, working with KAS_COS_002.g1m

I import into Blender, select for example, 8.vb, which is the sheath over her knife on the back.  I go to edit mode and delete vertices.  I keep 8.vb selected in the right panel, do the export, as 8.vb in the same folder (I've also tried to export to a different folder and copy the generated files into the main folder).

Then I do the g1m_import part.  I take the new .g1m file and put it into Layer2 and the mesh is still there on the costume in game.  I tried this with a few characters and run into the same issue.

Same problem occurs if I try to do a small edit to a mesh, not delete the whole thing.

Probably missed a step somewhere or am not understanding exactly how the import/export process works.  I am using Blender 2.79b.  Thanks for any advice.

 

 

 

Hmmmm I'm unsure where the problem is.  I was able to replicate what you said and I did not have problems getting the mod to work.

 

Spoiler

3.jpg.227f434b7f3dda2bfbfd4234fece5953.jpg

 

It's a guess, but did you...

 

1. Export 8.vb while in Edit mode?  I haven't tried to export while in Edit mode, but it might cause problems in exporting if you are not in Object mode.

 

2. Did you delete the "extra hidden" vertices?  I noticed I received an error message when I deleted the "extra hidden" vertices and tried to export.  It wouldn't let me do so.  So it's possible that you got confused if it got exported or not.

 

Spoiler

1.jpg.2dd3365ef4db5a8f062d1a3b7da00df6.jpg

2.jpg.3d98ff5cc66dd19171a7f34d2d2b3b4c.jpg

 

Link to comment
On 6/7/2021 at 5:59 AM, wingzg said:

 

Hmmmm I'm unsure where the problem is.  I was able to replicate what you said and I did not have problems getting the mod to work.

 

  Reveal hidden contents

3.jpg.227f434b7f3dda2bfbfd4234fece5953.jpg

 

It's a guess, but did you...

 

1. Export 8.vb while in Edit mode?  I haven't tried to export while in Edit mode, but it might cause problems in exporting if you are not in Object mode.

 

2. Did you delete the "extra hidden" vertices?  I noticed I received an error message when I deleted the "extra hidden" vertices and tried to export.  It wouldn't let me do so.  So it's possible that you got confused if it got exported or not.

 

  Reveal hidden contents

1.jpg.2dd3365ef4db5a8f062d1a3b7da00df6.jpg

2.jpg.3d98ff5cc66dd19171a7f34d2d2b3b4c.jpg

 

Thanks again.  I was able to get it to consistently work. It seems that when doing the export, you can't have the same .vb item selected in anyway on the right panel.  If for example 8.vb is highlighted (not even fully selected), I get those traceback errors when exporting.

My solution was to deselect everything, go back to Object mode, make sure the vb I want to export is not highlighted in the right panel, then do the export.  That process worked for me consistently.

Of course not all the results were good ? A lot of crazy mesh issues when loading into the game, but I guess that could be me deleting/modifying things I wasn't supposed to.  But getting the export process working is good sign. Baby steps.

 

I've gotten pretty good at editing textures following your tutorial, that's been fun.

Link to comment

Hi, I appreciate to your tutorial and it helped me making some prototypes, but I remained difficult with handling textures.

Is there a method to get different textures between the un/breaked slot like LEI_COS_001 and  LEI_COS_001a? 

 

Link to comment
8 hours ago, mysong said:

Hi, I appreciate to your tutorial and it helped me making some prototypes, but I remained difficult with handling textures.

Is there a method to get different textures between the un/breaked slot like LEI_COS_001 and  LEI_COS_001a? 

 

 

Are you asking whether if LEI_COS_001 can use a set of textures, while LEI_COS_001a uses a DIFFERENT set of textures?

If so, I believe there is a way but I have not tested out my self.  I believe you would have to change the .ktid and .mtd files of LEI_COS_001a so that it forces itself to read a different set of textures.  Renaming it from an exisiting .ktid and .mtd and using those textures would probably be the most practical.

 

I'll have to explore this myself.  But I can't make any promises that I'll get to it.

Link to comment
  • 1 month later...

Thank you very much for this guide.

 

I wanted to do something simple as a practice exercise but I wasnt able to do it. I wanted to replace Nico's skirt in her NIC_COS_005 by the jeans short of her NIC_COS_106 costume.

However when I add the softbody stuff with the mod I still cant see the skirt. Also I cant make it so the short are visible on the skin. The only thing I managed to do was apply the jeans texture so her skirt and vest.

 

Also while I added the g1m costume to the Character Editor folder I cant select it in the character select screen.

 

unknown.png

Edited by avionmission2
Press post too quickly and forgot a bit
Link to comment
13 hours ago, avionmission2 said:

Thank you very much for this guide.

 

I wanted to do something simple as a practice exercise but I wasnt able to do it. I wanted to replace Nico's skirt in her NIC_COS_005 by the jeans short of her NIC_COS_106 costume.

However when I add the softbody stuff with the mod I still cant see the skirt. Also I cant make it so the short are visible on the skin. The only thing I managed to do was apply the jeans texture so her skirt and vest.

 

Also while I added the g1m costume to the Character Editor folder I cant select it in the character select screen.

 

 

 

I understand you're trying to put NIC_COS_106's jean shorts onto NIC_COS_005.

 

But I am lost that when you said "I still can't see the skirt".  Are you talking about in blender?  You will not be able to to see certain clothing (skirts, loin cloths, loose items) on Blender because it is a 4D item.  4Ds uses in-game physics and the current modding tools are not able to mod them yet.  

 

The best you can do is hide the skirt and apply the jeans onto another .vb in the g1m.  

 

I am also lost when you said "can't make it so the short are visible on the skin". 

Link to comment
2 hours ago, avionmission2 said:

How can I hide the skirt?

Also I tried adding the shorts to the costume by adding the .vb to the g1m but they are not visible once in game.

 

thank you

 

Ah I see.  You can hide the skirt by using the .g1m_hide tool.  When you load the .g1m onto Blender, there should be a .vb in the sequence that doesn't load up.  Most likely that is the skirt .vb.  For example,  if .vbs 0-10 loads, but #4 is missing, #4 is most likely the skirt..

 

Simply adding a .vb into the .g1m will not work.  You have put the mesh into an already existing .vb.  Put the mesh preferably into a .vb that uses her clothing mesh and edit from there.

 

For example, if the .g1m only has 0-10 vbs, you cannot add an addition 11th .vb.  If .vb  3 is her jacket, combine the "11th" .vb into .vb 3.  After that you finish polishing and making your edits, run the two commands using the search bar:

1. Apply vgmap

2. Assign vertex groups -> (Select the number "3")

Then export

 

 

Link to comment

When I try to use the search bar and use the apply vgmap function it opens some directory. What am I supposed to do then?

 

EDIT: I tried following your instructions but once I merged the shorts with the jacket it broke.

unknown.png

Screenshot_28.png

 

EDIT2: I tried merging the shorts with the shoes instead. I dont get any error in the g1m_import but its still fucky

Screenshot_29.png

Edited by avionmission2
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