Jump to content

Dead or Alive 6 - Modding Thread and Discussion


Recommended Posts

1 hour ago, fgh1t6 said:

While the folder name doesn't matter, the file name and size must be the same as the exported one.  Double check your file and the command window should give you a prompt, some thing like: "File successfully imported, push any key to continue "


Indeed, I noticed that the filename was important, so there is no change there nor any size change as well since the .g1t file is never re-written. 
 

I used someone else's g1t file for the main menu, as a mean of testing (but the same happens with character textures). When I paste the g1t file into the Dead or Alive 6\REDELBE\ScreenLayout folder it all works. The problem really lies in the DDS to g1t conversion. 

 

00000_000000-ARGB.thumb.png.b087da775f9dc4d4bef3cac720d207ea.png

My test modification. 

 

DataToolReimportIssue.jpg.dcbc104ee51948ad8376fdcabec9b374.jpg

 

I follow the procedure exactly like in the previous video, but to no avail. When I extract the textures from the "modified" g1t file I can see that no modification was actually made during the DDS to g1t conversion process. I'm clearly missing something obvious. I just can't figure out what it is. 
 

Link to comment
21 minutes ago, XUTERO said:

Sorry to bother you and for the potentially stupid question, but are you using LinkDataTool to convert DDS textures to g1t ? 
If not is there another tool? 

LinkDataTool is a tool for exporting dds maps from g1t files and reimporting them, and I'm not exposed to any other similar tools at the moment 

Link to comment
24 minutes ago, XUTERO said:

Sorry to bother you and for the potentially stupid question, but are you using LinkDataTool to convert DDS textures to g1t ? 
If not is there another tool? 

Just note: you must first export the dds from the g1t file, then modify that dds and then import into the g1t file. If you import g1t directly using dds, it will fail due to different sizes 

Link to comment
10 hours ago, AjPUNISHER said:

I only transferred the vertex groups...nothing else.

 Your LEIFANG 001 BAREFOOT BOTTOMLESS BREAKABLE mod was basically what you were trying to do right?

 

 

Yes, it is;

 

however,  after i uploaded it;

 

i found this terrible extruding problem.

 

 

Still, i haven't find any proper solution to this.

 

Link to comment
3 hours ago, XUTERO said:

Sorry to bother you and for the potentially stupid question, but are you using LinkDataTool to convert DDS textures to g1t ? 
If not is there another tool? 

Have a try the attached package which uses English file names.

You should see the following text at the end.

 

Press any key to continue . . .
贴图导入完毕!
Press any key to continue . . .

LINKDATA_tool_DOA6_En.zip

Link to comment
15 hours ago, fgh1t6 said:

Have a try the attached package which uses English file names.

You should see the following text at the end.

 

Press any key to continue . . .
贴图导入完毕!
Press any key to continue . . .

LINKDATA_tool_DOA6_En.zip 119.85 kB · 6 downloads


Thank you much for the tool. I tied this one and the same happened. I then re-tested all DDS compression methods and found out the Intel Photoshop Plugin 32bit with no compression worked - except the image appeared blueish.
 

TextureProblem1.thumb.jpg.b9f5a1eaec24f9b9768ab016ef7de9c7.jpg


I then recalled the advise about saving the images in 32bits and using the correct compression format (DXT1, BC6, ARGB) from @h4sjohnson previous comment on page 17; https://www.loverslab.com/topic/117795-dead-or-alive-6-modding-thread-and-discussion/page/17/#comments

Since the only DDS format who gave any results was the one above I installed the Nvidia Photoshop Plugin and tried these ones instead. I finally found a format in 32bit ARGB that worked for this title image. This was a great step forward thanks to your help. 

TextureProblem2.thumb.jpg.3165e0ebcc2748a0d94b730f46f32122.jpg

 

 

I then went to try the Nvidia Plugin on a body texture; MPR_Muscle_Character_HTMCOS001_a01_02_kidsalb.g1t 

 

00000_000000-DXT1.thumb.jpg.7c08c9f796ef13578a06172c01e66570.jpg

(This texture should be saved in DXT1 DDS format as its name implies)


However when I attempted to repeat the process it failed systematically. I have literally tried every single Nvidia and Intel compression formats for hours without a single one succeeding to appear in game. I have systematically copied the modified "MPR_Muscle_Character_HTMCOS001_a01_02_kidsalb.g1t" file in; 
 

REDELBE\MaterialEditor

REDELBE\KIDSSystemResource

Dead or Alive 6\REDELBE\Layer2\My test HITOMI white shirt C01\Material

 

Nothing does. The game simply doesn't use the texture. Do I have to alter something in the g1m mesh file for it to use the new texture? 
It boggles my mind. 

 

 

 

 

 

Link to comment
40 minutes ago, XUTERO said:

 

I then went to try the Nvidia Plugin on a body texture; MPR_Muscle_Character_HTMCOS001_a01_02_kidsalb.g1t 

 

I think the HTMCOS001_a01_02_kidsalb.g1t is one of the alternate underwear versions of the texture (which you select by pressing a different button when choosing the costume), "HTMCOS001_a01_kidsalb.g1t" would be the default one, so either rename it to that or try to select the underwear options ingame.

Link to comment
59 minutes ago, blackdragon99 said:

