PDA

View Full Version : RGB Saber Colors


NickR
11-29-2003, 10:31 PM
Since I've finished the Force Fall code, and because no one else has start working on it, I decided to get cracking on getting RGB Saber Colors into JA. Rather than take my old RGB Saber Color code that I did for JK2, I've completely rewritten it.

I've got the client side part of the code working, i.e. you can set the rgb color values for you two saber blades via cvars but they are only seen by you. The cvars are:

>cg_saber_rgbcolors (0/1)
>cg_saber_rgbcolor (255.255.255)
>cg_saber2_rgbcolor (255.255.255)

The good thing about this new format is that you don't have 1 cvar for each rgb value. Instead you use a . to seperate each rgb value, like above.

I'm now working on getting this working in the menu.

razorace
11-30-2003, 01:37 AM
I suggest you use 3 cvars for each of the two blades. It would be more like the standard established by Raven and be more user friendly.

Also, please post that you're working on this in the "What's New?" thread. Thanks!

NickR
11-30-2003, 10:05 PM
I suggest you use 3 cvars for each of the two blades. It would be more like the standard established by Raven and be more user friendly.

You're kinding? I've just the thing finished. For my JO version it did use 3 cvars for each but I found it less user friendly than my current version. And what standard would that be? They use one cvar each for both blade colors, as does mine. If you can give me a suitable reason I'll gladly change it.

Also, please post that you're working on this in the "What's New?" thread. Thanks!

Sure, no problem! :)

razorace
12-01-2003, 02:31 AM
The standard cvars used to set the player colors.

Besides, using three cvars makes manual color tweaking and the menu additions much easier to do.

NickR
12-01-2003, 05:10 PM
Yeah, I think you're right. I've realised some people might want to use scripts to tweak they blade colors. They could even create a blade that constantly changes colors, which would be cool to see. Anyway, I've already altered the code with the 3 cvars for each blade done. I'm just sorting the 2 menus out now.

razorace
12-01-2003, 05:47 PM
Thanks.

How are you handling the blade shape or glow? Is it based off one file?

I'm asking since I think some of us would really like to add selectable blade styles to the game that's compatible with RGB saber colors. :)

NickR
12-01-2003, 09:08 PM
Just using one gray blade image and one grey glow image.

I could add support for have control over the color of the blade core aswell if you like.

razorace
12-01-2003, 09:48 PM
mmmm. That's a good question. I'm not sure how much people would want that and if it would work out good.

NickR
12-02-2003, 11:50 AM
I'm struggling to organise the layout of the 2 sets of rgb sliders in the main and ingame menu so 2 more sets for the blade core would make it harder. Unless of course I should make a popup menu instead.

razorace
12-02-2003, 09:25 PM
Good idea, that's probably the way to go.

Remember that you need to set things up so that other people will see your blade colors.

NickR
12-02-2003, 11:03 PM
Don't worry I've added server support now and basic bot support so you can add rgb colors to the bot files.

Emon
12-03-2003, 01:57 AM
You should include a wide variety of presets, including various shades of each color. People are stupid, and if not given presets, will turn them all the way up, making them horribly bright and ugly.

NickR
12-03-2003, 05:11 PM
I could add some presets, but then there already are some if you don't have rgb selected.

Emon
12-03-2003, 11:22 PM
Yeah, but people are stupid. Also, people go in there to get different shades of teal, and other colors, and they crank them up because they're clueless.

NickR
12-03-2003, 11:41 PM
I think we should discuss the layout of the rgb options. Because I'll be buggered if I spend hours working on a design and you guys say that it should be done differently. :D

About the rgb presets, I'll have to add extra code to make preset boxs coloured the correct way, and right now I'm not totally sure how I can achieve that via the Quake3 menu system. In UT2003 it would be simple to do, but unless we do it the old fashioned way and get loads of different colored images it'll be hard to alter a white box with specific rgb values. And it wouldn't make extended the rgb presets easy either.

razorace
12-04-2003, 12:17 AM
Have you tried the method that Raven used for the color tinting on the icons? That might work?

