HelixVision

HelixVision

Cer Feb 22, 2021 @ 11:55pm
Orcs Must Die! 2 gives error in GamePlugin.dll
I tried one of my favorite 3D games (in hacker mode) that works very well with Nvidia Shutter glasses: "Orcs Must Die! 2" wich is a DirectX9 game.
I installed the fix and started the game, but got immediately an error popup telling that the entry point "Direct3DCreate9Ex" can't be found in Katanga\katanga_Data\Plugins\GamePlugin.dll

What does this mean (apart from the obvious)? Do I have some configuration issue or is it just not compatible and I can give up right now?
< >
Showing 1-15 of 18 comments
Bo3b  [developer] Feb 23, 2021 @ 12:32am 
That means the game is using an extra old version of the HelixMod DLL. The really old versions did not include the Direct3DCreate9Ex call, and thus can't be used with HelixVision.

You can use a newer version of the DLL, but Helix also changed the syntax for the .ini files, so it's a manual process to update to the new syntax.

I took a quick look here, and the DX9Settings.ini file doesn't seem to have any key overrides, so the syntax changes are not bad.

For gruesome details on all this, see: http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List

How to manually convert the .ini:
http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#Conversion_from_old_HelixModDLL_syntax_to_new_syntax:

On a quick look, I think you just need the latest d3d9.dll found on that HelixMod page, and change the .ini settings to jus "Pres1" instead of "Preset1".
Cer Feb 24, 2021 @ 10:22am 
Thank you again for all the information!
With the example provided I could convert the ini file, and the two keys are even working ;). I just wasn't sure if the "OverrideMethod = 0" is still needed as it wasn't part of the example. I just left it in for now.

