Modifying the Shop, Defuser, C4 and Hostage Icons

A Tutorial for Counter-Strike: Source

Yo, buddy. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending natko points.
  • Post: Give natko your thoughts on this Tutorial.
  • Vote: Help natko win the Monthly Awards.
  • Rate: Give this Tutorial a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Tutorial.
  • Watch: Get notified when this Tutorial is updated.
Mascot

Join the community!

Sign up

Already a Bananite? Login

Sections Why these are different A warning on the tools and knowledge required What to adjust Moving Glyphs Save the file and edit the clientscheme.res The hudlayout.res edits Why these are different. These icons... Shopping cart, C4 Defuse kit and Hostage zone icon behave differently from the other icons like the HudAmmo and HudAccount, you can place a background on those by placing in "bgcolor\_override" "0 0 0 96" in those sections but you will see a problem... The icons sit on the left side and unfortunately there is no adjustment in the hudlayout.res for the shopping, C4, defuse kit and Hostage area icons. The other Hud icons do have adjustments [like in this step](http://css.gamebanana.com/tuts/11262#hudnumberadjust ""), there is no "icon_xpos" and "icon_ypos" setting to adjust... However, by manipulating a font file it is possible to get the background neat and a nice border around it... As always why not download the files I used as you look through the tutorial? [They are here](http://files.gamebanana.com/bitpit/insanes_css_hud_tutorial_icon_backg.zip ""), based on my Blue tutorial HUD at the fonts adjustment level. A warning on the tools and knowledge required. We need to copy the cstrike\resource\cstrike.ttf file and place it in cstrike\custom\tut_hud\resource. What we are going to do is adjust the position of the Glyph's and give a bit of space so the character has a bit of space for the background. If you missed the step on [how to modify a font file I urge you to read that first](http://css.gamebanana.com/tuts/11263 ""), playing with these is harder than you think but if you have the right tools it is not so bad. What to adjust. First open the cstrike\custom\tut_hud\resource\cstrike.ttf file with your font editor, it is trail and error on the positions and it may take you a few goes, I have a guide below on what I did to my file, you may want to do it differently. One thing you will need to know is how to move a Glyph using the aforementioned [Type light 3.1](http://www.cr8software.net/typelight.html "") - (a freeware OpenType font editor). Moving Glyphs in this editor is not simple but here is the trick. Step One: Using the select tool, highlight the whole Glyph, now pick one of the points, get your mouse cursor pinpointed on it, right click and a menu pops up. select "Move". Step Two: The Move Points box has some "X" (left to right) and "Y" (up and down) adjustments, pick the "Relative (x,y):" boxes, "X" is the left box and "Y" is the right one, place in your desired amount and move the Glyph... So now you know how to move the Glyph here is how much I moved mine to get a nice border around them... Shopping Icon: Glyph 14 (Character c) moved to the left about 100 units and up 100 units. Hostage zone: Glyph 18 (Character g) this was enlarged slightly and moved to around the same as the shopping icon, up and to the left around 100 units. C4 icon: Glyph 21 (Character 21) re-sized this to a more square shape to match the other icons moved this up around 150 units and moved it about 50 units to the left. Defuse Kit: Glyph 17 (Character f) moved around the same as the shopping icon but made this a icon like the shopping icon, a frame and the pliers are now a see through shape using the copied Glyph from Glyph 59 (Character n). Save the file and edit the clientscheme.res. This is repeated from another Tutorial in case you forgot or missed it. First a warning: The VALVe font file names must never be used as a custom file name, the reason is that when the game starts it will detect a file that is changed and replace it with the default file from the game files. You can override this and make it read only... don't bother, it will have problems if you give it to someone else, just rename it correctly as shown below. You have now changed a VALVe TTF file, you should place some embedded info' into the file before you save, click "Font" and select "Names". A box pops up and you can fill it in, change what is there because you don't want to confuse this with VALVe's normal cstrike.ttf file (NOTE: image is from another tutorial names will be different, I used "Counter-Strike_two" for the "Full name" adjusted the copyright info' and left everything else the same)... Save the file now, ("File" "save as") and call it what you called it in "Full name" field, I called my new file cstrike_two.tff but the real name to use in the clientscheme.res will be "Counter-Strike_two", you have to watch that with font files, the embeded info' is important! How to get the game to use the new font. The next part of the customization requires a couple of quick edits to the clientscheme.res file, [you can read here on how to get that file](http://css.gamebanana.com/tuts/10676#howandwhere "") but I will use [my tutorial file](http://files.gamebanana.com/bitpit/insanes_css_hud_tutorial_fonts_3.zip "") set from the previous pages.
Open the clientscheme.res, the first step is to add the whole font, down the bottom of the file there is the "CUSTOM FONT FILES" section, add it like the others in this format and adjust the "Icons" and the "IconsSmall" fonts in the fonts section... The hudlayout.res edits. Now you have the new font in, time to edit the sections in hudlayout.res, add the background color code "bgcolor_override" "0 0 0 96" in each section, adjust the "xpos" and "ypos" of each section "on the fly" [as described in this section of the tutorial](http://css.gamebanana.com/tuts/11262#hudnumberadjust "") using the command "hud_reloadscheme". Here are my edits after I added and adjusted the sections...
    }
    HudShoppingCart
    {
        "fieldName" "HudShoppingCart"
        "xpos"    "5"  //"64"
        "ypos"    "230" //"240"
        "zpos"    "1"        
        "wide"    "26"
        "tall"  "26"
        "visible" "1"
        "enabled" "1"
        "bgcolor_override"        "0 0 0 96"
        "PaintBackgroundType"    "2"
        "IconColor"            "HudIcon_Green"    
    }
    HudC4
    {
        "fieldName" "HudC4"
        "xpos"    "5"  //"16"
        "ypos"    "260" //"240"
        "wide"    "26"
        "tall"  "26"
        "visible" "1"
        "enabled" "1"
        "bgcolor_override"        "0 0 0 96"
        "PaintBackgroundType"    "2"
        "IconColor"            "HudIcon_Green"
        "FlashColor"        "HudIcon_Red"
    }
    
    HudDefuser
    {
        "fieldName" "HudDefuser"
        "xpos"    "5"  //"16"
        "ypos"    "260" //"240"
        "wide"    "26"
        "tall"  "26"
        "visible" "1"
        "enabled" "1"
        "bgcolor_override"        "0 0 0 96"
        "PaintBackgroundType"    "2"
        "IconColor"                "HudIcon_Green"
    }
    HudHostageRescueZone
    {
        "fieldName" "HudHostageRescueZone"
        "xpos"    "5"  //"16"
        "ypos"    "260" //"240"
        "wide"    "26"
        "tall"  "26"
        "visible" "1"
        "enabled" "1"
        "bgcolor_override"        "0 0 0 96"
        "PaintBackgroundType"    "2"        
        "IconColor"            "HudIcon_Green"
        "FlashColor"        "HudIcon_Red"
    }

Posts

None found

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share

Credits

Key Authors
dodbits

Submitter

natko avatar
natko avatar Offline
Admin Joined 16y
266,811 points Ranked 11th
56 medals 10 legendary 14 rare
  • Achieved Admin clearance Medal icon
  • 10 years a member Medal icon
  • Submitted 100 Skins Medal icon
  • Submitted 15 Tools Medal icon
  • Submitted 50 Gamefiles Medal icon
  • Submitted 30 Tutorials Medal icon

natko avatar
natko

Redistributor
Are you the owner? Request Ownership
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Category

Details

Difficulty Level
Beginner Difficulty

Attributes

Stats

Posts
0
Views
3,914
Date Added
4y
Date Modified
3y
bcp.crwdcntrl.net tracking pixel