OJP RGB Sabers

 

jka tchouky's rgb saber b1


Hello everyone, this is a jka version of my RGB sabers.
you can easily set up your cool new saber colors in the menus.
however, if you want to do it by hand, here are the cvars.

NOTE : the SCRIPTED sabers are only selectable with CVARS.



new saber colors:


//for cvars "color1" and "color2"

0 => red
1 => orange
2 => yellow
3 => green
4 => blue
5 => purple
6 => white
7 => black
8 => rgb
9 => pimp
10 => scripted

new cvars for definition
of rgb params of the blades


rgb_saber1 & rgb_saber2

//usage : 
rgb_saber1 R,G,B

example : 

rgb_saber1 255,0,255 //purple


cvars for scripted sabers !!!

rgb_script1 & rgb_script2

//usage : 
rgb_script1 :R1,G1,B1:T1:R2,G2,B2:t2:

with R1, G1, and B1 being the rgb params of the color number 1.
you have up to 10 color slots for each scripted sabers.
T1 is the transition time between color 1 and color 2 in milliseconds.

example:
rgb_script1 :255,0,0:500:255,0,255:500:0,0,255:500:

this script will make a saber that is red and then changes to purple
and then to blue with a transition time of half a second (500 millisecs) between each color changes.



jka tchouky's rgb saber b1

modmakers.txt


Custom blades' shapes


if you want to allow your new sabers to be compatible with RGB mods,
just replace the 3 following files :


gfx\effects\sabers\

rgb_line.jpg
rgb_glow2.jpg
rgb_core.jpg

to alter the black saber, just change :

black_glow.tga
black_line.tga
black_trail_core.tga
black_trail_glow.tga

don't forget the alpha channel !

Bots using custom sabers


in the botfiles/bots.txt
just add entries for : 
rgb_saber1
rgb_saber2
rgb_script1
rgb_script2

and change the color1 and color2 values to make them match the kind
of saber you want the bot to use.
examples provided in the pk3 : /botfiles/bots.txt watch out for alora and cultist

Coders

if you want the source code, just let me know, i ll just give it to you.




Note: Forgetting to add the colon at the end of a rgb saber script define results in very bad things happening. 

FAQs:

Q: My bot's RGB saber scripts are resulting in nasty saber color flickering and dynamic

A: Make sure that you included a colon at the end of your saber script in the bot file. (:255,255,0:500:0,255,0:500:255,0,0:500: = right; :255,255,0:500:0,255,0:500:255,0,0:500 = wrong)

Q: Why is my bot saber not displaying the correct color?

A: It's probably because you didn't set the color varible correctly. See the Color Cvar Legend for which value you want. 

Color Cvar Legend:
0 Standard Red
1 Standard Orange
2 Standard Yellow
3 Standard Green
4 Standard Blue
5 Standard Purple
6 Standard White
7 Standard Black
8 RGB Colors
9 Pimp Saber
10 Scripted RGB Colors