[TUT] How to import Titan Quest models into the editor

A short Tutorial, how to import Meshes/Textures from TQ:IT to Grim Dawn

Recommended only for experienced modder, who knows what I want to say and who knows how to realize that!
I wouldn’t mind if someone could provide a better tutorial, because my English language knowledge is limited!

!!! Make a full backup of your Grim Dawn Installation Folder !!!

So let’s begin…
…and don’t be afraid; it looks worse than it is :stuck_out_tongue:

Info:
TQ:IT meshes (files with the suffix .msh in their names) exists in two different formats.
The one I will talk about has the header (first 4 bytes of the file) 'MSH" + the version number 0x0B
If you change the version number to 0x02 then GD can treat those meshes as GD meshes.
Simple, isn’t it?

All needed tools are freely downloadable.

Now follow these steps exactly in this order:

  1. Extract the GD Game Files (AssetManager: menu “Tools->Extract Game Files”
    (You surely have done that already)

  2. Create a new mod called GDTQ (we need the mod later to compile a fresh database.arz)

  3. Goto your TQ:IT\database folder

  4. Extract the database.arz with the tool ArzExtractor.exe

  5. Download the file templates.arc for TQ:IT and copy it to your [TQ:IT Dir]\database folder

  6. Extract the templates.arc with the tool ArcExplorer.exe

  7. Copy the extracted folder [TQ:IT Dir]\database\records to [GrimDawn Dir]\database\records
    IMPORTANT: We only want the new files from TQ:IT, so don’t override any existing files
    in the destination folder during the copy process.

  8. Copy the extracted folder [TQ:IT Dir]\database emplates to [GrimDawnDir]\database emplates
    Again, don’t override any files during copy process, only copy new ones.

  9. Goto [TQ:IT Dir]\resources

  10. Extract all *.arc files with the tool ArcExplorer.exe into separated folders
    i.e. Creatures.arc must be extracted to [TQ:IT Dir]\resources\Creatures
    … and so on

  11. Copy all extracted folders in [TQ:IT Dir]\resources to [GrimDawn Dir]\resources
    Again, don’t override any files during copy process, only copy new ones.

  12. Copy ArchiveTool.exe and zlibwapi.dll from your [GrimDawn Dir] to [GrimDawn Dir]\database

  13. Copy ArchiveTool.exe and zlibwapi.dll from your [GrimDawn Dir] to [GrimDawn Dir]\resources

  14. open a command prompt, cd to [GrimDawn Dir]\database and type in:
    archivetool templates.arc -update . templates 6
    (this will create the templates.arc)

  15. Copy the folder [GrimDawn Dir]\database\records to your mods folder [GrimDawn Dir]\mods\GDTQ\database\records

  16. Start the AssetManager, select the mod GDTQ, click on the tab “Database”, rightclick on GDTQ/database and click build
    This takes a while…!

  17. Close the AssetManager, goto [GrimDawn Dir]\Mods\GDTQ\database, rename the newly created GDTQ.arz to database.arz
    and copy this file to [GrimDawn Dir]\database (overwrite the existing one)
    (you can delete the mod GDTQ now, we don’t need it anymore)

  18. Create a batch file with the name UpdateArcs.bat in [GrimDawn Dir]\resources

  19. copy/paste following commands into the UpdateArcs.bat:
    archivetool conversations.arc -update . conversations 6
    archivetool Creatures.arc -update . Creatures 6
    archivetool Effects.arc -update . Effects 6
    archivetool fonts.arc -update . fonts 6
    archivetool FX.arc -update . FX 6
    archivetool InGameUI.arc -update . InGameUI 6
    archivetool Items.arc -update . Items 6
    archivetool “Level art.arc” -update . “Level art” 6
    archivetool Levels.arc -update . Levels 6
    archivetool Lights.arc -update . Lights 6
    archivetool Menu.arc -update . Menu 6
    archivetool Music.arc -update . Music 6
    archivetool Particles.arc -update . Particles 6
    archivetool Quests.arc -update . Quests 6
    archivetool SceneryBabylon.arc -update . SceneryBabylon 6
    archivetool SceneryEgypt.arc -update . SceneryEgypt 6
    archivetool SceneryGreece.arc -update . SceneryGreece 6
    archivetool SceneryOlympus.arc -update . SceneryOlympus 6
    archivetool SceneryOrient.arc -update . SceneryOrient 6
    archivetool Scripts.arc -update . Scripts 6
    archivetool Shaders.arc -update . Shaders 6
    archivetool Sound.arc -update . Sound 6
    archivetool Sounds.arc -update . Sounds 6
    archivetool System.arc -update . System 6
    archivetool TerrainTextures.arc -update . TerrainTextures 6
    archivetool “Terrain Textures.arc” -update . “Terrain Textures” 6
    archivetool Text_EN.arc -update . TEXT_EN 6
    archivetool UI.arc -update . UI 6
    archivetool Underground.arc -update . Underground 6
    archivetool XPack.arc -update . XPack 6
    @pause

  20. execute UpdateArcs.bat
    this will create all necessary arc files

  21. Now we are at the point where we will patch a TQ:IT mesh file, so it can be used in the world editor :slight_smile:
    If we want to patch only a few meshes, we could use a hex-editor for simplicity.
    Patching all ~4000 meshes would requires a more efficient way;
    a tool that is able to scan recursively through the resources folder, find all meshes
    with the header ‘MSH’+0x0B and patch it on the fly…Someone here who can code it? ^^ EDIT: Elfe made it :slight_smile:

Update: The attachment contains an updated version of Elfe’s MeshConverter, which now can convert all TQ meshes.

  1. We now patch the camel.msh
    Launch a hex-editor, open the file [GrimDawn Dir]\resources\creatures\ambient\camel\camel01.msh
    Change the 4th byte from 0x0B to 0x02
    Save it, exit the hex-editor
  2. Goto [GrimDawn Dir]\resources and execute the UpdateArcs.bat
    This will update the camel01.msh in the related Creature.arc
    Now we are able to use the mesh!
  3. Launch the world editor, open an existing mod (or create a new one)
    go to the Editor Mode and select the Camel (records\creatures\ambient\camel01
    and click somewhere on the terrain…there it is…phew…ready!

EDIT: if you can’t see a patched mesh model in the editor/viewer,
launch the hex-editor again, open the mesh file and change byte 5
to hex 0x0D, if it isn’t there.
ie. 4D 53 48 02 00 -> change it to 4D 53 48 02 0D

That's it!

TL;DR
copy all (extracted) game files from your TQ:IT installation folder to the associated Grim Dawn folders
and rebuild the database.arz, templates.arc and all other *.arc files, so that the *.arc files combines
all TQ:IT and Grim Dawn game files.

Update 09.09.2017
-added a simple MIF data text editor
NB: Always make a backup of your mesh/mif data you’re working on!

Regards,
GlockenGerda

MeshConverter.zip (24.5 KB)

My god that is a really well done tutorial! And your english is just fine! Im sure someone can follow up with autopatching script.

Very much thanks for the hard work! Great job!

Gonna try this evening and will sure make a video for those who won’t understand.

But have something to say. We don’t need to extract ALL things, do we ? Because it’s going to be a huge mod compilation :smiley: .

Going to make that mass mesh converter now.

Thank you very much for discovering this and making a tutorial :slight_smile:

Thank you so much, alexei!
You’re welcome!

A video is a very good idea!
Seeing is better than 1000 words!
And no, you only need the files described in the .dbr files to copy over!

So if someone want to include only a Camel in his mod,
he should look at Camel01.dbr and copy only the related template,
the anims, sounds etc to his mod. Then he patch the msh and so on…
–>snippet from Camel01.dbr
templateName,database/templates/decoration.tpl,
animation,creatures/ambient/camel/anm/camel_kneel.anm,
mesh,creatures/ambient/camel/camel01.msh,
periodicSound,records/sounds/soundpak/decorations/animals/camelperiodicpak.dbr,
<–

Thank you, Elfe! That would be cool!

I’m just wondering why I wrote “override” instead of “overwrite” in my tut.
I was so confused!!:eek:

Converter’s done!

You can download it from the attachment. Usage shouldn’t be to hard to figure out:

Disclaimer: I, Elfe, am not responsible for what people do with this tool. Use at own risc and resposibility.

Additional Info: If you want to check if there were any files that could not be converted, check the folder in which the tool is.

There should be an ErrorReport.txt file containing all filepaths + header version that could not be converted.

Note: This only works for the type of mesh that GlockenGerda mentioned. There are some tq meshes with a different header.


Newest Version: 1.1

MeshConverter now can fix empty mif meshes.

People aren’t messing around here.

GlockenGerda, you’re really making stuff happen. NICE.

…And thanks Elfe, yet another useful tool.

So have done everything, your manipulation is working, but:

There isn’t that much think which are importable;
Sometimes animations are not working;
Level art folder is empty (which was one of the think I wanted the most for exemple to put waterfall which don’t exist in grim dawn)

So I used to get some of the monsters I wanted but I think that I’ve to wait for level art. But thanks anyway will make the video this week end.

The level art of TQIT which is in different directories in the database and resource files have a different mesh header which is probably why they don’t work.

If you used the mesh converter then it didn’t even patch anythin since the headerversion was wrong.

oh, there are more than 4k meshes importable ^^
Which animations are not working?
I would like to have a look at those.

So I used to get some of the monsters I wanted but I think that I’ve to wait for level art. But thanks anyway will make the video this week end.

The meshes with header 0x0A are not importable yet!
I’ll try to figure it out next week (I’m on vacation for a few days :slight_smile: )

That was fast, Elfe! Thanks a lot!

One small issue I’ve found.
In my resources folder are some mesh files with a filesize of 0.
As soon as the converter tries to read those empty files it crash.
But thats no big deal; I’ve deleted all empty files :wink:

Thanks!!

Huh, well that’s probably because I didn’t expect something like this could happen…a mesh that has no filesize obviously shouldn’t be converted, too.

The tool crashes because of

Filestreamname.Position = 3

since there is no position “3” it will throw an exception I suppose.

But I can add a check for that later.

Added fix to attachments in the post that contains the original download.

Thank you!!

I have updated my tut. Now it points to your tool! yeah!

I’ve just noticed that some TQ:IT meshes, that were patched correctly, doesn’t
show up in the editor/viewer.

That’s because the 4 bytes after the Header [4D53480B] are sometimes “00 00 00 00”.
If you change those bytes to “0D 00 00 00” these meshes should be displayed in
the editor/viewer as usual. (I test it currently).

And don’t forget to execute the “UpdateArcs.bat” in the \resources folder,
after you’ve patched meshes…

Yet more to add to the converter :slight_smile:

Little list of folders that contain “not working animations”:

arachnos
boarman except for : am_mountaineer_13, am_mountaineer_1
djinn
dragonian
duneraider
gorgon
ichtian
maenad
neanderthal
questbosses; Except for boss_minotaurlord (all levels), boss_satyrshaman
reptilian (only some)
rumormonsters; except for subfolder egypt: reptiliansoldier, shadowstalker, jackalman_shaman ; for greece folder: ino, flamingboarman, giantlimos, harpyhag, arachnosrunelord, satyrbrute, eurynomusdownrythief, orbedweaver,
satyr; except for am_champion, bm_ravager, bm_soldier, br_archer, bs_firgemagi, bs_shaman, bs_spiritcaller, cm_soldier, cr_archer, cs_shaman, cs_spiritcaller, um_otos, um_paphos, ur_archer783, ur_caldordarkbow, ur_skiron, us_algosfrostwind, us_drusil, us_fernoscharskin, us_nesisfleshmender
scorpos
Skeleton
terracotta
tigerman
tropicalarachnos
wraith
yerren
yeti
zombie

Little list of folders that contain “not showing mesh”

drxcreatures,
drxitem
Items subfolders, except containers, quite a lot of equipmentweapon, questitems, and some others folders where there is some mesh.
And some folders of xpack

Expecting this will help you.

Oh, please wait with updating your converter, Elfe!
I need time for more testing… There is something I must investigate first!

Yeah, thank you, Elite killer!
This “little” list will sure help me!

I want to report something but I dunno if I should test it more first.

I have trap_projectile.msh (to spawn the bolt trap from TQ) but it doesn’t show up in game. it works in the viewer just fine so its kinda weird, like I said above, I should probably test more… I will have to check when I get home cause it seems like it SHOULD work.