Win Panels

updated steampipeSections

Basic description of the win panels

The files for the win panels

Testing tips for the win panels

Making basic changes in the win panel

The hudlayout.res adjustments

The "win_allies.res" and "win_axis.res" adjustments

The special fonts with INsanes custom small panels


Basic description of the win panels: The panels display at the end of the round and hold many stats on who did what in the game, they were updated when the detonation mode came around to include avatars and of course the Det mode stuff.
The win panels are notoriously difficult to edit, they are even harder to explain but I will try. Be warned they will test your skills mainly because of the way they were set up, it is quite messy.
 
There are a few tips I can give you to ease the burden, it is a matter of knowing what the files do and how to set them up to see the edits, the next couple of sections are a must read if you are serious about altering these!

The files for the win panels: There are four files involved in editing the win panels...
  1. scripts\hudlayout.res - This has two sections about 3/4 down the file, "WinPanel_Allies" and "WinPanel_Axis" these define the area the panels display in and positions of icons.
  2. resource\ui\win_allies.res - This controls the Allied panel size, some titles, avatars, timer info, and positions of the player info that gets inserted beside each "category" like most kills, caps, defend, bombs.
  3. resource\ui\win_axis.res - This controls the Axis panel size, some titles, avatars, timer info, and positions of the player info that gets inserted beside each "category" like most kills, caps, defend, bombs.
  4. resource\clientscheme.res - Optional. This controls the fonts. Normally they will be OK but if you intend to shrink them you may need to edit and add some fonts.

The images used can be found in dod\dod_pak_dir.vpk  - root\materials\sprites\hud are ...

Win panels icons

The two big team flag icons are in \materials\sprites\obj_icons (the standard allies or axis objective icons). They are not defined as a file address in the files that control this area but they can be resized and moved or disabled via editing the hudlayout.res  "WinPanel_Allies" and "WinPanel_Axis" sections.

To disable them look for "icon_w" and "icon_h" and make the values "0".

Code:
        "icon_w"                "0"
        "icon_h"                "0"   

The avatars...well they are yours and others on the server.


 

Testing tips for the win panels: While editing the panels the first frustrating thing you will notice is looking at the many changes you have to do, they are a "end of round" panel so only display at the end after the game engine has collected a heap of statistics! Never fear CVAR's are here!
 
The dev's obviously had the same issue and got so pissed off when making the new detonation mode... I think they made a CVAR to test the panel and all its items to stop going nuts !
 
dod_test_winpanel is a command used on a listen server with cheats enabled. You can place this in your autoexec.cfg file...
Code:
//Test the winpanel
bind "KP_PGDN" "sv_cheats 1; dod_test_winpanel"
Use it, (Press the keypad PgDn key while in game on any map) to test, it only has Detonation mode and only effects Allied files but the panel it produces has all the entries you need the CTF, (capture the flag) and Detonation modes ...
 
Win panels DET
dod_test_winpanel command and the test Detonation mode panel
 
There is another item we can use to see the changes more clearly, temporarily add a faint white background to highlight the areas titles and names fit into, I found it possible ...but very difficult to make these panels without the highlight. This will ensure you don't overlap two items, handy when working on small panels with items very close together.
 
To apply this temporary background...
  1. Open resource\clientscheme.res and go to around line 130 and find...      Label.BgColor    "Blank"
  2. Change "Blank" to a dull white color ...  Label.BgColor        "255 255 255 20"   //"Blank"
  3. Press the bind keypad "3" PgDn and look...
Win panels DET hlt
dod_test_winpanel command and the test mode panel with highlighted titles and text areas

As you can see there even the devs make errors. Look at the huge area set aside for the titles "Most Bombs Detonated" and "Most area captures", they are freaking huge!

I know you are getting eager at this stage to do some actual edits but there is still a lot more to know yet. We will benefit by looking at and fixing that error they made, it will show you a lot about positioning the many titles in this complex panel.

I take it you have read some of my tips on editing the HUD? If not add the binds I have in this section, I will refer to them constantly in the next section.


Making basic changes in the win panel: Lets take that dev error on the title and fix it.
  1. Go to resource\ui\win_allies.res, open and find around line 151 "LeftCategoryHeader"
  2. Look at the "tall" setting, change to "12" and save the file.
  3. Start a game in windowed mode so you can edit on the fly, you will notice it is now better but lets move it up too.
  4. Press your title key "~" and go back to the file, change the "ypos" to "77" save the file.
  5. Resume the game and press the keypad END "1" key, and then the keypad PgDn "3" key.

What you just did there was edit "on the fly", VERY important to understand how to do this as editing will take too long with out it. Your image should look like this, note the now different LeftCategoryHeader or Most Bombs Detonated title...

Win panels DET edited
Edited result of the "LeftCategoryHeader" using "on the fly" in game editing

OK... now just pause a bit and look at another thing, see how the text within that area is aligned?
Now check the "LeftCategoryHeader" section again, find "textAlignment" there are ways of pushing around the text so it draws from that point...  

  • "north"  the very top of the area. 
  • "south" it would be sitting on the bottom of the area.
  • "east" the text would sit over the right side. (Like the "Winning Bomb Planter" title)
  • "west" it would sit over to the left side. (Like the "Winning Bomb Planter" player name)