I think the HTMCOS001_a01_02_kidsalb.g1t is one of the alternate underwear versions of the texture (which you select by pressing a different button when choosing the costume), "HTMCOS001_a01_kidsalb.g1t" would be the default one, so either rename it to that or try to select the underwear options ingame.

Spoiler

TextureProblem3.jpg.85620081d5382d37373a63b991ba86f6.jpg

 

That was exactly it....... ?
Somehow it did not appear on character select screen even when selecting the alternates. 
Thank you very much. 

 

 

Link to comment
2 minutes ago, XUTERO said:
  Hide contents

TextureProblem3.jpg.85620081d5382d37373a63b991ba86f6.jpg

 

That was exactly it....... ?
Somehow it did not appear on character select screen even when selecting the alternates. 
Thank you very much. 

 

 

 

The alternate underwear are only loaded during battles. In character selection, characters will always appear with default underwear (sadly)

Link to comment
4 hours ago, XUTERO said:

However when I attempted to repeat the process it failed systematically. I have literally tried every single Nvidia and Intel compression formats for hours without a single one succeeding to appear in game. I have systematically copied the modified "MPR_Muscle_Character_HTMCOS001_a01_02_kidsalb.g1t" file in; 

 

REDELBE\MaterialEditor

REDELBE\KIDSSystemResource

Dead or Alive 6\REDELBE\Layer2\My test HITOMI white shirt C01\Material

 

Nothing does. The game simply doesn't use the texture. Do I have to alter something in the g1m mesh file for it to use the new texture? 
It boggles my mind. 

 

I forgot about who but some one was kindly pointed me to "paint.net" https://www.getpaint.net/.  The latest version support DDS (https://forums.nexusmods.com/index.php?/topic/8057638-paintnet-now-supports-all-dds-formats-including-bc7-linear-etc/).  Open the orginal DDS with paint.net, past the new image from PS or Gimp, and then save. It will ask you the format, select the one match the file name , for example: BC1 for " 00000_000000_DXT1.dds", and BC4 for " 00000_000000_BC4.dds", Always use the "(Linear,***)" version. t.jpg.de54b7e3a53d245369aba7d1ecdac2ad.jpg

Link to comment

Does one need to buy DLC costumes in order to be able to extract them with qrdbtool2.4 ? 
Since the updates install them by default I would assume we can extract them, but perhaps that is not the case. 

I have extracted and successfully modified all Tamaki skin textures; 

ex; "MPR_Muscle_Character_SKDCOS0**_body_kidsalb.g1t"

and; "MPR_Muscle_Character_SKDCOS0**_body_z_kidsalb.g1t"

 

Except for the two last ones which are DLC and locked. I can't seem to find them anywhere in the list. 
Is this normal? 

Link to comment
32 minutes ago, XUTERO said:

Does one need to buy DLC costumes in order to be able to extract them with qrdbtool2.4 ? 
Since the updates install them by default I would assume we can extract them, but perhaps that is not the case. 

I have extracted and successfully modified all Tamaki skin textures; 

ex; "MPR_Muscle_Character_SKDCOS0**_body_kidsalb.g1t"

and; "MPR_Muscle_Character_SKDCOS0**_body_z_kidsalb.g1t"

 

Except for the two last ones which are DLC and locked. I can't seem to find them anywhere in the list. 
Is this normal? 

Update qrdbtool or you are not going to see latest filenames.

Link to comment

Hello there and hello once again, I don't care for these mods until some starts doing FunnyBunny666 Mods on DOA 6 will come back until then, This topic is not really fun anymore too me same art context this why still play DOA 5 and DOA 6 mods are dull and boring here a link will show you on what FunnyBunny666 does with the clothing. https://www.deviantart.com/funnybunny666/art/Momiji-DOAXVV-Dark-Prison-827694837 if not doing this kinda work please just not good enough my validations are facts not here to give anyone the rude or the finger, Just FunnyBunny does this for fun that is it. And also if going to give me crap about this, Then just don't reply at all, everyday go too this guy getting those mods and there going to show up in doa 6 ever.  

Link to comment
4 hours ago, vagonumero13 said:

Update qrdbtool or you are not going to see latest filenames.

I updated to the latest version, allowing me to find the files indeed. 
I also had to update to the latest version of REDEBLE for it to actually appear. 
All of this worked like a charm. Thank you very much. 

Link to comment
On 4/20/2020 at 8:25 PM, DarkMissLady said:

Hello there and hello once again, I don't care for these mods until some starts doing FunnyBunny666 Mods on DOA 6 will come back until then, This topic is not really fun anymore too me same art context this why still play DOA 5 and DOA 6 mods are dull and boring here a link will show you on what FunnyBunny666 does with the clothing. https://www.deviantart.com/funnybunny666/art/Momiji-DOAXVV-Dark-Prison-827694837 if not doing this kinda work please just not good enough my validations are facts not here to give anyone the rude or the finger, Just FunnyBunny does this for fun that is it. And also if going to give me crap about this, Then just don't reply at all, everyday go too this guy getting those mods and there going to show up in doa 6 ever.  

These mods were not on DOA 6 were not because we cannot do it, it is just because they are FunnyBunny666's work. You can found almost all DOA5 swimming suit DLC ported to DOA 6 by gatto tom. You don't have to find yourself an excuse not to use DOA 6. In fact, I can feel the DOA 6 team has out source the costume DLCs to worse and worse company. The meshes were not professionally done at all. Somehow I think maybe we have done too much mods that finally kill the game now.   

