Skip to content
View in the app

A better way to browse. Learn more.

LCPDFR.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Implementing colors through carvariations.meta (police3, police4)

Featured Replies

Hello dear all!

 

In order to change colors of some police car, I read that colors of cars should be changed in carvariations.meta.

I tried many times to load a carvariations.meta via LML but it doesn't work yet and I'm getting a bit desperate how to solve it.

 

1. I edited the install.xml file of ExtaSlots (https://www.lcpdfr.com/downloads/gta5mods/datafile/29393-lml-extra-slots) but didn't change the <DataFiles> part of the file.

Because I wanted to change the colors of police3, police4, sheriff, sheriff2, and others I made some adjustments to the carvariations.meta.

I put my edited version of carvariations.meta in LML/ExtraSlots/data and replaced the old one. carvariations.meta

When I tried to open the game, it crashed.

 

2. I tried also another way. I extracted the carvariations.meta out of update/update.rpf/dlc_patch/mpluxe/common/data and added new lines for police3 etc. because somebody wrote on LSPDFR that the carvariations of police3 is hardcoded in game. This didn't work out.

 

3. When I loaded an extra file which only contains only the colors of the cars which I wanted to change, with LML as a addon to the path update/update.rpf/dlc_patch/mpluxe/common/data, then the sheriff car changed color, the rest does not.

 

So two questions.

I assume that it is possible to load carvariations.meta via LML. But what code has to be written in the carvariations.meta in order to load all colors of the file in game and how has that file to be loaded?

And: Why aren't the colors of police3 and police4 loading in game but only in black and white?

 

Thank you for your responses! I am interested to get an understanding of how these files work in GTA, not quick solutions.

 

P.S. I already know these URLs:

https://www.lcpdfr.com/forums/topic/83252-what-do-i-have-to-edit-to-change-vehicle-color/

https://www.lcpdfr.com/forums/topic/81768-carvariations/

https://www.lcpdfr.com/forums/topic/63950-vehicle-texture-white/

 

https://imgur.com/a/F4Ptk

 

  • Management Team

You can load carvariations.meta just fine using LML, see Coastal Callouts for example. I suspect you are having issues because you are trying to replace existing colors but loading in the file as if it was for a new vehicle. Try loading it as a single entry replacement instead, perhaps that works. With certain data files it can be a bit tricky when you want to replace them, as it depends on how the game parser treats new entries for the same name: are they overwritten or discarded? This varies by parser, but the majority will reject new entries hence the replacement trick might be all you need to make it work (it will ensure your file is loaded before the first game file of that type).

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

  • Author

Hello LMS,

 

thank you for a first suggestion. Your answer made the circumstances a bit clearer for me.

So, if I understood it right, the next step for me is making an install.xml which only contains the e.g. police3 color information, which has to be replaced in the carvariations.meta in update/update.rpf/dlc_patch/mpluxe/common/data. For that, do I need this? (From install.xml guide)

image.png.a4838a0beb416e9c35939214fa5f9717.png

If so, how would the install.xml file of the color replacement look like?

If you could provide a example file or an description on what attention should be payed, it would be very helpful. I know the basics of install.xml files but I think that's a bit too difficult for me ^^.

 

Greetings from (also) Germany

  • Management Team

Yes, you would supply a data file containing all tags as usual, but only one entry. In this case the entry for POLICE3. The corresponding install.xml tag would look something like this:

<FileEntryReplacement type="CARCOLS_FILE">carvariations.meta</FileEntryReplacement>

See this article for more information, under "Single File Entry Replacement":

 

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

  • 2 weeks later...
  • Author

Hey again,

 

needed a little bit of time because of the second GTA update in May. Whatever...

I tried to implement the install.xml and the carvariations.meta as a single entry file but it didn't work out.

In attach also the carvariations.meta and related install.xml. Did I make a mistake somewhere in the files? If so, where? If not, what should I do next?

 

Thank you and have a nice day :)

black BMW.png

carvariations.meta install.xml

  • Management Team

Alas there is a chance this just does not work for carvariations.meta. A quick check of the game code reveals that it is loaded differently than say handling.meta which initially loops through all data files and loads them. Instead, carvariations.meta only loads one specific file "platform:/data/carvariations.ymt" and as such LML is not intercepting it. It should be possible in the future to add interception for this call, but I cannot say when/if I will add that.

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

  • Author

Hello @LMS,

 

Alright, that is unfortunate at this time.

Would it be generally possible to edit carvariations.meta or carvariations.ymt in the game files with mods folder and OpenIV in order to change the color of police3/4? If so, in which path should the file be replaced?

Or is there a (downloadable) mod on LSPDFR.com which provides this kind of color change?

 

Thanks for your answer.

  • Management Team

You can do that with both OpenIV or LML, however you will have to replace the entire file. If you search for the file name in OpenIV, see where it pops up. If it is present in update, that is the one you are after. Then, as I said, you could replace it using mods folder or file replacement via LML (however, this time not just a single entry but whole file).

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

  • Author

Hello @LMS

 

unfortunately the approach didn't work out with carvariations.ymt as well as with carvariations.meta.

