Basic QB Script Modding (TH4/THUG/THUG2)

Tutorials for all THUG+ games goes here.
Forum rules
This forum is only for posting tutorials.
Specify what game it is for, and please take a look at this Template.
Post Reply
Global Moderator
Posts: 196
Joined: Sat Nov 13, 2010 12:04 am

Basic QB Script Modding (TH4/THUG/THUG2)

Post by quazz »

So do you want to make some qb script mods for th4/thug/thug2? You've come to the right place, noob!

Decompiling THUGPro scripts will not have checksum names since they have been stripped from its scripts. This is mainly for new people interested in starting their own modifications, not for THUGPro.


THPSPreTool - A Pre Explorer, opens prx/pre files
Qb_view + Gui interface tool

1). Open 'THPSPreTool.exe' In your game files, navigate and load the game/data/pre/qb_scripts.prx or game/data/pre/qb.pre file.
(A good suggestion would be to make a copy of this pre file to back it up). Right click on the QB script you would like to make changes to, and extract the file.
2). 'Open Roq cmd.exe', it is a gui interface for roq.exe
3). To decompile a qb, select the decompile bullet and the qb from the list, and hit decompile. For THUG1 or TH4, select the -THUG1 flag from the upper dropdown box.
4). Make changes to the decompiled qb file in your text editor of choice. Locate the decompiled script file in the same directory but with the .txt extension. (If you still use Notepad, consider using Notepad++, Sublime Text, or Atom.)
5). To compile, select the compile bullet and the qb from the list, and hit compile.
6). In 'THPSPreTool.exe' right click the QB file you made changes to, and select Replace File. Your compiled QB might have the extension '.txt.qb', but select this anyway, no renaming necessary.
7). Tada! You are ready to launch the game.


1). Roq.exe is actually a custom build of 'Qb_View.exe' from the thugpro files.
2). If there is an error on compiling, a temp.dump file should be produced in the working directory and it can be viewed in a text editor.
3). The qb_view and roq cmd tools are actually old and deprecated.
4). Compiled scripts with this tool can not be decompiled with names intact unless the -dev argument is used. Please keep your source text files!
5). You may also edit scripts that are in the game/data/scripts directory, but the game will use scripts in the game/data/pre/qb_scripts.prx or game/data/pre/qb.pre file.
6). If you have dummied your qb_scripts.prx or qb.pre file, you will want to use an original undummied pre.
7). If your game crashes on launch, it most likely means some changes in your qb_scripts.prx or qb.pre are causing the game to crash. Please replace that replaced file with your original qb or with your original unmodified pre.
8). A prx file is technically the same as a pre file.

~Quazz 1/8/2018
Message me on for help.
Posts: 5
Joined: Sun Dec 31, 2017 1:43 pm

Re: Basic QB Script Modding (TH4/THUG/THUG2)

Post by XboX_LegaCy »

NICE! I will def use this a reference point! :D
Post Reply