How to change Killcam HUD Color



> >

Created 1 year ago

How to change Killcam HUD Color

Learn to change killcam, roundcam and HUD color

Learn how to modify the killcam


Note: color is denoted by (r,g,b) from range [0,1] CoD. To convert (r,g,b) value to scale with CoD's range, all you have to do is divide each number by 255.

Ex: Yellow in RGB (255,255,0) converted to CoD's range is (1,1,0).

You can also use the Color converter tool for this.


Now for the actual coding:



There are 2 instances for each of these variables, 1 for Killcam and 1 for Roundcam so line #'s will change based on which one you are modifying.

Topbar:


Look for
self.kc_topbar setShader( "black", 640, 112 );
Below it add
self.kc_topbar.color = (1,1,0);

Bottombar:


Find:
self.kc_bottombar setShader( "black", 640, 112 );
Add below:
self.kc_bottombar.color = (1,1,0);

Title:


Find:
self.kc_title.fontScale = 3.5;
Add below:
self.kc_title.color = (0,1,0);

Skip Text:


Find:
self.kc_skiptext.sort = 1;
Add below:
self.kc_skiptext.color = (.5, 0, .5);

Countdown Timer:


Find:
self.kc_timer.fontScale = 3.5;
Add below:
self.kc_timer.color = (0,0,1);

Now you can modify the colors for each of those variable using the conversion (r/255.0, g/255.0, b/255.0). You can do that either manually or create a utility function to do it for you automatically.

Automatic scale conversion from RGB



At end of the file (last line) add:
colorScale(r, g, b) {
    return ( r / 255.0 , g / 255.0 , b / 255.0 );
}

Now, change all those color values we added to format: colorScale( 255, 255, 0 )

Example:

Before:

self.kc_timer.color = (0,0,1);

After:

self.kc_timer.color = colorScale(0,0,255);

Now you can use any RGB value directly without manually calculating each of the values!

Let me know if this was helpful and if you have any questions, don't hesitate to ask. :)


Tutorial Details

Created: 1 year ago by <Ares> Indy

Views: 2112 Views

Keywords: Killcam, roundcam, hud,

Share this Knowledge with your friends!

Direct Link:

People who like this: (2)

Sign in to Like

4 Comments

About topbar and bottombat.

self.kc_topbar setShader( "black", 640, 112 );

That "black" must be "white" if you want the color to change.

This is just a notice, you forgot it I guess. (Correct me if I'm wrong.)

Commented by Dotix  (Aug 30th, 2016 12:06 AM)

How edit, Name for the Kill Cam?
Commented by -]xcessive[-Crazywest  (Aug 30th, 2016 03:45 AM)

Ye, wrote this quickly and can't edit it now. :(

Also, I forgot that Hamgoodies actually takeovers the killcam register so for killcam the correct file to modify is actually CoDaM_HamGoodies.pk3 > codam > HamGoodies.gsc. However, unlike CoDaM's default killcam, HamGoodies uses "white" shader so colors should be fine.

For roundcam, you'll have to change the "black" to "white" like Dotix mentioned and modify the CoDaM.pk3 > codam > killcam.gsc.

The best method for something like this is to create a CoDaM plugin to takeover the killcam/roundcam calls to simplify the whole process, but I'll save that for later.
Commented by <Ares> Indy  (Aug 30th, 2016 05:13 AM)

I say How i change the hammer killcam, and put any name?
Commented by -]xcessive[-Crazywest  (Aug 30th, 2016 05:29 AM)

Please sign in or create an account to post a comment.