Anyway, I don't really see much point of having presets for the RGB saber colors. What other colors would people want other than the original presets?

NickR
12-04-2003, 01:26 AM
I agree with Razor, I don't think we should have rgb presets.

Emon
12-04-2003, 01:44 AM
Have you ever played many games in JO with RGB sabers? Trust me, you need it, people don't know how to do it themselves.

razorace
12-04-2003, 02:19 AM
But this isn't the same as the JK2 RBG mods. We're leaving the original presets in.

razorace
12-05-2003, 07:34 PM
NickR, since you're tearing things apart anyway, should you mind setting it up so that players can choose the blade styles (blade shape jpgs) for both the original presets and the RGB blades?

If you need help with making the uiscript for such a setup, I'm willing to help.

locdog420
12-11-2003, 05:13 PM
so how is this coming? is it about done , can we get an update please?

NickR
12-11-2003, 06:15 PM
I think that TCK should have his RGB legacy kept intact, so how about I just incorporate the blade styles modifier you want and the second staff blade color change I've made?

I'm pretty sure both myself and TCK have probably coded the RGB blade color system exactly the same, so there's no point using mine and have people think he did it anyway! :D

Azymn
12-11-2003, 06:45 PM
I hope Tck doesn't mind me speaking for him, but he's done exactly what you've guess NickR.
I've seen a video on his sabers shifting through colors like christmas lights - very nice.
As far as selectable rgb blades go - doing them for all 6 blades and for the rgb styles mean you have to make a minimum of 14 jpegs for each different blade type (core and coreglow), or 28 jpegs per blade if you wanna do it well.

So if you only made 5 different blades to choose from you'd have to make 140 jpegs if you account for differences in core, coreglow, trail, and radial glow.

razorace
12-11-2003, 11:29 PM
NickR, as I have already suggested to TCK, I'm going to suggest that you get in contact with TCK so you guys can coordinate. I don't want to have to clean up a train wreak when you guys submit your stuff. :)

babywax
12-12-2003, 12:19 AM
Please link both blades on the saber staff, otherwise the game will turn into swinging rainbow :evanpiel:

razorace
12-12-2003, 03:24 AM
Don't think that's nessicary as a requirement but a "link" button option would be cool.

Tchouky
12-13-2003, 01:11 PM
hiya everyone.

As Azymn said, ive done more than my old rgb sabers.

you can see here a few screenshots and vids :
http://mbalch.free.fr/jk3/


here are the features of this small mod :
-rgb blades
-black saber ( with black trails)
-multicolor sabers ( watch the pimp videos.)
-scripted saber.

the later allows you to control which are the colors your saber will go through, the order, and the transition time between each color.

ill make a small vid if you like.

the script system is simple and efficient, it works this way :

tck_script1 ( or 2 for second blade, and the cvar names are temporary, asuming it gets included in ojp, maybe it will be better to call them OJP_script1 etc..)

so :
tck_script1 :R1,G1,B1:T1:R2,G2,B2:T2:.....:R10:G10:B10:T10:

you can have up to 10 colors. but there is no min limit.


I also made the menus, and the cvars for the definition of the saber are like this :
tck_saber1 R,G,B
the ui cvars which are used for sliders and stuff are disociated.


anyway, NickR, try to hang out on #jkacoding on quakenet so we can talk about it.
(just click on my sig =) )


btw if they re any serious testers interested, i ll give out the mod, so it can be extensively tested.

btw2, i won't release it as a stand alone mod.

ill try to make a small vid of a scripted saber and ill upload it soon.
cya.

Edit :
i uploaded a scripted sabers video.
the script used was red to blue with 1 sec between color change.
like this :
tck_script1 :255,0,0:1000:0,0,255:1000:

t3rr0r
12-13-2003, 01:47 PM
i'm glad how the blades don't look overly bright when when multiple settings of 255 are selected... awesome work. :D are you going to be able to chang the core colour this time around (i hope not :x)?