In my first question I said that carvariations.meta didn't work with both LML and mods folder. Besides that there is no entry in carvariations.meta for police3, so I tried to implement it with carvariations.ymt.

I extracted carvariations.ymt from the game as a .xml file, changed two colors from police3 in the file and loaded it with LML as carvariations.ymt.xml (?!) as a replacement in update folder. The game crashed when I tried to open it.

I also tried to load the file directly via the mods folder. When I drag and dropped the .ymt.xml file in the mods folder, OpenIV converted it and then it was a .ymt file. But the game crashed also on startup.

 

So what I should do now? Is it even possible to load a carvariations.ymt file in GTA? And how do I load a carvariations.meta file when there is no entry for police3 in that file?

 

On 5/11/2022 at 12:29 PM, aLExGO said:

3. When I loaded an extra file which only contains only the colors of the cars which I wanted to change, with LML as a addon to the path update/update.rpf/dlc_patch/mpluxe/common/data, then the sheriff car changed color, the rest does not.

Using LML and carvariations.meta, a addon with carvariations.meta is also not possible.

 

Am I doing a mistake somewhere? 

 

Thanks for your patience and support 🙂

  • Management Team

If you cannot find your vehicle in any of the .meta files, chances are it might be in the main .ymt file. If you want to use LML, you would have to extract the file via OpenIV, change the meta, import it back into any RPF (could be a new one) with OpenIV to get a ymt, then export that ymt again and use it. This is because ymts can only be replaced with ymts. The path would for instance look like this:

 

Spoiler

<FileReplacement>

    <GamePath>update:/x64/data/carvariations.ymt</GamePath>

    <FilePath>carvariations.ymt</FilePath>

</FileReplacement>

 

Try this with a vehicle in there, for instance ninef. If you replace all its color definitions with say 134 (white) and then spawn it in-game, it should always be white. Alternatively, if you do not wish to use LML for this, you could also just do the replacement via the OpenIV mods folder. Just make sure not to replace ymt with meta.

 

That being said, perhaps there is something funky with police cars and their colors (override via some DLC?). That's why I suggest you try with a different car first and see if it works. If it does, but it does not work with POLICE3, you at least know it is not your method that is at fault, but there is either a general problem with police vehicles or they are located and overwritten from some other DLC.

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

  • Author
On 6/12/2022 at 3:21 AM, LMS said:

If you cannot find your vehicle in any of the .meta files, chances are it might be in the main .ymt file. If you want to use LML, you would have to extract the file via OpenIV, change the meta, import it back into any RPF (could be a new one) with OpenIV to get a ymt, then export that ymt again and use it. This is because ymts can only be replaced with ymts. The path would for instance look like this:

Yes, I did that and it workes out fanatastically.

 

On 6/12/2022 at 3:21 AM, LMS said:

Try this with a vehicle in there, for instance ninef. If you replace all its color definitions with say 134 (white) and then spawn it in-game, it should always be white. Alternatively, if you do not wish to use LML for this, you could also just do the replacement via the OpenIV mods folder. Just make sure not to replace ymt with meta.

Also replacing the color lines for ninef works for every car in game.

 

On 6/12/2022 at 3:21 AM, LMS said:

That being said, perhaps there is something funky with police cars and their colors (override via some DLC?). That's why I suggest you try with a different car first and see if it works. If it does, but it does not work with POLICE3, you at least know it is not your method that is at fault, but there is either a general problem with police vehicles or they are located and overwritten from some other DLC.

 You're right. Because I noticed that it was not the method, but either the car or the police3 slot, I repalced the car with another one. Then I noticed the following. The car spawned in the color, which was given on the download page's screenshots. Means: I downloaded the car on a site where the screenshots of the car color was black.

So GTA (files, DLC?) seems to keep the color to the initial color of the car.

 

I noticed the difference because when I replaced the car in the police3 slot and changed the color of this car manually through a trainer, the initial color stayed and other colors were underlaying it. So I had at this car a brown and under this color a e.g. red (given through trainer) and both colors were displayed at the same time.

 

So you're right when you're saying there could be a file in GTA whiich is responsible for the initial/base color whic is given to the police slots 3 and 4. The question is: Where to find this file? Any ideas would be welcome!

 

Have a nice day! @LMS

  • 2 weeks later...
  • Management Team

Unfortunately, I am not sure from where it is overridden. But you are probably not the first one with this issue, so searching for "police3 carvariations" or something similar should hopefully yield some good results.

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

  • Author

So, I searched again and except this (https://www.lcpdfr.com/forums/topic/66927-location-ofcarvariations-vehiclemeta-files-for-all-police-cars-most-upto-date/#comment-523255) there was not much else to find.

After all I changed the unmarked vehicles from police3 and 4 to the slots police 5 und 6 and everything works fine. Would be interesting if somebody finds out in the future how this overriding thing works for hardcoded vehicles as police3, 4 etc.

At this point, many thanks to @LMS for helping me understand how the color thing works in GTA.

 

Have a nice day, folks! :)

 

This is a support topic.
Only reply here to offer help or assistance to aLExGO. Off-topic or "me too" replies will be removed.

Need support yourself? Make a new topic instead.

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...

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.