├── README.md
├── misc
├── gtavdirectory.png
├── gtavsourcecodelinks.txt
├── icon.psd
└── pricedown bl.otf
└── workingstatus.md
/README.md:
--------------------------------------------------------------------------------
1 | 
2 | # GTA V Modified Source Code Build Tutorial/Guide
3 |
4 | Github edition with fixed links and added some files and features!
Based on this [rentry.co](https://www.rentry.co/gtavbuildguide) tutorial, But this tutorial is better than that.
5 |
6 | **Working Status:** [See here for the status of tools and the game](/workingstatus.md)
7 |
8 | ## Requirements
9 | ### Base
10 | - Minimum 150GB Free Space
11 | - GTA V Files from Steam, Epic Games or Social Club (Minimum v2699)
12 | - Cracked Game is not recommended, in my opinion ther are maybe some problems occur.
13 | - GTAVSP.7z
14 | - **Want to have the source code? [See Here](/misc/gtavsourcecodelinks.txt) for the links and magnet.**
15 | - You can verify the authenticity of the file by its SHA1 hash: `ca39323730ed644fa534a2946506d4287f92a799`
16 | - To verify with 7-Zip, right click the file and select `7-Zip > CRC SHA > SHA1`
17 | - Archive password: `Mi76#b>9mRed`
18 | - [update.rpf and update2.rpf from GTA V build 2699](https://mega.nz/folder/O1UFlaAB#mqhLDQT7p77sMUnANJDjmA/file/Ph9FlQSK)
19 |
20 | ### Dependencies
21 | - Windows 10/11
22 | - [LTSC 2021](https://archive.org/download/Windows10EnterpriseLTSC202164Bit/en-us_windows_10_enterprise_ltsc_2021_x64_dvd_d289cf96.iso) Recommended, but you can use Normal Windows 10/11 too.
23 | - [Visual Studio 2012](https://files.dog/MSDN/Visual%20Studio%202012/en_visual_studio_ultimate_2012_x86_dvd_2262106.iso)
24 | - [Update 4 for Visual Studio 2012](https://files.dog/MSDN/Visual%20Studio%202012%20Update%204/mu_visual_studio_2012_update_4_x86_dvd_3161759.iso)
25 | - [DirectX SDK June 2010](https://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe)
26 | - [Incredibuild 4.0](https://xoreax-incredibuild.software.informer.com/4.0/)
27 | - This is only needed for Compiling Shaders and Game Scripts.
28 | - [7-Zip](https://7-zip.org/a/7z2301-x64.exe)
29 | - For extracting the archives.
30 | - [OpenIV](https://openiv.com/WebIV/guest.php?get=1)
31 | - For editing the game files.
32 |
33 | ### Miscellaneous
34 | - [Rush Patches](https://github.com/WH0LEWHALE/gtav-sourcecode-build-guide/files/14641602/rush_patches-master.zip)
35 | - [DLL Patches](https://github.com/WH0LEWHALE/gtav-sourcecode-build-guide/files/14641382/dll_patches.zip)
36 | - (OPTIONAL) [3rdParty Folder](https://github.com/WH0LEWHALE/gtav-sourcecode-build-guide/files/14733468/3rd.zip)
37 | - Extract and Put the folder to `X:\gta5\`
38 | - Rename "LitJSON.csproj" to "LitJson.csproj"
39 | - (OPTIONAL) [Fixed ShortcutMenu](https://github.com/WH0LEWHALE/gtav-sourcecode-build-guide/files/14735751/fixedshortcut.zip)
40 | - Extract and put the folder to `X:\gta5\tools_ng\bin\`
41 | - (OPTIONAL) [3D Studio Max 2010 SDK](https://archive.org/details/sdk-3ds-max-2010)
42 |
43 | ## Prebuilt Files
44 | - [Shaders](https://github.com/WH0LEWHALE/gtav-sourcecode-build-guide/files/14649717/common.zip)
45 | - [Scripts](https://drive.google.com/file/d/1AVMC_MBPpqKp0BIrOI-_lLq98QmwRn46/view)
46 |
47 | > [!NOTE]
48 | > It is recommended to create a virtual machine for this build process,
although the build process can be done on your Real PC.
49 | > VMWare/Hyper-V are recommended to run the VM due to their performance.
50 |
51 | ## Prerequisite Setup
52 | 1. Install DirectX SDK June 2010 and 7-Zip
53 | 2. Install Visual Studio 2012
54 | - Uncheck all optional components in the installer **except "Microsoft Foundation Classes for C++"** to save space, none of them are needed for the build.
55 | 3. Install Update 4 for Visual Studio 2012
56 | 4. Install Incredibuild 4.0 (Only needed for compiling shaders and scripts)
57 | - If you encounter the error that the installer is "Blocked by your administrator", follow these steps:
58 | 1. Hold Shift and right click the `incredibuild4_0.exe` file, select "Copy as path"
59 | 2. Open Command Prompt as Administrator
60 | 3. Paste the path and press Enter
61 | - Select to install "Incredibuild Agent", "Incredibuild Coordinator", and the extension for Visual Studio
62 | 5. Install OpenIV
63 | 6. Install Miscellaneous Files
64 | 8. Create X:\ drive by following these steps at the bottom
65 | 1. Open Command Prompt
66 | 2. Create a new folder called "GTA" to the Desktop
67 | 3. Run `net use X: \\localhost\c$\ /persistent:yes`
68 | - Example: `net use X: \\localhost\c$\Users\abcd\Desktop\GTA /persistent:yes`
69 | 9. Create the folder `X:\gta5` and copy all folders from `GTAVSP.7z\GTA V Source` into it
70 | - By the end, you should have the folders `X:\gta5\src`, `X:\gta5\script`, and `X:\gta5\tools_ng`. If the paths are different or some folders are missing, try re-extracting or moving as needed.
71 | 10. Right click the folder `X:\gta5`, select "Properties", uncheck "Read-only", click Apply then OK
72 | 11. Copy all folders in `dll_patches.zip` to `X:\gta5\tools_ng\bin`, make sure to overwrite when copying
73 | 12. Open Command Prompt as Administrator and run the following commands, then close:
74 | ```batch
75 | setx /m RS_TOOLSROOT X:\gta5\tools_ng
76 | setx /m DXSDK_DIR "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)"
77 | setx /m RS_CODEBRANCH X:\gta5\src\dev_ng
78 | setx /m RS_PROJECT gta5
79 | ```
80 | 12. To ensure changes are finalized, restart build machine.
81 |
82 | ## Patching The Source Code
83 | 1. Open `rush_patches-master.zip`
84 | 2. Copy `game` and `rage` folders to `X:\gta5\src\dev_ng`, make sure to overwrite when copying
85 | 3. (OPTIONAL) To skip launcher requirement for running the game, copy `game` and `rage` folders from `OPTIONAL_FIXES` to the same folder
86 |
87 | ## Building The Game Binary
88 | 1. Run `X:\gta5\src\dev_ng\game\VS_Project\load_sln_unity_2012.bat`
89 | - If prompted with "How do you want to open this file?", check "Always use this app to open .sln files" and click OK.
90 | 2. Once the solution loads, open the dropdown menu that says "Debug" at the top, select "Configuration Manager"
91 | 3. Change "Active Solution Platform" to "x64" and close the configuration window
92 | 4. Hold Ctrl key and click all projects under "GameLibs" and "Rage", right-click and select "Properties"
93 | 5. In the "Configuration" dropdown, select "All Configurations"
94 | 6. 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"
95 | - For faster compiles, search "mul" and set "Multiprocessor Compilation" to "Yes (/MP)".
96 | - If you get the error `C1060: Compiler is out of heap space` during build, come back to the above setting and turn it off.
97 | 7. Right-click the "game" project and select "Properties" and do step 5 again
98 | 8. Change build the type at the top of the window from "Debug" to "BankRelease"
99 | 9. At the top of the window, select `Build > Build Solution` and wait for build to finish.
100 | 10. Copy output binary to game folder.
101 |
102 | > [!NOTE]
103 | > Building shaders and scripts can be skipped using the prebuilt files above. These steps are here to allow modding or for those who prefer to build from source as much as possible.
104 |
105 | ## Building Shaders
106 | 1. Under "Shaders", right click the "shaders_rc" project and click "Build"
107 | - If you building in "BankRelease", Dont forget to build shaders with "Release Win32 4.0" in **Configuration Manager**.
108 | - Also, the same thing needs to apply to "shaders_dependency", Change "Debug" to "Release" in **Configuration Manager**
109 | - **If you compiling with Debug, then ignore the steps at the top and continue reading the tutorial.**
110 | 2. (OPTIONAL) Build low quality shaders
111 | 1. Right click the "shaders_rc" project and click "Properties"
112 | 2. Select `Configuration Properties > NMake`
113 | 3. Under "General", change all command lines from ending with `win32_40.bat` to ending with `win32_40_lq.bat`, then click "Apply" and "OK"
114 | 4. Rebuild shaders
115 | 3. Copy `X:\gta5\titleupdate\dev_ng\common` to game directory
116 |
117 | ## Building Game Scripts
118 | 1. Open Command Prompt
119 | 2. Run the following commands:
120 | ```batch
121 | X:
122 | cd X:\gta5\src\dev_ng
123 | setenv
124 | cd ..\..\tools_ng\bin\RageScriptEditor
125 | ragScriptEditor
126 | ```
127 | 3. In the editor, select `File > Open Project` and open `X:\gta5\script\dev_ng\singleplayer\GTA5_SP.scproj`
128 | 4. Select `Compiling > Intellibuild > Build Project`
129 |
130 | ## Patching Game Assets
131 | 1. Run OpenIV, select "Windows"
132 | 2. Select the game folder and click "Continue"
133 | 3. Open `GTA V\update\update2.rpf\x64\levels\gta5\script`
134 | 4. Click the "Edit mode" button, and copy `X:\gta5\titleupdate\dev_ng\x64\levels\gta5\script\script.rpf` to the OpenIV window
135 | 5. [IMPORTANT] Fix Story Mode
136 | 1. Open `GTA V\update\update.rpf\common\data` and make sure "Edit Mode" is enabled
137 | 2. Under "XML Text Files", right-click `gameconfig.xml` and click "Edit"
138 | 3. Under "Search", type "51000"
139 | 4. Change the value of `51000` to `53000`
140 | 5. Click "Save"
141 | 6. Close OpenIV
142 | 7. From `rush_patches-master.zip`, copy all files in the `ARCHIVEFIX` folder to a separate location
143 | 8. Open `\update`, and drag `update.rpf` and `update2.rpf` onto `ArchiveFix.exe`
144 | 9. Close both windows
145 |
146 | ## Running The Game
147 | 1. In the game directory, create a file named `launch.bat` and add these contents:
148 | ```batch
149 | cd %~dp0
150 | game_win64_bankrelease.exe -noSocialClub -nokeyboardhook -nonetlogs
151 | ```
152 | 2. (OPTIONAL) Add additional arguments:
153 | - `-kbgame` - Start game with game keyboard enabled.
154 | - `-output` - Show console log of game.
155 | - `-rag` - Enable support for RAG, the internal game debugging tool.
156 | - `-ragUseOwnWindow` - Use it with `-rag` parameter to make game run outside of RAG Render Window.
157 | - `-DoReleaseStartup` - Start real Story Mode on launch, Ignore if it says unknown parameter/command.
158 | - If you dont type this parameter, you will spawned in a random location as a random character with a random clothes.
159 | - `-sc_DisableForbiddenVehicleRemoval` - This parameter allows DLC and Other Cars without getting removed.
160 | - If you using RAG, go to "Vehicles" tab and create widgets, after that Click "Creation Options" and turn on "Create as personal vehicle" to prevent game crashes.
161 | - Additional standard game arguments can be added as well.
162 | 3. (OPTIONAL) Launch RAG with the following commands in Command Prompt
163 | ```batch
164 | X:
165 | cd X:\gta5\src\dev_ng
166 | setenv
167 | cd ..\..\tools_ng\bin\rag
168 | rag
169 | ```
170 | 4. (OPTIONAL) If your game is from Steam, Copy [Goldberg](https://gitlab.com/Mr_Goldberg/goldberg_emulator/-/jobs/4247811310/artifacts/download) patch into game directory, make sure to overwrite
171 | 5. Run `launch.bat`
172 |
173 | ## Debug Build Controls
174 |
175 | ```
176 | Legend:
177 | LCTRL -- Left control.
178 | RCTRL -- Right control.
179 | LALT - Left alt.
180 | RALT - Right alt.
181 | LSHIFT - Left shift
182 | RSHIFT - Right shift.
183 |
184 | Main keybinds:
185 | CTRL + TAB -> Switch between game keyboards. Available are debug, marketing, game and replay.
186 |
187 | Debug Keybinds:
188 | Backtick ---> Toggle scene information.
189 | Ins (Numpad) ---> Remove debug screen information.
190 | Del (Numpad) ---> Creates a copy of you.
191 | Page up (Numpad) ---> Toggle CPU information.
192 | CTRL + Del (Numpad) ---> Creates a copy of you and sets as your main.
193 | CTRL + Num lock (Numpad) ---> Freezes the game. (literally)
194 | ALT + Enter (Numpad) ---> Fullscreen.
195 |
196 | Page up / Page down ---> Change game weather.
197 | Scroll Lock ---> Appears "Streaming paused" message.
198 | Break (Pause break) ---> Freezes the game. (literally)
199 |
200 | A ---> Toggle AI display info variants.
201 | B ---> Toggle render info.
202 | D ---> Enable/Disable debug pad.
203 | G ---> Teleport (mouse)
204 | H ---> Health cheat
205 | I ---> Show navmeshes
206 | J ---> Skip to next segment of mission
207 | N ---> Appears your character name in minimap and weird red sphere. (It's AI Walking).
208 | O ---> Toggles minimap on the screen.
209 | Q ---> Changes current character model.
210 | R ---> Navigation info, ambient vehicle info
211 | S ---> Reload shaders
212 | U ---> Spawns a vehicle.
213 | V ---> Invincibility
214 | W ---> Gives a specific amount of all weapons in the game.
215 | X ---> Toggles character clothes info.
216 | Z ---> Mission Debug Menu
217 | F1 ---> Toggle Peds/Cards/Objects/Physics instances and lights info.
218 | F2 ---> AI Combat debug info.
219 | F3 ---> Decrease Wanted Level
220 | F5 ---> Teleports to random location.
221 | F8 ---> FAMILY_CONTROLLER / PLAYER_SWITCH STATE INFORMATION
222 | F9 ---> GAMEFLOW STATE INFORMATION
223 | F10 ---> FRIEND_CONTROLLER STATE INFORMATION
224 | F11 ---> RANDOM EVENTS DEBUG DISPLAY
225 | F12 ---> SCRIPT METRICS DEBUG INFO.
226 |
227 | CTRL + A ---> Remove AI display info.
228 | CTRL + B ---> Remove box modifier gui.
229 | LCTRL + C ---> Get all available promotions.
230 | RCTRL + C ---> Show prop hitboxes.
231 | CTRL + D ---> Opens filter menu.
232 | CTRL + F ---> Toggle prop/vehicle information like life ratio.
233 | CTRL + G ---> #UNKNOWN
234 | CTRL + I ---> Toggle mouse relative debug info.
235 | Ctrl + N ---> Show player/vehicle tags.
236 | Ctrl + P ---> Toggle information about promps and show character's hitbox.
237 | Ctrl + T ---> Clear Mission trigger
238 | Ctrl + U ---> Spawns or teleports a vehicle. #PARTIALLYKNOWN
239 | RCTRL + Right/Left arrow key ---> Increase/Decrease timescale.
240 |
241 | Ctrl + Shift + C ---> Prop hitboxes.
242 | Ctrl + Shift + H ---> Spawn a human.
243 | Ctrl + Shift + R ---> Init telemetry. #PARTIALLYKNOWN
244 | Ctrl + Shift + P ---> Spawns a car.
245 |
246 | ALT + A ---> Toggle vehicle information.
247 | ALT + C ---> Cycle through Camera Debug Displays
248 | ALT + G ---> Change game shader.
249 | ALT + H ---> Toggle shader information.
250 | ALT + M ---> Position zoom.
251 | ALT + O ---> Toggle overdraw info.
252 | ALT + T ---> Toggle texture view gui.
253 | ALT + W ---> Show every prop's hitbox.
254 | ALT + X ---> Removes power cables.
255 |
256 | SHIFT/CTRL + B ---> Toggle collision debug info.
257 | SHIFT + H ---> Teleports to your house.
258 | SHIFT + K ---> LowTierGod. (Kills the player.)
259 | SHIFT + O ---> Toggle Overview gui.
260 | SHIFT + P ---> Change characters model in vehicle.
261 | SHIFT + R ---> Toggle peds info.
262 | SHIFT + T ---> Change trigger zone.
263 | SHIFT + U ---> Spawns a vehicle and makes your driver auto.
264 |
265 | Ctrl + Alt + I ---> Toggle weapon/inputs information.
266 | ```
267 |
268 | # Epilogue
269 |
270 | Here is the end of the guide, I hope this tutorial was able to help you :)
271 | Just enjoy the game and please star or fork my repository please :3
272 |
273 | You can see some screenshots at the bottom about the game.
274 |
275 | ## Screenshots
276 | 
277 | 
278 | 
279 | 
280 |
281 | ## Videos
282 | https://www.youtube.com/watch?v=-RHmcVH4bGQ
283 | https://www.youtube.com/watch?v=n1xav7Mi4KY
284 | https://www.youtube.com/watch?v=TPWWho1cW2Y
285 |
286 |
287 |
--------------------------------------------------------------------------------
/misc/gtavdirectory.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shad0w-KuNgen/gtav-sourcecode-build-guide/438aaf225539951147641aae531c9e2f27070a11/misc/gtavdirectory.png
--------------------------------------------------------------------------------
/misc/gtavsourcecodelinks.txt:
--------------------------------------------------------------------------------
1 | Direct Link: https://cyberfile.me/7bu8
2 | Torrent Magnet: magnet:?xt=urn:btih:BYLBB5OGQG56R2II3W37OPOISCEZTFHU
3 |
4 | You can use QBittorent for download the torrent.
5 |
--------------------------------------------------------------------------------
/misc/icon.psd:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shad0w-KuNgen/gtav-sourcecode-build-guide/438aaf225539951147641aae531c9e2f27070a11/misc/icon.psd
--------------------------------------------------------------------------------
/misc/pricedown bl.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Shad0w-KuNgen/gtav-sourcecode-build-guide/438aaf225539951147641aae531c9e2f27070a11/misc/pricedown bl.otf
--------------------------------------------------------------------------------
/workingstatus.md:
--------------------------------------------------------------------------------
1 | # Working Status
2 |
3 | Here is the list that will compile and work sucessfully
4 |
5 | - [x] Can Compile Game
6 | - [x] Tools
7 | - [x] Rage Script Editor
8 | - It's working for me but somehow your virtual machine needs to be **Single Core** for script editor to work.
9 | - [x] Rag UI and Interface
10 | - [x] Map Viewer
11 | - [x] ShortcutMenu
12 | - [x] Other Tools
13 | - [x] Can Compile Game Scripts
14 | - [x] Can Compile Shaders
15 | - [x] Can Compile Tools
16 | - You need modify some of the tools to compile it.
17 |
--------------------------------------------------------------------------------