New Features

This section will show how to modify the CGame module to add new scripted features to it. Each feature is independant of any others but they all require that the scripted HUD be activated in the source code. As always, you must have the latest UI source code in your source tree in order for these features to compile and work correctly. This is critical. Get the source code from the Downloads page before adding anything from this section.

Custom Scripted Loading Screen

When you start or join a game (and are using scripted menus) you first see displayed on the screen the connect menu. This remains there until the client starts to initialize and the screen display is replaced by the Levelshot graphic for the map. As the client initializes, Quake 3 places a variety of text and graphics over top of this graphic to indicate that loading is taking place. The feature we will be adding here is a scripted menu replacement for the client initializing screen. Using this, you can have a custom loading screen that matches the theme of your mod. There are a number of new commands specific to this feature, including progress bars showing the state of the media loading. And the best part is that, if you don't specifically load the Loading Screen menu, the program defaults to the standard Quake 3 loading screen. The code changes to implement this feature can be found on the Loading Screen Code page and a tutorial on how to use the new commands to create the screen is found on the Custom Loading Screen page.

Area Powerup Modification

When drawing the Area Powerups in the Hud it is annoying in the way the time left on the powerup is displayed. Regardless of the orientation of the drawing, the time amount is drawn to the right of the powerup graphic. This can require a large amount of screen space to display the powerups and generally doesn't look all that good. The modification featured here changes this so the time left is drawn over top of the graphic, making it a neat package that is much easier to place on the screen. No changes to the item that is used to display the Area Powerups is required so there are no script changes or incompatabilities introduced. The code changes to implement this feature can be found on the Area Powerup Code page.

Completing the Hud

The stock Team Arena scripted Hud does not give you complete scripting control of everything drawn on the screen during game play. There are a number of things placed on the screen, such as the console text and the timer, that can not be modified by the Hud script. In this tutorial we will extend the scripted Hud to include new commands that will give you complete control over every item drawn on the screen. And best of all, they can be enabled or disabled individually so you only need to script those areas you are interested in. When these extensions are all disabled (the default state) the Hud acts just like the stock TA scripted Hud. The code changes to implement this feature can be found on the Hud Completion Code page and the tutorial explaining how to use the new commands is found on the Hud Completion page.

Fixing Some Alignment Issues

A somewhat annoying feature of the Team Arena scripted Hud is the lack of formatting control over most ownerdraw text commands. These commands draw their text as centered horizontally in the item window and don't allow you to change that. This tutorial will show how to modify several of these commands so they use the align command to specify their text format alignment. The code changes to implement this feature can be found on the Alignment Issue Code page and the tutorial explaining how to use this feature is found on the Alignment Issue page.

Return to Home Page