how to Esc to a custom mod menu?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

chip

New Member
Nov 14, 2002
524
0
0
Visit site
i'm using the UT2K4 mod architecture (launching from User Mods) and have learned enough about the new GUI setup to at least get a custom main menu up & running. however, once i have the mod launched into a map, using Esc brings up the usual menu/tabs as seen in SP/IA UT2K4. when i choose an option such as Forfeit or Settings, the mod then acts just as if it was UT2K4, in terms of Back-ing out to the UT2K4 main menu. since i don't need the options in the standard Esc-sequence menu, i've been trying to make it so my mod's main menu comes up at that keystroke from within a map.

but i can't seem to find exactly where to make the change. based on code and comments i've found in various classes, i've tried specifying my menu in both my custom xPlayer subclass (MidGameMenuClass=) and my gametype class (LoginMenuClass=), but to no avail. Esc always brings up UT2K4PlayerLoginMenu (the standard UT2K4 "mid-game" menu from what i can tell).

could someone please point me in the proper direction for accomplishing this seemingly simple task?
 

Dash489

New Member
May 13, 2004
38
0
0
Check your mods User.ini for your mods player controller. The ini file overides stuff in script so you have to make sure its not setting it to the regular MidGameMenuClass. Hope that helps.
 

chip

New Member
Nov 14, 2002
524
0
0
Visit site
Dash489 said:
Check your mods User.ini for your mods player controller. The ini file overides stuff in script so you have to make sure its not setting it to the regular MidGameMenuClass. Hope that helps.
thanks, Dash, i'll see if there's anything in the ini that might be affecting the situation. i'm 99.44% sure that my custom PlayerController is in use, though, both through showdebug and because if it wasn't, the mod wouldn't work at all.
 

Dash489

New Member
May 13, 2004
38
0
0
chip said:
thanks, Dash, i'll see if there's anything in the ini that might be affecting the situation. i'm 99.44% sure that my custom PlayerController is in use, though, both through showdebug and because if it wasn't, the mod wouldn't work at all.

Just to clarify. I am pretty sure that you are using you playercontroller but in the Mod User ini file the MidGameMenuClass default property of your Mod's PlayerContoller (assuming there is one in your mods User ini file) might me set to the regular MidGameMenuClass.

In my mods User.ini
Code:
[CTA_Engine.CTA_Player]
bDebuggingVoiceChat=False
EnemyTurnSpeed=45000
InputClass=Engine.PlayerInput
[B]MidGameMenuClass=GUI2K4.UT2K4DisconnectOptionPage[/B]
DemoMenuClass=GUI2K4.UT2K4DemoPlayback
AdminMenuClass=GUI2K4.RemoteAdmin
ChatPasswordMenuClass=GUI2K4.UT2K4ChatPassword
 

chip

New Member
Nov 14, 2002
524
0
0
Visit site
yep, i misunderstood your first reference, being unfamiliar with the details of ini files, but i got it squared away after seeing how things were listed there. little by little i'm gettin' the hang of this :tup:

thx again for the tip. :D
 

Evil_J

New Member
Mar 4, 2004
12
0
0
How to setup the custom menu???

Hi, i am new to coding in ut2004, would it be possible for you to share with me on how you setup the custom menu. Would be appreciated..

Thanks
 

chip

New Member
Nov 14, 2002
524
0
0
Visit site
Evil_J said:
Hi, i am new to coding in ut2004, would it be possible for you to share with me on how you setup the custom menu. Would be appreciated..

Thanks

i used UDE to scope out the classes in GUI2K4, found by reading the scripts that i wanted to copy UT2K4MainMenu (kind of a duh ;) ). i subclassed UT2K4MainPage (parent of UT2K4MainMenu), copied all the script from UT2K4MainMenu into my new subclass, then just analyzed the script structures to see how the UT2004 main menu works. that gave me clues as to what does what, and after that it was a matter of editing out what i didn't need, and swapping in my values for those used by UT2004 -- mainly for the BackgroundImage, GUIImage and GUIButton variables and corresponding objects -- plus some tailoring of the float values for the animations and the default properties object declarations, to get the components in the right size & positions on my menu.

i'm not sure it's the "best" way to do it, but to launch from my menu, i used a duplicate of the UT2004 map NoIntro.ut2. the only functional actor in this map is a ScriptedTrigger that launches a menu as soon as the map's played. so in my duplicate i set the ScriptedTrigger's ACTION_GoToMenu target to my main menu class.

finally, in my MainMod.ini, i set the key LocalMap= to point to the duplicate of NoIntro.ut2 that i had made. this key specifies a map to launch at startup, so the map loads and the ScriptedTrigger immediately launches my menu.

one note: to keep UT2004 from spamming my mod system directory with .ucl files for maps the mod doesn't use, i commented out of my MainMod.ini the Paths=../Maps/*ut2 key. but for my mod to launch from the User Mods menu, this required placing a copy of the UT2004 map Entry.ut2 in my mod's Map directory. it seems that if the game can't find Entry.ut2 somewhere in the paths spec'd in your MainMod.ini, it'll crash with a GPF while launching.

i know there are LOTS of details not covered in this brief summary, but at least you have some starting points.
 

Evil_J

New Member
Mar 4, 2004
12
0
0
chip said:
i used UDE to scope out the classes in GUI2K4, found by reading the scripts that i wanted to copy UT2K4MainMenu (kind of a duh ;) ). i subclassed UT2K4MainPage (parent of UT2K4MainMenu), copied all the script from UT2K4MainMenu into my new subclass, then just analyzed the script structures to see how the UT2004 main menu works. that gave me clues as to what does what, and after that it was a matter of editing out what i didn't need, and swapping in my values for those used by UT2004 -- mainly for the BackgroundImage, GUIImage and GUIButton variables and corresponding objects -- plus some tailoring of the float values for the animations and the default properties object declarations, to get the components in the right size & positions on my menu.

i'm not sure it's the "best" way to do it, but to launch from my menu, i used a duplicate of the UT2004 map NoIntro.ut2. the only functional actor in this map is a ScriptedTrigger that launches a menu as soon as the map's played. so in my duplicate i set the ScriptedTrigger's ACTION_GoToMenu target to my main menu class.

finally, in my MainMod.ini, i set the key LocalMap= to point to the duplicate of NoIntro.ut2 that i had made. this key specifies a map to launch at startup, so the map loads and the ScriptedTrigger immediately launches my menu.

one note: to keep UT2004 from spamming my mod system directory with .ucl files for maps the mod doesn't use, i commented out of my MainMod.ini the Paths=../Maps/*ut2 key. but for my mod to launch from the User Mods menu, this required placing a copy of the UT2004 map Entry.ut2 in my mod's Map directory. it seems that if the game can't find Entry.ut2 somewhere in the paths spec'd in your MainMod.ini, it'll crash with a GPF while launching.

i know there are LOTS of details not covered in this brief summary, but at least you have some starting points.

Thanks alot mate, i will try that out... looks simple enough... but you never know when you can hit a dead end.... ;)