I will try to do that.Originally Posted by Pfhoenix
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.
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
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.
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.
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).
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_S coreboards_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.
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.
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.