Titan Quest Fans Forum

Titan Quest - Anniversary Edition => Modifications => Installation and Tools => Topic started by: epinter on 22 January 2018, 02:30:30

Title: TQRespec: The respec tool for Titan Quest
Post by: epinter on 22 January 2018, 02:30:30
Features:
- Mod support
- Character respec
- Change gender
- Add attributes and skill points (just respec, or edit freely after enable a feature)
- Edit gold
- Edit Electrum
- Change difficulty
- Add/remove portals
- Unlock all bags
- Reset stats
- Remove Skills (get skill points back)
- Remove mastery (get skill points back)
- Copy character (to Windows, Android and Backup in zip format)
- Convert character when copying between platforms (Windows/Android)
- List with stats and information about all characters found.
- Export CSV of characters info and stats.
- Export Player.chr to JSON (for debugging)
- Extract all game files (ARC and ARZ) and decompile map, with a single command
- Map decompiler
- TEX converter


Changelog:
https://github.com/epinter/tqrespec/blob/master/CHANGELOG.md (https://github.com/epinter/tqrespec/blob/master/CHANGELOG.md)

More details can be found on GitHub:
https://github.com/epinter/tqrespec (https://github.com/epinter/tqrespec)

(https://github.com/epinter/tqrespec/raw/master/assets/screenshot_attributes.png)
(https://github.com/epinter/tqrespec/raw/master/assets/screenshot_skills.png)
(https://github.com/epinter/tqrespec/raw/master/assets/screenshot_misc.png)
Title: Re: TQRespec: A respec tool for Titan Quest (all versions)
Post by: Groom on 20 February 2019, 21:57:02
Hi
Nice tool for the Vanilla section (non-mods).

But as I'm playing the mod "Paths" https://www.kirmiziperfect.com/titan-quest-paths-mod/ (https://www.kirmiziperfect.com/titan-quest-paths-mod/) ,
Is it possible to change number of attributes distributed per (unallocated) point?

From the release notes:
"—Gain 16 attribute points per level instead of 2 (each attribute point increases an attribute by 1)."

And each point in Health/Mana gives 5 HP/Mana.

Thanks in advance
Groom
Title: Re: TQRespec: A respec tool for Titan Quest (all versions)
Post by: Yokoshima on 30 May 2019, 05:40:23
THANK YOU! I was playing a guy with a friend and there are two paths I want to explore, one solo and one with him. Now I can just copy my guy and save a lot of time.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: epinter on 15 July 2019, 02:03:16
New version is available, with skills and mastery respec. Mod support is planned, I hope I can release this feature soon.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: icefreeze on 15 July 2019, 04:47:48
Sadly i can't use new version of tqrespec, 0.6.1 too.
It shows this error notice:
Quote
java.lang.RuntimeException: Error loading database.
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.Db.initialize(Unknown Source)
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Unknown Source)
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Unknown Source)
   at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
   at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
   at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Game path not detected
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.GameInfo.getGamePath(Unknown Source)
   ... 6 more
I'm still using v0.2.1  :D
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: epinter on 15 July 2019, 13:53:41
Sadly i can't use new version of tqrespec, 0.6.1 too.
It shows this error notice:
Quote
java.lang.RuntimeException: Error loading database.
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.Db.initialize(Unknown Source)
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Unknown Source)
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Unknown Source)
   at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Unknown Source)
   at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
   at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: Game path not detected
   at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.GameInfo.getGamePath(Unknown Source)
   ... 6 more
I'm still using v0.2.1  :D

The game is installed through Steam ? Can you post the full path of you game installation, and the contents of libraryfolders.vdf (can be found under "SteamApps/common".

The path is detected this way:
1. Uninstall information from windows registry
2. Steam Libraryfolders.vdf (in 0.2.1, I was using config.vdf instead)
3. Gog


Test this build:
https://mega.nz/#!dJMBHSZb!dB3gOqPi7YZikgpGEbXI-on3isBCXRyXx0MdvbhYeVc
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: Medea Fleecestealer on 15 July 2019, 19:25:30
He uses a pirated copy of the game epinter so not sure you'd be able to fix the problem for that.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: epinter on 15 July 2019, 19:38:53
He uses a pirated copy of the game epinter so not sure you'd be able to fix the problem for that.

These pirated copies that are based on steam uses weird ways to handle game path in registry. I don't want to implement an option to force path, I will try to detect it as a fallback. Anyway, as a last resort, the application supports running without the game installed like described in readme (copying database and text).

Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: icefreeze on 15 July 2019, 20:32:08
Yeah, the last build (0715.4) works.
Thanks for your great work  ;D!
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: epinter on 15 July 2019, 20:55:59
Yeah, the last build (0715.4) works.
Thanks for your great work  ;D!

I appreciate your help, icefreeze. Thanks for the contribution!
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: Xerxes on 10 September 2019, 13:31:26
As neither TQDefiler nor GDDefiler are working properly with the current TQ AE I wanted to try TQRespec. However when I start it (version 0.7.2) it presents a message box telling me that the game is running and I need to close it. The game isn't running so there is nothing to close.
Maybe related - in TQRespec I can see my characters in the dropdown list but when I select one nothing happens. Neither attributes nor skills are populated with data.

Is there any way to fix these issues? I'm using the GoG version 2.8b of TQ AE with Ragnarok and Atlantis on Windows 7 x64 (up-to-date patches).
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: undefind on 11 September 2019, 03:22:56
try the AE version of the defiler. dont update when it asks and reallocate that way. just make sure to make a backup of your savedata first.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: epinter on 11 September 2019, 03:49:10
As neither TQDefiler nor GDDefiler are working properly with the current TQ AE I wanted to try TQRespec. However when I start it (version 0.7.2) it presents a message box telling me that the game is running and I need to close it. The game isn't running so there is nothing to close.
Maybe related - in TQRespec I can see my characters in the dropdown list but when I select one nothing happens. Neither attributes nor skills are populated with data.

Is there any way to fix these issues? I'm using the GoG version 2.8b of TQ AE with Ragnarok and Atlantis on Windows 7 x64 (up-to-date patches).

Don't run TQRespec from game folder, keep at another place. The game detection searches for any .exe from game folder.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: Medea Fleecestealer on 11 September 2019, 07:18:55
try the AE version of the defiler. dont update when it asks and reallocate that way. just make sure to make a backup of your savedata first.

There's an AE version of the Defiler?  ???
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: Xerxes on 11 September 2019, 09:28:49
Don't run TQRespec from game folder, keep at another place. The game detection searches for any .exe from game folder.
Now that is interesting! I had TQRespec in a separate "Tools\TQ Respec" folder below the "Titan Quest AE" folder, just like other tools that I need to mod the game. Now I moved TQRespec to a separate partition and it runs fine. The issue with character selection is gone too. Thank you for the quick help and the tool itself. :)

