Post by Admin on Sept 15, 2016 11:00:47 GMT
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.
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.