PDA

View Full Version : How to get dynamic lighting from weapons.


Darth Bastard
04-08-2002, 11:47 AM
Hey all. I was just tinkering around with JKO this weekend, editing the kyle model so I could play the sp game as Darth Maul, that sort of stuff. (And might I add, it is kinda funny to see Darth Maul sitting and chatting with Mon Mothma in the cutscene.) Anyway, I was looking around some of the .cfg and .dat files and found and interesting one. If you unpack your pk3 files, you will notice a folder titled ext_data. Within that folder is a file called weapons.dat. If you open it up in wordpad, the first thing you will notice is that all of the weapons info pertains to Voyager Elite Force. Ignore it and scroll down aways. A little lower you will find the configurations for all of the weapons in the game. (I'm sure some of you out there have already discovered this, so it's old news.) Anyway, I noticed a setting for the missile launcher that added the glow from the missile exhaust. I thought to myself, "hmm... if the missiles can put off a glow, certainly the blasters can too." So I copied the code from the missile launcher into the blaster, (and other weapons) and viola! now my blaster bolts light up the area around them. :) For anyone who wants to try this, here's the code to insert into each of the weapons:

missileLight 125
missileLightColor x x x
altmissileLight 125
altmissileLightColor x x x

The missile light can be adjusted as you like, depending on how bright you want light put off by the weapons to be, but I've found that 125 works pretty well. (If you use a red light for the E-11, you might want to bump this up a little, as the red tends to be a little dim.)

The x x x in the missileLightColor correspond to Red, Green, Blue. The values range from 0.0 to 1.0, depending on how much of each color you want put in. For example:

missileLightColor 1.0 1.0 0.5 will give you a yellowish light, perfect for the Bryar pistol.

MissileLightColor 1.0 0.0 0.0 will give you a red light, perfect for the E-11.

missileLightColor 0.0 1.0 0.0 = Green
missileLightColor 0.0 0.0 1.o = Blue

You get the idea.

Anyway, it was kinda cool watching the color reflect off of the white stormtrooper armor as they fired at me. And for those of you who play with volumetric shadows on, the shadows will react to the lights put off by the weapons. I fired at stormtrooper and missed slightly, but as the bolt whizzed past him, his shadow was thrown forward by the light from the blaster bolt.

Anyway, I hope ya like it!

Darth Bastard

L'Equa Sinar
04-08-2002, 12:03 PM
Hey man, thats good, real good, any chance you could make it as a small mod so all weapons have thier coors represented right then upload it as a small mod? I would love to see the lightsaber light up a stormy!! :)

If you do, could you e-mail me it at timxv@aol.com

WanderingKnight
04-08-2002, 12:06 PM
More importtantly, does this mean that we can finally have a lightsabre that actually casts light?

Digital_Ronin
04-08-2002, 12:13 PM
Interesting... just working on a fully cyan lightsaber, and this might be the way how to get at least the light reflection on the floor to the proper color.

Still you don't happen to know a way to control the lighsabers "trail" color as well? It isn't in that file you mentioned, but thanks anyway, this might be a step into the right direction. :)

Digital_Ronin

Darth Bastard
04-08-2002, 12:21 PM
Unfortunately, no. I couldn't get it to work with the lightsaber. :( Also, one thing to keep in mind, is that the light put off by the weapons is just light the light put off by the lightsaber already, only a little brighter. While you can see the light reflecting off of walls and the floor in lit areas, they still doesn't light up places that are truly dark, and that bugs me to no end. (Damn the limitations of the Quake III engine!) Also, in areas where colored lighting is used extensively, its really hard to see the light that the weapons put off. However in most areas, it works just fine. When I first figured out how to do it, I was in the detention area on Nar Shaddaa. I just sat there firing down the dim hallway, watching the light from the blaster bolts light up the walls and the floor. It was really cool effect. It seems that as long as there's SOME light in the level, the bolts do a pretty good job of casting a glow around them. It's just when the lighting for an area is really dim (or non-existent) that you notice that they won't light up the area around them.

Again, it sucks about the lightsaber not really putting off light. I imaging that will have to come in the form of a patch from Raven, if they can figure out how to get the game engine to handle it.

Darth Bastard
04-08-2002, 04:16 PM
I've put the weapon.dat file into a .pk3 file if anyone would care to host it. If so, just tell me where to send it.

Thanks,
DB

Graphicsgod
04-08-2002, 04:44 PM
Somebody lend this guy some space ;)!

L'Equa Sinar
04-08-2002, 05:05 PM
e-mail it to me at timxv@aol.com i can put it on my AOL space for now if you want?

Also, ca you send me the darth maul single player mod!! lol, i have to see the opening cutscene!!!! :)

Darth Bastard
04-08-2002, 05:15 PM
L'Equa Sinar: Done. :) Let me know if you get it. For some reason, our network at work has problems sending mail to anyone @aol.com. Half the time the messages come back undeliverable.

DB

Crack 6K
04-08-2002, 05:17 PM
How big is it? I'll gladly host it on my Powerlink account. Contact me at jc6k@adelphia.net or if you have AIM, my SN is Crack 6K.

L'Equa Sinar
04-08-2002, 05:23 PM
Its uploaed now:


http://members.aol.com/timxv/jk2/weaponglow.pk3

Enjoy! :) i assume we just put it in our base folder.

Belial6672
04-08-2002, 06:11 PM
thanks mate
looks really cool...god just loving this game and community

Belial

Darth Bastard
04-08-2002, 07:50 PM
Thanks! Glad ya like it!

DB