Link to comment

A mod to experiment on transparent texture control. Idea from Funnybuny666's Nyo nude mod: https://www.deviantart.com/funnybunny666/art/Nyotengu-Nude-Corset-Skirt-791694795

 

Many thanks to @vagonumero13. His new g1m_xml tool is very powerful for modifying material settings! A little issue is it also use the default folder of g1m_import.exe, so now the g1m_import will complain "there is no file to import" instead of asking for where is the folder to be imported. 

 

Credits:

Vagonumero13: rdbtool, g1mtools and REDELBE

Ausgeek: 3dmigoto tools for blender


洛克人SZ : LINKDATA tools for export and import the texture

Team Ninja, SNK: characters and game assets

 

 

fgCut_MOM033_minThong_title.jpg.ce179ee176d3b3af80e5507fc80cf7ae.jpg

fgCut_MOM033_minThong.zip

Link to comment
3 hours ago, fgh1t6 said:

Many thanks to @vagonumero13. His new g1m_xml tool is very powerful for modifying material settings! A little issue is it also use the default folder of g1m_import.exe, so now the g1m_import will complain "there is no file to import" instead of asking for where is the folder to be imported.

Anyway, they don't have files in common (in fact that's the reason why I use a different naming convention for index buffer / vertex buffer in g1m_xml, so that the files of g1m_import and g1m_xml could co-exist without any of them overwriting the files of the other)

 

Btw, yesterday I did some experiments with g1m_xml and it can be used to extend the number of submeshes / meshes, in case anyone ever needs that. The process is a little tricky, and it involves creating a new Vertex buffer, Index buffer, layout, submesh and mesh. My test on a Kasumi costume, adding 4 submeshes/meshes worked perfectly (and the teleport in break blow didn't cause any crash, I didn't need to alter the .grp)

Link to comment
3 hours ago, vagonumero13 said:

Anyway, they don't have files in common (in fact that's the reason why I use a different naming convention for index buffer / vertex buffer in g1m_xml, so that the files of g1m_import and g1m_xml could co-exist without any of them overwriting the files of the other)

 

Btw, yesterday I did some experiments with g1m_xml and it can be used to extend the number of submeshes / meshes, in case anyone ever needs that. The process is a little tricky, and it involves creating a new Vertex buffer, Index buffer, layout, submesh and mesh. My test on a Kasumi costume, adding 4 submeshes/meshes worked perfectly (and the teleport in break blow didn't cause any crash, I didn't need to alter the .grp)

Yes! It will be a A-bomb on modding. Could you publish the steps? I would like to try adding copies of an exist softbody meshs. 

Link to comment
1 hour ago, fgh1t6 said:

Yes! It will be a A-bomb on modding. Could you publish the steps? I would like to try adding copies of an exist softbody meshs. 

 

Have in mind that this may not work properly with soft parts, because the SOFT section is currently not parsed (nad probably changes would be needed there), but anyway these are the generic steps to add a mesh.

 

Example uses KAS_COS_106). Let's assume your .vb and .ib files are called "aaa.vb" and "aaa.ib".

 

- First copy the aaa.vb and aaa.ib file of your mesh to the folder (such as KAS_COS_106). Open "aaa.fmt" file with a text editor, you are going to need some things there.

- Locate the VertexSection of the .xml by searching "VertexSection". Now in the .fmt file, look at the value of "stride" (this is the vertex size).

- Find an entry in the VerteSection that has a similar "vertex_size" to the stride in the fmt. If you don't find one with similar number of vertex, search in the .g1m from where your mesh was based. Copy the line of the entry to the end of the section.

E.g., if "stride" was 44, in KAS_COS_106, a VB with similar stride is the idx=0 (<VB idx="0" vertex_size="44" u_00="0" u_0c="0" binary="VB_0.bin" />), so just copy that line.

