Open GreenComfyTea opened 4 months ago
Understandable 👍
Disregard my wrong conclusion about keyboard input. It's still related to nvidia overlay, but not to input.
I implemented the Quest End Timer Example example, put log prints for OnUpdate
and OnImGuiRender
events.
OnImGuiRender
is only being called once.
Not working SharpPluginLoader.log (log from other person) Working SharpPluginLoader.log (my log)
public void OnLoad()
{
// ...
KeyBindings.AddKeybind("SkipQuestEnd", new Keybind<Key>(Key.S, [Key.LeftControl, Key.LeftAlt]));
}
public void OnUpdate(float dt)
{
Log.Info("OnUpdate");
if(KeyBindings.IsPressed("SkipQuestEnd"))
{
Log.Info("OnUpdate: Keybind pressed");
}
// Each frame, check if the quest end timer is running and the `Ctrl+Alt+S` keybind is pressed
if(Quest.QuestEndTimer.Time > 0f && KeyBindings.IsPressed("SkipQuestEnd"))
{
// If so, set the quest end timer to be over instantly
Quest.QuestEndTimer.SetToEnd();
}
}
public void OnImGuiRender()
{
// ...
}
public void OnImGuiFreeRender()
{
Log.Info("OnImGuiFreeRender");
// ...
}
Oh great. Just what I needed, hooking conflicts 😆 I will probably change it so it hooks the game's own present function instead of the one on the swapchain itself. That should avoid any sort of conflict with other overlays.
I think there is something wrong with the menu key. default F9
value prints a warning. Changing to P
key = same.
{
"logfile": true,
"logcmd": true,
"logLevel": "INFO",
"outputEveryPath": false,
"enablePluginLoader": true,
"SPL": {
"ImGuiRenderingEnabled": true,
"PrimitiveRenderingEnabled": true,
"MenuKey": "F9"
}
}
Interesting, changing it to F7 seems to work for me, could you test that?
Nvm, changed it to F7 and it worked, then changed it back to F9 and it worked too. Can't replicate it anymore. No idea what it was.
Adding a comment as well noting that this issue also extends to the menu key straight up not working even with Nvidia's overlay explicitly turned off and after force quitting GeForce Experience (at least on my end. This issue is consistent despite reinstallations). The loader appears to run but the last 2 lines I see in the log are:
[ 07:34:11.6171658 | SPL ] Initializing D3D module for D3D12 [ 07:34:11.9003834 | SPL ] Found D3D12 command queue
No further inputs or changes to the menu key appear to work. I am running on v0.0.6. Same PC GPU specs as Green. Nvidia drivers are on v552.12.
@CodingSheep Does the game continue running like normal? Have you tried leaving it running for a couple minutes?
It also sounds like another overlay might be conflicting with it, as the renderer never gets initialized according to your log.
@Fexty12573 1) The game ran without any issues for the half hour I just ran it. 2) Let me test running the game with the Steam Overlay disabled and then with ReShade disabled. I do not expect either of these to be the cause of the issue on my end, but it'd be a very funny surprise if either was.
Update: Disabling the Steam Overlay fixed this issue. ReShade's overlay does not appear to conflict.
I figured. Well as I mentioned in my reply above, I do plan to modify the overlay hooking approach with the release of 0.0.7, so that shouldn't be an issue anymore in the future.
@GreenComfyTea @CodingSheep It has been a while, I haven't had much motivation recently but I finally got around to making those changes I mentioned to the DirectX hooking. If you don't mind could you check out ed0ed8f84debd84f37612667f1177902d042cedc, and try running the game with it to see if it still conflicts with other overlays? Would be very much appreciated.
I didn't had any issues with the previous version, and the new version also works well for me. I've put up a post asking people with the issue to try the new version out. But I think in the past 3 months I only got 1 report that could have been related, but it fixed itself.
Alright, thank you. I will switch to this then for 0.0.7. Now I just need to fix a bunch of shit that's not working 😭
Me on my way to create 10 more issues:![3x](https://github.com/Fexty12573/SharpPluginLoader/assets/30152047/dd8309a1-54be-4165-a8af-bd38fddc02d3)
Describe The Problem
The default ImGui key is
F9
. It was not registering by SPL at all because of GeForce Experience (and Nvidia App) overlay. They have aAlt+F9
hotkey. ImGui wasn't showing and doingif(Input.IsPressed(Key.F9)) Log.Info("F9 is pressed");
printed nothing.Removing the hotkey didn't help, but closing GeForce Experience completely solved the issue.
Personally, I have Nvidia overlay on, and I didn't encounter this issue. But with the other person that did have it we went thru a full troubleshooting process and I can confidently say it was because of Nvidia overlay.
PS. As a side note, it seems that there are
ImGuiRenderingEnabled
andPrimitiveRenderingEnabled
entries that go intoloader-config.json
. On the first SPL install, if there isloader-config.json
file already then ImGui will work by default, but these entries wont be added to the file. But if there is noloader-config.json
file then it will be generated with these entries set tofalse
, and ImGui won't work. This is confusing for end users. At least the default value should betrue
.PPS. I am not sure
\Monster Hunter World\nativePC\plugins\CSharp\Loader\SharpPluginLoader.log
is a good place for a log file. Too hidden from end users. I would be prefer if it was in the root folder, alongside regular stracker's log file. That's my personal opinion thou.PPPS. Another thing, I have several reports claiming that BetterMatchmaking doesn't work with AMD GPUs, it crashes. One of the errors that I got a report of was
AccessViolationException
that happened instartRequest
hook when actually trying to search for sessions.I assumeI don't know how GPU can affect the functionality of hooks, I checked Reloaded.Hooks issues and didn't see anything related, and I don't have enough information to create a proper issue. So I am just mentioning it here.netRequest
address was incorrect.To Reproduce
I don't have a reliable way of reproducing the issue.
Expected Behavior
Ideally, all key inputs should work regardless of other overlays. But I don't know if its even doable. As a workaround I can suggest making a entry for changing the ImGui key in a config file.
Priority
Suggested P2 Priority. Inaccessible ImGui makes people think the mods are not working at all. And if not, no menu means no easy customization.
PC Specs
Show/Hide
- `GPU`**: Nvidia**Environment
Show/Hide
- `Nvidia Drivers`**: v551.76**