Popular Post Captain14 397 Posted August 13, 2016 Popular Post Share Posted August 13, 2016 Hey all, Recently the OpenIV team has made the carcols.ymt file available as an XML file which allows editing. Big thanks to them for that as this is what makes this project possible. You can find the carcols.xml here: https://www.gta5-mods.com/tools/carcols-ymt-converted-into-xml-format Anyways on to the meat of it. The carcols is where all vehicle sirensettings are configured. Vehicle developers are probably familiar with this and most, but not all, vehicles currently released have been configured to work with sirensettings 1. Looking in the carcols we can see exactly where siren setting 1 is configured and learn about the structure of sirens. This is a shortened portion of the configuration for siren setting 1: Spoiler <Item> <id value="1"/> <name>police/sheriff</name> <timeMultiplier value="1.00000000"/> <lightFalloffMax value="10.00000000"/> <lightFalloffExponent value="10.00000000"/> <lightInnerConeAngle value="2.29061000"/> <lightOuterConeAngle value="70.00000000"/> <lightOffset value="0.00000000"/> <textureName>VehicleLight_sirenlight</textureName> <sequencerBpm value="220"/> <leftHeadLight> <sequencer value="0"/> </leftHeadLight> <rightHeadLight> <sequencer value="0"/> </rightHeadLight> <leftTailLight> <sequencer value="1431655765"/> </leftTailLight> <rightTailLight> <sequencer value="2863311530"/> </rightTailLight> <leftHeadLightMultiples value="1"/> <rightHeadLightMultiples value="1"/> <leftTailLightMultiples value="2"/> <rightTailLightMultiples value="2"/> <useRealLights value="true"/> <sirens> <Item> <rotation> <delta value="0.00000000"/> <start value="0.00000000"/> <speed value="3.00000000"/> <sequencer value="4294967295"/> <multiples value="1"/> <direction value="false"/> <syncToBpm value="true"/> </rotation> <flashiness> <delta value="1.57079600"/> <start value="4.71238900"/> <speed value="1.00000000"/> <sequencer value="1431655765"/> <multiples value="2"/> <direction value="true"/> <syncToBpm value="true"/> </flashiness> <corona> <intensity value="50.00000000"/> <size value="1.10000000"/> <pull value="0.20000000"/> <faceCamera value="false"/> </corona> <color value="0xFFFF0300"/> <intensity value="0.50000000"/> <lightGroup value="0"/> <rotate value="false"/> <scale value="true"/> <scaleFactor value="2"/> <flash value="true"/> <light value="true"/> <spotLight value="true"/> <castShadows value="false"/> </Item> </sirens> </Item> The full xml contains definitions for all 20 siren elements in order, but I have removed sirens 2-20 for the sake of making it easier to read. So far, here is what I have learned: The game engine caps the maximum number of sirens at 20 per sirensetting. Custom sirensettings can be added to the file and used. Corona colors and intensity can be edited for each individual siren (format for color: AARRGGBB). They can also be removed completely. Each individual siren can have it's own individual flash pattern (and these can be user created, not just selected from a list) Headlight and taillight flashing can be configured with custom flash patterns - one user has already released a modification that enables headlight flashing. You can set the number of "beats" per minute that the lights will flash using sequencerBPM value. This value will apply to all of the sirens for that specific sirensetting. You can set individual sirens to be rotating or non-rotating and configure their speeds. So far I have not done any work with rotating lights. For non-rotating lights, the flash pattern can be custom configured by editing the sequencer value under "flashiness" for each siren. In the snippet of code posted above, the siren uses the following configuration: <sequencer value="1431655765"/> At first glance it looks to be just a random number. This is actually a 32-bit integer, and when you view it in binary, the flash pattern becomes clear: 01010101010101010101010101010101 So this siren uses a simple alternating flash pattern - off, on, off, on, off, on, etc. These can be configured to create new and far more complex flash patterns than are currently in the game. Along with increasing the sequencer beats per minute you can create some neat stuff. Here is a (very quickly) thrown together demo to showcase possible patterns. This vehicle uses 6 sirens: two for all the red and blue lights, two for the traffic advisor (which is an extra), and two for the headlight strobes. The headlight strobe coronas have been modified to be white and the vehicle uses a completely custom sirensetting. The pattern for the red and blue lights has been customized for alternating speeds. Again, this is just rough stages of research so far, but I wanted to share what I had found with the community. Hopefully this will be useful for vehicle developers in designing cars which are non-ELS but offer similar levels of functionality. I will be updating this thread with further research as I discover new things. Thanks for reading and happy modding! Kane104, Lt Cole, Cyan and 41 others 44 Quote Link to post Share on other sites
HankVoight 553 Posted August 13, 2016 Share Posted August 13, 2016 This is actually really neat, having the ability to change/create patterns via a simple text change is truly amazing. If this does become fruitful and a script like the ELS pattern changer could be made to read the file and maybe even have the ability to change patterns while in game (like a plugin) could create virtually unlimited possibilities for everyone. And also maybe render ELS obsolete as then the only feature it would have over default lighting is the ability to change siren tones (which I'm sure a script could be written to do as well). I do look forward to more info on your research! Captain14, Babylon, 11john11 and 1 other 4 Quote Link to post Share on other sites
Kane104 1247 Posted August 13, 2016 Share Posted August 13, 2016 Absolutely epic. Thanks for the guidance you've posted, its much appreciated. GreenAid and Captain14 2 Quote Link to post Share on other sites
royalx7 20 Posted August 13, 2016 Share Posted August 13, 2016 To go along with HankVoight, i'd have to think that it would also be much more stable.. Instead of extras rapidly firing, using rockstars script would probably be better. (Tbh I'm not too sure how stable ELSV is, it could be perfect and I wouldn't know, just making an assumption). Quote Link to post Share on other sites
CiscoFan 98 Posted August 13, 2016 Share Posted August 13, 2016 Will it be possible to replicate this https://youtu.be/YgXOTlhnWFw Quote 3CX Extension Signup: https://goo.gl/forms/acQ2RktxRbMFWAG53 Link to post Share on other sites
purplepotatoes14 588 Posted August 13, 2016 Share Posted August 13, 2016 (edited) That is so COOL! I still can't believe that we're finding things out about this game even after it's been out for a good while. I really enjoy that custom headlight strobe pattern on the Explorer! Edited August 13, 2016 by purplepotatoes14 Captain14 and BlueSteelShield 2 Quote "Please, put it in park, will ya?" "LSPD, see the lights, pullover." "Stop the vehicle, we need to have a little chat!" "Get in the car and keep your mouth shut." "You have the right to absolutely nothing." "The damn gun is jammed!" Link to post Share on other sites
Captain14 397 Posted August 13, 2016 Author Share Posted August 13, 2016 (edited) 20 minutes ago, DroidRZRLover said: Will it be possible to replicate this https://youtu.be/YgXOTlhnWFw Yes absolutely. You can create any flash pattern with 32 flashes per cycle and they can be applied to the headlights, taillights, or any individual siren. @Desmond98 I would be happy to help you with configuring an ultra realistic pattern for your upcoming explorer! Edited August 13, 2016 by Captain14 Quote Link to post Share on other sites
CiscoFan 98 Posted August 13, 2016 Share Posted August 13, 2016 11 minutes ago, Captain14 said: Yes absolutely. You can create any flash pattern with 32 flashes per cycle and they can be applied to the headlights, taillights, or any individual siren. @Desmond98 I would be happy to help you with configuring an ultra realistic pattern for your upcoming explorer! Desmond98 and I are working together We will gladly accept the ultra realistic flash pattern Quote 3CX Extension Signup: https://goo.gl/forms/acQ2RktxRbMFWAG53 Link to post Share on other sites
Captain14 397 Posted August 13, 2016 Author Share Posted August 13, 2016 43 minutes ago, royalx7 said: To go along with HankVoight, i'd have to think that it would also be much more stable.. Instead of extras rapidly firing, using rockstars script would probably be better. (Tbh I'm not too sure how stable ELSV is, it could be perfect and I wouldn't know, just making an assumption). I'm certain ELS will be stable (at least much more so than the IV version) but as with any added plugin you will have crashes. As this uses the built-in system for lighting it will be more stable, but as another user has noted this does not offer the ability to change siren tones like ELS does. Quote Link to post Share on other sites
FRGamer 1425 Posted August 13, 2016 Share Posted August 13, 2016 This is really cool, thank you! Quote Link to post Share on other sites
GravelRoadCop 1308 Posted August 13, 2016 Share Posted August 13, 2016 Does this also influence the intensity/brightness of environmental lighting ? Quote Link to post Share on other sites
Captain14 397 Posted August 13, 2016 Author Share Posted August 13, 2016 1 hour ago, GravelRoadCop said: Does this also influence the intensity/brightness of environmental lighting ? I have yet to experiment with it but I believe this can also be changed. I'll try messing with it later if I get the time. thegreathah and GravelRoadCop 2 Quote Link to post Share on other sites
Captain14 397 Posted August 13, 2016 Author Share Posted August 13, 2016 @GravelRoadCop environmental lighting: GravelRoadCop 1 Quote Link to post Share on other sites
Scuderio 2405 Posted August 13, 2016 Share Posted August 13, 2016 That's so awsome, I'm looking for future posts. Quote Link to post Share on other sites
GravelRoadCop 1308 Posted August 13, 2016 Share Posted August 13, 2016 (edited) Today is a good day. So if I have a custom ambulance model installed, I can edit the file above and use custom flash patterns for the ambulance model ? Or does it require model editing as well in order to load the custom patterns ? Edited August 13, 2016 by GravelRoadCop Quote Link to post Share on other sites
Jakeus 47 Posted August 13, 2016 Share Posted August 13, 2016 From what I gather @GravelRoadCop it's simply editing the carcols.ymt file, no vehicle modeling required. Time to have a play! Be interesting to see what everyone comes up with! Quote Link to post Share on other sites
GravelRoadCop 1308 Posted August 13, 2016 Share Posted August 13, 2016 2 minutes ago, Jakeus said: From what I gather @GravelRoadCop it's simply editing the carcols.ymt file, no vehicle modeling required. Time to have a play! Be interesting to see what everyone comes up with! To be honest, I had to do a double-take on this because it seemed too good to be true ! How fascinating, I think I'm gonna dive into this and see what I can make ! Jakeus and Ranger61 2 Quote Link to post Share on other sites
Captain14 397 Posted August 13, 2016 Author Share Posted August 13, 2016 1 hour ago, GravelRoadCop said: To be honest, I had to do a double-take on this because it seemed too good to be true ! How fascinating, I think I'm gonna dive into this and see what I can make ! It's entirely in the carcols file. You can create extra siren settings to apply to an individual custom model if you would like to. Quote Link to post Share on other sites
Ranger61 89 Posted August 13, 2016 Share Posted August 13, 2016 I look forward to some kind of tutorial explaining the steps. @Captain14 first post is a nice start. Also, how did you see that number sequence. I still don't see 010101, etc That sound like some Dr. Harry Adams (Samuel L. Jackson's character in the movie Sphere) type skills. :D Quote MSI MPG Z490 GAMING EDGE WIFI, Core™ i7-10700 8-Core 2.9 - 4.8GHz Turbo, MSI GeForce RTX™ 2070 TRI FROZR, 16GB Kit (2 x 8GB) HyperX FURY DDR4 2666MHz, 500GB Black SN750 2280 M.2 SSD, 1TB MX500 7mm, 560 SSD Link to post Share on other sites
densup 50 Posted August 13, 2016 Share Posted August 13, 2016 (edited) 14 hours ago, HankVoight said: This is actually really neat, having the ability to change/create patterns via a simple text change is truly amazing. If this does become fruitful and a script like the ELS pattern changer could be made to read the file and maybe even have the ability to change patterns while in game (like a plugin) could create virtually unlimited possibilities for everyone. And also maybe render ELS obsolete as then the only feature it would have over default lighting is the ability to change siren tones (which I'm sure a script could be written to do as well). I do look forward to more info on your research! Possibly RIP ELS, all that time for nothing, kek. But on a serious note, good thread. The ENV can also be greatly effected by altering these lines. <lightFalloffMax value="55.60000000"/> <lightFalloffExponent value="10.00000000"/> <lightInnerConeAngle value="0.00000000"/> <lightOuterConeAngle value="25.60130000"/> As far as I've tested, you can do whatever you want. I'm sure if this is tweaked enough for all the sirens, we could have a great mix of ELS enhancers! I recommend doing some small research on light falloff exponent values and falloff to get a better understanding of what you're editing. Edited August 13, 2016 by densup Quote Link to post Share on other sites
Captain14 397 Posted August 13, 2016 Author Share Posted August 13, 2016 1 hour ago, Ranger61 said: I look forward to some kind of tutorial explaining the steps. @Captain14 first post is a nice start. Also, how did you see that number sequence. I still don't see 010101, etc That sound like some Dr. Harry Adams (Samuel L. Jackson's character in the movie Sphere) type skills. :D 0 is off, 1 is on. It's a 32 bit unsigned integer and the sequence of bits determines the flash pattern. So 0101 would be off, on, off, on. You can totally customize these settings and the game will cycle through the pattern you give it X times per minute (sequencerBpm value). Quote Link to post Share on other sites
thegreathah 4541 Posted August 13, 2016 Share Posted August 13, 2016 4 minutes ago, Captain14 said: 0 is off, 1 is on. It's a 32 bit unsigned integer and the sequence of bits determines the flash pattern. So 0101 would be off, on, off, on. You can totally customize these settings and the game will cycle through the pattern you give it X times per minute (sequencerBpm value). Awesome... I'll have to see what I can come up with. Quote #FuckyouTakeTwo Link to post Share on other sites
Captain14 397 Posted August 13, 2016 Author Share Posted August 13, 2016 Okay so I've done a little bit more research and also tested out a few other flash patterns. It is possible to enable environmental lighting for coronas (visible in video). You have to set the "light" value to true to enable it. I do not yet know if it is possible to enable environmental lighting without using coronas. I am going to further research this. All lights seem to be placed into two groups (0 and 1), I am not yet sure what these groupings determine. "delta" and "start" values under the flashiness section determine the rotation of the light mesh and corona when active. You can change how much the sirens scale when enabled. Here is another quick demo video. I played around with the explorer a little and altered the flash patterns some more: The valor is using siren7 and siren8. The rear window lights are using siren2 and siren5. The grille lights are using siren15 and siren16. The front strobes are using two sirens each in this video (sirens 1, 6, 19, and 20) but I will be reducing this to 2 by rotating 19 and 20. The traffic advisor is again an extra using siren9 and siren10. Finally, the rear taillight strobes are not using the default taillight flashing system but are using siren3 and siren4. You can see in the video that the lights with visible coronas (corner strobes) are environmental. Coronas are currently hidden for my other lights but can be added easily. In the video you may notice that the left taillight strobe seems buggy; I believe this is due to my not-so-great graphics settings. More research soon to come. Thomas199920, Desmond98 and RuKriM 3 Quote Link to post Share on other sites
purplepotatoes14 588 Posted August 13, 2016 Share Posted August 13, 2016 Spoiler 48 minutes ago, Captain14 said: Okay so I've done a little bit more research and also tested out a few other flash patterns. It is possible to enable environmental lighting for coronas (visible in video). You have to set the "light" value to true to enable it. I do not yet know if it is possible to enable environmental lighting without using coronas. I am going to further research this. All lights seem to be placed into two groups (0 and 1), I am not yet sure what these groupings determine. "delta" and "start" values under the flashiness section determine the rotation of the light mesh and corona when active. You can change how much the sirens scale when enabled. Here is another quick demo video. I played around with the explorer a little and altered the flash patterns some more: The valor is using siren7 and siren8. The rear window lights are using siren2 and siren5. The grille lights are using siren15 and siren16. The front strobes are using two sirens each in this video (sirens 1, 6, 19, and 20) but I will be reducing this to 2 by rotating 19 and 20. The traffic advisor is again an extra using siren9 and siren10. Finally, the rear taillight strobes are not using the default taillight flashing system but are using siren3 and siren4. You can see in the video that the lights with visible coronas (corner strobes) are environmental. Coronas are currently hidden for my other lights but can be added easily. In the video you may notice that the left taillight strobe seems buggy; I believe this is due to my not-so-great graphics settings. More research soon to come. Wow, this almost replicates an ELS pattern. That's awesome! redoper 1 Quote "Please, put it in park, will ya?" "LSPD, see the lights, pullover." "Stop the vehicle, we need to have a little chat!" "Get in the car and keep your mouth shut." "You have the right to absolutely nothing." "The damn gun is jammed!" Link to post Share on other sites
grimdar 83 Posted August 14, 2016 Share Posted August 14, 2016 (edited) Falloff values allow you to set the lights to reflect off objects much further. Short video I made here, you can see the light reflect off the buildings and tree. I set "lightfalloffMax" and "lightfalloffExponent" to a value of 80. Why would Rockstar have such low falloff values is beyond me, default is very unrealistic and there appears to be no performance issues. Edited August 14, 2016 by grimdar ESU, thegreathah, Nikopol and 6 others 9 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.