There's an AE version of the Defiler?  ???
I was wondering the same. All I could download from Soulseekkor's site is "TQDefiler DotNet 1.3.9" and I still have "TQDefiler VB 3.4.5". The DotNet version crashes with a Stack Overflow error when loading Ragnarok characters and the VB version is so old that it doesn't support the new masteries and levels but at least it doesn't crash.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: Medea Fleecestealer on 11 September 2019, 09:58:07
Unless someone's stolen the code from Soul then there isn't one.  The GDDefiler is a combined TQ/GD Defiler meant to cover both games, but it's been a while since Soul updated it.

https://forums.crateentertainment.com/t/tool-gd-defiler/28264

It works with Ragnarok, but seems to be flaky if you have Atlantis as well depending on what you're trying to do with it.  I only use it to see where my characters are waypoint/riftgate wise mostly so not sure how much of the editing capability is working.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: Xerxes on 11 September 2019, 11:54:32
I tried the current GDDefiler version 0.2.4.0 but it also crashes with unhandled exception errors when loading Ragnarok characters and for other characters it displays their stats but I cannot change anything. GDDefiler even crashes when trying to set the TQ AE folder in the options.

I guess TQRespec is the only properly working tool we have for TQ AE at the moment. I'm happy with it because the only thing I wanted is to reallocate attribute points and change masteries or try out some skills without the need to buy all points back.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: icefreeze on 11 September 2019, 15:30:47
@Xerxes TQdefiler still can using to reset skills, masteries with characters which don't touch any content of Atlantis dlc.
And you can use TQVault to reset attributes since previous versions.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: undefind on 13 September 2019, 00:46:56
dont know what i was thinking, there isnt a AE version.

i use the old TQDefilerNET to edit my characters. works fine for me on all my characters unless i change waypoints. i can edit xp, gold, available stat points, skill points, etc...
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: DarkBeaver on 19 October 2019, 11:01:05
Hi. I tried copy character but when i start game, he is not in the list of available chars. He is just missing.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2019-07)
Post by: Shard on 20 June 2020, 20:23:38
Is there a 32 bit version?
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2021-12)
Post by: bfair123 on 05 February 2022, 00:14:41
I've downloaded the latest version of TQRespec (0.11.0), but when I try to run it nothing happens. I'm on Windows 10 and have TQRespec folder at D:\TQRespec. I have installed the TQ:AE from Steam and have it on my D:\ drive (D:\SteamLibrary\steamapps\common\Titan Quest Anniversary Edition). After I launch TQRespec, when I look in Task Manager, it is listed as a running process and I can End Task it. So, for some reason it is starting but maybe just freezing or something - it never shows any kind of a screen. I tried to copy the database, savedata, and gamedata from under my SteamLibrary area to the same folders under the TQRespec folder (following the instructions for running without the game installed), but still the same thing occurs. I also installed the Microsoft Visual C++ Redist 2015-2022 package as well and it seemed to have no effect. Last, I downloaded the previous release version (0.10.2) but the same behavior seems to occur. Really at a dead-end here. Any one have any ideas?
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2021-12)
Post by: Xerxes on 30 August 2022, 11:06:43
I just started playing TQ AE again (2.10.5) and ran into a strange problem with TQRespec (0.11.2), which I haven't noticed previously in an older version of the tool. When I start TQRespec it throws an error message:
Code: [Select]
br.com.pinter.tqrespec.core.UnhandledRuntimeException: Error loading text resource
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.Txt.preload(Txt.java:70)
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Main.java:180)
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Main.java:170)
at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: StorageType not implemented: 0
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.models.StorageType.lambda$valueOf$1(StorageType.java:38)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.models.StorageType.valueOf(StorageType.java:38)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.data.ArcFile.<init>(ArcFile.java:123)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.data.ResourceReader.<init>(ResourceReader.java:38)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.data.ResourceReader$Builder.build(ResourceReader.java:99)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.Text.loadText(Text.java:129)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.Text.loadTextFromAllPaths(Text.java:112)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.Text.preload(Text.java:83)
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.Txt.preload(Txt.java:68)
... 5 more

