THAW - How to Load the Main Menu as a Level?

Discuss modding in thaw. If you want to make something by yourself you can ask how to in here. Also, you can post any thaw related mod in here.
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Mon Oct 16, 2017 8:48 pm

Well.. i saw this Video:
https://youtu.be/M2zvM1XAsjY

My First Attempt was to Edited the gamemenu_levelselect.qb.wpu with load_z_mainmenu but it Just Crashes after Loading.. :rolleyes:
My First Success was after Going into: z_mainmenu.pak with QueenBee.
And Replaced the ScriptFile in z_mainmenu.pak with z_ho.pak ScriptFile :o
But when the Game Starts instead of Going in the MainMenu im immediately in the Game Without a HUD. :mad:

What I want to achieve is: You can select the Main Menu Level in the level menu.

I Allready Have a Space for the Level in: gamemenu_levelselect.qb.wpu
Image

Someone can Help Me ? :( :thinking:
WhoElseButMe
Posts: 848
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby WhoElseButMe » Tue Oct 17, 2017 1:44 am

Look a little deeper into what ALL is needed to load a level.
It's more than just the menu entry.
Queenbee has a search feature too.
Unfortunately, it doesn't index checksums in section scripts so you cant search then for checksums only strings and the string code for section scripts is half-assed and broken.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Tue Oct 17, 2017 6:59 am

Soo..
Every Single Level has a Script File.
z_mainmenu.pak.wpc has a Script File that Loads into Main Menu.
z_ho.pak.wpc has a Script File that Loads into a Level than? :cool:
Allready Replaced Entire Script File from z.ho into z_mainmenu. Load Straight into Main Menu Level to Skate instead of Load and Use the Main Menu. But no HUD And Some Glitches.
I Need to find the Right Script that Loads into the Level and Replace it right? :thinking:

But it not Let me Get in the Main Menu then? So is it Possible to Create a New Folder: z_mainmenu2 and Load this one? :o

levelselect.qb has Entries like this:
HOLLYWOOD
load_z_ho
AND SOME NUMBERS.

I think I Need to Change the Second String to:
load_z_mainmenu
Than it Must Load Main Menu Level instead of HOLLYWOOD?. :D
What are the Two Numbers?

Is there Something i Missed please Let me know.
Just Started Modding some Days ago :)
WhoElseButMe
Posts: 848
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby WhoElseButMe » Tue Oct 17, 2017 11:17 am

You're doing it wrong. The scripts in the scene need to remain in the scene they're currently in.
You need to look in the qb.pak for what you need to add to allow it to properly load.
Realistically, load_z_mainmenu could be called on if it exists.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Tue Oct 17, 2017 7:31 pm

Finally:
scripts\game\levels.qb.wpc
Loads into the Levels :D

SectionScript Load_Z_MainMenu "LAUNCHES INTO MAIN MENU AFTER SELECTING THE LEVEL"
SectionScript Load_Z_HO "LAUNCHES INTO HOLLYWOOD AFTER SELECTING THE LEVEL"

How do i Change the Script in the SectionScript File? I Guess i have to Recode this File inorder to Load MainMenu2 Folder from
Game/data/worlds/worldzones/z_mainmenu2

In scripts\menu\gamemenu_levelselect.qb.wpc i did
StructItem String text \c2MAIN MENU
StructItemQbKey level load_z_mainmenu2
StructItemQbKey poster levelposter Created
StructItemIntger length 100
StructItemInteger rot 3

After i Insert Load_Z_HO Sibiling to "scripts\game\levels.qb.wpc" and Renamed it to Load_Z_MainMenu2 it Loads into HOLLYWOOD.
So My Guess is i Have to Recode it but how?

