Fixing Titan Quest on Steam

I picked up a copy of Titan Quest + Titan Quest: Immortal Throne on the current Steam weekend deal, only to find that I couldn’t attempt to refresh the games list for internet games without getting a nice exception dialog.

Assertion failed!Program: ...ps\common\titan quest immortal throne\Tqit.exe
File: .\common\gsPlatformSocket.c
Line: 236Expression: theSocket != INVALID_SOCKET

I researched this to find that it seems to be a common issue on Vista SP1, someone had suspected that Titan Quest was creating a raw socket for some reason. That is in fact what it’s doing. Since I am not running the game in administrator mode, the socket creation fails.

Since I don’t really like the idea of running Steam and TQ:IT in administrator mode, I looked for a better fix.

It makes a call to socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) in Engine.dll. I modified Engine.dll to make it call socket(AF_INET, SOCK_DGRAM, IPPROTO_TCP) instead. I suspect this breaks the ping display in the game list now, but it appears to run just fine now without any exceptions.

It’s a two byte fix for Engine.dll, assuming the latest version of Engine.dll for TQ:IT on Steam now (md5 of cf00e85ff32629e4ad7859765722517b), you will want to change offset 0x164A0F to 0x11 (from 0x01), and offset 0x164A11 to 0x02 (from 0x03).

Tags:

33 Responses to “Fixing Titan Quest on Steam”

  1. marcb says:

    Fantastic!
    Just got this game on steam and Windows 7 was crashing with it.
    The md5sum still matches today (14/10/09) and your mods worked beautifully!
    Thanks!

  2. Dale says:

    What is the best way to edit dll files? I have windows xp and I am hoping this fixes my online connection trouble. It started giving me an “unable to connect to server” message every time I try to play online.

  3. Torn says:

    Just had this problem with Titan Quest and Windows 7 – the fix still works. 🙂

    Get notepad++ with the ‘hex editor’ plugin. Open up the Engine.dll file and navigate to address 164A00, then count along to F (last one in row, has the value ’01’ – counting in hex goes 0123456789ABCDEF). Change that to 11. Go to the next row and find the address 164A11 and change the 02 to 03 (it’s the only 02 around there).

    I’ve put a .zip of the edited file over on mediafire: http://www.mediafire.com/?txjqymyzymj

  4. Matt says:

    Thanks, all. Torn’s file worked beautifully for the copy I got from Direct2Drive.

  5. Max says:

    Yeah, this works outstanding. I bought the Titan Gold pack at the Steam Store and i got this problem, until i used Torn’s file.
    Amazing.

    Thanks a lot man.

  6. Jack says:

    I’m on Windows 7 and have a GeForce GTX 260, Directx11, and when I try to start up TQ via STEAM, all I get is flickering black screen and a dialog box that says, “Couldn’t initialize graphics engine.” Is there a fix or hack for this problem/issue? Thanks.

  7. SoulSeekkor says:

    Nice work Rick! This fix will be included in my next TQ Defiler under your name.

    Soul

  8. Suyalus says:

    its not working… where do i copy the enigne? into the steamapps/common/TQ folder? not wokring… :S

  9. Dante says:

    Hey all, please note that the downloaded file is NOT the engine.dll for the fan patch. If you use the fan patch you will need to make sure your friends use the same engine.dll file. So edit your own if you have the fan patch (which you should, it rules) or share the one above with your friends.

  10. Dante says:

    This is the correct path for it:
    C:\Program Files\Steam\steamapps\common\titan quest immortal throne

  11. Fips says:

    Awesome work Rick, and thanks for the finished file, Torn.

  12. Xope says:

    Torn’s file works. Thanks!

  13. Novacro says:

    This works excellently. Thank you very much!

  14. Khasra says:

    After getting pass my lack of knowledge on hex editors nooberies I got it working. Thanks!

  15. Co7 says:

    Tnx sooooo much!

    It works perfect!

  16. fengshui says:

    awesome! works like a charm!

  17. js4311 says:

    i have no clue how to do this… please help… in the most lay way possible?

  18. rekha says:

    Torn posted a link to download the edited Engine.dll file. Here it is again: http://www.mediafire.com/?txjqymyzymj
    You copy it over the Engine.dll in C:\Program Files\Steam\steamapps\common\titan quest immortal throne

    Worked for me.

  19. Lenny says:

    Thx man !
    For those of you who have the fanpatch 1.17a, I edited the engine.dll.

    here is it:
    http://www.mediafire.com/?g3tkfjk3y8x1k6k

    cheers

  20. Tom says:

    Hey, so I followed rekha’s instructions. They worked as expected, but theres still a problem. When I go to host a server online, it works great. When i go to join a server online, tqim closes without notice. Theres no message, it just closes and leaves me wondering. Anyone know whats wrong and how i can fix it? thanks in advance!

    • Lenny says:

      Dear Tom

      the thing is, that you don’t know, what version other people are using. I assume that you try to join a random game.
      If thats the case and you have not exactly the same version as the host, u will crash.
      There are a few files which will be checked, database.arc, effects.dll and engine.dll (not so sure about what’s their name).

      hope that helps.

      • Tom says:

        well I’m trying to join the game that my friend is hosting, and he just got this about 2 weeks ago. I’ve had mine for a few years, both bought off of steam. Would there be a difference in versions for our games do you think? if so, how would i update mine to match his? shouldn’t the version update automatically?

      • Tom says:

        Whoah, I actually got it to work. I have no idea what the problem was. I joined a random server to see if that would make a difference, and it did. I made it in successfully. then my friend made a server and i went to join that, and it worked also. Thanks for the help!

  21. Annie says:

    So, I’ve done everything step by step, but when I open up the Engine.dll file, the next line after 164a00 is not 164a11, it is instead 164a10. I still changed the “02” to “03” but it’s still not working. Help?

  22. Jaszczur says:

    I downloaded Engine, I loaded engine.dll file and nothing. I dont know i should see something ? Its link to screen. Please help. I’ve got Windows 7, but my friend has Windows Vista and we both need (probably) your help.
    Link to Error: http://imageshack.us/photo/my-images/37/errorwj.png/

  23. Kage says:

    Thx alot, dude ^^
    Helped very much and im able to play again

  24. colega says:

    I love you so much dude.. ty very much .. i buy the game and =( wowow was sad don can play in multiplayer i love that … ty very much <3

  25. Urchin says:

    Beautiful. The fix worked like a charm 🙂

  26. Thank you for every other informative blog.
    Where else could I get that kind of info written
    in such a perfect method? I’ve a project that I’m simply now running on, and I have been at the look out for such info.

  27. Milad says:

    Hi.
    I have installed fanpatch 1.17a and i still can’t refresh in multiplayer.
    i saw a link at mediafire but the file was removed… so if any one know how to fix this tell me please i’m losing it …

Leave a Reply