[Tutorial] How to Replace Strings with Longer Strings

Post Reply
User avatar
DickChapy
Warrior
Posts: 222
Joined: Mon Feb 01, 2016 4:51 pm

[Tutorial] How to Replace Strings with Longer Strings

Post by DickChapy »

Hello, guys! Today I'll be showing you how to make strings longer. I'll be using my meshswap of MK4 Tanya as an example.

Necessary Tools
------------------
Mesh Swap Tools.7z
(245.72 KiB) Downloaded 604 times
------------------

Step 0: Download the tools above and extract them.
Step 0.jpg
Step 1: Copy the file you want to use from Asset to where you extracted the tools. In this example, that's CHAR_Kitana_M. Drag and drop the file onto decompress.exe. You should now have a folder called unpacked with the decompressed file inside
step 1.jpg
Step 2: Copy the decompressed file from unpacked to the ObjRef Creator folder.
Step 2.jpg
Step 3: Drag & drop your file onto extract.exe. You'll get a folder with the same name as your file.
step 3.jpg
Step 4: Copy your file and the new folder and paste them into the Package Appendor-Repacker folder.
step 4.jpg
Step 5: Inside of your CHAR_XXXX_X.xxx (CHAR_Kitana_M for me), you'll find the 3 text documents ExportTable, ImportTable, and NameTable. Delete everything except for these 3 text documents.
step 5.jpg
Step 6: Open ExportTable.txt and under the 'Edit' tab, go to 'Replace'. Enter the string you're replacing in the 'Find what:' box and the string you want to change it to in the 'Replace with:' box. In my case, I'm replacing all mentions of Kitana with TanyaDLC. You can either replace each string one by one with 'Replace', or use the 'Replace All' button. Once done, you can save and exit the file.
Step 6 part 1.jpg
step 6 part 2.jpg
Step 7: Repeat Step 6, but for NameTable.txt. Again, I'll be replacing all mentions of Kitana with TanyaDLC. Don't forget to save your changes.
Step 7.jpg
Step 8: Once you're done editing both ExportTable.txt and NameTable.txt, run the MKX Package Appendor-Repacker.exe and enter the name of the folder you're editing. Once the program is done, exit out of it.
step 8.jpg
Step 9: You should now have a file called CHAR_XXXX_X.xxx.repack (CHAR_Kitana_M.xxx for me). If you're not doing a meshswap onto a different character, simply remove the '.repack' from the file name and put it in your Asset folder. If you are meshswapping to a different character, continue to the following steps.
step 8.jpg
ONLY IF MESHSWAPPING ONTO ANOTHER CHARACTER

Step 10: If you're meshswapping to another character, open your CHAR_XXXX_X.xxx.repack file with a hex editor. Search for name of your character (CHAR_Kitana_M for me) and you should find something like the picture on the left. Replace all the highlighted area with the character you're meshwapping them to like in the example on the right (CHAR_TanyaDLC_M in my case). Make sure all the spaces after the name are '00' in hex and not just '.'. They have different values and this will not work if you just type periods after the name.
step 10.jpg
If the character you're meshswapping to isn't DLC, you can now save the file and rename it to who you're meshswapping with. If they are DLC, there's one more step.

Step 11: If you're meshswap target is a DLC character, search again using your hex editor for 'CHAR'. When you find the string that matches the example on the left, change it to 'DLC'. Once that's done, save the file and rename it to who you're meshswapping with.
step 11.jpg
That's it! You're all done!
------------------------------
Thanks to thethiny for his tools and for helping me understand how to use them


User avatar
mustafammk9456
Mortal
Posts: 53
Joined: Fri Jul 31, 2015 8:42 pm

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by mustafammk9456 »

thanks very much . i've been waiting for that since forever i'll try it ASAP
User avatar
Killer Potato
Master
Posts: 345
Joined: Fri Nov 13, 2015 9:55 am
Side: Darkness
Location: Romania

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by Killer Potato »

