Author Topic: Using the game's existing map in your mod  (Read 25316 times)

0 Members and 1 Guest are viewing this topic.

Not Yet Rated!

Offline Bumbleguppy

  • D'oh-ist Mage
  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 884
  • Country: us
  • Karma: +42/-0
    • View Profile
    • Awards
  • Time Zone: -8
Using the game's existing map in your mod
« on: 10 May 2019, 21:41:56 »
*Updated for Atlantis DLC
*Updated for Atlantis Patch 2.8

You can use and edit the existing game map either by extracting and decompiling the game's map or you can download the latest decompiled map ready to use. The extraction and decompile instructions here are for use with a Windows operating system.

Here is my hosted link with MEGA with a zipped version of the extracted and decompiled game map as of June 17th 2019:
Here is my hosted link with MEGA with a zipped version of the extracted and decompiled game map as of July 25th 2019:

https://mega.nz/#!NsQ0GYgK!bKrHOArCLE2MxxU4PRup-YGH6WbxMIj2cA-29UoZXiE

(I left the decompiled terrain textures in the directories for XPack3 in this download, you can delete them if you like)

Extract this to your mod's "source" directory. In Art Manager, set your tools directory to your game version's installation directory* (see below) and then go to the source tab and locate the "Levels\World\world01.wrl" file. Right-click it and select "auto-create asset". Build your mod and you now have the game map as part of your mod, ready to edit with the Editor.exe.


In order to extract the game map from the install directory yourself , start by getting the MAPDecompile.exe utility here:

https://mega.nz/#!x15EkYrB!SLz0XR5yuz_nfCyHtHJbPHZdGmQaTMcaYT7NgnExtoc

  • Extract the game map from the <game install directory>/Resources/Levels.arc using an Arc Extraction utility (see other tools threads to get).
  • You end up with "World/world01.map" in whatever directory you extracted it to.
  • Open ArtManager and start a new mod and copy and paste the MAPDecompile.exe to the "Working/CustomMaps/<ModName>/source" directory of the mod. You can do this with an existing game mod the same way, just copy to the existing mod's source directory.
  • Next, copy and paste the "world01.map" to the same directory, the "working/custommaps/<modname>/source" directory.
  • Next, open up the WIndows Command Prompt. If you haven't used it, take a moment to Google the basics, you only need to know how to change directories really.
  • Change the Command Prompt directory to the "working/custommaps/<modname>/source" directory you copied the MAPDecompile and world01.map to.
  • Type in "MAPDecompile world01.map world01.wrl" so that it looks similar to this:

    D:\Documents\My Games\Titan Quest - Immortal Throne\Working\CustomMaps\AtlantisMap\source\>MAPDecompile world01.map world01.wrl


  • Hit "Enter". If everything is correct, the MAPDecopiler will start decompiling each game map level one by one, a scrolling list of level names process and you can see the progress.
  • Your mod's Source directory should now look like this:
    Source
       Levels
       Maps
       Quests
       Text
       XPack
       XPack2
       XPack3

    The map decompiler will have made the highlighted directories during the decompilation if they didn't already exist.
  • Once the Decompiler is finished, navigate to the source directory and select the "world01.sd" and the "world01.wrl" files and select "cut".
  • Paste the "world01.sd" and the "world01.wrl" files directly into your "Source/Levels/World" directory of the mod. I don't know why this works or why it is necessary or why the decompiler doesn't extract these files directly to the correct directories, but this is a necessary step to make this work.

At this point you can remove/delete the "world01.map" and "MAPDecompile.exe" files from the source directory as they are no longer needed.


Now you can open up the Editor.exe and select that mod, navigate to source/Levels/World and click the world01.wrl file and the game map should load up in the Editor.