The reason for this message is the "Text\Text_EN.arc" file, which I have modified to add text for a new skill. What I did is add these lines to "skills.txt":
Code: [Select]
x3tagSkillStormBlizzard=Blizzard
x3tagSkillStormBlizzardDesc=Cast a whirlwind of icy air that slows and freezes your enemies.

Is it a known issue that modifications to the English text file break TQRespec?
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2021-12)
Post by: epinter on 30 August 2022, 15:45:48
I just started playing TQ AE again (2.10.5) and ran into a strange problem with TQRespec (0.11.2), which I haven't noticed previously in an older version of the tool. When I start TQRespec it throws an error message:
Code: [Select]
br.com.pinter.tqrespec.core.UnhandledRuntimeException: Error loading text resource
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.Txt.preload(Txt.java:70)
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Main.java:180)
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.Main$2.call(Main.java:170)
at javafx.graphics/javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.io.IOException: StorageType not implemented: 0
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.models.StorageType.lambda$valueOf$1(StorageType.java:38)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.models.StorageType.valueOf(StorageType.java:38)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.data.ArcFile.<init>(ArcFile.java:123)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.data.ResourceReader.<init>(ResourceReader.java:38)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.data.ResourceReader$Builder.build(ResourceReader.java:99)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.Text.loadText(Text.java:129)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.Text.loadTextFromAllPaths(Text.java:112)
at br.com.pinter.tqdatabase/br.com.pinter.tqdatabase.Text.preload(Text.java:83)
at br.com.pinter.tqrespec/br.com.pinter.tqrespec.tqdata.Txt.preload(Txt.java:68)
... 5 more

The reason for this message is the "Text\Text_EN.arc" file, which I have modified to add text for a new skill. What I did is add these lines to "skills.txt":
Code: [Select]
x3tagSkillStormBlizzard=Blizzard
x3tagSkillStormBlizzardDesc=Cast a whirlwind of icy air that slows and freezes your enemies.

Is it a known issue that modifications to the English text file break TQRespec?

Hi !

Your changes in the text should work. The .arc is being created in a way that is not parsed correctly by TQRespec. The message "StorageType not implemented: 0" from the stacktrace above means a field in the .ARC that should be 1(uncompressed) or 3(compressed), is set as 0. How did you create this .arc ? If you tell me the tool and options used, maybe I can reproduce and fix this issue.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2021-12)
Post by: Xerxes on 30 August 2022, 19:13:00
Your changes in the text should work. The .arc is being created in a way that is not parsed correctly by TQRespec. The message "StorageType not implemented: 0" from the stacktrace above means a field in the .ARC that should be 1(uncompressed) or 3(compressed), is set as 0. How did you create this .arc ? If you tell me the tool and options used, maybe I can reproduce and fix this issue.

I placed the modified "skills.txt in the TQ AE folder and then used the "ArchiveTool.exe" that comes with the game.
The command was:
Code: [Select]
ArchiveTool.exe Text\Text_EN.arc -update skills.txt .\ 9
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2021-12)
Post by: epinter on 05 September 2022, 16:45:43
Your changes in the text should work. The .arc is being created in a way that is not parsed correctly by TQRespec. The message "StorageType not implemented: 0" from the stacktrace above means a field in the .ARC that should be 1(uncompressed) or 3(compressed), is set as 0. How did you create this .arc ? If you tell me the tool and options used, maybe I can reproduce and fix this issue.

I placed the modified "skills.txt in the TQ AE folder and then used the "ArchiveTool.exe" that comes with the game.
The command was:
Code: [Select]
ArchiveTool.exe Text\Text_EN.arc -update skills.txt .\ 9

I published a new version(0.11.3) with the problem fixed.
Title: Re: TQRespec: The respec tool for Titan Quest (updated 2021-12)
Post by: Xerxes on 05 September 2022, 18:17:00
I published a new version(0.11.3) with the problem fixed.

Great! Thank you. I just tested it and it started without problems.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: Zjapper on 22 August 2023, 20:58:21
Downloaded and opened the respec tool. But for some reason i can't chose the charecter that i want to edit?
It only shows 3 out of 5 charecters in the select menu, but when i click the "watch chraecters" button, i can see the one i wanna edit, but i can't make the respec tool to open it.
I can only archive and explore the charecter, but not open it to edit.

Any advice?
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: epinter on 22 August 2023, 21:26:25
Downloaded and opened the respec tool. But for some reason i can't chose the charecter that i want to edit?
It only shows 3 out of 5 charecters in the select menu, but when i click the "watch chraecters" button, i can see the one i wanna edit, but i can't make the respec tool to open it.
I can only archive and explore the charecter, but not open it to edit.

Any advice?

See if the characters appears in the list as "Mod". Mod characters editing are not supported.

At some point, THQ Nordic told they would support multiple simultaneous mod in Titan Quest, since then I kept waiting the feature to appear in the game to start development in TQRespec, and they never released the feature. I will take look at this when I have free time, but no promises.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: Zjapper on 23 August 2023, 00:49:28
Downloaded and opened the respec tool. But for some reason i can't chose the charecter that i want to edit?
It only shows 3 out of 5 charecters in the select menu, but when i click the "watch chraecters" button, i can see the one i wanna edit, but i can't make the respec tool to open it.
I can only archive and explore the charecter, but not open it to edit.

