Character reindex (swaping ) tool

User avatar
3_Jamjamjamjam_3
Mortal
Posts: 3
Joined: Mon Nov 15, 2021 9:53 am

Re: Character reindex (swaping ) tool

Post by 3_Jamjamjamjam_3 »

Actually i think i found out what I did wrong. I was renaming all the Jade files to Kabal while I should only rename the dds files and keep the original Kabal Texture2D. I run the injector and now it can successfully say "file injected"

However after I replaced the CHAR_Kabal.xxx file into my Assets folder, I tried to run the game. It get a runtime error r6025 . My copy of the MKKE game is from Steam, several posts here said that could that be the reason. Should I install MKKE from an external source in order for this mod to work?


User avatar
MFS
Warrior
Posts: 169
Joined: Sun Jun 12, 2022 1:32 pm

Re: Character reindex (swaping ) tool

Post by MFS »

aman wrote: Tue Sep 15, 2015 12:03 pmcheck reindex.log for error, any line saying "ExportList "xxx" not found" pretty much means that name "xxx" have no equivalent index in the target ExportList.txt. Some manual patching is needed.
hatSorry, but what exactly does that mean?
Foe example, I got such info in my log:

Offset [0x00001d98]:Name Table item 'C_Flap_C00' not found, Use index of 'None'

What should I do in hex after this, who knows? (If anything, "None" was changed to 1288 in my case). Thank to all in advance!
Telegram: @mfskhaos
User avatar
zepterrian
Grand Master
Posts: 659
Joined: Fri Jul 10, 2015 3:50 pm
Side: Light

Re: Character reindex (swaping ) tool

Post by zepterrian »

MFS wrote: Sat Jul 09, 2022 1:15 pm
aman wrote: Tue Sep 15, 2015 12:03 pmcheck reindex.log for error, any line saying "ExportList "xxx" not found" pretty much means that name "xxx" have no equivalent index in the target ExportList.txt. Some manual patching is needed.
hatSorry, but what exactly does that mean?
Foe example, I got such info in my log:

Offset [0x00001d98]:Name Table item 'C_Flap_C00' not found, Use index of 'None'

What should I do in hex after this, who knows? (If anything, "None" was changed to 1288 in my case). Thank to all in advance!
do not worry about manual patching with the hex editor if you are trying common mesh swaps. Go and use the re-index mesh swap set I released.
For the raptor race...
User avatar
MFS
Warrior
Posts: 169
Joined: Sun Jun 12, 2022 1:32 pm

Re: Character reindex (swaping ) tool

Post by MFS »

Guys, I have some problem. If I give to a character an NPC model (i.e. BaseMale, Slave girl), my character loses animations and I can only watch him in Nekropolis, where he/she stands in standard T-pose. Did anyone have similar issue? I use the tools from this forum & have no issues when swapping playable characters, the issue is only with the NPCs. I'm hacking the PS3 version. Yeah, it has some differences from the PC port, but anyway... Maybe some one knows, how can I force NPCs to be animated? Thank 2 all in advance!
Telegram: @mfskhaos
User avatar
MFS
Warrior
Posts: 169
Joined: Sun Jun 12, 2022 1:32 pm

Re: Character reindex (swaping ) tool

Post by MFS »

So here's the story. I've checked the log of my mesh swap (NPC BaseMale to Liu Kang, if anything) and it looks like this:

Image

I think the problem is after offset 0x1396. After this the log should show the total number of bones (i.e. "PS3 bone count found: ...") and then continue the reindex process, starting with "Reference", "Hips" and so on, but this time it goes crazy and just repeats the same line about "AbsScale3D". After all this the final model loads in game but doesn't move. What should I change in hex manually, any ideas?
Telegram: @mfskhaos
User avatar
zepterrian
Grand Master
Posts: 659
Joined: Fri Jul 10, 2015 3:50 pm
Side: Light

Re: Character reindex (swaping ) tool

Post by zepterrian »

It can be due to compatibility issues perhaps.. remember that aman said that some swaps would just not work. Have you tried with another character that is not liu kang?
For the raptor race...
User avatar
MFS
Warrior
Posts: 169
Joined: Sun Jun 12, 2022 1:32 pm

