Killface1980 / DualSense4Rockstar

Mods for GTA V and RDR 2 to add support for adaptive triggers to the DualSense controller via DSX
51 stars 28 forks source link

Do not load scripts from ./Scripts folder #6

Closed dmustimenko closed 2 years ago

dmustimenko commented 2 years ago

I have the following logs: [23:16:17] [INFO] Config loaded from E:\Games\Red Dead Redemption 2\ScriptHookRDRDotNet.ini [23:16:17] [DEBUG] Loading API from E:\Games\Red Dead Redemption 2\ScriptHookRDRNetAPI.dll ... [23:16:17] [DEBUG] API from E:\Games\Red Dead Redemption 2\ScriptHookRDRNetAPI.dll loaded ... [23:16:17] [DEBUG] Resolve handler removed [23:16:17] [DEBUG] Loading scripts from E:\Games\Red Dead Redemption 2\scripts\ ... But that is all. I think it should loaded scripts from DSX_Base.dll, DualSense4RDR2.dll and Newtonsoft.Json.dll. But nothing. I debug solution with ScriptHookRDRDotNet and found that static bool IsManagedAssembly(string filename) return false for those assemblies. Do you know why scripts were not loaded?

Killface1980 commented 2 years ago

Weird. Do your folders look like this? Maybe rename the folder to "scripts" (lower case)?

image image

dmustimenko commented 2 years ago

Correct, all these files are the same in my RDR2 folder. I also changed scripts folder to lower case but I still have the same problem - scripts has not been loaded.

Killface1980 commented 2 years ago

[18:55:01] [INFO] Config loaded from D:\Rockstar Games\Red Dead Redemption 2\ScriptHookRDRDotNet.ini [18:55:01] [DEBUG] Loading API from D:\Rockstar Games\Red Dead Redemption 2\ScriptHookRDRNetAPI.dll ... [18:55:01] [DEBUG] API from D:\Rockstar Games\Red Dead Redemption 2\ScriptHookRDRNetAPI.dll loaded ... [18:55:01] [DEBUG] Resolve handler removed [18:55:02] [DEBUG] Loading scripts from D:\Rockstar Games\Red Dead Redemption 2\scripts\ ... [18:55:02] [DEBUG] Loading assembly DSX_Base.dll ... [18:55:02] [INFO] Found 0 script(s) in DSX_Base.dll. [18:55:02] [DEBUG] Loading assembly DualSense4RDR2.dll ... [18:55:02] [DEBUG] compatibleApi resolved ScriptHookRDRNetAPI, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null [18:55:02] [INFO] Found 3 script(s) in DualSense4RDR2.dll resolved to API 2.0.0. [18:55:02] [DEBUG] Loading assembly Newtonsoft.Json.dll ... [18:55:02] [INFO] Found 0 script(s) in Newtonsoft.Json.dll. [18:55:02] [DEBUG] Instantiating script DualSense4RDR2.add ... [18:55:02] [INFO] Started script DualSense4RDR2.add. [18:55:02] [DEBUG] Instantiating script DualSense4RDR2.LEDs_RDR2 ... [18:55:02] [INFO] Started script DualSense4RDR2.LEDs_RDR2. [18:55:02] [DEBUG] Instantiating script DualSense4RDR2.Main_RDR2 ... [18:55:02] [INFO] Started script DualSense4RDR2.Main_RDR2.

The log is supposed to look like this. I have no info about IsManagedAssembly; Are you using the SH v2 of the SHRDN together with the v2 version of the mod? I've added a link to the requirements of SHRDN v2 https://github.com/Halen84/ScriptHookRDR2DotNet-V2 can you check if you have everything installed? I guess the keys defined in ScriptHookRDRDotNet.ini Console/Reload F8/F9 (mine) don't work as well?

dmustimenko commented 2 years ago

I'm sorry, my bad, I loaded files from https://github.com/Killface1980/DualSense4Rockstar/tree/master/__RELEASE/RDR2 directly as "Save link as ..." but it was not correct and files were saved invalid. I downloaded all git files and zip contains correct script files. Now scripts are loading. But I have one difference with your log file: [11:54:19] [INFO] Config loaded from E:\Games\Red Dead Redemption 2\ScriptHookRDRDotNet.ini [11:54:19] [DEBUG] Loading API from E:\Games\Red Dead Redemption 2\ScriptHookRDRNetAPI.dll ... [11:54:19] [DEBUG] API from E:\Games\Red Dead Redemption 2\ScriptHookRDRNetAPI.dll loaded ... [11:54:19] [DEBUG] Resolve handler removed [11:54:19] [DEBUG] Loading scripts from E:\Games\Red Dead Redemption 2\scripts\ ... [11:54:19] [DEBUG] Loading assembly DSX_Base.dll ... [11:54:19] [INFO] Found 0 script(s) in DSX_Base.dll. [11:54:19] [DEBUG] Loading assembly DualSense4RDR2.dll ... [11:54:19] [DEBUG] compatibleApi resolved ScriptHookRDRNetAPI, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null [11:54:19] [INFO] Found 2 script(s) in DualSense4RDR2.dll resolved to API 2.0.0. [11:54:19] [DEBUG] Loading assembly Newtonsoft.Json.dll ... [11:54:19] [INFO] Found 0 script(s) in Newtonsoft.Json.dll. [11:54:19] [DEBUG] Instantiating script DualSense4RDR2.LEDs_RDR2 ... [11:54:19] [INFO] Started script DualSense4RDR2.LEDs_RDR2. [11:54:19] [DEBUG] Instantiating script DualSense4RDR2.Main_RDR2 ... [11:54:19] [INFO] Started script DualSense4RDR2.Main_RDR2.

As you can see the following are absent: [18:55:02] [DEBUG] Instantiating script DualSense4RDR2.add ... [18:55:02] [INFO] Started script DualSense4RDR2.add.

is it critical?

Killface1980 commented 2 years ago

Nope, I think the mod should be doing fine from now on. The add() script was a remainder from development with no purpose. I removed it with one of the recent updates.

Hope you like the mod :-)

dmustimenko commented 2 years ago

Yes, sure, your work is awesome! DualSense adaptive triggers are working great! Thank you!