*CRITICAL STEP*
In ArtManager, click the "tools" in the menubar at the top, then click "Options..". Click the file picker for "Tools Directory" and navigate to your Steam or GOG installation of TQ Anniversary Edition. Since the Atalantis update, you can't use the original THQ MapCompiler.exe which ArtManager gets from the tools directory to compile the map. If you don't do this, the map's pathing will be broken and unusable. This really flummoxed the mod community for a couple months after the update as all our maps were broken until @Prosoro got this tip from the devs themselves.

Once you have made any edits or simply want to add the map as-is, right click the "world01.wrl" in the ArtManager for the mod the map is going to be in and select "auto-create asset".

Build the mod and enjoy your original game map in your mod.


*NOTE*
Terrain textures in the Atlantis DLC are not loaded in the map editor by default as of this writing, @Endymion suggested a quick fix below.

Create a directory in your mod's build directory inside the Resources directory and name it "XPack3". If you already have a directory named XPack3, use that and create a directory in there and name it "TerrainTextures".

Use an ArcExtractor to unpack the Resources/XPack3/TerrainTextures.arc to this new directory.

In ArtManager, load your mod, then click the "Archive" in the menubar and select "Build". This will pack all these terrain textures into an "XPack3.arc".

Load up the map editor and viola! The terrain textures are now visible.

Do the same process for Resources/XPack3/Scenery.arc and Resources/XPack3/Underground.arc to see the walls and such as well.

Do it with the Resources/XPack3/Creatures.arc as well to see the monster proxies.
« Last Edit: 25 July 2019, 17:57:31 by Bumbleguppy »

Not Yet Rated!

Offline soa

  • Modder
  • Full Member
  • *
  • Posts: 517
  • Country: fr
  • Karma: +21/-0
    • View Profile
    • Awards
  • Time Zone: +1
Re: Using the game's existing map in your mod
« Reply #1 on: 10 May 2019, 22:34:48 »
What if you want to make small edits of the game map but you know that the devs are susceptible to make edits of their own in any of the upcoming patches ? Any way to track down level by level if they made any changes ? And to merge their changes with yours ?
« Last Edit: 11 May 2019, 01:12:09 by soa »
Soulvizier for AE, Ragnarok and Atlantis [released] :
https://titanquestfans.net/index.php?topic=1201.0  / Discord : https://discord.gg/qs9t6AA
Overhaul mod with many new monsters, skills, items, features, balance and bugfixes. Increased difficulty.

Not Yet Rated!

Offline Bumbleguppy

  • D'oh-ist Mage
  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 884
  • Country: us
  • Karma: +42/-0
    • View Profile
    • Awards
  • Time Zone: -8
Re: Using the game's existing map in your mod
« Reply #2 on: 10 May 2019, 22:55:04 »
Good question, sorry I don't have a definitive answer myself.

I mean, I imagine you COULD somehow use a file diff utility somehow, but I'm not smart enough to do it myself.

The only practical way I know is to open two instance of the Editor with the new map open in one and your existing in the other. Not much as far as ease of use, but I can actually do it.

If there is a map level that has been updated, you can copy the updated level's .lvl, .rlv and .tga files from the new map's directory and paste them into the same directory in your existing map, writing over the old version,  and then use the editor to force save it. If you don't want to use the Editor's "Force Save All" function, simply go into edit mode on that map section after the pasting override and nudge a proxy, then the editor will see it needs to be saved.

I don't know if copy-pasting NEW levels from the new XPack for example will work, but I'll let you know once I've done it successfully.

EDIT: Also, remember that if you add the game's map like in this tutorial, the custom mod has a custom map....just because it's identical to the game's map doesn't mean the game sees it as such. It's still your map and can't be updated automatically with DLC or anything else.
« Last Edit: 10 May 2019, 22:57:20 by Bumbleguppy »

Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Posts: 615
  • Country: ca
  • Karma: +10/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
Re: Using the game's existing map in your mod
« Reply #3 on: 11 May 2019, 02:17:19 »
Imported successfully in, however the XPack 3 maps render very oddly, and no creature or item has a visible mesh... Just checking if you have the same issues?

