Need help with vehicles.meta files
Hi, I downloaded a police Mercedes sprinter and in the zip file the model files were policet but I had already replaced the police transporter with a different vehicle, so I replaced sheriff2. when I tested it, it fell over all the time because I had not fixed the vehicles.meta, it had a vehicles.meta file but because of the model being from the beginning policet and i already had I vehicle on policet with its vehicles.meta, i copied everything for policet in the sprinters vehicles.meta file except for "<modelName>policet</modelName> <txdName>policet</txdName <handlingId>POLICET</handlingId> <gameName>POLICET</gameName>" using notepad++. then in the gta vehicles.meta, I marked everything in sheriff2 from the same place as when I copied the policet and then I pasted what I copied is now in sheriff2 aswell but in the gta vehicles.meta. afer that i saved the changes and I overwrote the vehicles.meta in openiv with the changed vehicles.meta, but in-game the sprinter still falls over and it's not because of speed, I fell over when I was driving at around 50km/h/31 mph can someone help me!
Does it fall over when you turn? If so:
<vecCentreOfMassOffset x="0.000000" y="0.000000" z="Lower this value. Can be negative if required" />
@a63nt-5m1th Okay thank you! but how much do you think i have to lower it?
That totally depends. The max I've ever had to use to find the perfect centre of mass was +6 (you will be lowering the value obvs, possibly negative if required).
Try lowering the value by 0.5 to 1.0 at a time. If you go way too low, you'll feel it, like a pendulum hanging down below your vehicle.
Generally, you want to lower it to the point where the vehicle no longer tips over under any normal driving circumstances. Somewhere about there will be the best/most realistic value for it, slightly too low & it will hug the ground with no roll or, if lowered even further, negative roll (rolling into corner etc).
@a63nt-5m1th i can't find the sheriff2 in all the handling.meta;s
It uses the fbi2 handling:
<Item> <modelName>sheriff2</modelName> <txdName>sheriff2</txdName> <handlingId>FBI2</handlingId> <!-- uses 'fbi2' '<handlingName>' in 'handling.meta' --> <gameName>SHERIFF2</gameName> <vehicleMakeName />
The cleanest way to handle a situation like this is just to make a duplicate of the entire fbi2 handling block of data in the same 'handling.meta':
& then rename that duplicate's '<handlingName>' line to 'sheriff2':
Rename this part of duplicate:
<Item type="CHandlingData"> <handlingName>fbi2</handlingName>
<Item type="CHandlingData"> <handlingName>sheriff2</handlingName>
Then find the 'sheriff2's 'vehicles.meta' data:
& change it's '<handlingId>' line to 'sheriff2':
<Item> <modelName>sheriff2</modelName> <txdName>sheriff2</txdName> <handlingId>fbi2</handlingId> <!-- change 'fbi2' here to 'sheriff2' --> <gameName>SHERIFF2</gameName> <vehicleMakeName />
The 'fbi2' & 'sheriff2' will now have separate handling profiles.
Finally, back in the 'update.rpf' 'handling.meta', edit the '<vecCentreOfMassOffset' line accordingly in the new 'sheriff2' duplicate handling block & test result in-game
I read some of your tutorials, thank you for sharing
but do you have any idea of which file determines the spawn location and frequency of a car like adder?
i tried to find adder by looking into popgroups.ymt and vehiclemodelsets.meta but to no avail.
You would add it into a section within the '<vehGroups>' section in 'popgroups.ymt' ('like 'VEH_RICH', but any '<vehGroups>' section will work).
That will allow it to spawn ambiently in traffic etc.
The adder (or any car in popgroups) can be seen just about anywhere really, it depends on a lot of things. Frequency (see below) has a much larger impact on whether you see a vehicle than location, although there may be a slightly higher chance of seeing rich cars in rich locations etc.
The only vehicles that have set spawn locations are he ones in 'vehiclemodelsets.meta'.
Have a read of this for setting the frequency of vehicle spawns.
The only thing I would add to that post is that setting any vehicle with 'SWANKNESS_5' in it's 'vehicles.meta' data:
will make it really rare to spawn (even if it's the only vehicle at all set to spawn in popgroups), so make sure it is set to SWANKNESS_4 or lower
Thank you for the input, appreciate it!
still i'm curious how adder works without being in the 2 files i mentioned earlier...
i only found it in vehicle.meta, but i guess it doesn't really indicate the specific location it spawns, although i know it always spawn at the same space in front of one of the store in rockford hills
If driving around, would likely be chosen by the game as part of a random vehicle scenario, or if parked, most likely would be selected by a car generator in a '.ymap'