Any advice?

See if the characters appears in the list as "Mod". Mod characters editing are not supported.

At some point, THQ Nordic told they would support multiple simultaneous mod in Titan Quest, since then I kept waiting the feature to appear in the game to start development in TQRespec, and they never released the feature. I will take look at this when I have free time, but no promises.

That's exacly what's wrong then. The charecters i wish to edit is mod. And it seems that mod charecters aren't supported in either respec, TQVault, Defiler or GD Defiler, sadly.
Are there any way to bypass this? Or any way to make the mod char into a main char so it'll then be supported?

Me and my sister are both huge TQ fans, and we're playing multiplayer together with new chars, and completing the game together. But the mistake we made it seems, is that we have used a bounce mod to x2 the monsters and bosses for more fun. But my sister has now at the end of normal playtrough, regrets about her secondary mastery (nature) as the lack of strenght, but not enough intelligense keeps her from using most of what we find.
So we're trying to figure out a way for her to change that mastery into the defence mastery instead before moving on to epic.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: Medea Fleecestealer on 23 August 2023, 07:59:39
Modded characters are supported in TQVault if you select the mod in the configuration window.  This will allow you to reset both masteries so she would be able to choose new ones.  Attribute points would also be reset and she could change her skill points/health/energy as well.  Click on Enable Custom Maps and then choose the mod then also tick the enable character editing.  TQVault will tell you it needs to restart and once it's done that select the character and edit as needed.  Shew would then need to go ingame and make the new selections and distribute her points.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: epinter on 01 June 2025, 04:01:33
Recent updates added features with more options to edit the characters (edit gold, add attributes/skill points, add portals, etc). Now Linux is fully supported. The version 1.0.3 added a feature to extract all game files, a map decompiler, and a TEX converter. For now, the extract and converter are command line tools, a readme can be found at https://github.com/epinter/tqrespec/blob/master/src/main/java/dev/pinter/tqextract/README.md
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: Medea Fleecestealer on 01 June 2025, 07:44:02
Nice epinter.  Thanks for all your work on this and your other projects.  Much appreciated.   :)
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: epinter on 06 June 2025, 17:23:34
Nice epinter.  Thanks for all your work on this and your other projects.  Much appreciated.   :)

Thank you  :D
I always learn something when I contribute to the community with this kind of development.

Btw, I released another version, now with mod support.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: Medea Fleecestealer on 07 June 2025, 09:00:12
Oh, so it could be used with mods like Xmax?  What about Legion of Champions and Soulvizier?  Does it work with those type of mods too?
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: epinter on 07 June 2025, 19:00:03
Oh, so it could be used with mods like Xmax?  What about Legion of Champions and Soulvizier?  Does it work with those type of mods too?

Yes, it should work with any mod. The game database.arz is always loaded while software is running. When you select a mod, the ARZ from the mod is loaded over the one from the game, so the values considered are from the mod. When any mod selection is done, the current mod is unloaded and the values considered are from the game (or the mod if one is selected), the log contains messages with the modifiers loaded from database. Currently, the values used are the skill points modifier, attributes modifier, attributes increment and the skills. If you have a mod that changes the points per level, the  value from the mod will be used. While developing I used LoC 2024, the skills are listed properly.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: nargil66 on 09 June 2025, 01:07:44
Thank you for including mod support, also for the portal unlock feature.
Btw, how to use the tex converter tool? Do I need a command prompt to do it? I'm mostly interested in converting DDS to TEX in a bulk.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: HekTo on 09 June 2025, 16:06:11
I'm mostly interested in converting DDS to TEX in a bulk.
https://youtu.be/wq_YPatWd50
1. Download the latest TQRespec - https://github.com/epinter/tqrespec/tags (At this moment it is https://github.com/epinter/tqrespec/releases/tag/v1.1.0 (TQRespec-1.1.0.zip)).
2. Unzip archive.
Further as in the video:
3. Create .bat file (with any name) in folder where texconverter-cli.exe and paste:
@echo off
setlocal EnableDelayedExpansion

set "SkipIfAlreadyExist=0"
set "DeleteOriginalAfterConversion=1"

set "ShowSkipped=1"
set "ShowDeleted=1"

REM Check if texconverter-cli.exe is in the folder with the batch file
set "TexConverter=%~dp0texconverter-cli.exe"
if not exist "%TexConverter%" (
   echo "%TexConverter% does not exist!"
   goto :EXIT
)

REM Check if the arguments have been passed
if "%~1"=="" (
    echo Error: No arguments passed!
    goto :EXIT
)