Very useful.The ugly mofo aka Ninja Goro is comming! :lol:
Doing stuff on MKX since 2016,and still doing stuff from time to time.
Mostly porting stuff on CoD
All the MKX mods I've done
User avatar
thethiny
Immortal
Posts: 2252
Joined: Fri Jan 17, 2014 12:08 pm
Side: Light
PSN: thethiny
XBox Live: thethiny
Location: Earthrealm
Contact:

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by thethiny »

Hey just to note, the way the Package Repacker works is that it will ignore ALL THE EXPORT TABLES that were already there, and it will ADD the ones you had. So I don't think that you need to rename the Export Table. The Export table is only for the number of lines.

Example:
Export Table:
File1
File2
File3
Texture2D.ImageIAdded

Name Table:
Name1
Name2
Name3

My tool will go and copy the first 3 export tables into the new file, then it will search for ImageAdded.Texture2D and add it as well. So if the first 3 files were names X X X, it will still load the same 3 files because these are only there for numbering purposes. I dunno if I updated that TBH. The name table is the only thing that is truly repacked.


There's also still oen last CHAR_Kitana_M in the file (you can open it in hex and change it) it will be called something like Characters.Kitana.CHAR.CHAR_Kitana_M you can rename the entire string with CHAR_TanyaDLC_M or wtv you want.
Image

All of my Mortal Kombat 11 Mods are now unified under a Single Thread. Click The Image to go to the thread.
User avatar
DickChapy
Warrior
Posts: 222
Joined: Mon Feb 01, 2016 4:51 pm

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by DickChapy »

thethiny wrote:Hey just to note, the way the Package Repacker works is that it will ignore ALL THE EXPORT TABLES that were already there, and it will ADD the ones you had. So I don't think that you need to rename the Export Table. The Export table is only for the number of lines.

Example:
Export Table:
File1
File2
File3
Texture2D.ImageIAdded

Name Table:
Name1
Name2
Name3

My tool will go and copy the first 3 export tables into the new file, then it will search for ImageAdded.Texture2D and add it as well. So if the first 3 files were names X X X, it will still load the same 3 files because these are only there for numbering purposes. I dunno if I updated that TBH. The name table is the only thing that is truly repacked.


There's also still oen last CHAR_Kitana_M in the file (you can open it in hex and change it) it will be called something like Characters.Kitana.CHAR.CHAR_Kitana_M you can rename the entire string with CHAR_TanyaDLC_M or wtv you want.
I did not know that renaming the Export Table didn't matter, thanks

For the big line with CHAR_Kitana_M I mentioned it specifically in Step 10 lol
User avatar
Scorp-Sub
Apprentice
Posts: 126
Joined: Tue Sep 01, 2015 8:36 am

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by Scorp-Sub »

Wow this is a great tutorial! I've been waiting for somebody to simplify this for a long time. Thanks for all your hard work! I can't wait to try this out. :)
User avatar
thethiny
Immortal
Posts: 2252
Joined: Fri Jan 17, 2014 12:08 pm
Side: Light
PSN: thethiny
XBox Live: thethiny
Location: Earthrealm
Contact:

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by thethiny »

DickChapy wrote:I did not know that renaming the Export Table didn't matter, thanks

For the big line with CHAR_Kitana_M I mentioned it specifically in Step 10 lol
Haha I didn't continue reading that.
Image

All of my Mortal Kombat 11 Mods are now unified under a Single Thread. Click The Image to go to the thread.
User avatar
armkub2
Mortal
Posts: 40
Joined: Tue Apr 24, 2018 9:04 am
Side: Light
PSN: -
XBox Live: -

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by armkub2 »

Thx it work i made a cyber jason mod :D
Beginner :3


WAAAAAAAAA
User avatar
Deiv9865
Apprentice
Posts: 93
Joined: Fri Mar 11, 2016 1:27 pm
Side: Darkness

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by Deiv9865 »

Keeps crashing/freezing the game
User avatar
HadiiiH
Mortal
Posts: 4
Joined: Sun Jul 09, 2023 3:32 pm

Re: [Tutorial] How to Replace Strings with Longer Strings

Post by HadiiiH »

does it work for mk9?
Post Reply

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