[THUG+][PC]Adding Game Times

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
ProHad
VIP
Posts: 45
Joined: Wed Mar 03, 2010 10:10 pm

[THUG+][PC]Adding Game Times

Post by ProHad » Sat Mar 06, 2010 2:43 pm

You need:
qb2.exe
gameoptions.qb
qbkey.exe

First thing you need to do is decompile gameoptions.qb useing:
qb2.exe -d gameoptions.qb>gameoptions.txt

Now open up gameoptions.txt with notepad and it should be real easy to find the game times, but if you can't it looks like:
:i $time_limit_options$ = :a{
:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}
:i :s{$name$ = %s(8,"1 minute")$checksum$ = call $time_60$ arguments
$time$ = %i(60,0000003c):s}
:i :s{$name$ = %s(9,"2 minutes")$checksum$ = call $time_120$ arguments
$time$ = %i(120,00000078):s}
:i :s{$name$ = %s(9,"5 minutes")$checksum$ = call $time_300$ arguments
$time$ = %i(300,0000012c):s}
:i :s{$name$ = %s(10,"10 minutes")$checksum$ = call $time_600$ arguments
$time$ = %i(600,00000258):s}
:i :a}
Now all I'm going to explain is adding 40 seconds(because that's easy to explain)

So lets break down everything by looking at 30 seconds.

:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}

Now I'm going to explain to you every part of that snippet.
[:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}
This is the length of the text string displayed in the menu including spaces, 30 Seconds is ten characters long so the command is 10
:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}

This is the text string displayed in the menu, make it what ever you want.

:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}
Now this is one of the more important parts, this is where it's trying to load the qb key from the table file.

:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}

Here you place the time value in seconds.

:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}

Convert the time value into hex decimals and that goes here.



:i $time_limit_options$ = :a{
:i :s{$name$ = %s(10,"30 seconds")$checksum$ = call $time_30$ arguments
$time$ = %i(30,0000001e):s}
:i :s{$name$ = %s(8,"1 minute")$checksum$ = call $time_60$ arguments
$time$ = %i(60,0000003c):s}
:i :s{$name$ = %s(9,"2 minutes")$checksum$ = call $time_120$ arguments
$time$ = %i(120,00000078):s}
:i :s{$name$ = %s(9,"5 minutes")$checksum$ = call $time_300$ arguments
$time$ = %i(300,0000012c):s}
:i :s{$name$ = %s(10,"10 minutes")$checksum$ = call $time_600$ arguments
$time$ = %i(600,00000258):s}
:i :a}

I usually add my own time right at the end just so it's easy.

So would be your line
:i :s{$name$ = %s(10,"40 Seconds")$checksum$ = call $time_40$ arguments
$time$ = %i(40,00000028):s}

Now if you just add that to the end of the times and try to compile it wont, you still have to add time_40 to the table file.

So open up qbkey and type time_40

It will give you the qbkey you have to add to the table file.
#addx 0xC2069430 "time_40"

Add that to the table file and then compile useing:

qb2.exe -c gameoptions.txt>gameoptions.qb

Post Reply