Scripthook .NET Compatibility Patch Enhanced 1.2
448
19
448
19
Scripthook Compatibility Patch
This mod provides a runtime compatibility layer between
ScriptHookVDotNet Nightlies and Script Hook V .Net Enhanced by Chiheb-Bacha
Newest update split the mod in two, Enhanced version or Nightly Version
If you use Enhanced version and need compatibility with Nightly then use Enhanced
If you use Nightly and need compatibility with older mods then use Nightly
The mod operates entirely in memory and does not modify the original
script assemblies on disk. A Dll injects a lightweight
compatibility directly into ScriptHookVDotNet's script AppDomain.
The Dll monitors assemblies as they are loaded by the CLR and inspects their
managed metadata for known API compatibility issues.
When an incompatible assembly is detected, the required metadata is patched directly
within the CLR-loaded image before the script is instantiated. This allows scripts
to continue operating against newer ScriptHookVDotNet API layouts without requiring
the original DLL to be decompiled, recompiled, or permanently modified.
The compatibility layer is designed to operate independently of GTA V executable memory
addresses and does not rely on game-version-specific pattern scanning. Its primary
dependency is the ScriptHookVDotNet/CLR loading environment rather than the underlying
GTA V executable version.
The only errors to be fixed right now are
constructor threw an exception: System.MissingMethodException:
Method not found: 'GTA.UI.FeedPost GTA.UI.Notification.PostTicker(System.String, Boolean, Boolean)'.
This can fix issues with mods like Cinematic Idle/AFK Cam
Potentially this can fix other Scripthook errors as well on outdated scripts, i just need to know what errors
Updates:
⠀⠀⠀⠀➤ Enhanced 1.2
⠀⠀⠀⠀⠀● If you use Script Hook Enhanced then use this for Nightly compatibility
⠀⠀⠀⠀➤ Nightly 1.2
⠀⠀⠀⠀⠀● If your on Script Hook Nightly then use this for older scripts
⠀⠀⠀⠀➤ 1.2
⠀⠀⠀⠀⠀● Nothing new was added except for better error handling on dll's
⠀⠀⠀⠀➤ 1.1
⠀⠀⠀⠀⠀● New error patched
⠀⠀⠀⠀⠀'GTA.Vehicle' does not contain a definition for 'Create'
⠀⠀⠀⠀⠀Change Vehicle.Create
⠀⠀⠀⠀⠀Back to World.CreateVehicle
How To Use
● Simply install 000_CompatibilityPatch.dll to the scripts folder
This mod provides a runtime compatibility layer between
ScriptHookVDotNet Nightlies and Script Hook V .Net Enhanced by Chiheb-Bacha
Newest update split the mod in two, Enhanced version or Nightly Version
If you use Enhanced version and need compatibility with Nightly then use Enhanced
If you use Nightly and need compatibility with older mods then use Nightly
The mod operates entirely in memory and does not modify the original
script assemblies on disk. A Dll injects a lightweight
compatibility directly into ScriptHookVDotNet's script AppDomain.
The Dll monitors assemblies as they are loaded by the CLR and inspects their
managed metadata for known API compatibility issues.
When an incompatible assembly is detected, the required metadata is patched directly
within the CLR-loaded image before the script is instantiated. This allows scripts
to continue operating against newer ScriptHookVDotNet API layouts without requiring
the original DLL to be decompiled, recompiled, or permanently modified.
The compatibility layer is designed to operate independently of GTA V executable memory
addresses and does not rely on game-version-specific pattern scanning. Its primary
dependency is the ScriptHookVDotNet/CLR loading environment rather than the underlying
GTA V executable version.
The only errors to be fixed right now are
constructor threw an exception: System.MissingMethodException:
Method not found: 'GTA.UI.FeedPost GTA.UI.Notification.PostTicker(System.String, Boolean, Boolean)'.
This can fix issues with mods like Cinematic Idle/AFK Cam
Potentially this can fix other Scripthook errors as well on outdated scripts, i just need to know what errors
Updates:
⠀⠀⠀⠀➤ Enhanced 1.2
⠀⠀⠀⠀⠀● If you use Script Hook Enhanced then use this for Nightly compatibility
⠀⠀⠀⠀➤ Nightly 1.2
⠀⠀⠀⠀⠀● If your on Script Hook Nightly then use this for older scripts
⠀⠀⠀⠀➤ 1.2
⠀⠀⠀⠀⠀● Nothing new was added except for better error handling on dll's
⠀⠀⠀⠀➤ 1.1
⠀⠀⠀⠀⠀● New error patched
⠀⠀⠀⠀⠀'GTA.Vehicle' does not contain a definition for 'Create'
⠀⠀⠀⠀⠀Change Vehicle.Create
⠀⠀⠀⠀⠀Back to World.CreateVehicle
How To Use
● Simply install 000_CompatibilityPatch.dll to the scripts folder
Dodano: 9 dni temu
Ostatnia aktualizacja: 3 dni temu
Last Downloaded: 41 minut temu
23 Komentarzy
More mods by InfiniteQuestion:
Scripthook Compatibility Patch
This mod provides a runtime compatibility layer between
ScriptHookVDotNet Nightlies and Script Hook V .Net Enhanced by Chiheb-Bacha
Newest update split the mod in two, Enhanced version or Nightly Version
If you use Enhanced version and need compatibility with Nightly then use Enhanced
If you use Nightly and need compatibility with older mods then use Nightly
The mod operates entirely in memory and does not modify the original
script assemblies on disk. A Dll injects a lightweight
compatibility directly into ScriptHookVDotNet's script AppDomain.
The Dll monitors assemblies as they are loaded by the CLR and inspects their
managed metadata for known API compatibility issues.
When an incompatible assembly is detected, the required metadata is patched directly
within the CLR-loaded image before the script is instantiated. This allows scripts
to continue operating against newer ScriptHookVDotNet API layouts without requiring
the original DLL to be decompiled, recompiled, or permanently modified.
The compatibility layer is designed to operate independently of GTA V executable memory
addresses and does not rely on game-version-specific pattern scanning. Its primary
dependency is the ScriptHookVDotNet/CLR loading environment rather than the underlying
GTA V executable version.
The only errors to be fixed right now are
constructor threw an exception: System.MissingMethodException:
Method not found: 'GTA.UI.FeedPost GTA.UI.Notification.PostTicker(System.String, Boolean, Boolean)'.
This can fix issues with mods like Cinematic Idle/AFK Cam
Potentially this can fix other Scripthook errors as well on outdated scripts, i just need to know what errors
Updates:
⠀⠀⠀⠀➤ Enhanced 1.2
⠀⠀⠀⠀⠀● If you use Script Hook Enhanced then use this for Nightly compatibility
⠀⠀⠀⠀➤ Nightly 1.2
⠀⠀⠀⠀⠀● If your on Script Hook Nightly then use this for older scripts
⠀⠀⠀⠀➤ 1.2
⠀⠀⠀⠀⠀● Nothing new was added except for better error handling on dll's
⠀⠀⠀⠀➤ 1.1
⠀⠀⠀⠀⠀● New error patched
⠀⠀⠀⠀⠀'GTA.Vehicle' does not contain a definition for 'Create'
⠀⠀⠀⠀⠀Change Vehicle.Create
⠀⠀⠀⠀⠀Back to World.CreateVehicle
How To Use
● Simply install 000_CompatibilityPatch.dll to the scripts folder
This mod provides a runtime compatibility layer between
ScriptHookVDotNet Nightlies and Script Hook V .Net Enhanced by Chiheb-Bacha
Newest update split the mod in two, Enhanced version or Nightly Version
If you use Enhanced version and need compatibility with Nightly then use Enhanced
If you use Nightly and need compatibility with older mods then use Nightly
The mod operates entirely in memory and does not modify the original
script assemblies on disk. A Dll injects a lightweight
compatibility directly into ScriptHookVDotNet's script AppDomain.
The Dll monitors assemblies as they are loaded by the CLR and inspects their
managed metadata for known API compatibility issues.
When an incompatible assembly is detected, the required metadata is patched directly
within the CLR-loaded image before the script is instantiated. This allows scripts
to continue operating against newer ScriptHookVDotNet API layouts without requiring
the original DLL to be decompiled, recompiled, or permanently modified.
The compatibility layer is designed to operate independently of GTA V executable memory
addresses and does not rely on game-version-specific pattern scanning. Its primary
dependency is the ScriptHookVDotNet/CLR loading environment rather than the underlying
GTA V executable version.
The only errors to be fixed right now are
constructor threw an exception: System.MissingMethodException:
Method not found: 'GTA.UI.FeedPost GTA.UI.Notification.PostTicker(System.String, Boolean, Boolean)'.
This can fix issues with mods like Cinematic Idle/AFK Cam
Potentially this can fix other Scripthook errors as well on outdated scripts, i just need to know what errors
Updates:
⠀⠀⠀⠀➤ Enhanced 1.2
⠀⠀⠀⠀⠀● If you use Script Hook Enhanced then use this for Nightly compatibility
⠀⠀⠀⠀➤ Nightly 1.2
⠀⠀⠀⠀⠀● If your on Script Hook Nightly then use this for older scripts
⠀⠀⠀⠀➤ 1.2
⠀⠀⠀⠀⠀● Nothing new was added except for better error handling on dll's
⠀⠀⠀⠀➤ 1.1
⠀⠀⠀⠀⠀● New error patched
⠀⠀⠀⠀⠀'GTA.Vehicle' does not contain a definition for 'Create'
⠀⠀⠀⠀⠀Change Vehicle.Create
⠀⠀⠀⠀⠀Back to World.CreateVehicle
How To Use
● Simply install 000_CompatibilityPatch.dll to the scripts folder
Dodano: 9 dni temu
Ostatnia aktualizacja: 3 dni temu
Last Downloaded: 41 minut temu

