[TUROTIAL: Thps3]Make a simple menu

Tutorials for all THPS games goes here.
Post Reply
Morten1337
Site Admin
Posts: 322
Joined: Mon Mar 01, 2010 2:23 pm
Location: Norway

[TUROTIAL: Thps3]Make a simple menu

Post by Morten1337 » Sat Mar 06, 2010 6:44 am

How to make a menu in THPS3
!NOTE: This is an old tutorial, there might be better ways to do this. Sorry for bad grammar etc.
Things you need:How to make a link:
  1. Decompile game.qb by making a .bat file:

    Code: Select all

    qb2.exe -d game.qb > game.txt
  2. Run it! Open "Game.txt" in Notepad.
  3. Search for "Sound Options", Then you will find this:

    Code: Select all

               :u(02:000000cc)call $AddLine$ arguments 
            $parent$ = $game_menu$$id$ = $backend_sound_options$$text$ = %s(13,"Sound Options")$link$ = $sfx_menu_container$
  4. Copy that piece of code and paste it above.
  5. Now you got a copy of the end run menuitem
  6. Change the variable after "$id$ =" to something like $my_first_menu_ID$
  7. And change the text "Sound Options" to ex. "My Menu"
  8. If you change the length of the text you have to change "13" to the number of letters in your text.
  9. Change the variable after "$link$ =" to something like $create_my_menu$ // Remember this.
  10. Compile it!! .bat file:// Do it twice

    Code: Select all

    qb2.exe -c game.txt
How to make the submenu:


  1. Decompile debugmenu.qb by making a .bat file:

    Code: Select all

    qb2.exe -d debugmenu.qb > debugmenu.txt
  2. Run it! Open "debugmenu.txt" in Notepad.
  3. Take this piece of code and paste it right under "$parent$ = $contain1$$child$ = $menu_test2$"
:u(02:00000018)$createmenu$:s{$type$ = call $verticalmenu$ arguments
$id$ = $create_my_menu$$x$ = %f(160.000000)$y$ = %f(112.000000)$w$ = %f(300.000000)$h$ = %f(400.000000)$blue_top$$children$ = :a{
:s{$type$ = $textmenuelement$$auto_id$$text$ = %s(7,"My menu")$static$$dont_gray$$drawer$ = $title$:s}
:s{$type$ = $textmenuelement$$id$ = $submenuitem_id$$text$ = %s(14,"Submenu item 1")$link$ = $new_menu$:s}:a}:s}
:u(02:00000019)call $attachchild$ arguments
$parent$ = $contain1$$child$ = $create_my_menu$
X = This MUST be the same as the "link" variable.
X = This is the text that appears on top of the screen.
X = If you want to add a link from this item, (Goto Step 9 in "How to make a link?")
X = This is the ID of your menuitem, (Goto Step 6 in "How to make a link?")
X = This is the text for your menuitem
X = !VERY IMPORTANT! This MUST be the same as the id , ex. $create_my_menu$
X = Remember to count the letters



If you want to add a new item to your menu paste this behind " :s{$type$"
:s{$type$ = $textmenuelement$$id$ = $submenuitem_id$$text$ = %s(14,"Submenu item 1")$link$ = $new_menu$:s}




Compile it!! .bat file:
// Do it twice

Code: Select all

qb2.exe -c debugmenu.txt
I like colors....


~MORTEN1337
[/size]

Lalita
Posts: 15
Joined: Tue Mar 16, 2010 5:18 am

Re: [TUROTIAL: Thps3]Make a simple menu

Post by Lalita » Sat Mar 20, 2010 4:24 am

Does anyone wanna make a in-games slap on/off menu? It would be pretty sick, like a bit like the other mods you press grab grab grab and then its just a slap menu, if anyone wants to just reply :P

Post Reply