Enter Amount

Day of Defeat:Source Bots install Guide
Steam Guide to install bots for Day of Defeat: Source
INsanes GUI and HUD for Day of Defeat: Source
Get the best DoD:S HUD
Please keep dodbits alive - Donate!

Objective Icons

updated steampipeSections


Basic description of the objective icons:
The scripts\hudlayout.res "HudObjectiveIcons" section holds most of the settings for the objective icons that most authors will want to use for customization.
However there are three more files depending on how much you want to do...
  • resource\clientscheme.res of course for fonts 
  • scripts\mod_textures.txt file for customizing objective icons in custom maps that have the icons embedded in .bsp file. It has non-technical "community" issues, read the rant below.
  • scripts\hudanimations.txt file for fooling with how they animate, shrinking and growing and whatever else you want when those two animations are called by the engine.
  • dod_pak_dir.vpk ... root\materials\sprites\obj_icons folder has around 86 small files for allies, axis and neutral icons

I don't normally use all those to their full custom capabilities, I did once make a heap of custom icons for a HUD that changed all icons both VALVe and the popular custom maps, boy it is a lot of work and at the end of it most orangebox servers had whitelists that would stop any person using a scripts\mod_textures.txt file.

The mod_textures.txt file is harmless and if allowed is a great file to customize font images and images in the HUD... that is images ONLY used in the HUD... it cannot display a invisible wall or other "world" textures... just the HUD !


Modifying the objective icons: Mostly you will just need to edit the scripts\hudlayout.res "HudObjectiveIcons" section...

        "fieldName"                "HudObjectiveIcons"
        "xpos"                    "0"
        "ypos"                    "0"
        "wide"                    "600"
        "tall"                    "200"
        "visible"                "1"
        "enabled"                "1"
        "iconsize"                "24"
        "icon_start_x"            "15"
        "icon_start_y"            "15"
        "separator_width"        "5"        // distance between the icons (including their backgrounds)
        "CornerCutSize"            "5"
        "BackgroundOverlap"        "4"        // amount the background overlaps the icons (width and height)
        "TimerBG"                "HudPanelObjectivesTimer"
        "TimerBG_Flash"            "HudPanelObjectivesTimer_Flash"
        "TimerFont"                "DefaultLarge"
        "time_added_height"        "12"

This panel is like a few others in the hudlayout.res not only defining the area for the panel to display in but also a lot of settings that change quite a few items inside the panel.

These are some basic ones that define the panel...

        "xpos"          "0"     - The top left corner of the panel, positions the panel at the left.
        "ypos"          "0"     - The top left corner of the panel, positions the panel at the top.
        "wide"         "600"  - The width allowed for the panel to display in, 600 is a bit much, 450 should be enough
        "tall"           "200"   - The height allowed for the panel to display in.
        "visible"       "1"      - "0" should make this invisible... but it does not
        "enabled"     "1"     - "0" should disable this... but it does not

 The ones below can adjust the items around and the objective icons themselves...

        "iconsize"                   "24"  -    The icon width and height
        "icon_start_x"             "15"  -   Left edge of the icon to the left of the screen (does not include background)
        "icon_start_y"             "15"  -   Top edge of the icon to the top of the screen (does not include background)
        "separator_width"       "5"    -   The distance between the icons (includes their backgrounds)
        "CornerCutSize"          "5"    -   The background boarder of the last icon gets a cut "0" make it square.
        "BackgroundOverlap"   "4"    -   The amount the background overlaps the icons (width and height)

 The ones below can adjust the timer panel items...

        "TimerBG"              "HudPanelObjectivesTimer"            - The color of the timer BG.  Line 53 clientscheme.res
        "TimerBG_Flash"    "HudPanelObjectivesTimer_Flash"   - The color of the timer BG flash.  Line 54 clientscheme.res
        "TimerFont"               "DefaultLarge"                           - The Font of the timer.  Line 54 clientscheme.res
        "time_added_height"   "12"                                         - The height of time added section.

 US Flag and Iron Cross Icons

Displaying custom objective icons: There are a couple of reasons you would want to do this, say you have a mod to your HUD files that changes the US Army from a US green and white star to a 48 star look, you have changed all the player skins, sounds and HUD items...what about the objective icons!!!