REM Processing each argument
for %%A in (%*) do (
   if exist "%%A" (
      REM If argument is folder
      if exist "%%A\*" (
         call :processFolder "%%A"
      ) else (
         REM If argument is file
         
         REM Check if .dds or .DDS extension
         set "isDDS_file=0"
         if "%%~xA" == ".dds" (
            set "isDDS_file=1"
         )
         if "%%~xA" == ".DDS" (
            set "isDDS_file=1"
         )
         
         if "!isDDS_file!" == "1" (
            REM If TEX file already exist
            if exist "%%~dpnA.tex" (
               if "%SkipIfAlreadyExist%"=="1" (
                  if "%ShowSkipped%"=="1" (
                     echo "%%A" skipped.
                  )
               ) else (
                  REM Delete TEX that already exist
                  del /F /Q "%%~dpnA.tex"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%~dpnA.tex" DELETED.
                  )
                  
                  REM Convert
                  "%TexConverter%" -i "%%A" -o "%%~dpnA.tex"
                  
                  REM If the conversion was completed without errors,
                  REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
                  REM and original file deletion is enabled
                  if !ERRORLEVEL!==0 if exist "%%~dpnA.tex" if "%DeleteOriginalAfterConversion%"=="1" (
                     del /F /Q "%%A"
                     
                     if "%ShowDeleted%"=="1" (
                        echo "%%A" DELETED.
                     )
                  )
               )
            ) else (
               REM If TEX file not already exist, then just convert
               "%TexConverter%" -i "%%A" -o "%%~dpnA.tex"
               
               REM If the conversion was completed without errors,
               REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
               REM and original file deletion is enabled
               if !ERRORLEVEL!==0 if exist "%%~dpnA.tex" if "%DeleteOriginalAfterConversion%"=="1" (
                  del /F /Q "%%A"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%A" DELETED.
                  )
               )
            )
         ) else (
            echo Error: %%A not have .dds extension!
         )
      )
   ) else (
      echo Error: %%A not exist!
   )
)

echo:
echo Done^!
goto :EXIT

:processFolder
REM For all DDS files in folder (with subfolders)
for /r "%1" %%F in (*.dds) do (
   REM If TEX file already exist
   if exist "%%~dpnF.tex" (
      if "%SkipIfAlreadyExist%"=="1" (
         if "%ShowSkipped%"=="1" (
            echo "%%F" skipped.
         )
      ) else (
         REM Delete TEX that already exist
         del /F /Q "%%~dpnF.tex"
         
         if "%ShowDeleted%"=="1" (
            echo "%%~dpnF.tex" DELETED.
         )
         
         REM Convert
         "%TexConverter%" -i "%%F" -o "%%~dpnF.tex"
         
         REM If the conversion was completed without errors,
         REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
         REM and original file deletion is enabled
         if !ERRORLEVEL!==0 if exist "%%~dpnF.tex" if "%DeleteOriginalAfterConversion%"=="1" (
            del /F /Q "%%F"
            
            if "%ShowDeleted%"=="1" (
               echo "%%F" DELETED.
            )
         )
      )
   ) else (
      REM If TEX file not already exist, then just convert
      "%TexConverter%" -i "%%F" -o "%%~dpnF.tex"
      
      REM If the conversion was completed without errors,
      REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
      REM and original file deletion is enabled
      if !ERRORLEVEL!==0 if exist "%%~dpnF.tex" if "%DeleteOriginalAfterConversion%"=="1" (
         del /F /Q "%%F"
         
         if "%ShowDeleted%"=="1" (
            echo "%%F" DELETED.
         )
      )
   )
)
exit /b

:EXIT
endlocal
pause
4. Create .bat file (with any name) in folder where texconverter-cli.exe and paste:
@echo off
setlocal EnableDelayedExpansion

set "SkipIfAlreadyExist=0"
set "DeleteOriginalAfterConversion=1"

set "ShowSkipped=1"
set "ShowDeleted=1"

REM Check if texconverter-cli.exe is in the folder with the batch file
set "TexConverter=%~dp0texconverter-cli.exe"
if not exist "%TexConverter%" (
   echo "%TexConverter% does not exist!"
   goto :EXIT
)

REM Check if the arguments have been passed
if "%~1"=="" (
    echo Error: No arguments passed!
    goto :EXIT
)

REM Processing each argument
for %%A in (%*) do (
   if exist "%%A" (
      REM If argument is folder
      if exist "%%A\*" (
         call :processFolder "%%A"
      ) else (
         REM If argument is file
         
         REM Check if .tex or .TEX extension
         set "isTEX_file=0"
         if "%%~xA" == ".tex" (
            set "isTEX_file=1"
         )
         if "%%~xA" == ".TEX" (
            set "isTEX_file=1"
         )
         
         if "!isTEX_file!" == "1" (
            REM If DDS file already exist
            if exist "%%~dpnA.dds" (
               if "%SkipIfAlreadyExist%"=="1" (
                  if "%ShowSkipped%"=="1" (
                     echo "%%A" skipped.
                  )
               ) else (
                  REM Delete DDS that already exist
                  del /F /Q "%%~dpnA.dds"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%~dpnA.dds" DELETED.
                  )
                  
                  REM Convert
                  "%TexConverter%" -i "%%A" -o "%%~dpnA.dds"
                  
                  REM If the conversion was completed without errors,
                  REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
                  REM and original file deletion is enabled
                  if !ERRORLEVEL!==0 if exist "%%~dpnA.dds" if "%DeleteOriginalAfterConversion%"=="1" (
                     del /F /Q "%%A"
                     
                     if "%ShowDeleted%"=="1" (
                        echo "%%A" DELETED.
                     )
                  )
               )
            ) else (
               REM If DDS file not already exist, then just convert
               "%TexConverter%" -i "%%A" -o "%%~dpnA.dds"
               
               REM If the conversion was completed without errors,
               REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
               REM and original file deletion is enabled
               if !ERRORLEVEL!==0 if exist "%%~dpnA.dds" if "%DeleteOriginalAfterConversion%"=="1" (
                  del /F /Q "%%A"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%A" DELETED.
                  )
               )
            )
         ) else (
            echo Error: %%A not have .tex extension!
         )
      )
   ) else (
      echo Error: %%A not exist!
   )
)

