Download the GTA V source code and Main User Tools;
Make a X: disk partition and put the gta 5 source code there with the name gta5, in a way that for example the source code is in "X:\gta5\src\dev_ng". (Should have at least 65GB);
Unset read-only on the source code, if it still shows up as read only it's likely a visual glitch.
Install dependencies with Install_All.bat in "%Main User Tools%\3. Redestributables" (if the bat doesn't exist, js install them all manually);
Install Ruby;
Symlink the gta 5 steam and titleupdate directories via CMD with "mklink /D /J "X:\gta5\titleupdate\dev_ng" "RETAIL_COPY_PLACEHOLDER"";
Set up the environment variables from the environment variables page. Do so by opening settings and going to system>about>advanced options>environment variables.
Firstly, you'll need to install git.
To make the game playable, you'll need to get the patches from here. You'll need them RAW to work.
Place them in "X:\gta5\src\dev_ng".
To apply patches, run "git apply --reject --whitespace=fix PATCHNAME.patch"
Open "X:\gta5\src\dev_ng\game\VS_Project\load_sln_unity_2012.bat". Ignore the SDK error every time you do so.
Change Durango to x64 and the configuration to whatever you would like (i wouldn't recommend the steam ones just cuz i'm not sure if they will work).
Select all the projects, except PSC and Shaders and go to properties, C/C++ General, then set Treat Warnings as Errors to No. Find Multi-Processor Compilation and set it to Yes. (you need to do this every time you change configuration and/or platform)
Also make sure you have the DLL Patches for tools if you want to prebuild scripts.
Prebuilding Shaders (skippable)
Go to shaders_rc, right click it and rebuild it.
Prebuilding Scripts (skippable)
Open "X:\gta5\tools_ng\bin\RageScriptEditor\ragScriptEditor.exe".
Go to File, Open project, then open "X:\gta5\script\dev_ng\singleplayer\GTA5_SP.scproj".
Once that is done, go Compiling and Compile All Files.
Open "%Main User Tools%\5. Place in GTA V DIR" and place the 3 folders in "X:\gta5\titleupdate\dev_ng"
(If prebuilding was done, you can copy common and x64 from "X:\gta5\build\dev_ng" instead)
Run "local-ip.bat" from "%Main User Tools%\2. Meta Files" to generate the local-ip.txt (ignore the warning, since it occurs because it uses your IP to generate the txt) and follow the instructions in said txt.
Open "X:\gta5\src\dev_ng\game\VS_Project\load_sln_unity_2012.bat" again, set it to x64 and set the configuration to whatever you'd like.
Finally, go to Build and Build Solution, then wait until it's done.
Copy everything from "X:\gta5\titleupdate\dev_ng" into your GTA V root directory, then go to "%Main User Tools%\7. Launch Batches" place them in your GTA V root directory and use one of the two to launch the game. Remember to replace GAME-FILE-NAME-HERE.exe with the actual exe name.
Every time you want to play the game, you'll need "X:\gta5\tools_ng\bin\rag\rag.exe" running, unless you remove -rag and -raguseOwnWindow from the batch files.
If the game gets stuck in the loading screen with the -doReleaseStartup command, go into "..\update\update.rpf\common\data\gameconfig.xml", change the SizeOfStack.value in <StackName>MISSION</StackName> to 53000.
Then, open ArchiveFix.exe from "%Main User Tools%\6. ArchiveFix" and drag into the exe the modified update.rpf to reencrypt it.