Combine 2 different scripts

Tony Hawk's Underground modding is discussed here.
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Combine 2 different scripts

Postby DreamY » Mon Feb 08, 2010 12:50 pm

Hey there,
i have basically no idea about modding any kind of the scripts in thps but ive got a question or maybe also work for you if youre bored.

Im totally used to the one button Wallplant (just press ollie one time instead of down + ollie) bAst! created some years? ago.
Since im using the THUGonline.exe, Chad and KaMeR created, the one button Wallplant isnt working anymore.

However i dont want to use the 2 button wallplant.
Now my question. Is there any way to combine both of them ?
Having Lost levels, playing online without problems, and so on combined with the one button Wallplant ?

To get yourself a bit used to the different files i post both of the links:
http://www.stylenation.de/chad/THUGonline.rar

Not completely sure if thats the script im using at home but i think so:
http://z13.invisionfree.com/MuHcReWFoRu ... id=3618750
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Mon Feb 08, 2010 10:04 pm

To clarify some things.
Not sure but i think the qbo.pre file from Chad doesnt access the walltrick.qb
I renamed the qb.pre into qbo.pre. And what happened ? Ive got my one button wallplant.
BUT! i cant connect to the master server like with the other .pre file.
Also i dont have the lost levels. Understandable, huh?

So my way to continue would be the following:
Open the normal qb.pre file and the qbo.pre file of chad (idk how lol)
Try to find the edited lines and write them new / copy paste or whatever to make one qbo.pre file for example that has the abillities of both .pre files.

But as you know i dont know shit about modding. This is just my logical way. Idk if this is possible at all but i hope you understand what i mean so far.
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Tue Feb 09, 2010 12:34 am

I just checked the exe files with hexedit and found out that the only changed position is the name of the .pre which gets loaded.
THUG.exe -> qb.pre
THUGonline.exe -> qbo.pre

Also compared the dns/gamespy/ip's in the exe to see if theres anything changed what could make me play online without the THUGonline.exe, but nothing. No changes at all beside the qbo and qb pre files.

So i got another question. Is the qbo.pre file the one that makes the game connect to the master server ?
Also is there any tool to track the files a game is loading like i can do with cmd and websites / my provider ?
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Tue Feb 09, 2010 1:16 pm

Changing the names of the scripts / .pre files / exe files didnt work so far.

I already changed the qb.pre file to qbo.pre with hexedit inside of the exe. After i changed the qb to qbo, the game loads his modified .pre file which causes me beeing able to play online. So i finally compared the qb.pre file with the qbo.pre file in my hexedit. Isnt that much readable but i found the following line:

rescripts\game\skater\walltricks.qb

yes right walltricks.qb not walltrick.qb or walltrick1.qb like i have in my script folder.
Thaught about changing the walltricks.qb to walltrick1.qb but no effect.
I could also just remove the whole line till rescripts\
Changing rescripts\ to scripts\ causes the game to crash so far.
Tryed alot of that but no effects. Stopped there and went to bed :D

This seems to me far too much work for me.

The only things i need/want are the lost levels, online fix and the one button wallplant. Nothing else.
I wanted to reach something by myself tho :/
But as i see this isnt something that can be done for me in just some hours.
However, if you know the way why should i spend more and more time in editing stuff, that doesnt work like i want it too.
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Tue Feb 09, 2010 11:28 pm

Alright lets see. Changing the script or names inside of the qdir.txt didnt work for me.

im simply trying to give you an alternative method to using the entire "qbo.pre" since the 2 walltrick.qb files i have (chads and the one you have are the same file)

If the files are the same, tell me why the one of me works and the one of him does not? Im sure i miss some important thing in my logical way of doing this task.

Also you told me the connection to gamespy is pointed through the exe.
Since i dont have any net.qb like you said, i checked the exe for changes.
Im not sure what to think about that right now. Is the net.qb an integrated file in the qb.pre?
Sry if im wrong with that :o

And to tell you, yes i understand the way MOTD is bypassed.

Code: Select all

for you to make changes yourself would require extracting the qbo.pre file