- In the "idx" of the copy, change the value to be N + 1, where N was the highest index (in this case, the highest index was 12, so I just put 13. In "binary", change it to "aaa.vb".

- Example of KAS_COS_106:

Spoiler

        <VertexSection>
            <VB idx="0" vertex_size="44" u_00="0" u_0c="0" binary="VB_0.bin" />
            <VB idx="1" vertex_size="120" u_00="0" u_0c="0" binary="VB_1.bin" />
            <VB idx="2" vertex_size="120" u_00="0" u_0c="0" binary="VB_2.bin" />
            <VB idx="3" vertex_size="120" u_00="0" u_0c="0" binary="VB_3.bin" />
            <VB idx="4" vertex_size="116" u_00="0" u_0c="0" binary="VB_4.bin" />
            <VB idx="5" vertex_size="116" u_00="0" u_0c="0" binary="VB_5.bin" />
            <VB idx="6" vertex_size="44" u_00="0" u_0c="0" binary="VB_6.bin" />
            <VB idx="7" vertex_size="44" u_00="0" u_0c="0" binary="VB_7.bin" />
            <VB idx="8" vertex_size="116" u_00="0" u_0c="0" binary="VB_8.bin" />
            <VB idx="9" vertex_size="116" u_00="0" u_0c="0" binary="VB_9.bin" />
            <VB idx="10" vertex_size="116" u_00="0" u_0c="0" binary="VB_10.bin" />
            <VB idx="11" vertex_size="116" u_00="0" u_0c="0" binary="VB_11.bin" />
            <VB idx="12" vertex_size="44" u_00="0" u_0c="0" binary="VB_12.bin" />
            <VB idx="13" vertex_size="44" u_00="0" u_0c="0" binary="aaa.vb" />          
        </VertexSection>

 

Where idx="13" isthe added vertex buffer.

- Now let's move to the LayoutSection, which is just below VertexSection. Here you will have to copy the same entry that you copied before. E.g, if you copied 0 in the previous step, copy here also the entry 0. Then in the copy correct both idx and Refs to be your new index (in the sample 13). IMPORTANT: don't forget to update the Refs value to be the same as idx, or it won't work.

So, in the example, it would be: (13 being the newest layout):

Spoiler

            <Layout idx="0">
                <Refs value="0" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="1">
                <Refs value="1" />
                <Semantic index="0" type="POSITION" format="R32G32B32A32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="16" />
                <Semantic index="0" type="BINORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="1" type="COLOR" format="R32G32B32A32_FLOAT" buffer_index="0" offset="48" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="64" />
                <Semantic index="0" type="PSIZE" format="R8G8B8A8_UINT" buffer_index="0" offset="68" />
                <Semantic index="0" type="FOG" format="R8G8B8A8_UINT" buffer_index="0" offset="72" />
                <Semantic index="5" type="TEXCOORD" format="R8G8B8A8_UINT" buffer_index="0" offset="76" />
                <Semantic index="0" type="NORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="0" type="TANGENT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="2">
                <Refs value="2" />
                <Semantic index="0" type="POSITION" format="R32G32B32A32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="16" />
                <Semantic index="0" type="BINORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="1" type="COLOR" format="R32G32B32A32_FLOAT" buffer_index="0" offset="48" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="64" />
                <Semantic index="0" type="PSIZE" format="R8G8B8A8_UINT" buffer_index="0" offset="68" />
                <Semantic index="0" type="FOG" format="R8G8B8A8_UINT" buffer_index="0" offset="72" />
                <Semantic index="5" type="TEXCOORD" format="R8G8B8A8_UINT" buffer_index="0" offset="76" />
                <Semantic index="0" type="NORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="0" type="TANGENT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="3">
                <Refs value="3" />
                <Semantic index="0" type="POSITION" format="R32G32B32A32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="16" />
                <Semantic index="0" type="BINORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="1" type="COLOR" format="R32G32B32A32_FLOAT" buffer_index="0" offset="48" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="64" />
                <Semantic index="0" type="PSIZE" format="R8G8B8A8_UINT" buffer_index="0" offset="68" />
                <Semantic index="0" type="FOG" format="R8G8B8A8_UINT" buffer_index="0" offset="72" />
                <Semantic index="5" type="TEXCOORD" format="R8G8B8A8_UINT" buffer_index="0" offset="76" />
                <Semantic index="0" type="NORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="0" type="TANGENT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="4">
                <Refs value="4" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="5">
                <Refs value="5" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="6">
                <Refs value="6" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="7">
                <Refs value="7" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="8">
                <Refs value="8" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="9">
                <Refs value="9" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="10">
                <Refs value="10" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="11">
                <Refs value="11" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="12">
                <Refs value="12" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="13">
                <Refs value="13" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
           </LayoutSection>

 

- Now let's move to the "IndicesSection", so search that in the text editor. In the .fmt file, take a look at the value of "format". It should be either DXGI_FORMAT_R16_UINT (more than 90% of times), DXGI_FORMAT_R8_UINT or DXGI_FORMAT_R32_UINT. So just take note of the number following "R", that is the number of bits of the index.

- In the .xml, do a copy of an entry that has simialr number of bits. And then assign it the new idx, and change the binary to "aaa.ib".

In the sample we would end like this:

 

Spoiler

        <IndicesSection>
            <IB idx="0" bits="16" u_08="0" binary="IB_0.bin" />
            <IB idx="1" bits="16" u_08="0" binary="IB_1.bin" />
            <IB idx="2" bits="16" u_08="0" binary="IB_2.bin" />
            <IB idx="3" bits="16" u_08="0" binary="IB_3.bin" />
            <IB idx="4" bits="16" u_08="0" binary="IB_4.bin" />
            <IB idx="5" bits="16" u_08="0" binary="IB_5.bin" />
            <IB idx="6" bits="16" u_08="0" binary="IB_6.bin" />
            <IB idx="7" bits="16" u_08="0" binary="IB_7.bin" />
            <IB idx="8" bits="16" u_08="0" binary="IB_8.bin" />
            <IB idx="9" bits="16" u_08="0" binary="IB_9.bin" />
            <IB idx="10" bits="16" u_08="0" binary="IB_10.bin" />
            <IB idx="11" bits="16" u_08="0" binary="IB_11.bin" />
            <IB idx="12" bits="16" u_08="0" binary="IB_12.bin" />
            <IB idx="13" bits="16" u_08="0" binary="aaa.ib" />           
        </IndicesSection>

- Now it is time for the Submeshes section, the most important part (but not the last one). Before, an acclaration regarding Submeshes and Meshes: submeshes are what g1m_export and g1m_import actually work with, they don't work directly with meshes. But submeshes must always be assigned in meshes.

Note that unlike before, where the number of VB always equal the number of IB and the number of Layouts, the number of submeshes is not always the same (this is because submeshes that are part of same mesh share same VB, so there may be more submeshes than VB/IB/Layout).

- So, here in the SubmeshesSection, copy an entry from your source. If your source was other .g1m, then copy it from the xml of that .g1m.

- Now begin by correcting the index but making it one more than the latest one (in example, the latest in KAS_COS_106 was 13, so my new submesh will be idx="14").

- Correction of the values U_0C, U_10, Material, Texture: just copy these values from other submesh of the current .g1m, whose material you want to have.

- Correction of VB_Start and NumVertices. VB_Start -> make it 0. NumVertices: remember the stride of a previous step?. well, NumVertices is calculated doing VB file size / stride.

- Correction of IB_Start and NumIndices. IB_Start -> make it 0. NumIndices: if the format in the .fmt was "R16", then it is calculated like this: IB file size / 2. If it was R8, then it equals the file size, and if it was R32, then it is IB file size / 4.

- Correction of VB and IB: make it the value of the idx you added in the VB and IB steps (in the example, 13)

- Correction of Bones_map: ahhh, this is the trickiest part, and that's why it is better to leave this to a machine. This will be corrected later by g1m_import. At the moment, just make sure the Bones_map value is valid in this .g1m. If you copied the submesh from this same g1m, then it is already valid. Otherwise, just make it "0".

- The submesh is already done. In the example, assuming a VB file size of 62480, and a IB file size of 12576, the new submesh would look like this:

Spoiler

            <Submesh idx="14">
                <U_00 value="53" />
                <VB value="13" />
                <Bones_map value="0" />
                <!--If you want a submesh to use the material of other, replace the U_OC, U_10, Material and Texture. U_0C seem to be the most important one in DOA6.-->
                <U_0C value="3" />
                <U_10 value="3" />
                <Material value="3" />
                <Texture value="0" />
                <IB value="13" />
                <U_20 value="1" />
                <IB_format value="3" />
                <VB_Start value="0" />
                <NumVertices value="1420" />
                <IB_Start value="0" />
                <NumIndices value="6288" />
            </Submesh>

- Now time to add the submesh to a mesh, so the Meshes section is just below. Begin by increasing the value of the field "Count1" by 1. (Note: it is currently not clear what Count2 is for, but if it different than 0, it is possible that this process may be flawed, that has not been tested)

- Add the new mesh by copying the entry from the .g1m where your submesh were. So, you have to look at the value Submeshes in that g1m and find the Mesh that had that submesh "idx" in "Submeshes".

- Correct the copy of the entry by assigning a new idx value (like always it must be one bigger than the latest), and then correct the Submeshes value by putting there the "idx" of the submesh you added before.

 

So, in the example, it would be: (Mesh13 being the new)

Spoiler

    <MeshesSection>
            <U_00 value="1" />
            <U_04 value="0" />
            <U_08 value="0" />
            <U_0C value="0" />
            <!--Notice: the sum of Count1+Count2 must equal the number of <Mesh> entries.-->
            <Count1 value="14" />
            <Count2 value="0" />
            <S_18 value="0" />
            <U_1C value="93" />
            <S_20 value="-1" />
            <U_24 value="0" />
            <Mesh idx="0">
                <Type value="@C98ABC1B" />
                <U_10 value="0x20001" />
                <Nun_ID value="20000" />
                <Submeshes value="2" />
            </Mesh>
            <Mesh idx="1">
                <Type value="@C98ABC1B" />
                <U_10 value="0x20001" />
                <Nun_ID value="20001" />
                <Submeshes value="3" />
            </Mesh>
            <Mesh idx="2">
                <Type value="@9C907E51" />
                <U_10 value="0x20001" />
                <Nun_ID value="20002" />
                <Submeshes value="4" />
            </Mesh>
            <Mesh idx="3">
                <Type value="@589F6552" />
                <U_10 value="0x20004" />
                <Nun_ID value="0" />
                <Submeshes value="5" />
            </Mesh>
            <Mesh idx="4">
                <Type value="@589F6552" />
                <U_10 value="0x20004" />
                <Nun_ID value="1" />
                <Submeshes value="6" />
            </Mesh>
            <Mesh idx="5">
                <Type value="@68659D5C" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="7" />
            </Mesh>
            <Mesh idx="6">
                <Type value="@2D23BC66" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="8" />
            </Mesh>
            <Mesh idx="7">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="0" />
                <Submeshes value="9" />
            </Mesh>
            <Mesh idx="8">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="1" />
                <Submeshes value="10" />
            </Mesh>
            <Mesh idx="9">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="2" />
                <Submeshes value="11" />
            </Mesh>
            <Mesh idx="10">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="3" />
                <Submeshes value="12" />
            </Mesh>
            <Mesh idx="11">
                <Type value="@DC694116" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="13" />
            </Mesh>
            <Mesh idx="12">
                <Type value="@37639FF9" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="0, 1" />
            </Mesh>
              <Mesh idx="13">
                <Type value="@2D23BC66" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="14" />
            </Mesh>
        </MeshesSection>

- The xml is ready. So run it on g1m_xml to convert to .g1m.

- The extra step is correcting the bone map using g1m_import. For that, I'm assuming that you had your .vgmap file ("aaa.vgmap"). So rename aaa.vb, aaa.ib, aaa.fmt and aaa.vgmap as "14.vb", "14.ib", etc  (well, actually replace "14" by the "idx" of the submesh "idx")

- Run the .g1m with g1m_import. We are doing this, so that g1m_import applies the .vgmap file, which would cause it to correct the Bone_map in the submesh. (in fact, if you now xmlize your .g1m again, you will likely notice that that value was changed by g1m_import, unless by coincidence, it was the same).

 

Link to comment
3 hours ago, vagonumero13 said:

 

Have in mind that this may not work properly with soft parts, because the SOFT section is currently not parsed (nad probably changes would be needed there), but anyway these are the generic steps to add a mesh.

 

Example uses KAS_COS_106). Let's assume your .vb and .ib files are called "aaa.vb" and "aaa.ib".

 

