💬 You can check out "Discussions" for talking and discuss.
Most of this guide is from this repo but I fixed some errors like missing variables and more simple directories. I decided to make this because I spent way too much time figuring out how to fix most the issues.
- Prerequisites
- Prerequisites Setup
- Patching The Source Code
- Building the files
- Patching Game Assets
- Running The Game
- BankRelease & Debug Controls
- Working Status of the Tools and Game
- Known Issues, bugs and errors
- Troubleshooting
- Final Thoughts
- Windows 10/11 ## VM HIGHLY RECOMMENDED
- LTSC 2021 Recommended, but you can use Normal Windows 10/11 too.
- Latest Grand Theft Auto V Files from Steam, Epic Games or maybe Rockstar Games Launcher.
- Minimum 65GB Free Space, 140GB+ is Recommended because of the game files and programs.
- GTAVSP.7z - Source Code
- Download Link: All Available Download Links
- Archive Password:
Mi76#b>9mRed
- You can verify the authenticity of the file by its SHA1 hash:
ca39323730ed644fa534a2946506d4287f92a799
- To verify with 7-Zip, right-click the file and select
7-Zip > CRC SHA > SHA1
- To verify with 7-Zip, right-click the file and select
- update.rpf and update2.rpf from GTA V build 2699
- Some Patience and Technical Competence
- Visual Studio 2012
- Do not download VS 2010 or update 4 if you are using VS 2022 with patches (UNRECOMMENDED) Visual Studio 2022 Patches
- (OPTIONAL) Visual Studio 2022
- Same goes here, only download if you are using the 2022 patches
- DirectX SDK June 2010
- (OPTIONAL) 3D Studio Max 2010 SDK
- Incredibuild 4.0
- This is only needed for Compiling Shaders and Game Scripts.
- 7-Zip
- For extracting the archives.
- OpenIV
- For editing the game files.
- Git
- For Applying some patches.
- Rush Patches
- DLL Patches
- (OPTIONAL) 3rdParty Folder
- (OPTIONAL) gIKgDXuVHNzIgXkiwpB.zip - Art Asset Leak ## Link Dead
- Mirror Link, Thanks to @RockstarAdvancedGameEngine. ## Link Dead
- (OPTIONAL) Network Fix
- This will fix the Studio or IP-related issues.
- Mixed Patches
- (OPTIONAL & NOT STABLE) Visual Studio 2022 Patches
- Presented by @userTermzik, but I don't recommend this because it needs some modifications.
- Shaders (You can build your own shaders and play with them without any problem.) ## Link Dead
- Game Scripts (You can still use the included game scripts from the update and update2.rpf files or )build it yourself
- BankRelease EXE (If you want to skip the "Building The Game Binary/Executable" step)
Note
It is recommended to create a virtual machine for this build process, Although the build process can be done on your Real PC
It's not recommended on your Real PC because sometimes the conflicts may happen and broke the whole compilation process
VMWare/Hyper-V are recommended to run the Virtual Machine due to their performance.
- Install DirectX SDK June 2010
- If you get error S1023, Uninstall
Visual C++ 2010 Redistributable
& Reinstall DirectX SDK - (June 2010).
- If you get error S1023, Uninstall
- Install 7-Zip/Win-rar
- Install Visual Studio 2012
- Uncheck all optional components in the installer except "Microsoft Foundation Classes for C++" to save space, none of them are needed for the build.
- Install Update 4 for Visual Studio 2012
- Install Incredibuild 4.0 (Only needed for compiling shaders and game scripts)
- If you encounter the error that the installer is "Blocked by your administrator", follow these steps:
- Hold Shift and right click the
incredibuild4_0.exe
file, select "Copy as path" - Open Command Prompt as Administrator
- Paste the path and press Enter
- Hold Shift and right click the
- Select to install "Incredibuild Agent", "Incredibuild Coordinator", and the extension for Visual Studio
- If you encounter the error that the installer is "Blocked by your administrator", follow these steps:
- Install OpenIV
- Extract DLL Patches and Rush Patches
- (OPTIONAL) Install 3D Studio Max 2010 SDK
- Create X:\ Drive by following the steps at the bottom:
- Open Command Prompt
- Create a new folder called "GTA" to the Desktop or anywhere that you want
- Run
net use X: \\localhost\c$\<Path to working folder for build> /persistent:yes
- Example:
net use X: \\localhost\c$\Users\<username>\Desktop\GTA /persistent:yes
- Example:
- Create the folder
X:\gta5
and copy all folders fromGTAVSP.7z\GTA V Source
into it - Right click the folder
X:\gta5
, select "Properties", uncheck "Read-only", click Apply then OK - Open Command Prompt as Administrator and run the following commands, then close:
setx /m RS_TOOLSROOT X:\gta5\tools_ng
setx /m DXSDK_DIR "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)"
setx /m RS_CODEBRANCH X:\gta5\src\dev_ng
setx /m RS_PROJECT gta5
setx /m RAGE_DIR X:\gta5\src\dev_ng\rage
- (OPTIONAL) Symlink the
X:\gta5\titleupdate\dev_ng
directory.- This can be done with this CMD Command:
mklink /D /J "X:\gta5\titleupdate\dev_ng" "INSERT_RETAIL_COPY_HERE"
. (INSERT_RETAIL_COPY_HERE
being your GTA V Game Directory)
- This can be done with this CMD Command:
- If you dont want to symlink, Put all the game files to the
X:\gta5\titleupdate\dev_ng
directory. - To ensure changes are finalized, restart build machine/computer.
- Open
rush_patches-master.zip
- Copy
game
andrage
folders toX:\gta5\src\dev_ng
, make sure to overwrite when copying - (OPTIONAL) To skip launcher requirement for running the game, copy
game
andrage
folders fromrush_patches-master.zip\OPTIONAL_FIXES
to the same folder - Copy all folders in
dll_patches_x.zip
toX:\gta5\tools_ng\bin
, make sure to overwrite when copying - (OPTIONAL) Extract
Network Fix.zip
and put the 2 files intox:\gta5\tools_ng\etc\globals
, make sure to overite all files when copying - (OPTIONAL) Install 3rdParty Folder, Extract and Put the folder to
X:\gta5\
. - Install Mixed Patches using git
- Extract everything from
Mixed_Patches.zip
toX:\gta5\stc\dev_ng
- Launch
auto.bat
then wait for the file to patch the source - Close the cmd window
- Extract everything from
By far, Your Folder Structure should look like this:
🖥️ X:
┗ 📂 gta5
┣ 📂 3rdParty - (OPTIONAL)
┣ 📂 src
┃ ┣ 📂 dev_ng
┣ 📂 script
┃ ┣ 📂 dev_ng
┗ 📂 tools_ng
x:\gta5\title_update\dev_ng
- Run
X:\gta5\src\dev_ng\game\VS_Project\load_sln_unity_2012.bat
- If prompted with "How do you want to open this file?", check "Always use this app to open .sln files" and Select Visual Studio 2012 then click OK
- Once the solution loads, open the dropdown menu that says "Debug" at the top, select "Configuration Manager"
- Change "Active Solution Platform" to "x64" and close the configuration window
- Hold Ctrl key and click all projects under "GameLibs" and "Rage" folder, right-click and select "Properties"
- In the "Configuration" dropdown, select "All Configurations"
- Select
C/C++ > All options
, under "Look for options or switches", search "err" and set "Treat Warnings as Errors" to "No (/WX-)", then click "Apply" and "OK"- For faster compiles, search "mul" and set "Multiprocessor Compilation" to "Yes (/MP)"
- If you get the error
C1060: Compiler is out of heap space
during build, come back to the above setting and turn it off
- If you get the error
- For faster compiles, search "mul" and set "Multiprocessor Compilation" to "Yes (/MP)"
- Right-click the "game" project and select "Properties" and do step 5,6 again
- Change build the type at the top of the window from "Debug" to "BankRelease"
- At the top of the window, select
Build > Build Solution
and wait for build to finish - Copy output binary to game folder.
Warning
Building shaders and game scripts can be skipped using the prebuilt files above
For shaders, Extract common.zip
and put the common
folder into your Game Directory
For scripts, Run OpenIV and put the script.rpf
file into x:\gta5\title_update\dev_ng\update\update2.rpf\x64\levels\gta5\script
These steps are here to allow modding or for those who prefer to build from source as much as possible
Right-click This PC > Properties > Advanced system settings > Environment Variables. Under User variables, click New. Variable Name: RAGE_DIR Set Path to X:\gta5\src\dev_ng\rage Repeat for System Variable
- hold control and click shaders_rc and shaders_dependency then right click and properties
- Go to VC++, then click Include directories'dropdown menu and click
- In the top box (User-Specified Values), add
$(Inherit);$ (RAGE_DIR)\base\src - Now click ok, apply, ok and close out the properties
- Under "Shaders", right click the "shaders_rc" project and click "Build"
- (OPTIONAL) Build low quality shaders
- Right click the "shaders_rc" project and click "Properties"
- Select
Configuration Properties > NMake
- Under "General", change all command lines from ending with
win32_40.bat
to ending withwin32_40_lq.bat
, then click "Apply" and "OK" - Rebuild shaders and wait it to finish This will take a while
- title_update is your game directory automatically so visual studio will build there, if the "common" folder isn't in the directory repeat step 5 (and 6 if you build lq shaders).
- Open Command Prompt and Run the following commands:
X:
cd X:\gta5\src\dev_ng
setenv
cd ..\..\tools_ng\bin\RageScriptEditor
ragScriptEditor
- In the editor, select
File > Open Project
and openX:\gta5\script\dev_ng\singleplayer\GTA5_SP.scproj
- Select
Compiling > Intellibuild > Build Project
and wait until the compiling process finishes. - Run OpenIV, select "Windows" under "Grand Theft Auto V"
- Select the game folder and click "Continue"
- Open
<Game Directory>\update\update2.rpf\x64\levels\gta5\script
- Delete
script.rpf
- Click the "Edit mode" button, and copy
X:\gta5\titleupdate\dev_ng\x64\levels\gta5\script\script.rpf
to the OpenIV window.
- Install
update.rpf and update2.rpf from GTA V build 2699
from Prerequisites List - Put
update.rpf
andupdate2.rpf
files to<Game Directory>\update\
folder- Dont forget to backup your old files from update folder.
If you ever modify the RPF files, dont forget to encrpyt them.
Here you can see how to do it:
- From
rush_patches-master.zip
, copy all files in theARCHIVEFIX
folder to a separate location - Drag RPF file(s) onto
ArchiveFix.exe
- Don't drag the both files at the same time, just drag one by one.
- Go to game directory
- Put the
common
folder to the game directory.
- Scripts Already included in update2.rpf, you can replace it in future with one that you builded it.
Copy the game-win64-bankrelease.exe file from Prebuilt Files and paste it into the game directory (
X:\gta5\titleupdate\dev_ng\
)
- Rename the original
GTA5.exe
toLGTA5.exe
and change the prebuilt/compiled binary file fromgame-win64-bankrelease.exe
toGTA5.exe
- In the game directory, create a file named
launch.bat
and add these contents:
cd %~dp0
GTA5.exe -noSocialClub -nokeyboardhook -nonetlogs
- (OPTIONAL) Add additional arguments:
-kbgame
- Start game with game keyboard enabled-output
- Show console log of game, the game opens a little bit slow.-rag
- Enable support for RAG, the internal game debugging tool-ragUseOwnWindow
- Use it with-rag
parameter to make game run outside of RAG Render Window- DO NOT Forget to Launch RAG Before launching the game if u using any RAG parameters
-DoReleaseStartup
- Start real Story Mode on launch, Ignore if it says unknown parameter/command- If you dont type this parameter, you will spawned in a random location as a random character with a random clothes
- Additional standard game arguments can be added as well.
- (OPTIONAL) Launch RAG with the following commands in Command Prompt:
X:
cd X:\gta5\src\dev_ng
setenv
cd ..\..\tools_ng\bin\rag
rag
- Run
launch.bat
- Can Compile Game
- Can Compile Tools
- Can Compile Game Scripts
- Can Compile Shaders
- Game
- Script Hook V and ASI Loaders
- Tools
- Rage Script Editor
- Rag
- Rag UI
- Rag Interface
- Map Viewer
- Shortcut Menu
- Other Tools
- Note that Some Perforce login required tools will not work, they need some modifications and Perforce.
- Perforce Download Links:
- Helix Core: https://www.perforce.com/downloads/helix-core-free-small-teams
- Helix Visual Client: https://www.perforce.com/downloads/helix-visual-client-p4v
- Perforce Download Links:
- Note that Some Perforce login required tools will not work, they need some modifications and Perforce.
B = Bug - E = Error - F = Fix
B: When I create "Vehicles" Widgets, the game crashes.
F: Before Opening The Save Game, just enter the game normally and dont load the save, create vehicle widgets then load the game.
E: Fatal Error: Unable to create default effect 'common:/shaders/im', cannot continue.
F: If u didn't put the shaders to the game directory or you dont have the low quality shaders, then this error may appear.
Just Simply Put the shaders to the game directory and compile the low quality shaders by following tutorial.
Just make your shaders quality "High" and dont lower that.
To do this, Follow this steps:
- Go To \Documents\Rockstar Games\GTA V
- Open settings.xml
- Change
<ShaderQuality value="0" />
To<ShaderQuality value="1" />
- Save the file and Done!
E: Couldn't connect to RAG.exe. Keep trying?
F: Just Simply Open the RAG Manually, then start launch.bat.
E: Fatal Error: Fatal disc error (code -*)
F: You are %100 missing some files or misdragged something, fix your game files.
- Game crashes if you open "Keybinds" Menu in BankRelease or Debug Builds.
- It's because the game tries to load a missing keyboard layout file.
- This can probably be fixed by just editing some lines in the source code.
- It's because the game tries to load a missing keyboard layout file.
- @GTA-Source-Helper
- Network Fix
- @RockstarAdvancedGameEngine
- OneDrive Link for Source Code
- Mirror Link for Art Asset Leak -@voyageprofessor
- Prebuilt Game Scripts
- Other Contributors / Supporters
- Thanks to all of you guys!