Hi,
I've setup some hotkeys for the speedhack timing function inside dxwnd, but when playing Wizardry 8 the hotkeys are not working. In other games they work fine.
Any suggestions? Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
One possible reason is that the hotkey values are meaningful for the game that intercepts the keystroke before it arrives to DxWnd. A little search trying other key values may show if this is the case. If so, it's enough to pick other key values.
A more serious reason could be that DxWnd can't hook the message processing routine with its wrapper that holds the virtual key detection. Sadly, the virtual keys don't seem to work in all possible situations.
A DxWnd log file captured with the options "Logs / DxWnd hacks" and "Logs / Win events" should reveal some detail about what's going on.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I used F2 and F3 keys which from what I understand are not used for anything within W8. I also tried some other keys but the hotkeys weren't working either. Here's my logfile. Not sure if it can be read from that, but I just started the game, pressed alt+F2 and alt+F3 a couple times and then exited.
Uhm... I mounted my copy of the game in the hope to be able to give a quick answer, but I see that the game is rather complex and troublesome, the virtual keys are not its only problem.
It could be useful to have the configuration that you selected with the 3DSetup.exe panel.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
And in the attachment the dxwnd config. Note that in the hook tab I do not have the hot IAT patch ticked since I disabled the intro videos (deleted Data\Flics\Intro\sirtech.bik) and without them the game works fine. But even with IAT enabled, the hotkeys were still not working.
My tests show a curious thing: the key pressed events (Windows messages WM_KEYDOWN, WM_KEYUP) are not intercepted by the main window processing routine. I can see that all messages related to the window size and position are detected, but nothing about the input. This makes me wonder how the game processes the input commands, like the arrow keys in the main menu to move the selection.
This, of course, is the reason why the function keys are not working.
I need to understand how the input keys processing works in this game, then it will be possible to hook the function keys callbacks in the proper place.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Quite an interesting reading and also a productive one.
This is the summary:
1) the function keys (both for DxWnd and reshade) are not handled because the game issues an early keyboard hook
2) probably reshade can't do anything about that because it is an OpenGL proxy loaded when it's too late, but DxWnd can!! ;)
3) my previous tests were affected by a bug that now I noticed and fixed, this is why I was getting crazy about that.
4) moving the function keys handling into and before the keyboard hook procedure WORKS! Tested with the Alt-F1 key used as toggle for FPS overlay, it's fantastic.
5) So, grab the updated dxwnd.dll in attach (to be used in last DxWnd 2.05.69 release) and game configuration, then add the function keys you need, it should work all the same.
6) please, report the result.
Heh, sorry to keep you waiting, had some other things in the pipeline and more importantly... the patch with the new dxwnd.dll doesn't work on my end :/
FPS toggle hotkey.
I was trying many different combinations to make sure I wasn't goofing up. Clean Wiz8 install nothing altered, tried it on both Win10 and Win8.1. Tried playing a different game with the same config (just changing the path to executable) and in the other game, the hotkey worked.
Here are some screenshots of my config that I assume are relevant (just in case)
Logfile in the attachment, Logs / DxWnd hacks + Logs / Win events
Edit: I'm playing the gog version. Since gog likes to bundle their games with their own dll wrappers I thought I might delete all the dlls that I can whilst still be able to start the game. The only dlls that remain are binkw32.dll Mss32.dll sr.dll and srDD_DirectX7.dll. With these 4 dlls I'm still able to run the game. But it has no effect, the hotkeys are still not working :)
Rather strange that it works for you, but not for me. What version of Wiz8 are you playing? Is it Steam?
Sorry, the most likely cause of this failure is because perhaps I sent you the wrong file. Probably in the hurry of telling you that I fixed the problem I picked the wrong one, not so unlikely considering the mess caused by working on many problems together.
This time I labelled the release with a dedicated label "v2.05.70.wiz8", you should see that label in the Help->About panel after the dxwnd.dll will be replaced.
Hopefully this time everything will be ok, but in case of problems a better way to show your current configuration, and quicker than taking screenshots of all DxWnd panels, is to use the "Export ..." menu command to save a configuration file (with .dxw extension) that you could easily share (es. posting it here) or use for your personal backup.
As far as I could guess, reshade is a opengl proxy, that means that it is loaded dynamically after the program initialization. This is a problem, because when reshade is loaded the keyboard hook is already active and this is the responsible for stealing the keystrokes.
DxWnd has an optional injection mode that takes place at the program's entry point, that's why it can take action before it's too late, setting its own keyboard hook before the game's one.
To let reshade get its own key you may try a more complex trick that destroys any windows hook set by the game (and by reshade as well, I think), it could work but it could also have side effects, so you have to try.
To do this you need to enable DxWnd debug mode, that is a mode meant for DxWnd developer's usage (currently that means for myself only!). This is what you should do:
1) open the options panel (from DxWnd menu: Options -> Global settings)
2) check the "Debug mode" option and confirm pressing the ok button.
3) modify the Wizardry 8 game configuration. Now you should see more tabs, pick the "Debug" tab.
4) check the "Disable WindowProc hooks" flag and confirm.
Now Wizardry 8 won't be able to set this shielding hook that intercepts the keystrokes. I saw that the arrow keys still can control the game, but it's possible that other game keys could become deaf. Good luck.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ahaha, it works! Well, kind of. Not "Disable WindowProc hooks", but "Disable SetWindowsHooks hooks" allows reshade to pick up on the key presses and mouse clicks. I can get into the reshade "home" button menu and setup shaders. The downside is that while reshade hooks the keyboard input, Wiz8 no longer does. I cannot interact with the game whatsoever, no menu buttons work.
But! Reshade remembers the setup. So I can first setup reshade with "Disable SetWindowsHooks hooks", then quit the game, reenable the hooks and play Wiz with reshade. Only thing is obviously I can't reconfigure reshade ingame, or use the reshade menu (well, can't use without first disabling the SetWindowsHooks).
Very good, sorry for my mistake again, I get lost in this riddle of options that I created myself!!
And of course you won't be using reshade for the B&W effect only, I suppose, otherwise you could have got the same with the "DirectX / Simulate BW monitor" as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I was able to start the game with your configuration and dll files. But I'm not sure how to use the alt+F1 you mentioned, do I just set it on global setting - hotkey tab and use it normally?
Actually I set my hotkey as alt + page up, alt page down and etc... But the problem is it only display increment or decrement of t, but had no effect on the speed of game. Only the times 4 speed in initial work (which adjust on modify->timing tab), and after i use hotkey to toggle it to 8, 16 or even 1 it had no effect.
Any advice? The setting and dll i had verify and it's all properly copied and imported.
Last edit: King Lee 2023-11-21
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Time control may depend very much on the internal game architecture. In unfortunate cases, for instance, the game could benchmark the situation at startup and never adjust the timing during the gameplay. In any case, it's early to draw conclusions, I'll have to test the game and see what happens exactly. Please, be patient.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The first tests were surprising. You said that the time change has no effect, but this is not true: you can speedrun the intro speech making the talking very fat (though it is better to just click and terminate it) and you can change the timing of some events like the speed of the water in the fall or the wave movement (see the screenshots, you can run the experiment yourself to verify what I say).
The only problem is that this is perfectly useless, while the party walking speed seems locked and impossible to change! But I wouldn't be surprised if speedrunning the game you could get a quicker monsters arrival or other events like that.
In any case, it seems that in the game different events use different timing criteria (oh, my!) so this brings a most interesting question: what would you like to speedrun? Do you want mostly to alter the party's walking speed or something else?
Hi,
I've setup some hotkeys for the speedhack timing function inside dxwnd, but when playing Wizardry 8 the hotkeys are not working. In other games they work fine.
Any suggestions? Thanks.
One possible reason is that the hotkey values are meaningful for the game that intercepts the keystroke before it arrives to DxWnd. A little search trying other key values may show if this is the case. If so, it's enough to pick other key values.
A more serious reason could be that DxWnd can't hook the message processing routine with its wrapper that holds the virtual key detection. Sadly, the virtual keys don't seem to work in all possible situations.
A DxWnd log file captured with the options "Logs / DxWnd hacks" and "Logs / Win events" should reveal some detail about what's going on.
Thank you for the prompt response!
I used F2 and F3 keys which from what I understand are not used for anything within W8. I also tried some other keys but the hotkeys weren't working either. Here's my logfile. Not sure if it can be read from that, but I just started the game, pressed alt+F2 and alt+F3 a couple times and then exited.
The DxWnd version that I used there was not the newest one, here's a newer one.
Uhm... I mounted my copy of the game in the hope to be able to give a quick answer, but I see that the game is rather complex and troublesome, the virtual keys are not its only problem.
It could be useful to have the configuration that you selected with the 3DSetup.exe panel.
Yes, the game is quite problematic. Here's my 3DSetup.exe -> https://i.postimg.cc/Vv4nHK7X/Snap1.png
And in the attachment the dxwnd config. Note that in the hook tab I do not have the hot IAT patch ticked since I disabled the intro videos (deleted Data\Flics\Intro\sirtech.bik) and without them the game works fine. But even with IAT enabled, the hotkeys were still not working.
Last edit: jigby 2021-04-16
My tests show a curious thing: the key pressed events (Windows messages WM_KEYDOWN, WM_KEYUP) are not intercepted by the main window processing routine. I can see that all messages related to the window size and position are detected, but nothing about the input. This makes me wonder how the game processes the input commands, like the arrow keys in the main menu to move the selection.
This, of course, is the reason why the function keys are not working.
I need to understand how the input keys processing works in this game, then it will be possible to hook the function keys callbacks in the proper place.
Partially related, but I stumbled on this thread ->https://reshade.me/forum/troubleshooting/5978-reshade-key-does-not-work-in-wizardry-8
Same problem really. It would require a patch for Wiz8 to remap its key events to standard Windows ones
Quite an interesting reading and also a productive one.
This is the summary:
1) the function keys (both for DxWnd and reshade) are not handled because the game issues an early keyboard hook
2) probably reshade can't do anything about that because it is an OpenGL proxy loaded when it's too late, but DxWnd can!! ;)
3) my previous tests were affected by a bug that now I noticed and fixed, this is why I was getting crazy about that.
4) moving the function keys handling into and before the keyboard hook procedure WORKS! Tested with the Alt-F1 key used as toggle for FPS overlay, it's fantastic.
5) So, grab the updated dxwnd.dll in attach (to be used in last DxWnd 2.05.69 release) and game configuration, then add the function keys you need, it should work all the same.
6) please, report the result.
Enjoy!
If there's a frustrating situation, that is taming a complex problem and have nobody clapping hands.
Sic!
Heh, sorry to keep you waiting, had some other things in the pipeline and more importantly... the patch with the new dxwnd.dll doesn't work on my end :/
FPS toggle hotkey.
I was trying many different combinations to make sure I wasn't goofing up. Clean Wiz8 install nothing altered, tried it on both Win10 and Win8.1. Tried playing a different game with the same config (just changing the path to executable) and in the other game, the hotkey worked.
Here are some screenshots of my config that I assume are relevant (just in case)
https://imgur.com/a/idNmF5Z
Logfile in the attachment, Logs / DxWnd hacks + Logs / Win events
Edit: I'm playing the gog version. Since gog likes to bundle their games with their own dll wrappers I thought I might delete all the dlls that I can whilst still be able to start the game. The only dlls that remain are binkw32.dll Mss32.dll sr.dll and srDD_DirectX7.dll. With these 4 dlls I'm still able to run the game. But it has no effect, the hotkeys are still not working :)
Rather strange that it works for you, but not for me. What version of Wiz8 are you playing? Is it Steam?
Last edit: jigby 2021-05-02
Sorry, the most likely cause of this failure is because perhaps I sent you the wrong file. Probably in the hurry of telling you that I fixed the problem I picked the wrong one, not so unlikely considering the mess caused by working on many problems together.
This time I labelled the release with a dedicated label "v2.05.70.wiz8", you should see that label in the Help->About panel after the dxwnd.dll will be replaced.
Hopefully this time everything will be ok, but in case of problems a better way to show your current configuration, and quicker than taking screenshots of all DxWnd panels, is to use the "Export ..." menu command to save a configuration file (with .dxw extension) that you could easily share (es. posting it here) or use for your personal backup.
Ok, so let's give it another try ...
Yes! This works great! Thank you.
Now that I'm going deep down the rabbit hole, I've got to figure out how to run this thing with reshade ;)
As far as I could guess, reshade is a opengl proxy, that means that it is loaded dynamically after the program initialization. This is a problem, because when reshade is loaded the keyboard hook is already active and this is the responsible for stealing the keystrokes.
DxWnd has an optional injection mode that takes place at the program's entry point, that's why it can take action before it's too late, setting its own keyboard hook before the game's one.
To let reshade get its own key you may try a more complex trick that destroys any windows hook set by the game (and by reshade as well, I think), it could work but it could also have side effects, so you have to try.
To do this you need to enable DxWnd debug mode, that is a mode meant for DxWnd developer's usage (currently that means for myself only!). This is what you should do:
1) open the options panel (from DxWnd menu: Options -> Global settings)
2) check the "Debug mode" option and confirm pressing the ok button.
3) modify the Wizardry 8 game configuration. Now you should see more tabs, pick the "Debug" tab.
4) check the "Disable WindowProc hooks" flag and confirm.
Now Wizardry 8 won't be able to set this shielding hook that intercepts the keystrokes. I saw that the arrow keys still can control the game, but it's possible that other game keys could become deaf. Good luck.
Ahaha, it works! Well, kind of. Not "Disable WindowProc hooks", but "Disable SetWindowsHooks hooks" allows reshade to pick up on the key presses and mouse clicks. I can get into the reshade "home" button menu and setup shaders. The downside is that while reshade hooks the keyboard input, Wiz8 no longer does. I cannot interact with the game whatsoever, no menu buttons work.
But! Reshade remembers the setup. So I can first setup reshade with "Disable SetWindowsHooks hooks", then quit the game, reenable the hooks and play Wiz with reshade. Only thing is obviously I can't reconfigure reshade ingame, or use the reshade menu (well, can't use without first disabling the SetWindowsHooks).
My setup was dxwnd -> dgvoodoo2 -> reshade
Monochrome Wizardry 8.
https://postimg.cc/grm2s9yd
https://postimg.cc/sMQjx3zP
Edit: I suppose, since reshade remembers the setup, you could just make a config with text editor and do it that way, but this is more convenient.
Last edit: jigby 2021-05-02
Very good, sorry for my mistake again, I get lost in this riddle of options that I created myself!!
And of course you won't be using reshade for the B&W effect only, I suppose, otherwise you could have got the same with the "DirectX / Simulate BW monitor" as well.
Hi, sorry for necro the post.
I'm also looking for a similar solution to toggle speed by hotkey on DXwnd (Wizardry 8)
But the DXwnd had already updated to newer version and when I put those files in newest version it's not compatible.
Can you make a file for the newest version of DXwnd or teach me how to make one? Cause I cannot find the download link of the DXwnd version you use.
Last edit: King Lee 2023-11-21
Have you searched here? https://sourceforge.net/projects/dxwnd/files/Latest%20build/
Opps, my bad.
Thanks for your quick reply~
Hi, I was able to start the game with your configuration and dll files. But I'm not sure how to use the alt+F1 you mentioned, do I just set it on global setting - hotkey tab and use it normally?
Actually I set my hotkey as alt + page up, alt page down and etc... But the problem is it only display increment or decrement of t, but had no effect on the speed of game. Only the times 4 speed in initial work (which adjust on modify->timing tab), and after i use hotkey to toggle it to 8, 16 or even 1 it had no effect.
Any advice? The setting and dll i had verify and it's all properly copied and imported.
Last edit: King Lee 2023-11-21
Time control may depend very much on the internal game architecture. In unfortunate cases, for instance, the game could benchmark the situation at startup and never adjust the timing during the gameplay. In any case, it's early to draw conclusions, I'll have to test the game and see what happens exactly. Please, be patient.
Well, I admit I wasn't too fast, but I finally got a testbed. Now let's see the problem ...
The first tests were surprising. You said that the time change has no effect, but this is not true: you can speedrun the intro speech making the talking very fat (though it is better to just click and terminate it) and you can change the timing of some events like the speed of the water in the fall or the wave movement (see the screenshots, you can run the experiment yourself to verify what I say).
The only problem is that this is perfectly useless, while the party walking speed seems locked and impossible to change! But I wouldn't be surprised if speedrunning the game you could get a quicker monsters arrival or other events like that.
In any case, it seems that in the game different events use different timing criteria (oh, my!) so this brings a most interesting question: what would you like to speedrun? Do you want mostly to alter the party's walking speed or something else?
Last edit: gho 2023-11-26