razorace
12-13-2003, 06:28 PM
Originally posted by Tchouky

tck_script1 ( or 2 for second blade, and the cvar names are temporary, asuming it gets included in ojp, maybe it will be better to call them OJP_script1 etc..)


I think saber_script or sab_script would be more approprate.

Wudan
12-13-2003, 08:25 PM
Easy 'nuff to do, foo :)

razorace
12-14-2003, 02:33 AM
Wudan, don't you have some coding to do instead of spamming the OJP forums? :D

Lathain Valtiel
12-14-2003, 06:18 AM
I'd ask for an RGB Core option if only because It'd let me copy KOTOR's Heart of the Guardian sabers. Heh.

locdog420
12-28-2003, 05:32 PM
So....is this mod done yet....whats the deal!

razorace
12-28-2003, 07:12 PM
From what I understand, NickR's and TCK's systems are basically done. However, since they concurrently created seperate systems, they're going to have to figure out which system (or a hybrid system) will be used for OJP.

NickR
12-28-2003, 08:49 PM
I don't have mirc installed atm, sorry.

I think Tchouky has everything covered. I only have the standard rgb functionality done with an unfinished menu.

Unless Tchouky has some rgb problems then you should use his rgb system. He's obviously put more effort and time into it than I have.

Teancum
12-29-2003, 05:15 AM
I have only one comment concerning this. Don't allow the RGB mode to change the saber core. To me it just ruins the whole Star Wars feel when people have a black (usually the color picked) core.

I lied. I have two comments. Make the saber menu like the RGB for the player menu. It keeps the presets, for those like me, who are fine with the current sabers, and allows others to use RGB.

Marker0077
12-29-2003, 07:51 AM
I think people should have the freedom to do whatever they like. Granted, the black core does look uglier tha hell IMO but some people like it & they should be permitted to use them if they like.

I think the best solution would be to have a client side CVar that just disables the core colors. Making it white would probably be best.

Also, as far as the presets are concerned, as long as each color is configurable via a CVAr then those can be scripted (like JediMod was). All it takes is a tutorial on how to write them, I can take care of that if you guys like.

razorace
12-29-2003, 08:33 AM
According to TCK, we can't do RGB cores due to the way the trails are handled. However, TCK has been able to get it to do white and black.

He's also done some scripting stuff to allow you do shifting color stuff but I have no clue how that's set up.

locdog420
02-02-2004, 07:21 PM
so where can i download the saber mod at??? is this thing done or...

AIVAS
02-02-2004, 07:58 PM
Originally posted by Tchouky
hiya everyone.

As Azymn said, ive done more than my old rgb sabers.

you can see here a few screenshots and vids :
http://mbalch.free.fr/jk3/


here are the features of this small mod :
-rgb blades
-black saber ( with black trails)
-multicolor sabers ( watch the pimp videos.)
-scripted saber.

the later allows you to control which are the colors your saber will go through, the order, and the transition time between each color.

ill make a small vid if you like.

the script system is simple and efficient, it works this way :

tck_script1 ( or 2 for second blade, and the cvar names are temporary, asuming it gets included in ojp, maybe it will be better to call them OJP_script1 etc..)

so :
tck_script1 :R1,G1,B1:T1:R2,G2,B2:T2:.....:R10:G10:B10:T10:

you can have up to 10 colors. but there is no min limit.


I also made the menus, and the cvars for the definition of the saber are like this :
tck_saber1 R,G,B
the ui cvars which are used for sliders and stuff are disociated.


anyway, NickR, try to hang out on #jkacoding on quakenet so we can talk about it.
(just click on my sig =) )


btw if they re any serious testers interested, i ll give out the mod, so it can be extensively tested.

btw2, i won't release it as a stand alone mod.

ill try to make a small vid of a scripted saber and ill upload it soon.
cya.

Edit :
i uploaded a scripted sabers video.
the script used was red to blue with 1 sec between color change.
like this :
tck_script1 :255,0,0:1000:0,0,255:1000:

WOW, are you releasing this? where can I get this? It's exactly what I've been waiting for!:D

razorace
02-03-2004, 12:44 AM
He's working on it right now. It's going to be a OJP exclusive...well at least until someone ports the source code.

AIVAS
02-03-2004, 01:51 AM
Originally posted by razorace
He's working on it right now. It's going to be a OJP exclusive...well at least until someone ports the source code.

...

well, Since I can't run strong forces 2 and ojp at the same time, I'll have to make a tough choice.

Also, have you found the mod yet?

razorace
02-03-2004, 03:18 AM
I've found it but I haven't tried it.

Marker0077
02-03-2004, 10:10 AM
I like the multi-color sabers, they look cool & all but I would imagine that that is prety laggy for some clients. I think there should be a cvar for clients that disables the multi-colored saber for them only (since it's all done client side anyways pretty much), this way those whom want to view it can but those of us with a slow PC can still play wihtout the extra lag.

razorace
02-03-2004, 10:14 PM
If it turns out to be laggy, we'll impliment a cvar or something. However, it sounds like TCK set things up so it won't lag.

Marker0077
02-04-2004, 05:20 AM
I think whether it will lag or not is really going to depend on the clockspeed of the PC. I use a 600 mhz myself so I expect it to be pretty laggy.

razorace
02-04-2004, 08:46 AM
The blade is redrawn every frame so it shouldn't lag at all as long as it's not network dependant and not very badly programmed.

Master_Keralys
02-12-2004, 03:39 PM
Since neither NickR or TCK has been around for a while, I was just wondering how this is going - especially since it's one of the things I'm looking forward to most with OJP...

razorace
02-12-2004, 06:52 PM
We're still waiting for TCK to send in the code.

Tchouky
02-16-2004, 11:46 AM
its not more or less laggy than regular sabers.

the color of the saber is retreived exactly the same way as model informations.

so it means its sent only everytime a client changes his informations ( model, team, etc...).


and for the drawing code, it only add one sprite per frame which is really nothing...

so it doesn't affect FPS or ping at all.

Master_Keralys
02-17-2004, 03:48 PM
Excellent. How well can you get silver/gray with this particular mod, Tchouky?

razorace
02-18-2004, 01:07 AM
I've ported the RGB saber code into Basic but I'm having technical problems. I'm working on it...

razorace
02-22-2004, 06:20 AM
Ok, I did some more investigation into the bugs and it seems to be something that's broken with TCK's code instead of something on my end. Something just isn't right whenever a bot (namely the Alora bot) uses RGB scripting.

Whatever the problem is, it's causing a nice old crash in MSV debug and makes the player saber lighting look like ass in a normal compile. My debugger states that it's due to a bad pointer in the quake string search function at some point during the player init stage. I can't figure out exactly which statement is bad since the search phase can't be found by simply searching for the phrase in all the source files. Very weird.

I'm at a loss at finding a quick and easy bug fix since I have no experience with TCK's code. I'm going to contact TCK and see what he thinks.

Anyway, the real issue at hand until the problem is fixed is....

Should OJP still accept the code even thou it has a known and nasty bug in it or should we wait until TCK has had time to fix it?

Any input would be great.

razorace
02-22-2004, 06:31 AM
Ok, well, the good news is that I've determined the problem and fixed it. Basically, the bots.txt file that TCK had sent me didn't match the correct format for the rgb saber scripts, weird.

Now I noticed that plain RGB sabers don't seem to be reading correctly from the bot files. :|

Master_Keralys
03-03-2004, 02:31 PM
Is there any chance we'll ever get the SP SDK and be able to implement the RGB sabers into SP?

razorace
03-03-2004, 07:21 PM
Well, I've heard that Raven released the SP source code for Elite Force but only after a very long time.

Master_Keralys
03-03-2004, 07:39 PM
At least there's some hope, however small it may be. Course, they never did the SP SDK for JK2, did they? Somehow I think they'd probably have to fight with LA over it, and knowing LA, it'd never happen. Ah, well, nice thought....