This is completely experimental approach so if this doesn't work or you have other Scripthook errors I can try to patch then let me know
How I wish there were a mod that made compiled scripts for Legacy work in Enhanced.
[00:55:12] [ERROR] Failed to compile WreckToyCar.3.cs using API version 3.9.0 with 1 error(s):
at line 628: 'GTA.Vehicle' does not contain a definition for 'Create'
This one is also incompatible,this mod: https://www.gta5-mods.com/scripts/toy-cars-make-any-car-tiny#comment-2478291
@Ninocobretti Legacy scripts don't work in Enhanced? What's the difference between the two, I thought only enhanced couldn't work with legacy?
@JoyLucien Sweet I think this might be able to patch that one, I'll check it out thanks.
@JoyLucien This error has been patched but scripthook compiles .cs files before running .dll scripts so this patcher can only work for compiled dll's. But since it is a .cs file all you need to change is
⠀⠀⠀⠀⠀Change Vehicle.Create
⠀⠀⠀⠀⠀Back to World.CreateVehicle
@InfiniteQuestion Sadly, mods like RDE don't do that; I wish there were a way to use emulation or reverse engineering to trick GTA V Enhanced into running them.
@InfiniteQuestion ok,Is the current script running detection and performing fixes every frame, and will it affect performance?
@JoyLucien It should have no impact on performance. The patch is done in memory before loaded in game.
@InfiniteQuestion I ran into:
Could not load type 'GTA.Input.Controls' from assembly 'ScriptHookVDotNet3, Version=3.9.0.0
Using Pullmeoverremade
@Van_Zandt Thank you. I'll take a look as soon as I can.
@Van_Zandt Sorry nothing can be done with this mod as its code has been obfuscated making patching impossible
Could you also create a version of the nightly build that is compatible with the old API?
@JoyLucien I'm not sure what you mean by old API? The old API should still be compatible with the on by Chiheb-Bacha. If you can give me an example of an error i can maybe patch it. This isn't a version of the nightly builds, this is just a patch to allow some functions from the nightly builds into the enhanced version on this site.
@InfiniteQuestion What I mean is that if I use the shvdn nightly build, some scripts using the old API names will stop working. Please also create a compatibility patch for the shvdn nightly build.
@JoyLucien so you want the opposite direction of this mod, instead of nightly to enhanced you want enhanced to nightly? Can you give an example of a mod compiled against enhanced instead of nightly.
Use the latest nightly version to load this mod: https://www.gta5-mods.com/scripts/advanced-persistence-2-0#description_tab
Method not found: 'GTA.FeedPost GTA.UI.Notification.PostTicker(System.String, Boolean, Boolean)'.
And your current compatibility script cannot be loaded in nightly. Can you add a detection to your 000_CompatibilityPatch.dll and use different patches according to whether you are currently using shvdnenh or shvdn nightly?
[ERROR] Failed to load script assembly 000_CompatibilityPatch.dll when searching for script types because there is an assembly that the script tried to load as a dependency but couldn't. Exception message: One or more of the requested types could not be loaded. For more information, retrieve the LoaderExceptions property.
First LoaderException message (which tells what assembly is missing): System.IO.FileNotFoundException: Could not load file or assembly 'ScriptHookVDotNet3, Version=3.9.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: "ScriptHookVDotNet3, Version=3.9.0.0, Culture=neutral, PublicKeyToken=null"
Sounds coool
@JoyLucien I added a old scripthook api to nightlies patch, but i cant patch the advanced persistence. This would require creating a fake scripthook to load before dot net then forcing it to use its version checker over scripthooks but some memory hacking like that would truly set off false positives.
@InfiniteQuestion only to modify the nightly source code.
@JoyLucien I dont understand? It still might be possible, but so far i havent found it.