echo:
echo Done^!
goto :EXIT

:processFolder
REM For all TEX files in folder (with subfolders)
for /r "%1" %%F in (*.tex) do (
   REM If DDS file already exist
   if exist "%%~dpnF.dds" (
      if "%SkipIfAlreadyExist%"=="1" (
         if "%ShowSkipped%"=="1" (
            echo "%%F" skipped.
         )
      ) else (
         REM Delete DDS that already exist
         del /F /Q "%%~dpnF.dds"
         
         if "%ShowDeleted%"=="1" (
            echo "%%~dpnF.dds" DELETED.
         )
         
         REM Convert
         "%TexConverter%" -i "%%F" -o "%%~dpnF.dds"
         
         REM If the conversion was completed without errors,
         REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
         REM and original file deletion is enabled
         if !ERRORLEVEL!==0 if exist "%%~dpnF.dds" if "%DeleteOriginalAfterConversion%"=="1" (
            del /F /Q "%%F"
            
            if "%ShowDeleted%"=="1" (
               echo "%%F" DELETED.
            )
         )
      )
   ) else (
      REM If DDS file not already exist, then just convert
      "%TexConverter%" -i "%%F" -o "%%~dpnF.dds"
      
      REM If the conversion was completed without errors,
      REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
      REM and original file deletion is enabled
      if !ERRORLEVEL!==0 if exist "%%~dpnF.dds" if "%DeleteOriginalAfterConversion%"=="1" (
         del /F /Q "%%F"
         
         if "%ShowDeleted%"=="1" (
            echo "%%F" DELETED.
         )
      )
   )
)
exit /b

:EXIT
endlocal
pause
Now you can convert DDS to TEX and TEX to DDS by drag&dropping the required files and/or folders onto the corresponding .bat file.
At the beginning of each .bat file there is:
set "SkipIfAlreadyExist=0"
set "DeleteOriginalAfterConversion=1"

set "ShowSkipped=1"
set "ShowDeleted=1"
And you can change the "settings" at your discretion (changing from 0 to 1 or from 1 to 0).
SkipIfAlreadyExist:
Set to 1: If during conversion (e.g. DDS to TEX) it is found that there is already a corresponding TEX file for such DDS, then simply ignore (skip) such file.
Set to 0: If during conversion (e.g. DDS to TEX) it is found that there is already a corresponding TEX file for such DDS, the TEX file will be first deleted and then converted again.

DeleteOriginalAfterConversion:
Set to 1: When the conversion is successful (only successful) (e.g. DDS to TEX) the original file is deleted (i.e. the DDS file will be deleted and only the converted TEX file will remain).
Set to 0: Never delete the original file after conversion.

ShowSkipped:
Set to 1: Messages will be shown about which files were skipped.
Set to 0: No messages will be shown about which files were skipped.

ShowDeleted:
Set to 1: Messages will be shown about which files were deleted.
Set to 0: No messages will be shown about which files were deleted.
Notes:
1. You can drag&drop several folders/files onto a .bat file at the same time. And also both files and folders at the same time.
2. If you want to convert a folder, then files from other subfolders of this folder will always be converted.
3. Works correctly only if the file extension is .dds/.tex or .DDS/.TEX (i.e. if the extension is .Tex or .dDs, it will not work).
4. You can create a shortcut for the .bat file(s) and place them anywhere. Drag&drop on such a shortcut will also work.
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: epinter on 09 June 2025, 16:47:17
Thank you for including mod support, also for the portal unlock feature.
Btw, how to use the tex converter tool? Do I need a command prompt to do it? I'm mostly interested in converting DDS to TEX in a bulk.

It is a command line tool, you can use command prompt or powershell to run. The tex converter is simple to use, just run:
texconverter-cli.exe -i x:/tmp/TIGERMAN01.TEX -o x:/tmp/tigerman.dds"

I didn't create a feature to convert a directory with textures. I will try to do something, but for now, you can use a powershell script, like this:
Code: [Select]
Get-ChildItem -Path "x:/tmp/extracted/Resources" -Recurse -Include '*dds' | ForEach-Object {
    $outFile = $_.FullName -replace '\.dds','.tex'
    & "x:/tmp/TQRespec/texconverter-cli.exe" -i $_.FullName -o $outFile
}

You can put this inside a file with extension ".ps1", this code will enter every subdirectory inside "x:/tmp/extracted/Resources" and run convert every .dds found to .tex. If you never use powershell to run scripts, maybe you will need to enable scripts execution.

Thanks for your work, I played LoC 2024 a bit, it's a huge work.  :)
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: epinter on 09 June 2025, 16:48:05
I'm mostly interested in converting DDS to TEX in a bulk.
https://youtu.be/wq_YPatWd50
1. Download the latest TQRespec - https://github.com/epinter/tqrespec/tags (At this moment it is https://github.com/epinter/tqrespec/releases/tag/v1.1.0 (TQRespec-1.1.0.zip)).
2. Unzip archive.
Further as in the video:
3. Create .bat file (with any name) in folder where texconverter-cli.exe and paste:
@echo off
setlocal EnableDelayedExpansion

