Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
Multiplayer Connection Tutorial
There are currently 92 users playing Freelancer on 33 servers.
January. 20, 2018
[Main Page]

FX Tutorials

From The Starport

Main Page | Recent changes | Edit this page | Page history | Switch to MediaWiki mode

Printable version | Disclaimers | Privacy policy

Dynamic Headlights

This is a simple tutorial with which you can put actual lighting effects for your headlights. Pretty much all this information was found at I have just extracted the code and will be putting an explanation for each part.

1.Changing it so all headlights show up as the new dynamic headlight in equipment\light_effect.ini

Find LargeWhiteSpecial and comment out this section so that it looks like this:

 ;nickname = LargeWhiteSpecial
 ;glow_color = 255, 255, 255
 ;color = 155, 155, 155
 ;bulb_size = 0.7
 ;glow_size = 4
 ;flare_cone = 30, 0

Next go either bellow this or and the end of the file and add:

nickname = LargeWhiteSpecial
particles = headlight

This should now tell freelancer that instead of having a light on the HpHeadlight you will have this effect "headlight"

2.Defining "headlight" as an effect in FX\effects.ini

Add this code to the end of the file:

nickname = headlight
effect_type = EFT_FLASHLIGHT
vis_effect = gf_br_thruster01
lgt_effect = dyn_headlight
lgt_range_scale = 300
lgt_radius = 300

This is the effect that will be show, the part that affect the lighting and the bit we are most interested in are the lgt_ lines with effect defining which light effect will be used, and radius defining the size (not sure exactly what range_scale does but it works like this). The vis_effect defines and effect that will be played while it is going, this line is absolutely necessary because freelancer does not like it when there is only a lgt_effect defined without a vis_effect, because this is a thruster effect it is activated and with no means for it to be activated it remains invisible.

3.Defining the light effect in FX\lightanim.ini

add this code at the end:

name = dyn_headlight
frame = -1, 255, 255, 255, 1

This is the actual color and brightness of the light, you can have it flash different colors by using several frames of different colors. Frame is read as

frame = frame number, Red, Green, Blue, Brightness (0-1)

Problems with this:

1. You now do not have a visible light as you did before, this means you will have to define through all loadouts and in the ship packages that you want to attach the dynamic light to the HpHeadlight as well as the original light, this would require a lot more .ini editing that this has.
2. The light isn't a beam or cone of light but a sphere meaning you also light up your ship partially, this can be fixed by putting a hardpoint in front of the headlight hardpoint to try and mimic a cone of light, this would also help remedy the first problem, but would require a large amount of time hardpointing each and every ship with a new hardpoint which is not a small task as well as defining the dynamic headlight in every loadout and ship package.

That should be it, i have take this code straight from my working freelancer so hopefully it all works.

Retrieved from ""

This page has been accessed 6,577 times. This page was last modified 09:50, 25 March 2010. Content is available under The Starport.