Re: Character reindex (swaping ) tool

Post by MFS »

zepterrian wrote: Wed Jan 11, 2023 10:14 pm It can be due to compatibility issues perhaps.. remember that aman said that some swaps would just not work. Have you tried with another character that is not liu kang?
Thanx I'll try but I guess the result will be the same.
By the way, do you know if it's possible to read anywhere the original Tetzrep guide about re-indexing (the link from 1st post doesnt work - http://psx-scene.com/forums/f277/mortal ... ex852.html )?
Telegram: @mfskhaos
User avatar
zepterrian
Grand Master
Posts: 659
Joined: Fri Jul 10, 2015 3:50 pm
Side: Light

Re: Character reindex (swaping ) tool

Post by zepterrian »

MFS wrote: Thu Jan 12, 2023 8:49 am
zepterrian wrote: Wed Jan 11, 2023 10:14 pm It can be due to compatibility issues perhaps.. remember that aman said that some swaps would just not work. Have you tried with another character that is not liu kang?
Thanx I'll try but I guess the result will be the same.
By the way, do you know if it's possible to read anywhere the original Tetzrep guide about re-indexing (the link from 1st post doesnt work - http://psx-scene.com/forums/f277/mortal ... ex852.html )?
The site has been down for a couple of years now.
But a friend of mine GrimDoe, AKA LilGrim in this website, had compiled part of the process in this pdf file.
UPDATE_04_10_2020_SkeletalMesh_Swap_3.rar
(787.26 KiB) Downloaded 53 times
He did not manage to finish it for some reason but I think the main explanation is there just like I remember it at psx scene.
For the raptor race...
User avatar
MFS
Warrior
Posts: 169
Joined: Sun Jun 12, 2022 1:32 pm

Re: Character reindex (swaping ) tool

Post by MFS »

Wow thank you kind sir, I'll try to study the science behind this reindexing process :)
I've got another question - is it possible to swap the reflection meshes? I have a glitch on Desert Arena, when my meshswapped character casts shadow of an old model. Especially my new Sonya's shadow has a cap & ponytail. Looks really strange lol. I think it has connection with her Reflection.Skeletalmesh.
Telegram: @mfskhaos
User avatar
zepterrian
Grand Master
Posts: 659
Joined: Fri Jul 10, 2015 3:50 pm
Side: Light

Re: Character reindex (swaping ) tool

Post by zepterrian »

MFS wrote: Thu Jan 12, 2023 6:05 pm Wow thank you kind sir, I'll try to study the science behind this reindexing process :)
I've got another question - is it possible to swap the reflection meshes? I have a glitch on Desert Arena, when my meshswapped character casts shadow of an old model. Especially my new Sonya's shadow has a cap & ponytail. Looks really strange lol. I think it has connection with her Reflection.Skeletalmesh.
if you can import it into blender then I think you can swap it. But I am 100% not sure because of the scripts we use to import/export.
The same for the re-indexer. if they do not have the same data structure as a normal mesh then a it is not possible to apply this method either.
For the raptor race...
User avatar
sultan0017
Warrior
Posts: 286
Joined: Sat Mar 11, 2023 2:46 pm
Side: Light
Contact:

Re: Character reindex (swaping ) tool

Post by sultan0017 »

zepterrian wrote: Fri Nov 19, 2021 12:25 pm
3_Jamjamjamjam_3 wrote: Mon Nov 15, 2021 9:58 am
zepterrian wrote: Sun Oct 18, 2015 11:19 am well i can´t tell exactly what´s wrong but i´ll tell you what to do just in case you did not understand the tutorial.