set "SkipIfAlreadyExist=0"
set "DeleteOriginalAfterConversion=1"

set "ShowSkipped=1"
set "ShowDeleted=1"

REM Check if texconverter-cli.exe is in the folder with the batch file
set "TexConverter=%~dp0%texconverter-cli.exe"
if not exist "%TexConverter%" (
   echo "%TexConverter% does not exist!"
   goto :EXIT
)

REM Check if the arguments have been passed
if "%~1"=="" (
    echo Error: No arguments passed!
    goto :EXIT
)

REM Processing each argument
for %%A in (%*) do (
   if exist "%%A" (
      REM If argument is folder
      if exist "%%A\*" (
         call :processFolder "%%A"
      ) else (
         REM If argument is file
         
         REM Check if .dds or .DDS extension
         set "isDDS_file=0"
         if "%%~xA" == ".dds" (
            set "isDDS_file=1"
         )
         if "%%~xA" == ".DDS" (
            set "isDDS_file=1"
         )
         
         if "!isDDS_file!" == "1" (
            REM If TEX file already exist
            if exist "%%~dpnA.tex" (
               if "%SkipIfAlreadyExist%"=="1" (
                  if "%ShowSkipped%"=="1" (
                     echo "%%A" skipped.
                  )
               ) else (
                  REM Delete TEX that already exist
                  del /F /Q "%%~dpnA.tex"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%~dpnA.tex" DELETED.
                  )
                  
                  REM Convert
                  "%TexConverter%" -i "%%A" -o "%%~dpnA.tex"
                  
                  REM If the conversion was completed without errors,
                  REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
                  REM and original file deletion is enabled
                  if !ERRORLEVEL!==0 if exist "%%~dpnA.tex" if "%DeleteOriginalAfterConversion%"=="1" (
                     del /F /Q "%%A"
                     
                     if "%ShowDeleted%"=="1" (
                        echo "%%A" DELETED.
                     )
                  )
               )
            ) else (
               REM If TEX file not already exist, then just convert
               "%TexConverter%" -i "%%A" -o "%%~dpnA.tex"
               
               REM If the conversion was completed without errors,
               REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
               REM and original file deletion is enabled
               if !ERRORLEVEL!==0 if exist "%%~dpnA.tex" if "%DeleteOriginalAfterConversion%"=="1" (
                  del /F /Q "%%A"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%A" DELETED.
                  )
               )
            )
         ) else (
            echo Error: %%A not have .dds extension!
         )
      )
   ) else (
      echo Error: %%A not exist!
   )
)

echo:
echo Done^!
goto :EXIT

:processFolder
REM For all DDS files in folder (with subfolders)
for /r "%1" %%F in (*.dds) do (
   REM If TEX file already exist
   if exist "%%~dpnF.tex" (
      if "%SkipIfAlreadyExist%"=="1" (
         if "%ShowSkipped%"=="1" (
            echo "%%F" skipped.
         )
      ) else (
         REM Delete TEX that already exist
         del /F /Q "%%~dpnF.tex"
         
         if "%ShowDeleted%"=="1" (
            echo "%%~dpnF.tex" DELETED.
         )
         
         REM Convert
         "%TexConverter%" -i "%%F" -o "%%~dpnF.tex"
         
         REM If the conversion was completed without errors,
         REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
         REM and original file deletion is enabled
         if !ERRORLEVEL!==0 if exist "%%~dpnF.tex" if "%DeleteOriginalAfterConversion%"=="1" (
            del /F /Q "%%F"
            
            if "%ShowDeleted%"=="1" (
               echo "%%F" DELETED.
            )
         )
      )
   ) else (
      REM If TEX file not already exist, then just convert
      "%TexConverter%" -i "%%F" -o "%%~dpnF.tex"
      
      REM If the conversion was completed without errors,
      REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
      REM and original file deletion is enabled
      if !ERRORLEVEL!==0 if exist "%%~dpnF.tex" if "%DeleteOriginalAfterConversion%"=="1" (
         del /F /Q "%%F"
         
         if "%ShowDeleted%"=="1" (
            echo "%%F" DELETED.
         )
      )
   )
)
exit /b

:EXIT
endlocal
pause
4. Create .bat file (with any name) in folder where texconverter-cli.exe and paste:
@echo off
setlocal EnableDelayedExpansion

set "SkipIfAlreadyExist=0"
set "DeleteOriginalAfterConversion=1"

set "ShowSkipped=1"
set "ShowDeleted=1"

REM Check if texconverter-cli.exe is in the folder with the batch file
set "TexConverter=%~dp0%texconverter-cli.exe"
if not exist "%TexConverter%" (
   echo "%TexConverter% does not exist!"
   goto :EXIT
)

REM Check if the arguments have been passed
if "%~1"=="" (
    echo Error: No arguments passed!
    goto :EXIT
)

