[Logo]
 
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
TUTORIAL: How to change the scoreboard  XML
Forum Index -> UT3 RPG
Author Message
BattleMode

Rampage
[Avatar]

Joined: 11/14/2007 01:35:49
Messages: 126
Offline

(This will be useful for things like adding RPG Levels to the scoreboard, I think that is a nicer solution then a hidden screen somewhere, I think this is also useful for modifying the HUD and adding things like XP and Mana, but that part needs some more research)

Pfhoenix wrote:
This may be asking much, but the community could really use even a single page walkthrough of modifying the scoreboards as you did with BattleMod. Good stuff, though, and we'll see how Epic fixes UI handling later on. 
I will try to do that.

BattleMOD can be found here: http://www.onsrpg.com/ut3mods.php all source code is included a screenshot is there as well. One of the things it does is change the scoreboard to add PPH. I will try to make a step by step on how to do this with probably a few tiny mistakes.

First it is necessary to understand how the PPH gets on the screen.
- A player has a HUD
- The HUD contains a UI Scene
- The UI Scene refers to the scoreboard class
- The scoreboard class puts the text on the screen

So to get the PPH to the screen all those things have to be changed.

STEP 1
First you need to uncook UI_Scenes_Scoreboards.upk with the UT3 editor since this one contains the 5 (!) UI Scenes which need to be changed. Instructions on how to uncook can be found here: http://utforums.epicgames.com/showthread.php?t=585462

STEP 2
I copied the entire uncooked UI_Scenes_Scoreboards.upk and named it UI_Scenes_Scoreboards_BM.upk. Each UI Scene contains multiple panels. E.g. a VCTF UI Scene has a panel for RED and a panel for BLUE players. The panels refer to the scoreboard classes.

STEP 3
You need to create the custom scoreboard panels (e.g. BattleCTFScoreboardPanel as derived from UTCTFScoreboardPanel), compile them and publish them (unpublished doesn't work) BEFORE you start editing the UI_Scenes_Scoreboards_BM.upk. Otherwise you will refer to a non existing class which will make the UT3 Editor crash. You learn to save often very quickly. See my mod for the exact source code for the panels.

STEP 4
The simplest way to change the class the panel refers to is to copy the panel to the clipboard, paste in into notepad, replace the class, delete the original panel, copy the notepad version to the clipboard and paste it back into the UT3 Editor. It's a tad tricky to get the new panel to the exact same position the old one came from. I did this by copying the coordinates to the clipboard before I removed the old one and pasting them back for the new one. You will need to try this to completely understand. An example replacement is to replace UTCTFScoreboardPanel with BattleCTFScoreboardPanel (just like there are multiple UI Scenes there are also multiple scoreboard panels).

STEP 5
Now you need to make custom HUDs refering to the custom UI Scenes. Like BattleCTFHUD derived from UTCTFHUD containing a property like ScoreboardSceneTemplate=Scoreboard_CTF'UI_Scenes_Scoreboards_BM.sbCTF' to make it refer to the new scoreboard. Just like you needed a bunch of scoreboard panels and a bunch of UI Scenes, you need a bunch of HUDs.

STEP 6
Now you need to get the game to actually use the HUD. In the ModifyPlayer of the mutator you call things like PC.ClientSetHUD (Class'BattleOnslaughtHUD', Worldinfo.Game.Scoreboardtype); to replace the HUD. Again you need to do this for all those different HUDs for all different gametypes. For details see the source code.

You also need to call UTPC.LoadSettingsFromProfile (True); to make it all work properly, without that the HUD will do funny things. I am not entirely sure but I figure this properly initializes your brand new HUD. It was one of those try everything until it works things.

STEP 7
The funny thing is STEP 1 - STEP 6 only prepared for the real thing. Now you can start hacking nice things into your custom scoreboards (e.g. BattleCTFScoreboardPanel) to do things like adding PPH.

WARNING: There is a bug in UT3 (which I reported and Epic promised to fix: http://utforums.epicgames.com/showthread.php?p=25126917) which prevents proper usage of a autodownloaded custom UI Scene.
 
Forum Index -> UT3 RPG
Go to: