cdg.net

Clan of the Dead Goat Forums
It is currently Fri Sep 03, 2010 4:45 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 269 posts ]  Go to page 1, 2, 3, 4, 5 ... 18  Next
Author Message
 Post subject: [CS:S] Custom Hud + tutorial *READ POSTS BEFORE ASKING!!!*
PostPosted: Wed Dec 29, 2004 10:12 pm 
Offline
Wise Old Man
User avatar

Joined: Wed Jul 07, 2004 6:29 pm
Posts: 1047
Location: Richmond BC
Ok.. here goes nothing.. if I miss anything.. my bad... and this is a long post since i am gona fit evrything needed in here. (sory to admin if this is considered as spam. i got a request from FatKid46 and ChineseWarrior)

Modding the HUD colours and fonts

Open up ClientScheme.res. it shud be in \counter-strike source\cstrike\resource

and you should see this:
Code:
//
// TRACKER SCHEME RESOURCE FILE
//
// sections:
//      colors         - all the colors used by the scheme
//      basesettings   - contains settings for app to use to draw controls
//      fonts         - list of all the fonts used by app
//      borders         - description of all the borders
//
//
Scheme
{
   //Name - currently overriden in code
   //{
   //   "Name"   "ClientScheme"
   //}

   //////////////////////// COLORS ///////////////////////////
   Colors
   {
      // base colors
      "Orange"         "255 176 0 255"
      "OrangeDim"         "255 176 0 120"
      "LightOrange"      "188 112 0 128"


now.. these are some of the default colours.. as you scroll down you see more colours... to define the colours, it goes by "red green blue". the last one im not sure of.. i think it has sumthin to do with the brightness.
ok, now to add colours.. just make a new line in and define the colours like this:
Code:
//////////////////////// COLORS ///////////////////////////
   Colors
   {
      // base colors
      "Orange"         "255 176 0 255"
      "OrangeDim"         "255 176 0 120"
      "LightOrange"      "188 112 0 128"

      "Green"            "12 255 0 255"
      "GreenDim"         "12 255 0 120"
      "LightGreen"      "0 188 13 128"

      "White"            "255 255 255 225"


as you can see, i added green and white. now that defining the colours is done.. you can now modify the colours of fonts, etc.

Below the colours section, there is something called Base Settings... this is where u change the colours for the HUD. I'm not sure which each one is.. but try changing colours around... see what you get in-game. try out every command like team change, radio or aiming at a hostie to show health to see what colours have been changed.
eg.
Code:
// CHudMenu
      "ItemColor"      "187 187 187 200"   // default 187 187 187 255
      "MenuColor"      "255 255 255 255"
      "MenuBoxBg"      "0 0 0 100"

      // weapon selection colors
      "SelectionNumberFg"      "187 187 187 200"
      "SelectionTextFg"      "255 0 0 200"
      "SelectionEmptyBoxBg"    "0 0 0 80"
      "SelectionBoxBg"       "0 0 0 80"
      "SelectionSelectedBoxBg" "0 0 0 190"

you will notice that you cant change the money colour and health. i will show you in a later section.
now.. to change fonts.
still in ClientScheme.res, there is a section below base settings known as fonts. here is where you can change all the in-game fonts. i am only gona talk about changing the numbers, since that is the only thing i changed. also... dont forget to install new fonts into ur fonts folder.
Code:
HudNumbersSmall
      {
         "1"
         {
            "name"      "Wide Glide"
            "tall"      "10"
            "weight"   "1000"
            "additive"   "1"
            "antialias" "1"
            "range"      "0x0000 0x017F"
         }
      }

      HudSelectionNumbers
      {
         "1"
         {
            "name"      "Wide Glide"
            "tall"      "11"
            "weight"   "700"
            "antialias" "1"
            "additive"   "1"
            "range"      "0x0000 0x017F" //   Basic Latin, Latin-1 Supplement, Latin Extended-A
         }
      }

"name" would be the name of the font.... "tall" defines the font size.
after changing the fonts, you may notice in-game that they might be misaligned. see my previous posts to see what happens.


Fixing font positioning and scripted colour changes

Open up HudLayout.res in \counter-strike source\cstrike\scripts.
you should be seeing this:
Code:
"Resource/HudLayout.res"
{
   HudHealth
   {
      "fieldName"      "HudHealth"
      "xpos"   "16"
      "ypos"   "440"
      "wide"   "132"
      "tall"  "40"
      "visible" "1"
      "enabled" "1"

ok.. since the numbers were misaligned in my experience... here's how to re-align them. first let's do the health counter. under "HudHealth" there is a line called "digit_ypos". change this number around.. the lower the number, the higher it will be and vice versa. do the same for HudArmor, HudSuit, HudRoundTimer, HudAccount, and HudAmmo. This should fix the number alignment problem.

colour changes can be modified in HudAnimations.txt. it's located in the scripts folder as well. you should see this when you open it:
Code:
// sample animation script
//
//
// commands:
//   Animate <panel name> <variable> <target value> <interpolator> <start time> <duration>
//      variables:
//         FgColor
//         BgColor
//         Position


to modify the money colour when money is removed or added, go to this line:
Code:
//activecolor - instantly turn red, fade back to green
event AccountMoneyRemoved
{
   Animate HudAccount      FgColor   "HudIcon_Red" Linear 0.0 0.0001
   Animate HudAccount      FgColor   "Green" Accel 0.0 3.0

   Animate   HudAccount      Ammo2Color "HudIcon_Red" Linear 0.0 0.0001
   Animate HudAccount      Ammo2Color "0 0 0 0" Accel 0.0 3.0
}

//activecolor - instantly turn white, fade back to green
event AccountMoneyAdded
{
   Animate HudAccount      FgColor   "White" Linear 0.0 0.0001
   Animate HudAccount      FgColor   "Green" Accel 0.0 3.0

   Animate HudAccount      Ammo2Color "HudIcon_Green" Accel 0.0 0.0001
   Animate HudAccount      Ammo2Color "0 0 0 0" Accel 0.0 3.0   
}

i changed some of the scripts alredy. since my i want my HUD to be green, set the second colour in each section to your desired colour. the colours defined here must be added in the ClientScheme.res. this is if you are using a custom colour. (see Modding the HUD colours)

now for the health. since i want the scripting default, like health turns red when low, i am gona change only one thing. go to this line. it shud be right below the money animations.
Code:
event HealthRestored
{
   Animate HudHealth      FgColor   "GreenDim"   Linear 0.0 0.01


change it to the desired colour. if all goes well, congratulations! you have successfully modded your HUD.



Modding the gun names
There are people like me who are annoyed by the gun names in CSS. I mean, I dont like calling the Deagle a "Night Hawk." so here's how you can change it.

open up "cstrike_english.txt" in \counter-strike source\cstrike\resource. this is a big .txt file. as you scroll down, you will notice you can change a variety of names. and, there is hint that there WILL be new player skins coming soon!! go to this line:
Code:
// pistols menu
"Cstrike_Select_Pistol"            "SELECT A PISTOL"
"Cstrike_Glock18"               "&1 GLOCK 18"
"Cstrike_USP45"               "&2 H&K USP 45"
"Cstrike_P228"               "&3 SIG P228"
"Cstrike_DesertEagle"            "&4 I.M.I. DESERT EAGLE .50AE"
"Cstrike_FiveSeven"            "&5 FN Five-seveN"
"Cstrike_Elites"               "&5 DUAL BERETTA 92G ELITE II"

as you can see, i alredy modified the names of the pistols. this shows up in the buy weapon menu. do the same for the shotguns, smg's, rifles, etc.

now.. for modifying the HUD weapon names. this is when hud_fastswitch is disabled and you see the weapon sprites when you change weapon. go to this line, it's at the very bottom:
Code:
"Cstrike_WPNHUD_AK47"         "AK-47"
"Cstrike_WPNHUD_Aug"         "STEYR AUG A1"
"Cstrike_WPNHUD_AWP"         "MAGNUM SNIPER RIFLE"
"Cstrike_WPNHUD_DesertEagle"      "IMI DEAGLE"
"Cstrike_WPNHUD_Elites"         "DUAL BERETTAS"
"Cstrike_WPNHUD_Famas"         "FAMAS F1"
"Cstrike_WPNHUD_FiveSeven"      "FN Five-seveN"
"Cstrike_WPNHUD_Flashbang"      "FLASHBANG"
"Cstrike_WPNHUD_G3SG1"         "H&K G3-SG1"
"Cstrike_WPNHUD_Galil"         "IMI GALIL"
"Cstrike_WPNHUD_Glock18"      "GLOCK 18"
"Cstrike_WPNHUD_HE_Grenade"      "HE GRENADE"


Change the names as desired. And that ends my long tutorial. Good luck, happy modding, and enjoy! :up:

*edit*
almost forgot to show the final product.
Image

My hud itself: *updated after new CT model came out. unfortunately, still unable to change text colours.*Download

Credits: Basic HUD modification help and weapon naming: Mike Palazzo
Animation modding and text alignment help: FatKid46
Compilation and script modding: Zonda_S

Crazy Chuckster's radar and time repositioned HUD can be dled here: http://www.cdg.net/forums/viewtopic.php?t=16413&start=120


Last edited by zonda_s on Fri Feb 25, 2005 6:29 am, edited 5 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 29, 2004 10:26 pm 
Offline
New born

Joined: Thu Sep 23, 2004 6:05 pm
Posts: 8
Location: England, Essex
exelent, nice work i was just waitin for this to be released =P and the tutorial is great!

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 29, 2004 11:07 pm 
Offline
New born

Joined: Wed Dec 29, 2004 9:00 pm
Posts: 8
hey man ty i got it all worked out now!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 29, 2004 11:16 pm 
Offline
Site Admin
User avatar

Joined: Tue Dec 10, 2002 1:58 pm
Posts: 9262
Location: N. Ireland
Resize that pic zonda, should be 800x600 so as people with low resolutions can see it.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 29, 2004 11:35 pm 
Offline
Wise Old Man
User avatar

Joined: Wed Jul 07, 2004 6:29 pm
Posts: 1047
Location: Richmond BC
sory.. my bad... that's wat i get for using a 19" monitor :oops:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 29, 2004 11:39 pm 
Offline
Clinically Dead
User avatar

Joined: Sat May 10, 2003 2:09 am
Posts: 4209
Location: The GRID
Is this worth the click?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 29, 2004 11:41 pm 
Offline
Adolescent

Joined: Thu Jul 08, 2004 11:18 pm
Posts: 138
Hey, this is a nice little tut. I like it. It worked good for me! ps....satan, or a mod, you think we should have a certain forum/subforum or whatever you call it for people that wanna make CS:Source tutorials or something? I mean, the basic help thread is kinda overflowing with help topics of all the game, and sometimes they arent really answered to the fullest....anyways, lol, im not the boss, but it was just a consideration....

-XfAcToR-


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 29, 2004 11:47 pm 
Offline
Site Admin
User avatar

Joined: Fri Dec 13, 2002 5:58 pm
Posts: 5563
Location: Belgium - 2.1
-XfAcToR- wrote:
Hey, this is a nice little tut. I like it. It worked good for me! ps....satan, or a mod, you think we should have a certain forum/subforum or whatever you call it for people that wanna make CS:Source tutorials or something? I mean, the basic help thread is kinda overflowing with help topics of all the game, and sometimes they arent really answered to the fullest....anyways, lol, im not the boss, but it was just a consideration....

-XfAcToR-


We're discussing that. But we are all quite busy atm :s

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 12:21 am 
Offline
Old Timer
User avatar

Joined: Fri Nov 07, 2003 6:50 pm
Posts: 779
Nice HUD and nice tutorial, however is there any reason that my text is so tiny ingame? I don't think ive installed the font properly, if you could explain how thats done a little more id be happy :) (Its probably in the tutorial but ive only really skimmed it)

/Edit, I know it says to install them into my fonts folder, but does this need to be created and is the folder actually called "fonts" also is it located in the cstrike folder?

Thanks,
Hawk

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 12:34 am 
Offline
Wise Old Man
User avatar

Joined: Sat Feb 21, 2004 8:00 am
Posts: 1817
Location: BC Canada
i would LOVE to change the names of the weapons

how would I go about changing the names when I do not have a "cstrike_english.txt" in my resource folder?

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 1:25 am 
Offline
Middle Aged

Joined: Wed Dec 11, 2002 1:39 am
Posts: 346
Location: UK
can someone make me a green version of the default hud?

I just want my hud to be green instead of orange.
thanks

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 1:29 am 
Offline
Site Admin
User avatar

Joined: Tue Dec 10, 2002 1:58 pm
Posts: 9262
Location: N. Ireland
Just dont install the font then, voilá.

_________________
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 4:48 am 
Offline
New born

Joined: Tue Dec 28, 2004 1:00 am
Posts: 7
hey nice hud i got all the colors and stuff working except for the font.... can i get some assisstance..


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 4:55 am 
Offline
Adolescent

Joined: Thu Jul 08, 2004 11:18 pm
Posts: 138
That's cool jake. Its all good, I understand you guys are pretty busy all the time, I mean, come on, all you do is lounge in the forums, lol....wait....thats me....haha, anyways, thats pretty cool that you are thinking about that and discussing it. I hope you guys do it and follow through with it.

-XfAcToR-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 30, 2004 5:05 am 
Offline
New born

Joined: Tue Dec 28, 2004 8:27 pm
Posts: 11
Sweet, i used your own personal hud but all of the info on the bottom like the health and armor wasn't slanted like yours why?

Edit: like the otheres where do i install the font?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 269 posts ]  Go to page 1, 2, 3, 4, 5 ... 18  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group