Not Yet Rated!

Offline Bumbleguppy

  • D'oh-ist Mage
  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 884
  • Country: us
  • Karma: +42/-0
    • View Profile
    • Awards
  • Time Zone: -8
Re: Using the game's existing map in your mod
« Reply #4 on: 11 May 2019, 02:36:58 »
Looking at it first glance, the mesh and terrain textures aren't loading.

However, the horse and vineyard and basket textures load right away.

I would hazard a guess and say that the editor is not set up to check the new XPack3 resources for mesh or terrain textures. Whoops.

Hopefully an update in the future can fix this...I don't know of any config file for the Editor to do it myself.

Not Yet Rated!

Offline sauruz

  • Maze Lord
  • Global Admin
  • Full Member
  • *
  • Posts: 1625
  • Country: pt
  • Karma: +32/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: Using the game's existing map in your mod
« Reply #5 on: 11 May 2019, 09:54:33 »
Imported successfully in, however the XPack 3 maps render very oddly, and no creature or item has a visible mesh... Just checking if you have the same issues?

Good to hear im not the only one seeing this . I was starting to think my PC couldnt handle TQ anymore o.O

Also there a few grey squares in some places in vanilla map, checked the steam foruns and saw some people talking about this, im guessing this is a bug from TQ and not with the editor.
« Last Edit: 11 May 2019, 09:58:50 by sauruz »
Check my upcoming TQ project - Titanomachy - "https://titanquestfans.net/index.php?topic=910.0"

Not Yet Rated!

Offline Endymion

  • Modder
  • Full Member
  • *
  • Posts: 103
  • Country: aq
  • Karma: +9/-0
    • View Profile
    • Awards
  • Time Zone: ?
Re: Using the game's existing map in your mod
« Reply #6 on: 11 May 2019, 17:41:10 »
As a temporal measure you can repack XPack3 as an .arc to get Editor to see its contents.
I.e. unpack important .arcs such as Creatures, Scenery, Underground and so forth, put them all in one folder and pack it under XPack3.arc.

Not Yet Rated!

Offline Bumbleguppy

  • D'oh-ist Mage
  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 884
  • Country: us
  • Karma: +42/-0
    • View Profile
    • Awards
  • Time Zone: -8
Re: Using the game's existing map in your mod
« Reply #7 on: 17 June 2019, 17:47:05 »
Updated OP with relevant info and a fresh new decompiled map for the Atlantis update.

Not Yet Rated!

Offline sauruz

  • Maze Lord
  • Global Admin
  • Full Member
  • *
  • Posts: 1625
  • Country: pt
  • Karma: +32/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: Using the game's existing map in your mod
« Reply #8 on: 17 June 2019, 19:11:38 »
A quick newbie question(s)

-Do we neeed to extracting and decompiling  the game map after any TQ patch ?

-So after i (re)build xpac3 TerrainTextures.arc in AM , everyhting that are invisible in the editor ( monster proxies/objects.. etc) will be fixed ? or only the scenario ?
Check my upcoming TQ project - Titanomachy - "https://titanquestfans.net/index.php?topic=910.0"

Not Yet Rated!

Offline Bumbleguppy

  • D'oh-ist Mage
  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 884
  • Country: us
  • Karma: +42/-0
    • View Profile
    • Awards
  • Time Zone: -8
Re: Using the game's existing map in your mod
« Reply #9 on: 17 June 2019, 20:07:53 »
Only the terrain painting will be fixed. I will have to look into what to extract and archive for the scenery like wall objects and such.


If a patch changes the game map and you want those changes in your custom map, you will have to place the changed levels in your existing game map, yes.

I have had good results with copying the Level .lvl, .tga and the .rlv...three files represent the one level (map section) and pasting them directly into the matching directory in my custom map.

This works well when you screw up a single map level so bad you want to start over, too. ;)

