sega 500 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Sega 500 PowerPoint Presentation
Download Presentation
Sega 500

Loading in 2 Seconds...

play fullscreen
1 / 64

Sega 500 - PowerPoint PPT Presentation

  • Uploaded on

Sega 500. A Near TC for the GUI. Jeff “Ezeikeil” Giles So far. We’ve covered the core ins and outs of the GUI system in UT2003. Changed the Menus. Got functionality. Today.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

Sega 500

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
sega 500

Sega 500

A Near TC for

the GUI

Jeff “Ezeikeil” Giles

so far
So far
  • We’ve covered the core ins and outs of the GUI system in UT2003.
  • Changed the Menus.
  • Got functionality .
  • The presentation is going to be a little light on the graphic site of things since the GUI doesn’t like to have it’s picture taken.
  • Also, I’m going focus on the functionality of the new stuff. Not really look at the specifics of previously seen GUI items.
the plan
The Plan
  • We’re going to overhaul the front end of UT2003 so that it doesn’t look or behave like anything even resembling UT.
  • Also, we’re going to make it run exclusively on a specific map, with a specific game type and mutator.
the plan1
The Plan
  • How our menu’s will relate:









getting started
Getting started
  • Our main menu is simply going to be a new background, text box and a button “begin” which takes us to the options screen.

class EzeMainMenu extends GUIPage;

main menu
Main Menu
  • The first big change is that we loaded some custom textures for the menus
  • One for the background, one for the button.

#exec texture IMPORT name=MAINMENU FILE=Textures\MainMenu.bmp

#exec texture IMPORT name=BEGIN FILE=Textures\Begin.bmp

main menu1
Main Menu

//begin button











//This menu's defaults








main menu2
Main Menu
  • Adding some functionality
  • We need something to happen when our button is clicked…e.g. something for the delegate to point to.
main menu3
Main Menu
  • This simply causes a menu to open if the controller in index 2 is the caller.

function bool ButtonClick(GUIComponent Sender)


//jump to next menu

if ( Sender==Controls[2] )


return true;


main menu4
Main Menu
  • We also trap the keyboard so the if escape is pressed, we can back out of the game.

function bool MyKeyEvent(out byte Key,out byte State,float delta)


if(Key == 0x1B && state == 1) // Escape pressed


return true;



return false;


main menu5
Main Menu
  • And just for fun, we add a scroll box to the screen which is initialized here…

var GUIScrollTextBox scrollbox;

function InitComponent(GUIController MyController, GUIComponent MyOwner)


super.InitComponent(MyController, MyOwner);


scrollbox.SetContent("Boo-ya!|Opening a can of whoop-ass",);


main menu6
Main Menu
  • And declared pretty much like any other button

Begin Object Class=GUIScrollTextBox Name=PlayerScroll








End Object


options menu
Options menu
  • Right, we’ve told our menu to open another menu, time to create that one.

class EzeMainMenu extends GUIPage;

options menu1
Options menu
  • Most of the contents of this page are pretty much the same, so no point in talking about them.
  • Really, the buttons have different pictures and locations, that’s about it…
options menu2
Options menu
  • The newness really lies in the functionality of the ButtonClick function.
options menu3
Options menu

function bool ButtonClick(GUIComponent Sender)


//Open Mutator menu

if ( Sender==Controls[3] )


//Begin Game

if ( Sender==Controls[1] )