1- take CHAR_Jade.xxx and CHAR_Kitana.xxx files and extract the files inside them through extract.exe tool (drag each package over extract.exe). this step is for taking their name tables.
2- now you have to get their export lists. to do that you need to type "umodel.exe -list CHAR_???.xxx >ExportList.txt". using umodel in cmd mode. "???" is where you have to type the name of your character. Do this same process for the other package. Finally decompress kitana´s package.
3- Now take the jade´s export list and nametable and put them inside "in" folder. take her .skeletalmesh file and put it inside the "in" folder too. Now you´ll have 3 files inside the "in" folder.
4- take kitana´s export list and name table file and put them inside "out" folder.
5- run "mk9swap.exe" through cmd and type "mk9swap.exe Jade Kitana > reindex.log" where "Jade" is the name of jade´s skeletalmesh file as aman explained in his tut.
6- Now you´ll need to inject this new skeletalmesh file. to do this first:
a)- open kitana´s .xxx decompressed package with some hex editor (i use HxD) and go to the end of the file. Take note of the last offset. It is 1395D12.
b)- open kitana´s export list and search for "SkeletalMesh Kitana". On the left you´ll see three columns of numbers. the third column is what you´ll use. Take note of that one. It is 13F79B. this number is the size of kitana´s original skeletamesh file.
c)- open jade´s export list and search for "SkeletalMesh Jade". Take note of the skeletalmesh size as you did for Kitana.
d)- go to your hex editor where you opened kitana´s decompressed package. what you´ll do now is to search kitana´s original skeletalmesh size. The number is 13F79B but you can´t search it simply like that, first you have to write it in little endian format. So if the number is 13F79B you will need to write it as 9BF713 and then search it. Here is a pic.HxD.png
the values marked in blue are the size and what is marked in red is the offset of the skeletalmesh.
e)- replace the size values with jade´s. Jade´s values in little endian format are BE1B1500. you´ll have something like thisHxD2.png
f)- now replace the offset values (those which are marked in red in the previous pic) with the package´s last offset in little endian format. If the values were 1395D12 now converted to little endian they are 125D3901. You´ll have something like thisHxD3.png
g)- open the new skeletalmesh file in hex. copy and paste it at the end of kitana´s package.
7- replace kitana´s textures with jade´s.
Don´t forget to make a backup of your original file. This will replace Kitana´s main costume.
Remember that you will not have the cloth animations. that includes the hair. this is due to this mesh swap project is still in development.
What you get is Kitana with Jade´s "skin" so every move and special move, xray, and everything else is from Kitana.
Hello if this thread is still alive. I am trying to do a similar swap but swapping Jade_B's Skeletalmesh into Kabal's. I done all the steps up until the replacing textures step, but I keep getting the "File Not Found in .xxx package", Already made sure it is a fresh new package (no modifications), renamed all to Kabal instead of Jade_B, but it still doesn't work
make sure to inject the textures first before renaming everything.
I gotta ask u zepterrian, why do I keep getting "File Not Found in .xxx package" when trying to inject the Texture2D using the files from Jade_B in this case, but is injected when I use Kabal's Texture2D files, the problem is even though the injection works, the character is all black except the hair.

BTW what I'm trying to do is use Sonya's 2nd costume as the main one, so taking the skeletalmesh and textures of the 2nd costume and inject them to the 1st default one, this maybe a problem and worth mentioning.
Attachments
IMG_20230406_020902.jpg
User avatar
zepterrian
Grand Master
Posts: 659
Joined: Fri Jul 10, 2015 3:50 pm
Side: Light

Re: Character reindex (swaping ) tool

Post by zepterrian »

sultan0017 wrote: Tue Apr 11, 2023 11:21 am I gotta ask u zepterrian, why do I keep getting "File Not Found in .xxx package" when trying to inject the Texture2D using the files from Jade_B in this case, but is injected when I use Kabal's Texture2D files, the problem is even though the injection works, the character is all black except the hair.

BTW what I'm trying to do is use Sonya's 2nd costume as the main one, so taking the skeletalmesh and textures of the 2nd costume and inject them to the 1st default one, this maybe a problem and worth mentioning.
If you get file not found it is simply because the file you point to as "original" is not inside the package.
An example of this is when you want to inject a file inside your char package a first time and the injection is successful. When you do that, you replace the "original" file by the newer one of course, meaning that if you want to repeat the injection again, your "original" file now will happen to be the last one you injected. So if you keep pointing to the very first original file as the "original", the program will not find it and "File not found" will pop up.
But don't give yourself a headache with that. If it says file not found it is because your file is not present in your .xxx package.

