Mesh to MS3D Conversion for Steam Version of M2TW: Kingdoms
This issue gave our team some headaches and it doesn't seem to have been covered before, so here's a small tutorial on how to solve it. I tried to make it as exhaustive as possible and took baby steps.
The Problem: GOAT does not convert .mesh files from the Steam version of Medieval 2 Total War.
The Solution: change those files' serialization number.
EDIT: this problem was already solved by Hex35 in another older thread. He provides you with a nice python script that does the job for you (by automatically fixing the model's header). The process described in my post below is a little more involved.
Say I want to convert the mesh file for the mexican priest from the Americas expansion of M2TW: Kingdoms (mexican_priest_lod0) into a MS3D file, so that I can edit it in either Milkshape or some other 3d editor.
Spoiler Alert, click show to read:
If I own the CD version of the game I can just open GOAT, click on the MeshToMS3D button, choose the file I want to convert and GOAT will convert it fine.
Spoiler Alert, click show to read:
If instead I happen to own the Steam version of the game then GOAT will throw a bunch of errors at me. There are at least a couple observations to be made here.
If we take a look into GOAT's Python files (specifically GameObjectApplicationLibrary_v1_0) those two attributes, "is regular" and "is variant", are mirrored by 2 arrays of numbers, "regularheader" and "variantheader", respectively. The two are similar yet have a few differences: there are 4 missing numbers and a couple numbers a different.
Spoiler Alert, click show to read:
We could also use the MeshToText function of GOAT to take a look inside the CD version.
Spoiler Alert, click show to read:
The highlighted number after "serialization::archive" is exactly the same number for "regularheader" from GOAT's file.
Spoiler Alert, click show to read:
Unfortunately, the Steam version will give you an error if you try to convert it to a text file, and you cannot turn a text file into a MS3D file anyway. Therefore, you cannot simply edit the serialization number in the text file.
The solution here is to use an HeX Editor. I used HxD - Hexeditor but you can use any editor you like. For instance HexEd is free and you can use it directly from your browser.
Now, when you try to convert the Steam version it'll work like a charm.
Spoiler Alert, click show to read:
Last edited by MagicTrinkets; March 13, 2018 at 03:33 PM.
Reason: Adding Hex35's info + link
First of all, thank you Hex35 and please forgive the eons it took me to reply to your post.
Second, I'm going to add your info to my post. I know that it's a matter of scrolling down a few posts but, admittedly, the very thread you've linked me to doesn't feature your explanation in its OP. This is unfortunate because you tackled and solved exactly the same issue I encountered and it would have saved me a lot of time if I'd seen it before. I would imagine that many more useful contributions ended up getting lost in the depths of that thread and many others in this forum.
Last edited by MagicTrinkets; March 13, 2018 at 03:35 PM.
Reason: funny syntax is funny