Modding 102

Reading posts on various GTA 5 Help Forums I'm no longer surprised by the misinformation you'll find there. Foremost are posts blaming SH5 (Script Hook V) for game crashes when in reality it's really other mods or user errors that cause problems.

This article goes a bit beyond my original post called Modding 101 and tries to address some common misconceptions. Another post worth reading is The 3 Reasons GTA 5 Breaks.

Does Script Hook V Crash Games?

No, it doesn't crash games. SH5 is an enabler, the cornerstone of the modding foundation. It isn't responsible for causing any GTA 5 crashes in properly modded games running on the appropriate hardware. ScriptHookV.dll contains code that allows many other mods to communicate and exploit GTA 5 functions (called native functions).

For example Trainers like Menyoo and mods like Community Script Hook V .NET (SHVDN) both depend on SH5 and share its code.

Do I need both dinput8.dll and the Asi Loader from OpenIV?

Even experts often get this wrong because dinput8.dll, the one bundled with SH5, is exactly the same file as the Asi Loader offered as an option with OpenIV. This file should never be replaced with the one from the Windows System32 folder which shares the same name - it doesn't support GTA 5 mods.

How can Menyoo crash when I did everything right?

A common help or complaint post contains "An exception occurred while executing 'Menyoo.asi' ". The poster then goes on to write he did everything right and has all the essential files installed: SHVDN and packfile limit adjuster and heap limit adjuster and gameconfig.xml mods. So how is this possible? Of course the user then blames SH5 and everything else except himself or herself.

Well first Menyoo is an excellent Trainer and very stable. It rarely crashes randomly. Secondly, Menyoo doesn't use SHVDN only SH5. It also doesn't depend directly on any of the other mods mentioned above which are primarily to ensure stability.

What crashes Menyoo? Users do. By installing mods that aren't compatible or by not having updated versions of Menyoo. Or it could be a combination of clothes or vehicle parts that just don't make sense and cause the crash. Either way, it has nothing to do with SH5.

What is the difference between dinput8.dll, SH5, and SHVDN?

Any file with an asi extension, for example ScriptHookVDotNet.asi and Menyoo.asi, are loaded by dinput8.dll and obviously that's why it's called the Asi loader. Script Hook V shares its code with asi files such as the two above. This allows them to interact with the RAGE game engine to spawn vehicles, teleport, and all kinds of fun things. As for SHVDN, it allows the modding community to further expand the game by creating and running custom programs called scripts.