REM Processing each argument
for %%A in (%*) do (
   if exist "%%A" (
      REM If argument is folder
      if exist "%%A\*" (
         call :processFolder "%%A"
      ) else (
         REM If argument is file
         
         REM Check if .tex or .TEX extension
         set "isTEX_file=0"
         if "%%~xA" == ".tex" (
            set "isTEX_file=1"
         )
         if "%%~xA" == ".TEX" (
            set "isTEX_file=1"
         )
         
         if "!isTEX_file!" == "1" (
            REM If DDS file already exist
            if exist "%%~dpnA.dds" (
               if "%SkipIfAlreadyExist%"=="1" (
                  if "%ShowSkipped%"=="1" (
                     echo "%%A" skipped.
                  )
               ) else (
                  REM Delete DDS that already exist
                  del /F /Q "%%~dpnA.dds"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%~dpnA.dds" DELETED.
                  )
                  
                  REM Convert
                  "%TexConverter%" -i "%%A" -o "%%~dpnA.dds"
                  
                  REM If the conversion was completed without errors,
                  REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
                  REM and original file deletion is enabled
                  if !ERRORLEVEL!==0 if exist "%%~dpnA.dds" if "%DeleteOriginalAfterConversion%"=="1" (
                     del /F /Q "%%A"
                     
                     if "%ShowDeleted%"=="1" (
                        echo "%%A" DELETED.
                     )
                  )
               )
            ) else (
               REM If DDS file not already exist, then just convert
               "%TexConverter%" -i "%%A" -o "%%~dpnA.dds"
               
               REM If the conversion was completed without errors,
               REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
               REM and original file deletion is enabled
               if !ERRORLEVEL!==0 if exist "%%~dpnA.dds" if "%DeleteOriginalAfterConversion%"=="1" (
                  del /F /Q "%%A"
                  
                  if "%ShowDeleted%"=="1" (
                     echo "%%A" DELETED.
                  )
               )
            )
         ) else (
            echo Error: %%A not have .tex extension!
         )
      )
   ) else (
      echo Error: %%A not exist!
   )
)

echo:
echo Done^!
goto :EXIT

:processFolder
REM For all TEX files in folder (with subfolders)
for /r "%1" %%F in (*.tex) do (
   REM If DDS file already exist
   if exist "%%~dpnF.dds" (
      if "%SkipIfAlreadyExist%"=="1" (
         if "%ShowSkipped%"=="1" (
            echo "%%F" skipped.
         )
      ) else (
         REM Delete DDS that already exist
         del /F /Q "%%~dpnF.dds"
         
         if "%ShowDeleted%"=="1" (
            echo "%%~dpnF.dds" DELETED.
         )
         
         REM Convert
         "%TexConverter%" -i "%%F" -o "%%~dpnF.dds"
         
         REM If the conversion was completed without errors,
         REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
         REM and original file deletion is enabled
         if !ERRORLEVEL!==0 if exist "%%~dpnF.dds" if "%DeleteOriginalAfterConversion%"=="1" (
            del /F /Q "%%F"
            
            if "%ShowDeleted%"=="1" (
               echo "%%F" DELETED.
            )
         )
      )
   ) else (
      REM If DDS file not already exist, then just convert
      "%TexConverter%" -i "%%F" -o "%%~dpnF.dds"
      
      REM If the conversion was completed without errors,
      REM and converted file exist (its possible, that texconverter-cli.exe will complete without errors but will not create a converted file),
      REM and original file deletion is enabled
      if !ERRORLEVEL!==0 if exist "%%~dpnF.dds" if "%DeleteOriginalAfterConversion%"=="1" (
         del /F /Q "%%F"
         
         if "%ShowDeleted%"=="1" (
            echo "%%F" DELETED.
         )
      )
   )
)
exit /b

:EXIT
endlocal
pause
Now you can convert DDS to TEX and TEX to DDS by drag&dropping the required files and/or folders onto the corresponding .bat file.
At the beginning of each .bat file there is:
set "SkipIfAlreadyExist=0"
set "DeleteOriginalAfterConversion=1"

set "ShowSkipped=1"
set "ShowDeleted=1"
And you can change the "settings" at your discretion (changing from 0 to 1 or from 1 to 0).
SkipIfAlreadyExist:
Set to 1: If during conversion (e.g. DDS to TEX) it is found that there is already a corresponding TEX file for such DDS, then simply ignore (skip) such file.
Set to 0: If during conversion (e.g. DDS to TEX) it is found that there is already a corresponding TEX file for such DDS, the TEX file will be first deleted and then converted again.

DeleteOriginalAfterConversion:
Set to 1: When the conversion is successful (only successful) (e.g. DDS to TEX) the original file is deleted (i.e. the DDS file will be deleted and only the converted TEX file will remain).
Set to 0: Never delete the original file after conversion.

ShowSkipped:
Set to 1: Messages will be shown about which files were skipped.
Set to 0: No messages will be shown about which files were skipped.

ShowDeleted:
Set to 1: Messages will be shown about which files were deleted.
Set to 0: No messages will be shown about which files were deleted.
Notes:
1. You can drag&drop several folders/files onto a .bat file at the same time. And also both files and folders at the same time.
2. If you want to convert a folder, then files from other subfolders of this folder will always be converted.
3. Works correctly only if the file extension is .dds/.tex or .DDS/.TEX (i.e. if the extension is .Tex or .dDs, it will not work).
4. You can create a shortcut for the .bat file(s) and place them anywhere. Drag&drop on such a shortcut will also work.

Thanks @HekTo, a nice drag and drop way to convert. :)
Title: Re: TQRespec: The respec tool for Titan Quest
Post by: nargil66 on 09 June 2025, 18:47:48
Perfect, thank you both :D I'll try your method tonight @HekTo !
SimplePortal 2.3.7 © 2008-2026, SimplePortal