Now.. It`s Not more Crashing the Game looks Like i Get Progress :)
WhoElseButMe
Posts: 848
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby WhoElseButMe » Wed Oct 18, 2017 2:21 am

Yes, you're on the right track here.
You need to use blubs qb compiler to decompile section scripts after extracting them
The main issue you're going to run into, the instruction 0x4A was added to THAW and blubs tool doesn't support it.
I mention this because of byte 7 below
load_z_mainmenu

Code: Select all

01 16 FD 74 DC 96 4A 18 00 00 00 00 00 00 01 00
08 00 00 00 00 1B 00 00 00 00 00 00 A4 93 E6 44
00 00 00 00 01 24

What the above bytes actually say

Code: Select all

    :i $load_level$ $level_Z_Mainmenu$
:i endfunction

level_Z_Mainmenu is one of the structures in levels.qb

And as you may have guessed, load_z_hollywood simply calls load_level with level_z_ho.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Wed Oct 18, 2017 3:10 pm

OK..
With the QB Explorer Tool Decompiled the File.
Open The Text Document.

#/ QB Script version 2
%include "scripts#game#levels#qb#wpc_76458FDD.qb_table.qbi" #/ Table file

:i $[fd74dc96]$Unknown instruction at 00000006:4a

#/ END

Put in the
:i $load_level$ $level_Z_Mainmenu$
:i endfunction
Used to Tool to Compile it.
Problem is
Test.dump File.
scripts#game#levels#qb#wpc_76458FDD.qb_table.qbi is Empty. :S

Something i doing Wrong here :thinking:
WhoElseButMe
Posts: 848
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby WhoElseButMe » Thu Oct 19, 2017 12:43 am

Blubs tool needs an open function call.
Thaw scripts the sectionscript type is the open function call.

Code: Select all

:i function $something$
    :i $load_level$ $level_Z_Mainmenu2$
:i endfunction


after you compile, open the file in a hex editor and remove the first bytes

Code: Select all

012316F625CE04


save and replace/add to the game.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Thu Oct 19, 2017 1:03 pm

So this is How my .txt File is now:

Code: Select all

#/ QB Script version 2
%include "level.qb_table.qbi"   #/ Table file

:i function $something$
    :i $load_level$ $level_Z_Mainmenu2$
:endfunction

#/ END


Temp.dump Created every Single Time. :S
When i Remove the Code. txt.qb has been Created :thinking:

Than i did Open Hex Workshop and Tryed to Remove the Lines:

Code: Select all

012316F625CE04

But Only:

Code: Select all

012316

Is Existing.. :$
Very Close arent we ? :)
WhoElseButMe
Posts: 848
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby WhoElseButMe » Thu Oct 19, 2017 1:37 pm

First and foremost #/ is a comment so this

Code: Select all

#/ QB Script version 2

and this

Code: Select all

#/ END

can be removed

The temp.dump file is the compiled version of the file including everything up to the problem.
Here's one problem
This

Code: Select all

:endfunction

Needs to look like this

Code: Select all

:i endfunction

:i = new line indicator
But you never reached that error because of the point made below.

Also, and this is the most important part, you're using an outdated version of the tool.
The version of the tool you have doesn't rebuild the table.
Either get qb2.1 or manually add any new checksums to the .qbi or the tool can't compile.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Thu Oct 19, 2017 1:51 pm

Weird? :thinking:
Downloaded:
QueenBee 1.9 and QBExplorer 2.1 from here:
http://thps-mods.com/tools.php

Must be the Latest one right? :|
WhoElseButMe
Posts: 848
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby WhoElseButMe » Thu Oct 19, 2017 2:02 pm

The comment at the top of decompiled script states you're using version 2.
If you have qb2.1 in the directory and are using cmd.exe there is a text field that allows you to specify which exe to use.
Try changing that and compile again.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Thu Oct 19, 2017 2:54 pm

UPDATE!
Downloaded QB2.1.exe from here: http://www.thmods.com/mod_tools/ and Named it to roq.exe

Now it Writes:

#/ QB Script version 2.1 by RoQ http://www.HackTHPS.de
%include "scripts#game#levels#qb#wpc_76458FDD.qb_table.qbi" #/ Table file

:i $fd74dc96$Unknown instruction at 00000006:4a

#/ END

This File Needs to Be Updated on THPS-Mods. :D
http://www.thps-mods.com/tools.php

Now i had Compiled it and it Works! :)
chrisrolltdasr1997
Posts: 8
Joined: Mon Oct 16, 2017 8:35 pm
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby chrisrolltdasr1997 » Thu Oct 19, 2017 3:23 pm

Now Running v2.1 Tryed it Again with success! :D

Code: Select all

%include "level.qb_table.qbi"

:i function $something$
    :i $load_level$ $level_Z_Mainmenu2$
:i endfunction


After Compiling Level.qb_table_qbi says:

Code: Select all

#addx 0xF625CE04 "something"
#addx 0x96DC74FD "load_level"
#addx 0x1928D0E2 "level_Z_Mainmenu2"


After this Looked in Hex Editor:

Code: Select all

012316000000000116000000001600000000012400

Code: Select all

.#.................$.


But where is the:

Code: Select all

012316F625CE04 Value?
WhoElseButMe
Posts: 848
Joined: Tue Aug 04, 2009 12:50 am
Location: FL - USA
Contact:

Re: THAW - How to Load the Main Menu as a Level?

Postby WhoElseButMe » Thu Oct 19, 2017 3:28 pm

Hit the compile button twice. I think it says that somewhere in the tool.
The text side of the hex editor is irrelevant, only the bytes are.

As you can see

Code: Select all

1600000000

This is saying that 0x16 name checksum is 0x00000000. Meaning the tool didn't write out the checksums.
Image
WhoElseButMe on Nov 26, 2009 wrote:It's that lack of respect amongst their peers and ignorance towards modding etiquette that keeps us who know this stuff well from spreading it like wild fire. We do still enjoy playing the game and if you need to cheat to play a game PLAY SOMETHING ELSE YOU DON'T SUCK AT.

Return to “THAW modding”

Who is online

Users browsing this forum: No registered users and 1 guest