- First copy the aaa.vb and aaa.ib file of your mesh to the folder (such as KAS_COS_106). Open "aaa.fmt" file with a text editor, you are going to need some things there.

- Locate the VertexSection of the .xml by searching "VertexSection". Now in the .fmt file, look at the value of "stride" (this is the vertex size).

- Find an entry in the VerteSection that has a similar "vertex_size" to the stride in the fmt. If you don't find one with similar number of vertex, search in the .g1m from where your mesh was based. Copy the line of the entry to the end of the section.

E.g., if "stride" was 44, in KAS_COS_106, a VB with similar stride is the idx=0 (<VB idx="0" vertex_size="44" u_00="0" u_0c="0" binary="VB_0.bin" />), so just copy that line.

- In the "idx" of the copy, change the value to be N + 1, where N was the highest index (in this case, the highest index was 12, so I just put 13. In "binary", change it to "aaa.vb".

- Example of KAS_COS_106:

  Hide contents

        <VertexSection>
            <VB idx="0" vertex_size="44" u_00="0" u_0c="0" binary="VB_0.bin" />
            <VB idx="1" vertex_size="120" u_00="0" u_0c="0" binary="VB_1.bin" />
            <VB idx="2" vertex_size="120" u_00="0" u_0c="0" binary="VB_2.bin" />
            <VB idx="3" vertex_size="120" u_00="0" u_0c="0" binary="VB_3.bin" />
            <VB idx="4" vertex_size="116" u_00="0" u_0c="0" binary="VB_4.bin" />
            <VB idx="5" vertex_size="116" u_00="0" u_0c="0" binary="VB_5.bin" />
            <VB idx="6" vertex_size="44" u_00="0" u_0c="0" binary="VB_6.bin" />
            <VB idx="7" vertex_size="44" u_00="0" u_0c="0" binary="VB_7.bin" />
            <VB idx="8" vertex_size="116" u_00="0" u_0c="0" binary="VB_8.bin" />
            <VB idx="9" vertex_size="116" u_00="0" u_0c="0" binary="VB_9.bin" />
            <VB idx="10" vertex_size="116" u_00="0" u_0c="0" binary="VB_10.bin" />
            <VB idx="11" vertex_size="116" u_00="0" u_0c="0" binary="VB_11.bin" />
            <VB idx="12" vertex_size="44" u_00="0" u_0c="0" binary="VB_12.bin" />
            <VB idx="13" vertex_size="44" u_00="0" u_0c="0" binary="aaa.vb" />          
        </VertexSection>

 

Where idx="13" isthe added vertex buffer.

- Now let's move to the LayoutSection, which is just below VertexSection. Here you will have to copy the same entry that you copied before. E.g, if you copied 0 in the previous step, copy here also the entry 0. Then in the copy correct both idx and Refs to be your new index (in the sample 13). IMPORTANT: don't forget to update the Refs value to be the same as idx, or it won't work.

So, in the example, it would be: (13 being the newest layout):

  Hide contents

            <Layout idx="0">
                <Refs value="0" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="1">
                <Refs value="1" />
                <Semantic index="0" type="POSITION" format="R32G32B32A32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="16" />
                <Semantic index="0" type="BINORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="1" type="COLOR" format="R32G32B32A32_FLOAT" buffer_index="0" offset="48" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="64" />
                <Semantic index="0" type="PSIZE" format="R8G8B8A8_UINT" buffer_index="0" offset="68" />
                <Semantic index="0" type="FOG" format="R8G8B8A8_UINT" buffer_index="0" offset="72" />
                <Semantic index="5" type="TEXCOORD" format="R8G8B8A8_UINT" buffer_index="0" offset="76" />
                <Semantic index="0" type="NORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="0" type="TANGENT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="2">
                <Refs value="2" />
                <Semantic index="0" type="POSITION" format="R32G32B32A32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="16" />
                <Semantic index="0" type="BINORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="1" type="COLOR" format="R32G32B32A32_FLOAT" buffer_index="0" offset="48" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="64" />
                <Semantic index="0" type="PSIZE" format="R8G8B8A8_UINT" buffer_index="0" offset="68" />
                <Semantic index="0" type="FOG" format="R8G8B8A8_UINT" buffer_index="0" offset="72" />
                <Semantic index="5" type="TEXCOORD" format="R8G8B8A8_UINT" buffer_index="0" offset="76" />
                <Semantic index="0" type="NORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="0" type="TANGENT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="3">
                <Refs value="3" />
                <Semantic index="0" type="POSITION" format="R32G32B32A32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="16" />
                <Semantic index="0" type="BINORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="1" type="COLOR" format="R32G32B32A32_FLOAT" buffer_index="0" offset="48" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="64" />
                <Semantic index="0" type="PSIZE" format="R8G8B8A8_UINT" buffer_index="0" offset="68" />
                <Semantic index="0" type="FOG" format="R8G8B8A8_UINT" buffer_index="0" offset="72" />
                <Semantic index="5" type="TEXCOORD" format="R8G8B8A8_UINT" buffer_index="0" offset="76" />
                <Semantic index="0" type="NORMAL" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="0" type="TANGENT" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="4">
                <Refs value="4" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="5">
                <Refs value="5" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="6">
                <Refs value="6" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="7">
                <Refs value="7" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="8">
                <Refs value="8" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="9">
                <Refs value="9" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="10">
                <Refs value="10" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="11">
                <Refs value="11" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R32G32_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="40" />
                <Semantic index="0" type="PSIZE" format="R32G32B32A32_UINT" buffer_index="0" offset="48" />
                <Semantic index="0" type="FOG" format="R32G32B32A32_UINT" buffer_index="0" offset="64" />
                <Semantic index="8" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="80" />
                <Semantic index="9" type="TEXCOORD" format="R32G32B32A32_FLOAT" buffer_index="0" offset="96" />
                <Semantic index="0" type="SAMPLE" format="R32_FLOAT" buffer_index="0" offset="112" />
            </Layout>
            <Layout idx="12">
                <Refs value="12" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
            <Layout idx="13">
                <Refs value="13" />
                <Semantic index="0" type="POSITION" format="R32G32B32_FLOAT" buffer_index="0" offset="0" />
                <Semantic index="0" type="BLENDWEIGHT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="12" />
                <Semantic index="0" type="BLENDINDICES" format="R8G8B8A8_UINT" buffer_index="0" offset="20" />
                <Semantic index="0" type="NORMAL" format="R16G16B16A16_FLOAT" buffer_index="0" offset="24" />
                <Semantic index="0" type="TEXCOORD" format="R16G16_FLOAT" buffer_index="0" offset="32" />
                <Semantic index="0" type="TANGENT" format="R16G16B16A16_FLOAT" buffer_index="0" offset="36" />
            </Layout>
           </LayoutSection>

 

- Now let's move to the "IndicesSection", so search that in the text editor. In the .fmt file, take a look at the value of "format". It should be either DXGI_FORMAT_R16_UINT (more than 90% of times), DXGI_FORMAT_R8_UINT or DXGI_FORMAT_R32_UINT. So just take note of the number following "R", that is the number of bits of the index.

- In the .xml, do a copy of an entry that has simialr number of bits. And then assign it the new idx, and change the binary to "aaa.ib".

In the sample we would end like this:

 

  Hide contents

        <IndicesSection>
            <IB idx="0" bits="16" u_08="0" binary="IB_0.bin" />
            <IB idx="1" bits="16" u_08="0" binary="IB_1.bin" />
            <IB idx="2" bits="16" u_08="0" binary="IB_2.bin" />
            <IB idx="3" bits="16" u_08="0" binary="IB_3.bin" />
            <IB idx="4" bits="16" u_08="0" binary="IB_4.bin" />
            <IB idx="5" bits="16" u_08="0" binary="IB_5.bin" />
            <IB idx="6" bits="16" u_08="0" binary="IB_6.bin" />
            <IB idx="7" bits="16" u_08="0" binary="IB_7.bin" />
            <IB idx="8" bits="16" u_08="0" binary="IB_8.bin" />
            <IB idx="9" bits="16" u_08="0" binary="IB_9.bin" />
            <IB idx="10" bits="16" u_08="0" binary="IB_10.bin" />
            <IB idx="11" bits="16" u_08="0" binary="IB_11.bin" />
            <IB idx="12" bits="16" u_08="0" binary="IB_12.bin" />
            <IB idx="13" bits="16" u_08="0" binary="aaa.ib" />           
        </IndicesSection>

- Now it is time for the Submeshes section, the most important part (but not the last one). Before, an acclaration regarding Submeshes and Meshes: submeshes are what g1m_export and g1m_import actually work with, they don't work directly with meshes. But submeshes must always be assigned in meshes.

Note that unlike before, where the number of VB always equal the number of IB and the number of Layouts, the number of submeshes is not always the same (this is because submeshes that are part of same mesh share same VB, so there may be more submeshes than VB/IB/Layout).

- So, here in the SubmeshesSection, copy an entry from your source. If your source was other .g1m, then copy it from the xml of that .g1m.

- Now begin by correcting the index but making it one more than the latest one (in example, the latest in KAS_COS_106 was 13, so my new submesh will be idx="14").

- Correction of the values U_0C, U_10, Material, Texture: just copy these values from other submesh of the current .g1m, whose material you want to have.

- Correction of VB_Start and NumVertices. VB_Start -> make it 0. NumVertices: remember the stride of a previous step?. well, NumVertices is calculated doing VB file size / stride.

- Correction of IB_Start and NumIndices. IB_Start -> make it 0. NumIndices: if the format in the .fmt was "R16", then it is calculated like this: IB file size / 2. If it was R8, then it equals the file size, and if it was R32, then it is IB file size / 4.

- Correction of VB and IB: make it the value of the idx you added in the VB and IB steps (in the example, 13)

- Correction of Bones_map: ahhh, this is the trickiest part, and that's why it is better to leave this to a machine. This will be corrected later by g1m_import. At the moment, just make sure the Bones_map value is valid in this .g1m. If you copied the submesh from this same g1m, then it is already valid. Otherwise, just make it "0".

- The submesh is already done. In the example, assuming a VB file size of 62480, and a IB file size of 12576, the new submesh would look like this:

  Hide contents

            <Submesh idx="14">
                <U_00 value="53" />
                <VB value="13" />
                <Bones_map value="0" />
                <!--If you want a submesh to use the material of other, replace the U_OC, U_10, Material and Texture. U_0C seem to be the most important one in DOA6.-->
                <U_0C value="3" />
                <U_10 value="3" />
                <Material value="3" />
                <Texture value="0" />
                <IB value="13" />
                <U_20 value="1" />
                <IB_format value="3" />
                <VB_Start value="0" />
                <NumVertices value="1420" />
                <IB_Start value="0" />
                <NumIndices value="6288" />
            </Submesh>

- Now time to add the submesh to a mesh, so the Meshes section is just below. Begin by increasing the value of the field "Count1" by 1. (Note: it is currently not clear what Count2 is for, but if it different than 0, it is possible that this process may be flawed, that has not been tested)

- Add the new mesh by copying the entry from the .g1m where your submesh were. So, you have to look at the value Submeshes in that g1m and find the Mesh that had that submesh "idx" in "Submeshes".

- Correct the copy of the entry by assigning a new idx value (like always it must be one bigger than the latest), and then correct the Submeshes value by putting there the "idx" of the submesh you added before.

 

So, in the example, it would be: (Mesh13 being the new)

  Hide contents

    <MeshesSection>
            <U_00 value="1" />
            <U_04 value="0" />
            <U_08 value="0" />
            <U_0C value="0" />
            <!--Notice: the sum of Count1+Count2 must equal the number of <Mesh> entries.-->
            <Count1 value="14" />
            <Count2 value="0" />
            <S_18 value="0" />
            <U_1C value="93" />
            <S_20 value="-1" />
            <U_24 value="0" />
            <Mesh idx="0">
                <Type value="@C98ABC1B" />
                <U_10 value="0x20001" />
                <Nun_ID value="20000" />
                <Submeshes value="2" />
            </Mesh>
            <Mesh idx="1">
                <Type value="@C98ABC1B" />
                <U_10 value="0x20001" />
                <Nun_ID value="20001" />
                <Submeshes value="3" />
            </Mesh>
            <Mesh idx="2">
                <Type value="@9C907E51" />
                <U_10 value="0x20001" />
                <Nun_ID value="20002" />
                <Submeshes value="4" />
            </Mesh>
            <Mesh idx="3">
                <Type value="@589F6552" />
                <U_10 value="0x20004" />
                <Nun_ID value="0" />
                <Submeshes value="5" />
            </Mesh>
            <Mesh idx="4">
                <Type value="@589F6552" />
                <U_10 value="0x20004" />
                <Nun_ID value="1" />
                <Submeshes value="6" />
            </Mesh>
            <Mesh idx="5">
                <Type value="@68659D5C" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="7" />
            </Mesh>
            <Mesh idx="6">
                <Type value="@2D23BC66" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="8" />
            </Mesh>
            <Mesh idx="7">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="0" />
                <Submeshes value="9" />
            </Mesh>
            <Mesh idx="8">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="1" />
                <Submeshes value="10" />
            </Mesh>
            <Mesh idx="9">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="2" />
                <Submeshes value="11" />
            </Mesh>
            <Mesh idx="10">
                <Type value="@F3040298" />
                <U_10 value="0x20004" />
                <Nun_ID value="3" />
                <Submeshes value="12" />
            </Mesh>
            <Mesh idx="11">
                <Type value="@DC694116" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="13" />
            </Mesh>
            <Mesh idx="12">
                <Type value="@37639FF9" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="0, 1" />
            </Mesh>
              <Mesh idx="13">
                <Type value="@2D23BC66" />
                <U_10 value="0x20000" />
                <Nun_ID value="-1" />
                <Submeshes value="14" />
            </Mesh>
        </MeshesSection>

- The xml is ready. So run it on g1m_xml to convert to .g1m.

- The extra step is correcting the bone map using g1m_import. For that, I'm assuming that you had your .vgmap file ("aaa.vgmap"). So rename aaa.vb, aaa.ib, aaa.fmt and aaa.vgmap as "14.vb", "14.ib", etc  (well, actually replace "14" by the "idx" of the submesh "idx")

- Run the .g1m with g1m_import. We are doing this, so that g1m_import applies the .vgmap file, which would cause it to correct the Bone_map in the submesh. (in fact, if you now xmlize your .g1m again, you will likely notice that that value was changed by g1m_import, unless by coincidence, it was the same).

 

It looks very complicated
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