Jump to content

Home

How to get dynamic lighting from weapons (Sort of)


Darth Bastard

Recommended Posts

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...