So for example, if the devs add a rowboat or something to the NPC in Rhodes, simply copy the XPack/Levels/Area_01_Rhodes/Rhodes_CityFinal_01.lvl and the .tga (mini-map image) and the .rlv and paste them over the existing files in your map's Xpack/Levels/Area_01_Rhodes directory.

Then force save them in the editor, I like to nudge a proxy 1mm and back and then save just those levels I nudged in. Then build and the level is done.

I haven't looked into the other things for the editor for Atlantis yet, like proxies and such. I'll do that sometime.

EDIT: Yeah, you'll need to extract the Resources/XPack3/Scenery.arc and Underground.arc and place them in your custom map's Resorces/XPack3 directory and create the two directories in there Scenery and Underground. Then use ArtManager Archive->Build command to add them to the XPack3.arc in your custom mod. I jest checked it and it works.
« Last Edit: 17 June 2019, 20:20:33 by Bumbleguppy »

Not Yet Rated!

Offline sauruz

  • Maze Lord
  • Global Admin
  • Full Member
  • *
  • Posts: 1625
  • Country: pt
  • Karma: +32/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: Using the game's existing map in your mod
« Reply #10 on: 17 June 2019, 20:19:20 »

So for example, if the devs add a rowboat or something to the NPC in Rhodes, simply copy the XPack/Levels/Area_01_Rhodes/Rhodes_CityFinal_01.lvl and the .tga (mini-map image) and the .rlv and paste them over the existing files in your map's Xpack/Levels/Area_01_Rhodes directory.


I think i need to do this, because after latest patch ( when they changed the quest that ports you to Gandir ( 1st city of Atlantis xpac)) i no longer see the boats/captains setle near Rhodes ( on the editor)
Check my upcoming TQ project - Titanomachy - "https://titanquestfans.net/index.php?topic=910.0"

Not Yet Rated!

Offline Bumbleguppy

  • D'oh-ist Mage
  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 884
  • Country: us
  • Karma: +42/-0
    • View Profile
    • Awards
  • Time Zone: -8
Re: Using the game's existing map in your mod
« Reply #11 on: 17 June 2019, 20:24:06 »
Yeah, it works well. I once tried using the "IMport Level" but it imports the level to the middle of the map overview and not where it was in the original game. Copying and pasting the level files preserves all teh positioning and knitting with adjacent levels.

I updated the OP to include the Scenery and Underground .arcs to get the whole editor complete experience for XPAck3.

Not Yet Rated!

Offline WNG

  • Forum Moderator
  • Full Member
  • *
  • Posts: 615
  • Country: ca
  • Karma: +10/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: -4
Re: Using the game's existing map in your mod
« Reply #12 on: 18 June 2019, 01:29:32 »
I'll try this as soon as I get the chance. Will say if anything is wrong...

Also, if I want to see new items in the editor, I only need to do the same with Items.arc?

Not Yet Rated!

Offline Bumbleguppy

  • D'oh-ist Mage
  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 884
  • Country: us
  • Karma: +42/-0
    • View Profile
    • Awards
  • Time Zone: -8
Re: Using the game's existing map in your mod
« Reply #13 on: 18 June 2019, 01:54:16 »
I would think so. Are there items in the map, like swords and armor?

Not Yet Rated!

Offline sauruz

  • Maze Lord
  • Global Admin
  • Full Member
  • *
  • Posts: 1625
  • Country: pt
  • Karma: +32/-0
  • Gender: Male
    • View Profile
    • Awards
  • Time Zone: ?
Re: Using the game's existing map in your mod
« Reply #14 on: 19 June 2019, 12:39:07 »
They fixed Atlantis maps in the editor on last update, ( i didnt build xpac3 TerrainTextures.arc in AM ),
Check my upcoming TQ project - Titanomachy - "https://titanquestfans.net/index.php?topic=910.0"

Tags:
 


SimplePortal 2.3.7 © 2008-2024, SimplePortal