Enhanced flares
Posted: Wed Sep 09, 2015 2:48 am
So we all know that UGL flares are a bit weak. It may be realistic, but it's not particularly good gameplay.
To this end I looked into enhancing the UGL flares and came up with the following script:
http://pastebin.com/Hq6tx5SR
This attaches a point light to the flare that appears and disappears at roughly the same time as the flare itself.
The brightness of the flare, as well as its duration, color, and attenuation (how quickly the light disappears) are all in global variables so they can be changed mid mission if necessary.
The attenuation is probably the most important factor, but also the hardest to get right. The function takes parameters in in the form of [start dist, const coefficient, linear coefficient, quadratic coefficient, hard limit start, hard limit end].
startDist is the dist at which the light will start to dim. I have set to 1 (meter).
the coefficients are the harder ones. The constant coefficient will affect all light outside the start distance equally, while the linear and quadratic affect the light more as distance goes on. If you want the light to be concentrated set the quadratic coefficient high.
The hard limit start and end we can mostly ignore as a setting of 500,700 works just fine.
Notes:
This only affects UGL flares not mortar or starter pistol flares.
If you extend the duration of the supplemental light beyond the lifetime of the flare then the light will not continue to fall, it will sit in position.
Be careful with the attenuation, as you can accidentally make a beacon of light ( http://steamcommunity.com/sharedfiles/f ... =513868925 )
The attached light is actually hovering 0.5m above the ground to increase their effectiveness while on the ground.
I would attach pictures, but they can't really convey the changes, take a look at enhanced_flare_test_v5 and change flareBrightness and flareAttenuation.
I intend to use these to redo spoopy swamp (along with two dozen other changes).
To this end I looked into enhancing the UGL flares and came up with the following script:
http://pastebin.com/Hq6tx5SR
This attaches a point light to the flare that appears and disappears at roughly the same time as the flare itself.
The brightness of the flare, as well as its duration, color, and attenuation (how quickly the light disappears) are all in global variables so they can be changed mid mission if necessary.
The attenuation is probably the most important factor, but also the hardest to get right. The function takes parameters in in the form of [start dist, const coefficient, linear coefficient, quadratic coefficient, hard limit start, hard limit end].
startDist is the dist at which the light will start to dim. I have set to 1 (meter).
the coefficients are the harder ones. The constant coefficient will affect all light outside the start distance equally, while the linear and quadratic affect the light more as distance goes on. If you want the light to be concentrated set the quadratic coefficient high.
The hard limit start and end we can mostly ignore as a setting of 500,700 works just fine.
Notes:
This only affects UGL flares not mortar or starter pistol flares.
If you extend the duration of the supplemental light beyond the lifetime of the flare then the light will not continue to fall, it will sit in position.
Be careful with the attenuation, as you can accidentally make a beacon of light ( http://steamcommunity.com/sharedfiles/f ... =513868925 )
The attached light is actually hovering 0.5m above the ground to increase their effectiveness while on the ground.
I would attach pictures, but they can't really convey the changes, take a look at enhanced_flare_test_v5 and change flareBrightness and flareAttenuation.
I intend to use these to redo spoopy swamp (along with two dozen other changes).