Console(Controller.Master.Console).DelayedConsoleCommand("open DM-




return true;


options menu4
Options menu
  • So waz going down?
  • This simply opens a menu, just like we said a second ago.

//Open Mutator menu

if ( Sender==Controls[3] )


options menu5
Options menu
  • But this is a bit different
  • Nut Shell?...It opens our level and closes the menu…

//Begin Game

if ( Sender==Controls[1] )


Console(Controller.Master.Console).DelayedConsoleCommand("open DM-



options menu6
Options menu
  • DelayedConsoleCommand accepts a string which is parsed buy the ‘?’ is used to determine how the game runs.

"open DM-Antalus?Mutator=eze.adrenalinbounce?numbots=4");

  • Which map to open, use a mutator and the number of bots.
using our menu
Using our menu
  • So, how to we get UT to use OUR menu?
  • Not hard, but it does take another file and a mod to the UT2003.ini
using our menu1
Using our menu
  • Here’s the whole file
  • Simply specify which menu class to use…

class EzeGames extends GameEngine;





using our menu2
Using our menu
  • And now in the UT2003.ini we make a change to this line.




using our menu3
Using our menu
  • Replace with this
  • So if you run from a map it show up.
  • Yet the is a problem…




using our menu4
Using our menu
  • Our menu doesn’t show up on the 1st run.
  • No matter what

Here’s why…

using our menu5
Using our menu
  • Well, this is actually a level. A scripted sequence to be exact, which is running a unrealgame.cinematicgame.
  • If we open it (NvidiaLogo.ut2) up in the editor we’ll find a AIScript tag.
  • Once opened, here’s what you’ll find.
using our menu6
Using our menu
  • Under the AIScript tab
using our menu7
Using our menu
  • This causes a specific menu to open when the script is done.
  • Here’s my preferred solution:
  • Make a copy of this level. I called mine


using our menu8
Using our menu
  • And in this copy, point the script at our menu class.
using our menu9
Using our menu
  • Lastly, in the UT2003.ini. We tell UT to use OUR map too.



ProtocolDescription=Unreal Protocol




using our menu10
Using our menu
  • And, yeah. You can totally customize the intro map if you like.
using our menu11
Using our menu
  • Great! Your menu’s are now in place.
  • Time to waste hours of our lives figuring out where to place the buttons & stuff by yutzing with the X and Y coordinates…

There has to be a better way…

a better way
a better way…
  • Yeah…there is…
  • Here’s an snipit from an online forum by a fella named Dr.Sin…
  • You’ll need to be running the debug *.u’s for this by the way.
a better way1
a better way…
  • Just move you current *.u’s (the retail build) into a temp folder and dump the debugs into the system folder.

(if your at school, you should be good to go)

a better way2
a better way…
  • First things first… all mod authors please do the following:
    • In UT2003.ini look for the header [XInterface.GUIController]
    • Add this to the section: bModAuthor=true
a better way3
a better way…
  • This will unlock the GUI placement and debug code. Once there, at any GUI page you can do the following..
  • Press CTRL-ALT-D to enter design mode.

<Design mod???>

a better way4
a better way…
  • Hold CTRL and click on any control on the page. The GUI will highlight (from the outermost inward as you click) the different controls under the cursor.

<Dude…gota try this>

a better way5
a better way…
  • >OH….my god….debug info….for which menu the mouse is over….my god!<

<Dude…it gets better>

a better way6
a better way…
  • CTRL+Cursors move the controlCTRL+ -/= size YCTRL+ +/- size X
  • Holding ALT will size/move 5x faster.
  • Holding ALT will also allow you to move the control via the mouse.
a better way7
a better way…

>>> GASP!!! <<<

  • Wait, there’s more.
  • Press CTRL-C to copy the dimensions & position of the control to the clipboard.
a better way8
a better way…
  • Yes…you can cut and paste your screen coordinates.





a better way9
a better way…
  • And…yes…there is a god

>>>Thud!....passes out from shock and dismay…<<<

a better way10
a better way…
  • What Dr.Sin says about the GUI…

“Makes designing menus much easier.”

actually he says a bit more
Actually, he says a bit more…
  • A GUIPage is the main menu container that holds other menu components.
  • It's what the controller tracks on the top most level. To make a new menu, create a new page and start adding GUIComponents to it.
actually he says a bit more1
Actually, he says a bit more…
  • The GUIComponents get defined in the default props and need to be assigned in order to the Controls[x] array.
  • Word has is, Dr.Sin is someone at Epic.
  • Time to deal with the splash screen.
and that loading screen
And that loading screen…
  • Dealing with this fella is actually really easy once we get the EzeMainMenu in place…because, this file also specifies the loading page to use .
  • Just add yours…


and that loading screen1
And that loading screen…
  • But there is one slightly odd thing…The loading screen is derived from a vignette…and there isn’t a since doc in the code explaining what a vignette is in the context of UT

Figures don’t it?

and that loading screen2
And that loading screen…
  • Fortunately, it’s a very simple class made up of 2 functions:
  • And if you look at how it’s currently used in TestVignette.uc, you’ll see you can do all sorts of stuff with it…

simulated event Init();

simulated event DrawVignette( Canvas C, float Progress );

and that loading screen3
And that loading screen…
  • But, it really just boils down to displaying a picture and some text…but you can make it all snazzy if you like 
  • But keeping it simple, means we can pack everything into one function…
and that loading screen4
And that loading screen…

simulated event DrawVignette( Canvas C, float Progress )


c.DrawTile(Background, C.SizeX, C.SizeY, 0, 0, Background.USize, Background.VSize );

C.Style = ERenderStyle.STY_Alpha;

theFont =Font(DynamicLoadObject("UT2003Fonts.FontLarge", class'Font'));

C.Font = theFont;

C.DrawColor = c.MakeColor(255,128,0);

C.FontScaleX = 1;

C.FontScaleY = 1;

c.setpos(c.ClipX/7, c.clipY/4*3);

c.drawtext("Think you can take me?... Be-otch!");


and that loading screen5
And that loading screen…
  • Nothing complex, but does the job nicely…
  • Previously, we thought this image to be locked up in a dll.
  • Turns out it’s not. Just in an odd place.
  • Look in your ut2003\help directory.
  • Just open this up in Photoshop and have fun…
  • Ok, this isn’t really a programmer solution, but we should know about it.

And no. Image size doesn’t seem to matterGo big or go home!

that s a wrap
That’s a wrap
  • Et Voila! All the steps required to create your own total conversion of UT.
  • Hope this meets all your GUI needs.

But first…

a word to the wise
A word to the wise…
  • Before you lay into the overhauling the menu’s for UT, consider this first.
  • Just because you can, doesn’t mean you should.
a word to the wise1
A word to the wise…
  • What I mean by this is:
    • Modify the menu only where appropriate to do so.
    • There is no faster was to get people to stop playing your mod that Hosing their GUI!... Particularly if they feel this means a reinstall of UT!
a word to the wise2
A word to the wise…
  • This extends into even talking about the game art. Don’t graffiti up their stuff. Some people actually like the look of UT.
  • …despite how tempting the splash screen is, unless your doing a TC...leave it alone in your distribution.
a word to the wise3
A word to the wise…
  • For an example of very good moding a game and menu system…just look at how Half life was integrated with counterstrike…The mod played nicely with the existing system.
a word to the wise4
A word to the wise…
  • In addition to this, we already know how to get around this buy using command lines to specify which ini files to run.
  • And you can even take it one step further if you feel the need…all your assets and source code can be included in your own custom paths.
a word to the wise5
A word to the wise…

I’ll get off my soap box now…