It is possible but a pain to do. The old dod and dod:s file structure was set out to look in the dod/materials/sprites/obj_icons, now if you placed a icon with a 48 US star flag instead of a US single white star flag icon, with the same name but different graphics, in that folder it would over-ride what the mapper and the game intended to display.
In one of the many "improvement" updates to the orangebox engine and kept in SteamPipe, this has now changed.
At first this looked impossible after orangebox, it is possible but is now quite a big task to do, you now have to tell the game files via a entry into the dod/scripts/mod_texture.txt file as well as make new images for every icon of every objective icon VALVe has made as well as all custom map icons and any new new ones yet to be made!!!
That's why a lot of people who used to make this stuff...stopped doing it. It's just too hard now.
But... if you want to try here is the outline of what you need to do.....
  • Extract the files from the .bsp file using "Packrat
  • Take note of the files addresses in packrat, these are also mentioned in the .VMT file.
  • Modify the vtf custom file, place in folders the same as mentioned in the .bsp or VMT files.
  •  All will work When the file is mentioned in the dod/scripts/mod_textures file...



        "icon_obj_allies"   //standard mod_textures entry
            "file"    "sprites/obj_icons/icon_obj_allies"
            "x"        "0"
            "y"        "0"
            "width"        "64"
            "height"    "64"

        "icon_obj_axis"    //standard mod_textures entry
            "file"    "sprites/obj_icons/icon_obj_axis"
            "x"        "0"
            "y"        "0"
            "width"        "64"
            "height"    "64"

        "icon_obj_oak_allies" //******dod_churchyard_b5*******
            "file"    "sprites/obj_icons/dod_churchyard/icon_obj_oak_allies"
            "x"        "0"
            "y"        "0"
            "width"        "64"
            "height"    "64"

"icon_obj_oak_allies"  is the allied icon for the Oak tree in dod_churchyard_b5. You also need to add the axis icon and the if there is a special neutral flag it needs to be in the mod_textures.txt file too.

You get the idea, Are you sure you wnat to make all those icons for all those custom maps? There are other issues with this too. Sometimes a mapper will use a icon that is already in the custom set..


The dod_flurry_b1 and dod_flurry_b2 problem: dod_flurry_b1 and dod_flurry_b2 did not work with this method and I thought it was a couple of things but here is one thing in the VMT file....


"$translucent" 1
"$baseTexture" "sprites/obj_icons/flurry/icon_obj_88_allies"
"$vertexcolor" 1
"$no_fullbright" 1
"$ignorez" 1


The "$baseTexture" address should be ... "sprites\...." (the slash is wrong.)


"$baseTexture" "sprites\obj_icons/flurry/icon_obj_88_allies"


Also it may be that the mod-texture.txt file will only accept one instance of "icon_obj_88_allies" a file name also used by other maps....
dod_anvil, dod_harbor_rc1, dod_flak_b6, dod_strand_rc1 and b4

With all of those maps above I can get the custom icons for the "icon_obj_88..." to work... because the VMT file is correct and the folder used is dod\materials\sprites\obj_icons.

What does this mean? dod_flurry_b1 and dod_flurry_b2 had to go unsupported as there
were more mapps sharing the same icon.

You cannot have two icon names "icon_obj_88_allies" going to two "file" addresses. The situation below is two "icon_obj_88_allies" entries, this does not Work!


"icon_obj_88_allies" //******dod_flurry_b1 and b2*******
"file" "sprites/obj_icons/fluffy/icon_obj_88_allies" //different folder
"x" "0"
"y" "0"
"width" "64"
"height" "64"

"icon_obj_88_allies" //******dod_anvil, dod_harbor_rc1, dod_flak_b6, dod_strand_rc1/b4
"file" "sprites/obj_icons/icon_obj_88_allies"
"x" "0"
"y" "0"
"width" "64"
"height" "64"

A situation like this cannot be fixed (I can't find a way, tell me if you have)
you are forced to pick between the two and remove on of the enitities in the
mod-textures file.

In this case I deleted the entry for dod_flurry_b1 and b2 because the other entry supports more maps.

This broke my heart... dod_flurry_b1 and b2 are my favorites :(

Damn...you read all that... dude! is that hard or what... much easier to just place a image and over-ride the image file!!! But those days are gone, you now need to do the above.

Do you really want to go to all that hassle!

dodbits.com Copyright © 2014. All Rights Reserved.