Jump to content

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?

Link to comment
Share on other sites

  • Management Team

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

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
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?

Link to comment
Share on other sites

  • Management Team

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.

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
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.

Link to comment
Share on other sites

  • Management Team

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?

Please do not PM me unless really necessary (knowing you helps). If you think you need my attention in a topic, tag me.

Link to comment
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:

'>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...