I copied the dll from HelixVision\Tools\HelixMod\x32 (guess that old game isn't 64bit).
Now it works great, just 3D seperation need to be set to high values.
I run the game in 1440p and katanga at 100% SS (wich is about 3k x 3k resolution). This seems to be the maximum for because when I use 3440 as width the game crashes. But standard 1440p is enough and performance is great.

BTW: What determines where the katanga help text is displayed. At the beginning it was behind the big screen (recenter dosn't change that). Does the headset position matters when katanga opens?

One issue with the game is that it needs keyboard and mouse. Moving and using mouse I can do blind, but to press key G to start the round I need to take off the headset. Since WMR has cameras build in, I wonder if there is a possibility to have a real world window below the big screen. Maybe I have to put a virtual desktop window showing a webcam that points to the keyboard. I could imagine that you already came accross this issue and probably a solution?

In case someone needs it I post the ini below. Or can you update the mod ?


---- DX9Settings.ini ----
[general]
OverrideMethod = 0
PresetsKeysList = 0;1;
DefVSConst1 = 250

[KEY0]
Key = 79
Presets = 0;
Type = 2

[Pres0]
Const2 = 0x3f800000

[KEY1]
Key = 80
Presets = 1;
Type = 2

[Pres1]
Const2 = 0x00000000
organizedmast60 Feb 24, 2021 @ 1:12pm 
Originally posted by Cer:
Thank you again for all the information!
With the example provided I could convert the ini file, and the two keys are even working ;). I just wasn't sure if the "OverrideMethod = 0" is still needed as it wasn't part of the example. I just left it in for now.

I copied the dll from HelixVision\Tools\HelixMod\x32 (guess that old game isn't 64bit).
Now it works great, just 3D seperation need to be set to high values.
I run the game in 1440p and katanga at 100% SS (wich is about 3k x 3k resolution). This seems to be the maximum for because when I use 3440 as width the game crashes. But standard 1440p is enough and performance is great.

BTW: What determines where the katanga help text is displayed. At the beginning it was behind the big screen (recenter dosn't change that). Does the headset position matters when katanga opens?

One issue with the game is that it needs keyboard and mouse. Moving and using mouse I can do blind, but to press key G to start the round I need to take off the headset. Since WMR has cameras build in, I wonder if there is a possibility to have a real world window below the big screen. Maybe I have to put a virtual desktop window showing a webcam that points to the keyboard. I could imagine that you already came accross this issue and probably a solution?

In case someone needs it I post the ini below. Or can you update the mod ?


---- DX9Settings.ini ----
[general]
OverrideMethod = 0
PresetsKeysList = 0;1;
DefVSConst1 = 250

[KEY0]
Key = 79
Presets = 0;
Type = 2

[Pres0]
Const2 = 0x3f800000

[KEY1]
Key = 80
Presets = 1;
Type = 2

[Pres1]
Const2 = 0x00000000


But what did you so exactly with the ini file did you copy past this text above inside ?? I dont know if it was super complicated to do but could you share some of the exact steps please ?

THanks for sharing
Cer Feb 24, 2021 @ 10:40pm 
Open the ini file with notepad.
Delete the whole content.
Copy above part (starting with line "[general]").
Paste it into the ini file.

What it does: You can use the O and P key to move the depth of some screen elements.
Just try it out see what you like more.
Last edited by Cer; Feb 24, 2021 @ 10:43pm
organizedmast60 Feb 24, 2021 @ 11:14pm 
Originally posted by Cer:
Open the ini file with notepad.
Delete the whole content.
Copy above part (starting with line "[general]").
Paste it into the ini file.

What it does: You can use the O and P key to move the depth of some screen elements.
Just try it out see what you like more.
which ini file the one in Helixvision/32? \or the ini file in the profile ?? because I tried both but still get that same error message.
Cer Feb 25, 2021 @ 12:02am 
Did you read my post and copied the DLL overwriting the old??
Both changes must be done in the game directory (just click on the path under the play button in helix vision).
The ini in in Helixvision/32 is empty anyway and changes in the profile ... dunno, think then you need to re-install the fix.
Bo3b  [developer] Feb 25, 2021 @ 12:44pm 
Originally posted by Cer:
BTW: What determines where the katanga help text is displayed. At the beginning it was behind the big screen (recenter dosn't change that). Does the headset position matters when katanga opens?

One issue with the game is that it needs keyboard and mouse. Moving and using mouse I can do blind, but to press key G to start the round I need to take off the headset. Since WMR has cameras build in, I wonder if there is a possibility to have a real world window below the big screen. Maybe I have to put a virtual desktop window showing a webcam that points to the keyboard. I could imagine that you already came accross this issue and probably a solution?
Glad this is working for you. Good to know. We'll likely take your update for next release, thanks.

For the Help text billboard, it's supposed to be off to your left out of your peripheral vision, but easy to see if you rotate your head to look. And if you hit F1, it will move behind you, instead of be invisible now. A full 180 if you need.

However, lots of complexity, and your environment may not match. If my floor is broken for example, I get it behind the screen instead of off to the side. My floor currently is rotated 90 degrees for reasons that are not clear. I did not set it up that way, but that's what it's now at in SteamVR.

WMR in particularly has a stupid launch bug that they've never fixed, which starts your environment 180 degrees off how you are sitting, so you might see empty space and no HelixVision screen at launch. Can lower the occurrence by starting SteamVR first, but it still happens.


For the keypress of G, you use their controller spotlight feature in WMR, but that means finding your controller.

Better approach- learn to touch type, at least a little. I'm sure you can WASD blind, the G key is only two keys to the right. That's what the little nubby on the F key is for- to let you know by feel where you are without having to look. You can easily find the G key by feel, give it a try.
Bo3b  [developer] Feb 25, 2021 @ 12:48pm 
Originally posted by organizedmast60:
Originally posted by Cer:
Open the ini file with notepad.
Delete the whole content.
Copy above part (starting with line "[general]").
Paste it into the ini file.

What it does: You can use the O and P key to move the depth of some screen elements.
Just try it out see what you like more.
which ini file the one in Helixvision/32? \or the ini file in the profile ?? because I tried both but still get that same error message.
The file that you edit will be in the game directory. As cer notes, click on the link in the HelixVision page to open that game path folder. In there, find the DX9Settings.ini file. That's the one to replace the contents.

But you also need to download the 32 bit latest HelixMod, just the file edit by itself won't fix it. Go to my link here: http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#List_of_features_supported_by_HelixMod.2C_and_all_versions_available.
organizedmast60 Feb 25, 2021 @ 6:07pm 
Originally posted by Bo3b:
Originally posted by organizedmast60:
which ini file the one in Helixvision/32? \or the ini file in the profile ?? because I tried both but still get that same error message.
The file that you edit will be in the game directory. As cer notes, click on the link in the HelixVision page to open that game path folder. In there, find the DX9Settings.ini file. That's the one to replace the contents.

But you also need to download the 32 bit latest HelixMod, just the file edit by itself won't fix it. Go to my link here: http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List#List_of_features_supported_by_HelixMod.2C_and_all_versions_available.



List of features supported by HelixMod, and all versions available.
Release versions from newest to oldest:

https://s3.amazonaws.com/-HeliX-/DLLS/DllsModPack1.zip
https://s3.amazonaws.com/-HeliX-/DllsModPack.zip
https://s3.amazonaws.com/Helixfix/DllsModPack.zip
https://s3.amazonaws.com/-HeliX-/DLLS/Release.zip
https://s3.amazonaws.com/HelixMods/*Mainfiles/Releasev2.zip
https://s3.amazonaws.com/HelixMods/*Mainfiles/Release.zip
https://s3.amazonaws.com/HelixMods/*Oldversion/Release.zip
https://s3.amazonaws.com/HelixMods/*Oldversion/Release.upd.zip

Debug From newest to oldest

https://s3.amazonaws.com/-HeliX-/DLLS/DllsModPack1.zip
https://s3.amazonaws.com/-HeliX-/DllsModPack.zip
https://s3.amazonaws.com/Helixfix/DllsModPack.zip
https://s3.amazonaws.com/-HeliX-/DLLS/Debug.zip
https://s3.amazonaws.com/HelixMods/*Mainfiles/Debug.zip
https://s3.amazonaws.com/HelixMods/*Oldversion/Debug.zip

So this is what i see when I go to the link and scroll to the bottom. I tried to download the first as it says newest to oldest I assumed it was the one on the top. Inside the archive there is only a x64 folder and DLL file, this is not what I'm looking for right?

D:\STEAM\steamapps\common\Orcs Must Die 2\build\game is this the path you were referring to where the changes are meant to be made ?

D:\STEAM\steamapps\common\HelixVision\Tools\HelixMod\x32 Do I have any bussines making any changes here ??


Also is there a way to reset all profiles so you can start from scratch ? I have made so many changes its hard to keep track. Apologies for my lack of knowledge but I am getting better as I finally got katanga to work aside from a few crashes: Resident Evil 4 and Transformers devastation for example. ANd of course this horrid "Direct3DCreate9Ex" can't be found in Katanga\katanga_Data\Plugins\GamePlugin.dll error message it s been going pretty good.

Really appreciate the help look forward to hear from you.




Cer Feb 25, 2021 @ 11:33pm 
The file you need is in the ZIP: DllsModPack1.zip/DLLs/RELEASE
Within the x64 folder is the 64bit version, outside the 32bit.
But I just took the dll from HelixVision\Tools\HelixMod\x32 (as I already told you twice, don't you read what I write? I don't understand why you just don't follow the instructions).

Tried to uninstall HelixVision, delete the complte Folder where it was installed and then reinstall? Thats teh usual way to get a clean start (with any software!)
Cer Feb 25, 2021 @ 11:38pm 
Originally posted by Bo3b:
Originally posted by Cer:
For the keypress of G, you use their controller spotlight feature in WMR, but that means finding your controller.

Better approach- learn to touch type, at least a little. I'm sure you can WASD blind, the G key is only two keys to the right. That's what the little nubby on the F key is for- to let you know by feel where you are without having to look. You can easily find the G key by feel, give it a try.

Sure, Orcs must die 2 can be played that way. I have even a Logitech G15 keyboard where I can program the extra function keys. (BTW I am not using WSAD, never got used to that. I am a curser key user!)
However, for other more complex games I really woud like to actually see my keyboard. Maybe I can use a smartphone camera to bring a picture in a window that I place as overlay using virtual desktop or similar inside katanga.
Bo3b  [developer] Feb 26, 2021 @ 12:10am 
Originally posted by Cer:
Sure, Orcs must die 2 can be played that way. I have even a Logitech G15 keyboard where I can program the extra function keys. (BTW I am not using WSAD, never got used to that. I am a curser key user!)
However, for other more complex games I really woud like to actually see my keyboard. Maybe I can use a smartphone camera to bring a picture in a window that I place as overlay using virtual desktop or similar inside katanga.
Arrow keys, very nice. Lots of variances in how people use systems, I see options for inverted X axes, and wonder how that works- even as I always use inverted Y axes.

Is it time to learn to touch type? It's the single most valuable thing you learn as a computer user. It takes about 2 weeks of study to get the basics right, and then it's endless improvement. Lots and lots of gamified typing tutor/practice games. Not to put to fine a point on it, but people who never learn to touch type are deliberately handicapping themselves. Hugely, hugely valuable for VR.

Outside of that- it seems like you already have the mechanism you want. IIRC you have a WMR headset, and you can just turn on their flashlight feature and point it at your keyboard.
Last edited by Bo3b; Feb 26, 2021 @ 12:11am
organizedmast60 Feb 26, 2021 @ 4:07pm 
Originally posted by Cer:
The file you need is in the ZIP: DllsModPack1.zip/DLLs/RELEASE
Within the x64 folder is the 64bit version, outside the 32bit.
But I just took the dll from HelixVision\Tools\HelixMod\x32 (as I already told you twice, don't you read what I write? I don't understand why you just don't follow the instructions).

Tried to uninstall HelixVision, delete the complte Folder where it was installed and then reinstall? Thats teh usual way to get a clean start (with any software!)


\ok good news succes I got it too work both of the orc must die games and they work perfectly. Thank you both for your patience with me I know, it must be hard to explain these things when it comes to you so easy. I'm so accustomed to working with screenshots and paths I was just a little lost after going through all those folders re-installing the fix what a pain.

But I been playing around with similar games with the old Ini file notation for example Operation Raccoon City did the same steps and the error message changed to: Fatal error: failed to open shared surface. 0x80070057 have any of you seen this before ??

Thanks again for sharing guys very much appreciated.
Bo3b  [developer] Feb 26, 2021 @ 4:54pm 
Originally posted by organizedmast60:
But I been playing around with similar games with the old Ini file notation for example Operation Raccoon City did the same steps and the error message changed to: Fatal error: failed to open shared surface. 0x80070057 have any of you seen this before ??

Thanks again for sharing guys very much appreciated.
Glad you got that working. It can be pretty fun to get things working that no dev ever thought was going to happen. Orcs for example- the original devs have never even seen their game in 3D.

For the Fatal Error you see there, try it a couple more times. This means that the Katanga app could not make a connection to the game and get the visuals to be displayed. Usually a transient error, relatively rare. This error is unrelated to the HelixMod versions, or changing the .ini files.

If you keep getting it, post the log files and I'll take a look.

%appdata%\..\LocalLow\Katanga\Katanga\output_log.txt
%appdata%\..\LocalLow\Katanga\Katanga\katanga.log
organizedmast60 Feb 26, 2021 @ 6:16pm 
Originally posted by Bo3b:
Originally posted by organizedmast60:
But I been playing around with similar games with the old Ini file notation for example Operation Raccoon City did the same steps and the error message changed to: Fatal error: failed to open shared surface. 0x80070057 have any of you seen this before ??

Thanks again for sharing guys very much appreciated.
Glad you got that working. It can be pretty fun to get things working that no dev ever thought was going to happen. Orcs for example- the original devs have never even seen their game in 3D.

For the Fatal Error you see there, try it a couple more times. This means that the Katanga app could not make a connection to the game and get the visuals to be displayed. Usually a transient error, relatively rare. This error is unrelated to the HelixMod versions, or changing the .ini files.

If you keep getting it, post the log files and I'll take a look.

%appdata%\..\LocalLow\Katanga\Katanga\output_log.txt
%appdata%\..\LocalLow\Katanga\Katanga\katanga.log


Tried it a couple more times same message as requested the output log:

<RI> Input initialized.

<RI> Initialized touch support.

OpenVR initialized!
The referenced script on this Behaviour (Game Object '_Stats') is missing!

(Filename: Line: 1758)

UnloadTime: 0.852000 ms
<b>[SteamVR]</b> Successfully loaded 22 actions from action manifest into SteamVR (D:/STEAM/steamapps/common/HelixVision/Tools/Katanga/actions.json)
<b>[SteamVR]</b> Initialized. Connected to oculus:WMHD30382006C3
Awake
CreateSetupMutex
RecenterHMD
UpdateCurve state: 0.01000027
Set environment state: 4
Sharpening state: 1 sharpness: 1.5
Hint state: 1
Start: Command line arguments: D:\STEAM\steamapps\common\HelixVision\Tools\Katanga\katanga.exe -extendedmotionbluroff -fov 90 -fastvisor --game-path D:\STEAM\steamapps\common\Vanquish\Vanquish.exe --game-title Vanquish --launch-type DX9
--game-path: D:\STEAM\steamapps\common\Vanquish\Vanquish.exe
--game-title: Vanquish
--launch-type: DX9
CurrentDirectory: D:\STEAM\steamapps\common\HelixVision\Tools\Katanga
Successful hook library Init
Launch type: DX9 for Game: Vanquish.exe
...Launching suspended: D:\STEAM\steamapps\common\Vanquish\Vanquish.exe
LoadAgent
Load GamePlugin
Successfully loaded D:/STEAM/steamapps/common/HelixVision/Tools/Katanga/katanga_Data/Plugins/GamePlugin.dll
Hook the D3D9.DLL!Direct3DCreate9...
Resume game launch: DX9
Restored Working Directory to: D:\STEAM\steamapps\common\HelixVision\Tools\Katanga
Launch EndOfFrame
-> Got shared handle: 40003dc2

And starting from here the katanga.log:

Saturday, February 27, 2021 @ 2:11:05 AM UTC


..Unity Native C++ logging enabled.

..Katanga:CreateSetupMutex--> 0000000000000AA8

GamePlugin C++ logging enabled.

GamePlugin::OnLoad called
GamePlugin: OpenMutex called: 00000630
GamePlugin: Mapped file created: 049D0000, val: 0x0
GamePlugin::OnHookAdded called [Hook: D3D9.DLL!Direct3DCreate9 @ 0x792070E0 / Chain:1]
GamePlugin::HookDirect3DCreate9
..Katanga:OpenFileMappedIPC Mapped file created: 0000027B52280000, val: 0x0
GamePlugin::OnFunctionCall called [Hook: D3D9.DLL!Direct3DCreate9 @ 0x792070E0 / Chain:1]
GamePlugin::Hooked_Direct3DCreate9 - SDK: 32
GamePlugin::HookCreateDevice
Returned IDirect3D9Ex: 03B94CB0

GamePlugin::Hooked_CreateDevice called
Width: 1600, Height: 900, Format: 21
-> CaptureSetupMutex mutex:00000630
WaitForSingleObject mutex:00000630, result:0x0

GamePlugin::Hooked_CreateDevice called
Width: 1600, Height: 900, Format: 21
-> CaptureSetupMutex mutex:00000630
WaitForSingleObject mutex:00000630, result:0x0
IDirect3D9->CreateDevice result: 0, device: 03B94E28
Create hooks for all DX9 calls.
GamePlugin:DX9 CreateSharedRenderTarget called. gGameSurface: 00000000, gGameSharedHandle: 00000000
-> CaptureSetupMutex mutex:00000630
WaitForSingleObject mutex:00000630, result:0x0
Width: 3200, Height: 900, Format: 21
Successfully created new shared surface: 350E0460, new shared handle: 40003DC2, mapped: 049D0000
<- ReleaseSetupMutex mutex:00000630
ReleaseSetupMutex mutex:00000630, result:OK
<- ReleaseSetupMutex mutex:00000630
ReleaseSetupMutex mutex:00000630, result:OK
..Katanga:GrabSetupMutex: WaitForSingleObject WAIT_TIMEOUT err: 0x0
..Katanga:ReleaseSetupMutex: ReleaseMutex ERROR_NOT_OWNER
..Katanga:GrabSetupMutex: WaitForSingleObject failed. wait: 0x80, err: 0x0
..Katanga:CreateSharedSurface called. shared:0000000040003DC2
....OpenSharedResource on shared: 0000000040003DC2, result: -2147024809, resource: 0000000000000000
Fatal Error: Failed to open shared surface. (0x80070057)


I hope this could shed some light on the issue ? If there is anything else I can provide which can help please let me know I will take a look. Thank you so much for the speedy reply.



< >
Showing 1-15 of 18 comments
Per page: 1530 50