Script Hook RDR2 SDK
The main compilation is based on ScriptHookRDR2.dll. When the game is updated, only ScriptHookRDR2.dll needs to be updated. Generally, development files do not need to be updated, but special circumstances are not excluded. - If you want the game to reload the asi script but do not want to restart the game, just create an empty "ScriptHookRDR2.dev" file in the game directory, then press "Ctrl+R" in the game and hear the "beep" sound, which means the script uninstall is complete. Press "Ctrl+R" again and hear the "beep" sound.
Screenshots 5 screenshots
About this mod Machine translation
The main compilation is based on ScriptHookRDR2.dll. When the game is updated, only ScriptHookRDR2.dll needs to be updated. Generally, development files do not need to be updated, but special circumstances are not excluded. - If you want the game to reload the asi script but do not want to restart the game, just create an empty "ScriptHookRDR2.dev" file in the game directory, then press "Ctrl+R" in the game and hear the "di" sound, which means the script is uninstalled. Press "Ctrl+R" again and hear the "di di di" sound, which means the script loading is complete;
**Note: This package is for developers, non-developers please go to ** **
Script Hook RDR2 SDK:
The main compilation is based on ScriptHookRDR2.dll. When the game is updated, only ScriptHookRDR2.dll needs to be updated. Generally, development files do not need to be updated, but special circumstances are not excluded.
DeBug:
- If you want the game to reload the asi script but do not want to restart the game, just create an empty "ScriptHookRDR2.dev" file in the game directory, then press "Ctrl+R" in the game and hear the "di" sound, which means the script is uninstalled. Press "Ctrl+R" again and hear the "di di di" sound, which means the script is loaded;
- If you want the DeBug function to work properly in the game, you must call the "scriptUnregister()" method in the main function "DllMain()". For details, please check the code in "NativeTrainer\main.cpp";
- Script reloading only applies to *.asi files that are loaded normally, and does not support loading of *.asi files added midway. [For example, if there is a test.asi file when the game is running, if you press "Ctrl+R" to uninstall it first, and then add a "test2.asi" file, the new "test2.asi" file will not be recognized when reloading]
Keyboard hook:
- You must use keyboard hook instead of GetKeyState/GetAsyncKeyState API to ensure that all keys can work properly;
- The keyboardHandlerRegister() /keyboardHandlerUnregister() function needs to be called in the main function "DllMain()" to handle the loading/unloading of key operations;
- For details, please refer to the code example in NativeTrainer\main.cpp;
Entity example:
- The entities currently used by the game are stored in pools. Each type of entity has a separate pool. Using the "worldGetAllVehicles()" method allows you to access any type of entity;
- When accessing these entities, please note that many entities are not created through scripts, so the script does not have full control over the entities. If you want to prevent the entities from being deleted by the game or want to delete the entities, you need to convert the entities to "task entities [SET_ENTITY_AS_MISSION_ENTITY]" to gain full control. Entities that are not set as task entities may be deleted by the game at any time, so we need to call these entities in the interval between script executions (i.e., the call of the WAIT (0) function)
- The original script also follows the above rules, such as while accessing entities from the world using "[GET_PED_NEARBY_VEHICLES [Get the vehicles around the ped]]( [Get the peds around the ped]]( "[IS_ENTITY_A_MISSION_ENTITY [Is it a mission entity]]( [Set as a mission entity]](
- You can view entity-related code examples in Pools\script.cpp;
Compile:
- The scripts in the example require "Visual Studio 2013" or higher to compile properly.
terms of use:
- You can only use this SDK to compile/produce offline script Mods, and online use is prohibited;
- When you publish a script, please do not include the "ScriptHookRDR2.dll" file. You need to point the download of ScriptHookRDR2.dll to avoid players downloading Script Hook RDR2 that is not the latest version;
Example
- The compressed package contains the source code of "NativeTrainer" and Pools. For more details, please check NativeTrainer\script.cpp and Pools\script.cpp.
- * *
EN:; THIS ARCHIVE REDISTRIBUTION IS NOT ALLOWED, USE THE FOLLOWING LINK I …
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- There is no universal mod manager for this game: some mods replace game files directly, some go into a game-specific Mods folder, and some need a game-specific community loader or tool first — follow the bundled readme.
- Place the files exactly as the readme says; mods with listed dependencies need those installed too.
- Launch the game to confirm it loaded; some games require enabling mods in settings or an in-game mod menu.
Install locations vary a lot between games and mods — the bundled readme is the most reliable guide.