Menu

Thief: The Dark Project + TFix (Mod) - Need Help

John Smith
2019-08-16
2019-12-17
  • John Smith

    John Smith - 2019-08-16

    I want the Thief game to have thin/thick borders and for it's custom resolution to be 1584x855 for thin borders or 1594x865 for thick borders. In the cam_ext.cfg file for the game, I can add custom resolutions but it refuses to accept anything that I try except for 1600x870 which is fairly close. Still, I want to use a macro to resize and reposition the game window, but it won't let me. That's where DxWnd comes in. I need DxWnd to let me resize and reposition the game window. But if I don't have 'Run in Window' checked, DxWnd won't let me use the macro to resize and reposition the game window. And if I do have it checked, when I start the Tutorial or click New Game, the game stutters and then crashes. I could use some help.

     
  • John Smith

    John Smith - 2019-08-16

    Nevermind. I am just going to play in a 1366x768 window.

     
  • John Smith

    John Smith - 2019-12-16

    Okay, so it is four months later. I had moved all of my games to an external hard drive. Then I tried playing Thief: The Dark Project today. I wanted to see if I could get a custom window size and position. I wanted the game window to be 1600x894 at 0,-24 position. To do that, I use a DxWnd initial window size of 1596x865 and that results in a game window of 1600x894. Just like I want. And then I use a macro to move the game window to 0,-24. The end result is perfect. But as soon as I load a game, I get a black screen, the game freezes, and then the game crashes to desktop. I also want an in-game resolution to be high, not like 800x600, but that is not important because the game will also freeze and crash as soon as I start it regardless of in-game resolution. Do you own the game and would you be able to confirm that it does freeze and crash on load game with DxWnd enabled?

     
    • gho

      gho - 2019-12-16

      There are several game releases and distributions, not to mention the user's mods. I'm not sure I have an identical release, could you help to identify that better?
      May I ask why you want a window border around the game area since it seems you're going to fill all available space? I ask because if you do that for a specific purpose, maybe there could be alternative solutions.
      I'll make some test with a game release as close to yours as possible. But please be aware that not all games are programmed to support window size changes (an operation that could require the invalidation and renewal of 3D graphic resources). For these games it is possible to force an initial custom size, but you can't resize them later. In some cases DxWnd can recover the errors, but not always. Anyway, this is just theory, I'm going to see it with the real stuff.

       
  • John Smith

    John Smith - 2019-12-16

    It is Thief Gold (which is an improved Thief I: The Dark Project) on Steam and then I installed TFix 1.27 (from the PC Gaming Wiki for Thief I: The Dark Project) on top of that. That resulted in a THIEF.exe that says the following in the Properties > Details tab:
    File Description: Thief 2: The Metal Age (no idea why it says that because I am playing the first Thief game, not the second one)
    File Version: 1.9.0.0
    Project Versoin: 1.27.

    After I installed TFix, I went to the Thief installation folder and edited cam_ext.cfg and removed the semicolon where it says ;force_windowed.

    In the same cam_ext.cfg file, I also added a custom in-game resolution. The first line is optional but it helps me see if my custom in-game resolution is still saved in the file or not:
    ; CUSTOM RESOLUTION
    user_mode1 1596 836

    Note, I may end up changing that in-game resolution to something like 1600x894 or 1600x900 if I get DxWnd working and it will let me. I think that to change it to 1600x894, I have to have DxWnd's Custom/Initial/Maximum resolution set that high. The reason that I think this (based on my poor memory) is because I think that if I don't set it to anything then the in-game resolutions don't go high enough and then I can only select a poor, lower quality resolution.

    In DxWnd, I didn't make a lot of changes. I'll show the two places that I made changes in the same screenshot.

    And what I'm trying to do is make Thief windowed (with borders because I like them) at 1600x894 and 0,-24.

    PS - This help that I'm asking for is a lot of work and very tedious. So I won't hold it against you if you don't try. I just couldn't get it to work on my end and so I thought I'd ask someone with expertise. But I have no expectations whatsoever.

     
  • dippy dipper

    dippy dipper - 2019-12-16

    After I installed TFix, I went to the Thief installation folder and edited cam_ext.cfg and removed the semicolon where it says ;force_windowed.

    Generally you would wan't the game to be configured to run in fullscreen. Dxwnd then forces this fullscreen game to run in a window.

    If you setup the game to run in a windowed mode you now have a situation where Dxwnd is trying to force a windowed game to run in a window.

    edit:
    I guess TFix contains a ddraw.dll wrapper or something similar. So this introduces added complexity when used together with Dxwnd.

     

    Last edit: dippy dipper 2019-12-16
  • gho

    gho - 2019-12-16

    I think there's again some confusion between screen resolution and window size.
    When using DxWnd, it takes care of scaling the image to the desired size, so that resolution and size are independent, at least from the game point of view.
    So I think you should not try to make calculations to assign a custom resolution value: for a D3D game the best option is to use the video "Native" modes and simply calculate the optimal position and size without setting any resolution forced value.
    Again, I don't understand why you want to surround a fullscreen window with window borders. If you wanted a fake-fullscreen mode (a.k.a. borderless fullscreen window) DxWnd would make all calculations for you. But if you really want, just subtract the borders size to the window size and sum to the position. For instance, on my 1920x1080 desktop if I have 5 pixel borders and 20 pixels titlebar, so I should set the game position at xy=(5,20) and size 1910 x 1055, where 1910 = 1920 - (5 * 2) and 1055 = 1080 - 5 - 20.
    Finally, I see no reason for using a macro to move the window to any pre-defined position: this way you risk to invalidate the graphic resources. On the contrary, it would be safer to tell DxWnd to give birth to the window directly in the desired position.

     

    Last edit: gho 2019-12-16
  • John Smith

    John Smith - 2019-12-17

    Just forget it. You are annoying the hell out of me. Close this thread. EDIT: I could take the time to answer some of these questions, but I'd rather not bother. So just forget that I asked.

     

    Last edit: John Smith 2019-12-17
  • John Smith

    John Smith - 2019-12-17

    UPDATE: I will attempt to explain and answer some of these questions later. Hopefully it will help you understand some things better, and I will probably learn something in the process too, i.e. mistakes that I made, etc. I may respond with some answers within the next few days or week, but please don't turn this into a debate. The good news is that it seems to be working now. The only thing that I did was disable force_windowed in the cam_ext.cfg file, so I guess the credit goes to dippy dipper unless this "now working" state is a fluke. Thanks for trying to help and sorry that I woke up on the wrong side of the bed. EDIT: I also changed the screen resolution from SVGA to Native, and that made the in-game resolution I wanted to appear. EDIT: It was sort of a fluke. If I launch the game from the DxWnd window, it doesn't crash when I load game. But if I launch it from Steam, it does. Yesterday, the same thing happened even though I didn't disable forced_window in cam_ext.cfg. So disabling that didn't solve the problem, just eliminated one unnecessary step.

     

    Last edit: John Smith 2019-12-17
    • gho

      gho - 2019-12-17

      John, I'm miles away from the idea of firing a debate. The matter is that hooking a program is a hell of a complex thing and the results depend on a huge lot of tiny details. In addition, this "Steam" matter makes things much more complicated because, for obvious reasons, I can't buy a license of each game I'm trying to support, so in this case I give generic hints without the possibility to test them in practice.
      In this case there are two important and basic issues that you have to understand:
      1) DxWnd tries to be generic: it forces a window state to fullscreen programs, but leaves alone the windowed programs. There are lots of games that start with a windowed splash panel and then turn into fullscreen mode, DxWnd waits for this event to happen before doing anything. So, starting a game in windowed mode you risk that DxWnd simply ignores some steps.
      2) In order to have a perfect result it is often (but not always) necessary to use early hooking, that is starting to hook the system calls from the very beginning of the program execution. In DxWnd early hooking is possible ONLY if you start the game from DxWnd interface. If you start the game from the Windows shortcuts or the Steam launcher, DxWnd will catch the program a little later, when the game will try to open its first window. This is nothing in terms of time (you see that happening immediately) but it skips a lot of important and sometimes essential operations. So, it's not at all surprising that running the game from Steam launcher is giving different results. Sorry, it's a technical limitation, as long as I could try I think DxWnd can't go in the past to catch the lost operations.

       
  • John Smith

    John Smith - 2019-12-17

    Thanks for the follow up and additional information. I was just annoyed by the whole "why do you want borders" question over and over again. I didn't want to get into that. Your explanation makes perfect sense, and I can understand why this limitation exists. I found out that if I pin the game to my taskbar, the game runs like I want it to when I launch it (doesn't crash when I load game). And I'm happy with that. I don't mind having that particular game pinned to my taskbar. In fact, I probably even prefer it. As for the other stuff that I didn't want to get into, I'm not sure if I will reply to those questions anytime soon. But I'll try not to forget about them. By the way, in the many years that I have used your program, I was never able to get the window position y=-24 to work. I always just assumed that it was a limitation or overlooked bug. That's why I use macros to reposition my windows to where I want them. Please don't tell me I should not move them to y negative 24, or ask me why. But um, it's never been a big deal to me. I don't mind using macros, especially since I only use DxWnd for a dozen or so games. That means the vast majority of my games don't need DxWnd and still need to be moved, so why not use the macros to move ALL my games regardless if the games use DxWnd or not. But if your program was intended to have that capability of y equals negative 24 on window position, it would be an improvement to be able to have the DxWnd do that (yes, I have manually entered the number for window position on the first tab in DxWnd). Anyway, if I don't follow up on those previous questions anytime soon, please don't hold it against me. I'm just not as dedicated and committed to crossing all my t's and dotting all my i's like I used to be. I'm really low energy these days. Probably old age and constant disappointments.

     

    Last edit: John Smith 2019-12-17

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.