As for the black textures, in my experience, it is because you injected them directly without opening them in photoshop (or your current editor).
To avoid this problems open the original textures and the new textures as well. Copy the new texture and paste it over the old one (also the new alpha channel over the older one). If you have to resize the new texture to make it match the original's size do it. Then save as dds and inject using your preferred method.
For the raptor race...
User avatar
sultan0017
Warrior
Posts: 286
Joined: Sat Mar 11, 2023 2:46 pm
Side: Light
Contact:

Re: Character reindex (swaping ) tool

Post by sultan0017 »

zepterrian wrote: Thu Apr 13, 2023 4:35 pm
sultan0017 wrote: Tue Apr 11, 2023 11:21 am I gotta ask u zepterrian, why do I keep getting "File Not Found in .xxx package" when trying to inject the Texture2D using the files from Jade_B in this case, but is injected when I use Kabal's Texture2D files, the problem is even though the injection works, the character is all black except the hair.

BTW what I'm trying to do is use Sonya's 2nd costume as the main one, so taking the skeletalmesh and textures of the 2nd costume and inject them to the 1st default one, this maybe a problem and worth mentioning.
If you get file not found it is simply because the file you point to as "original" is not inside the package.
An example of this is when you want to inject a file inside your char package a first time and the injection is successful. When you do that, you replace the "original" file by the newer one of course, meaning that if you want to repeat the injection again, your "original" file now will happen to be the last one you injected. So if you keep pointing to the very first original file as the "original", the program will not find it and "File not found" will pop up.
But don't give yourself a headache with that. If it says file not found it is because your file is not present in your .xxx package.

As for the black textures, in my experience, it is because you injected them directly without opening them in photoshop (or your current editor).
To avoid this problems open the original textures and the new textures as well. Copy the new texture and paste it over the old one (also the new alpha channel over the older one). If you have to resize the new texture to make it match the original's size do it. Then save as dds and inject using your preferred method.
Well thanks didnt know i had to open the file😅, so here is my final result, i got those black markings all over the place is there a way fix em?? if not not a problem i feel like I'm finally getting the hang of things.
Edit: forgot to ask about the dog tags, why r they floating lol, i read it is a shortcoming from the mesh swap, if so then i did what i could hahaha.
Attachments
IMG_20230414_204945.jpg
User avatar
zepterrian
Grand Master
Posts: 659
Joined: Fri Jul 10, 2015 3:50 pm
Side: Light

Re: Character reindex (swaping ) tool

Post by zepterrian »

sultan0017 wrote: Fri Apr 14, 2023 1:53 pm Well thanks didnt know i had to open the file😅, so here is my final result, i got those black markings all over the place is there a way fix em?? if not not a problem i feel like I'm finally getting the hang of things.
Edit: forgot to ask about the dog tags, why r they floating lol, i read it is a shortcoming from the mesh swap, if so then i did what i could hahaha.
Make sure not to forget to open them all in photoshop (or the editor you are using) and then save with proper configuration as described in the texture tutorial post.
Also there are textures named Details. For those, the save setting is "dtx1 no alpha".
As for the floating accessories, that's because this swap method does not allow animations in any other mesh that is not the "meat" mesh let's say. You can try making it invisible swapping materials perhaps.
For the raptor race...
User avatar
sultan0017
Warrior
Posts: 286
Joined: Sat Mar 11, 2023 2:46 pm
Side: Light
Contact:

Re: Character reindex (swaping ) tool

Post by sultan0017 »

zepterrian wrote: Fri Apr 14, 2023 3:23 pm
Make sure not to forget to open them all in photoshop (or the editor you are using) and then save with proper configuration as described in the texture tutorial post.
Also there are textures named Details. For those, the save setting is "dtx1 no alpha".
As for the floating accessories, that's because this swap method does not allow animations in any other mesh that is not the "meat" mesh let's say. You can try making it invisible swapping materials perhaps.
Well Sadly no luck same results, thanks for ur help tho, achieved better results with the info u provided.
Post Reply

Return to “Mortal Kombat 9 PC Modding Tutorials and Discussions”