Jump to content
Sign in to follow this  
Sgt.Kanyo

How to change the traffic light's light up color

Recommended Posts

So I've been wanting to change the little emissive light textures that you see on the traffic lights (talking about the little circle parts). Is there any way to change the texture on those? I've checked they are not in the .wtd of the traffic lights, so it must be somewhere else. It's not in visualsettings.dat either, because that changes the enviroment light of the traffic light ( what you see on the ground etc. )

So anyone know where those are?

Share this post


Link to post
Share on other sites

The traffic light colors are hardcoded to green, amber, red. There are two different colors in memory. Those for the actual traffic light and those for the light shining on the ground. The actual colors are retrieved from a switch (trafficLightState), so you would have to change the code directly, the ambient lights are static floats which can be changed a little easier then. An example of how it may look:
 
Different colors, changed brightness

Share this post


Link to post
Share on other sites

Yeah I did manage to change the light on the ground by modifying visualsettings.dat. However I don't really know how to change the actual light itself. Also on your picture I only see the enviroment or ambient light (the light on the ground) and the light sprite being changed. However I can't even see any color for the traffic light itself. Your's look all blacked out.

Where would I go about changing the actual lights (those circles in front of the traffic light bulbs or whatever)? You said they are in a switch, which I assume would be switch case (I'm just starting to understand a bit of programming in c++). Which file has that, and how would I open it?

Share this post


Link to post
Share on other sites

It appears to be black because I decided to increase the intensity of the light which also increases the dispersion, so it no longer looks like a small solid light. The lights are coronas and drawn the same way the headlights, brakelights etc. are. The code is located in the GTAIV.exe/EFLC.exe and can be opened using a disassembler or a debugger at runtime. But if you just started getting into C++ it's a vain project, you need to have at least basic assembler and reverse engineering skills.

Share this post


Link to post
Share on other sites

Oh well I don't have any of those skills so I guess I won't be modding the .exe files. I didn't even know it was possible to reverse engineer an .exe like that. Also I was using the word sprite for what you are using as coronas. At least in the Half Life series they were called sprites, I thought they were called like that in general.

Share this post


Link to post
Share on other sites

A sprite is rather a 2D image, the coronas are lights. And yes, you can reverse it perfectly fine, just like any other software. May I ask what you need this for?

Share this post


Link to post
Share on other sites

Well all I wanted to do is recolor the traffic lights a bit. For example I'd have given the green light a bit more blueish color to get this effect:

'>

Also I'd have decreased the saturation on all 3 colors to like 80% to 90% to have a bit more white in the inside part of the lights as you can see here:

'>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×