Now we can move to another part of editing these panels, repeating the changes from one side of the Allied panel and then applying that to the almost cloned Axis panel file.

  1. Go to the "RightCategoryHeader" section and change "tall" to "12" and "ypos" to "77"
  2. Do the same for the resource\ui\win_axis.res on the same sections and save both files.

You can now see why these are a pain. A very crowded panel and two of them to edit... with the things like icons adjustment in the scripts\hudlayout.res and other items in the resource\ui\win_allies.res and resource\ui\win_axis.res.

But with those methods above at least I have given you the best chance in at least finding and trying different things to see how to adjust and do it quickly...well quicker anyway.

A word of warning about the "on the fly" adjustment technique, you can move around items and change only certain things, anything involving colors, (the clientscheme.res) you will find it will not change, a restart of a map will not help either and may make the other panels not respond like buttons on them. This is normal, some edits require a game restart as those items are in files loaded at the game start, just edit, save the file, start a game and look for the change.


 

The hudlayout.res adjustments: there are al lot of settings in the two sections of this file "WinPanel_Allies" and "WinPanel_Axis".

There is  a small problem with the "icon_left_stat...." series of entries, they must be an old entry for the x and y adjustments and do not respond to edits. They now follow the items in win_allies.res and win_axis.res files found in resource\ui folder.

These "dud" entries in "WinPanel_Allies" and "WinPanel_Axis" sections are ...

Code:
        "icon_left_stat_x"            "90" 
        "icon_left_stat_y1"           "96"
        "icon_left_stat_y2"           "107"
        "icon_left_stat_y3"           "118"
        "icon_right_stat_x"           "230"
        "icon_right_stat_y1"        "96"
        "icon_right_stat_y2"         "107"
        "icon_right_stat_y3"         "118"

The others above that in "WinPanel_Allies" and "WinPanel_Axis" do respond to alterations....

Code:
WinPanel_Allies
    {
        "fieldName"                "WinPanel_Allies"
        "visible"                 "1"
        "enabled"                 "1"
        "xpos"                    "c-150"
        "ypos"                    "255"
        "wide"                    "300"
        "tall"                     "155"
        "PaintBackgroundType"   "2"
        
        "icon_ypos"              "4"
        "icon_xpos_left"        "4"
        "icon_xpos_right"      "264"
        "icon_w"                "32"
        "icon_h"                 "32"    
        
        "icon_stat_size"         "12"

Here is an image of icon adjustments in the "WinPanel_Allies" and "WinPanel_Axis" section ...

Win panels icons adjust

 


 

Win panels sections

The "win_allies.res" and "win_axis.res" adjustments: Here is an image of adjustments in the "win_allies.res" and "win_axis.res" sections. The image is of the allied file but the Axis is a clone of this except for a few lines that deal with the text in some labels and the team icons.

Note there is another "dud" section in the two files, the "LastCapper" section should display the wining bomb planter or the last capper... it doe not and that task is handled by the "LastCapper_Avatar" and that players avatar is handled by the section "top_1_avatar".

Told you at the start these were confusing and messy !!!

 


 

 thumb_adjust_win_panel

The special fonts with INsanes custom small panels:

You should have enough now to make some adjustments by yourself just like the ones I do for my small HUD series.

By the way if you use my small win panels make sure you also place the special fonts, "WINFontMedium" and "WINFontSmall" I use in your clientscheme.res, it was the only way I could shrink the panel and fit long silly names in.

Here are the fonts to place in clientscheme.res "Fonts" section...

Code:
     }
        "WINFontMedium"
        {
            "1"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "15"
                "weight"    "400"
                "yres"    "480 599"
                "dropshadow"    "1"
                                "additive"    "0"
            }
            "2"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "16"
                "weight"    "400"
                "yres"    "600 767"
                "dropshadow"    "1"
                                "additive"    "0"
            }
            "3"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "17"
                "weight"    "400"
                "yres"    "768 1023"
                "dropshadow"    "1"
                                "additive"    "0"
            }
            "4"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "19"
                "weight"    "400"
                "yres"    "1024 1199"
                "dropshadow"    "1"
                                "additive"    "0"
            }
            "5"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "23"
                "weight"    "400"
                "yres"    "1200 10000"
                "dropshadow"    "1"
                                "additive"    "0"
            }
        }        
        "WINFontSmall" // New Font for smaller winpanels. Set this in Win_Allies.res and Win_Axis.res.
        {
            "1"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "11"
                "weight"    "400"
                "yres"    "480 599"
                "dropshadow"    "1"
                "additive"        "0"
            }
            "2"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "12"
                "weight"    "400"
                "yres"    "600 767"
                "dropshadow"    "1"
                "additive"        "0"
            }
            "3"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "13"
                "weight"    "400"
                "yres"    "768 1023"
                "dropshadow"    "1"
                "additive"        "0"
            }
            "4"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "15" //"15"
                "weight"    "400"
                "yres"    "1024 1199"
                "dropshadow"    "1"
                "additive"        "0"
            }
            "5"
            {
                "name"        "Microsoft Sans Serif"
                "tall"        "20"
                "weight"    "400"
                "yres"    "1200 10000"
                "dropshadow"    "1"
                "additive"        "0"
            }
        }

Enjoy!

Enter Amount

dodbits.com Copyright © 2011. All Rights Reserved.