Thats what i wanted to do first like i said in one of my posts above.
But since i dont know how to extract .pre files, i tryed to edit it in hexedit.

Im not asking you for a step by step tutorial how to go on the right way to success.
Im rather asking for help in it like getting tools or scripts like you said.
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Wed Feb 10, 2010 3:08 am

Thanks alot for the tools (:
With extracting the qb.pre i finally understand almost everything.
I guess with a bit reading and a bit time i will finish it.

And youre right, i should stay on the method that worked so far.

I will definitely come back to you if i got any more questions.
And btw yes, this is by far easier then trying to edit everything in hex :O
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Wed Feb 10, 2010 5:28 pm

Alright im stuck again lolz
Compiling the edited .txt file with the tool of kamer doesnt work for me.
Like lets take the edited net.txt which i want to put back to .qb

Using the tool to compile gives me the following lines:
Including: 'net.qb_table.qbi'
...done. NOTE : You have to compile your source 2 times in order to have the full table
Modified by RoQ - www.HackTHPS.de
Unkown how to handle 'd' at line 358
16:28:20 complete.

It ends up on just creating a file called temp.dump

So how to put it back to .qb properly?

And also how do i bulid up the .pre file after finished editing everything ?
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Wed Feb 10, 2010 8:50 pm

I was at work when i posted this and there i didnt have notepad++
Since im at home now i checked it here.
The d line is found about 4 times in there.
Its called

Code: Select all

:i default

Simply removing the lines worked fine to get it into a .qb

Now i need to unlock the lost levels somehow and im at the part to build the .pre file
And thats the point i will stuck again. Building an edited qb.pre file again.
I guess theres another tool to do that ?

Also whats the blubs syntax ?
I know what a syntax is but what means blubs syntax ? Sry if this is kind of a noob question :o
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Thu Feb 11, 2010 3:09 am

Well since the net.txt converted successfully to a .qb ive made myself to find something about the lost levels.
Im not sure, but i think the lost levels are unlocked inside of the gamemenu.qb
First thaught was to compare the gamemenu.qb of chad with the gamemenu.qb original file.
Cant find the gamemenu.qb of chad so i decided to check the original gamemenu.qb
and i found the following lines.

Code: Select all

   :i doIf  ($DEVKIT_LEVELS$ = %i(0,00000000))
      :i doIf call $GotParam$ arguments
            $DEVKIT_ONLY$
         :i return
         
      :i endif

and this ones:

Code: Select all

   :i :s{$text$ = %s(9,"West Side")$level_num$ = %i(18,00000012)$points_to_unlock$ = %i(4294967295,ffffffff)$num_am_goals$ = %i(0,00000000)$num_goals$ = %i(0,00000000)$flag$ = call $LEVEL_UNLOCKED_SCH$ arguments
         $level$ = $load_WWW$$DEVKIT_ONLY$:s}
   :i :s{$text$ = %s(9,"TestLevel")$level_num$ = %i(21,00000015)$points_to_unlock$ = %i(4294967295,ffffffff)$num_am_goals$ = %i(0,00000000)$num_goals$ = %i(0,00000000)$flag$ = call $LEVEL_UNLOCKED_NJ$ arguments
         $level$ = $load_TestLevel$$DEVKIT_ONLY$:s}
   :i :s{$text$ = %s(7,"Default")$level_num$ = %i(30,0000001e)$points_to_unlock$ = %i(4294967295,ffffffff)$num_am_goals$ = %i(0,00000000)$num_goals$ = %i(0,00000000)$flag$ = call $LEVEL_UNLOCKED_NJ$ arguments
         $level$ = $load_Default$$DEVKIT_ONLY$:s}

Can this be the lines to enable that levels ? Im a bit sceptical about it because the second lines contain other levelnames.
Westside, Testlevel, Default ? But this is what makes me sceptical. 3 Maps ? The Lost Levels that i want are also 3 maps.
Thats what i thaught, so i opened up the levels.qb and did a simple change in the text.

Instead of

Code: Select all

:i :s{$text$ = %s(9,"West Side")$level_num$ = %i(18,00000012)$points_to_unlock$ = %i(4294967295,ffffffff)$num_am_goals$ = %i(0,00000000)$num_goals$ = %i(0,00000000)$flag$ = call $LEVEL_UNLOCKED_SCH$ arguments
         $level$ = $load_WWW$$DEVKIT_ONLY$:s}


i did it like that

Code: Select all

:i :s{$text$ = %s(10,"Downhill Jam")$level_num$ = %i(13,0000000d)$points_to_unlock$ = %i(0,00000000)$num_am_goals$ = %i(0,00000000)$num_goals$ = %i(0,00000000)$flag$ = call $LEVEL_UNLOCKED_NJ$ arguments
         $level$ = $load_dj$:s}


Is this the right way to do that ? Somehow i know its not but thats why im here.
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Thu Feb 11, 2010 11:49 am

Oh ye sry i overread the part "gamemenu.qb (the script that has your lost levels, probably other stuff too)"

Well i think i will first leave this one and fix on the 3 other levels there.

Code: Select all

:i :s{$text$ = %s(10,"Downhill Jam")$level_num$ = %i(13,0000000d)$points_to_unlock$ = %i(0,00000000)$num_am_goals$ = %i(0,00000000)$num_goals$ = %i(0,00000000)$flag$ = call $LEVEL_UNLOCKED_NJ$ arguments
         $level$ = $load_dj$:s}

The Level number is what ? The number before the name in this case 10, "Downhill Jam" or the number after the %i(x,xxxxxx)?
From the other lines i already know what the term $LEVEL_UNLOCKED_NJ$ means.

So lets see. When i come home i will add the 3 different levels. First i need to know what the number before the name means.
Because some other levels got about 3 or 4 times and 8, "namehere"
And also i noticed no level starts with a 1,2,3,4,5 or smth. If i remember well the first number was 7.

You already mentioned how to build up the .pre file again. Could you go on with that part ? Because then i can try the edited files to see if everything is working fine.

Also i found this one somewhere which is kind of helpful. It has nothing to do with this topic but i will post it anyway.

(Start)
#Edit Source Code
#Compile
#Compile Errors? Yes=(Edit Source Code), No=(Go To Next Part)
#Link
#Link Errors? Yes=(Edit Source Code), No=(Go To Next Part)
#Run Program
#Runtime Errors/Application Errors?Yes=(Edit Source Code), No=(Go To Next Part)
(Done)
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Thu Feb 11, 2010 11:53 pm

Yep i understood everything so far (:

Yes i know how to make a batch file. I already did one to automatically reset my inet connection after every downloaded rapidshare / megaupload part. Ye kind of offtopic but i just wanted to mention it.

And lol @batch file. This will take hours to do :o

*Edit*
Just curious but do i need to add scripts\qdir.txt 0x88888888 to the batch too ?
I dont have the qdir.txt in my scripts folder.
Or should i just paste it in there and go on with the file ?

*Edit2*
Alright i finished it. Tryed both methods. Running the batch file with scripts\qdir.txt 0x88888888 in it and without it. Also i tryed it with having the qdir.txt in the script folder and without it.

Had no problems to build up the file again. Saved the old qb.pre to another place to have a safety file and replaced the one in the pre folder with my new file. Game starts normally. First i tryed to connect to the master server. Didnt work.
Then i checked the level select menu. No new levels there. No crashes. Face went like this -> :/
The last thing to check was the wallplant. Didnt work too. Replaced the walltricks.qb with the modded one of basti also and rebuild the .pre after that again. No change so far.

Atm i have no idea whats wrong. ._.
DreamY
Posts: 19
Joined: Thu Feb 04, 2010 4:25 pm
Contact:

Re: Combine 2 different scripts

Postby DreamY » Sat Feb 13, 2010 3:43 pm

For me its definitely a bug in the scripts.
And i dunno why but i think the problem is the :i default which i removed.
Loading up the files of basti works without any problem.

But if i start up my scripts the game is crashing / freezing while starting.

Return to “THUG modding”

Who is online

Users browsing this forum: No registered users and 20 guests