How would you set a default type of wheel to spawn with a vehicle?
-
Hi,
I'm trying to figure out if there is a way to spawn a vehicle with a certain wheel type, is that possible? I'm not talking about the category like sport, or high end, but the actual wheel design for example the High End category has 40 wheels, but I want ''xxxxx" car to only spawn with design number 15 of the high end wheels category. Is this possible to configure in some meta file?
Thanks for any help!
-
@FalqGTAV
It could be done using 'vehiclemodelsets.meta' but it would be rather convoluted & a bit restrictive as the vehicle would only ever spawn in certain set locations around Los Santos.
Basically, vehiclemodelsets controls the upgraded/mod kitted cars you have probably seen spawning in a few select locations (ie modded cars that randomly/intermittently turn up always driving down the same street etc). Like the modded ones outside/around Los Santos Customs. They are defined in vehiclemodelsets also.
Have a look in the file, there are quite a few different 'CAmbientModelSet' locations to choose from (153 by my count. Although a lot are Airport/Lifeguard/Police etc ones). You won't know where they spawn (unless you have seen the upgraded vehicle on the streets in the past & can recognise it in the file from it's vehicle name & upgrades choices). The spawn location info is not recorded in the file. I presume there are special ymap car generators dotted around the games ymap files that vehiclemodelsets uses. Something like that anyway.A modded vehicle in the file will look like this (scrollbar on right to see whole file):
Example:
<Item> <Name>SABREGT</Name> <Variations type="CAmbientVehicleModelVariations"> <BodyColour1 value="35" /> --- primary colour <BodyColour2 value="72" /> --- secondary colour <BodyColour3 value="28" /> --- pearlessence colour <BodyColour4 value="156" /> --- wheel/alloy colour <WindowTint value="-1" /> <ColourCombination value="-1" /> <Livery value="-1" /> <ModKit value="0" /> --- '0' means use <Mods> items below. '-1' & '1' seem to disable upgrades <Mods> <Item> <ModType>VMT_BUMPER_F</ModType> <ModIndex value="0" /> </Item> <Item> <ModType>VMT_BUMPER_R</ModType> <ModIndex value="0" /> </Item> <Item> <ModType>VMT_WING_L</ModType> <ModIndex value="-1" /> </Item> <Item> <ModType>VMT_WING_R</ModType> <ModIndex value="-1" /> </Item> <Item> <ModType>VMT_EXHAUST</ModType> <ModIndex value="2" /> </Item> <Item> <ModType>VMT_WHEELS</ModType> <ModIndex value="6" /> </Item> <Item> <ModType>VMT_SUSPENSION</ModType> <ModIndex value="0" /> </Item> <Item> <ModType>VMT_BONNET</ModType> <ModIndex value="4" /> </Item> <Item> <ModType>VMT_SPOILER</ModType> <ModIndex value="0" /> </Item> <Item> <ModType>VMT_SKIRT</ModType> <ModIndex value="-1" /> </Item> <Item> <ModType>VMT_GRILL</ModType> <ModIndex value="1" /> </Item> <Item> <ModType>VMT_CHASSIS</ModType> <ModIndex value="0" /> </Item> <Item> <ModType>VMT_ROOF</ModType> <ModIndex value="-1" /> </Item> </Mods> <Extra1>CantUse</Extra1> <Extra2>CantUse</Extra2> <Extra3>CantUse</Extra3> <Extra4>CantUse</Extra4> <Extra5>CantUse</Extra5> <Extra6>CantUse</Extra6> <Extra7>CantUse</Extra7> <Extra8>CantUse</Extra8> <Extra9>CantUse</Extra9> <Extra10>CantUse</Extra10> </Variations> <Probability value="1.000000" /> </Item>
Note: You can find the 'BodyColour1/2/3/4' values & match them to certain colours using this LSC Vehicle Colours Index Chart.
This is the bit you will be interested in:
<Item> <ModType>VMT_WHEELS</ModType> <ModIndex value="6" /> </Item>
That means that this SabreGT will always spawn with the 6th set of non-standard/non-default wheels (ie 7th set of wheels in trainer etc) in the Muscle Wheel category (or whatever category of wheel is defined in it's 'vehicles.meta'). This line:
<wheelType>VWT_MUSCLE</wheelType>
Any of the 'CAmbientModelSet' vehicles can be changed to be modded/upgraded ones so by my reckoning, if you can isolate the ones that will work for you (ie the ones that spawn on the streets/acceptable locations etc) you could add your car/cars in this format:
Example:<Item> <Name>SABREGT</Name> <Variations type="CAmbientVehicleModelVariations"> <BodyColour1 value="35" /> <BodyColour2 value="72" /> <BodyColour3 value="28" /> <BodyColour4 value="156" /> <WindowTint value="-1" /> <ColourCombination value="-1" /> <Livery value="-1" /> <ModKit value="0" /> <Mods> <Item> <ModType>VMT_WHEELS</ModType> <ModIndex value="6" /> </Item> </Mods> <Extra1>CantUse</Extra1> <Extra2>CantUse</Extra2> <Extra3>CantUse</Extra3> <Extra4>CantUse</Extra4> <Extra5>CantUse</Extra5> <Extra6>CantUse</Extra6> <Extra7>CantUse</Extra7> <Extra8>CantUse</Extra8> <Extra9>CantUse</Extra9> <Extra10>CantUse</Extra10> </Variations> <Probability value="1.000000" /> </Item>
& they would spawn default but with the wheels you defined in the '<ModType>VMT_WHEELS</ModType>' '<ModIndex value' line .
The only issues I can see is that you will either have to find a way to define a random colour combination in the '<BodyColour1 value=' lines. Maybe '0' or '-1' might make the game choose a colour at random or removing the lines & defining a random colour in the actual car generator in the ymap (not sure about any of that. Pure guess work) or you would have to add multiple different coloured cars into the file in which case I suspect the game at some point (once you added too many vehicles to the file) would start acting a bit funny & doing things like swapping cars for aeroplanes & trying to make them takeoff from the airport runways (yes, that has happened lol).
As mentioned, it is a bit convoluted & restrictive but I don't know of any other way that I have any actual evidence of.
Idea:
If you could define your own wheel category. Say:
<wheelType>VWT_SABRE</wheelType>
then fill that category with only one set of wheels (wheel_sabre_01.ydr) the game would have no choice but to put the same set of wheels on any vehicle that had 'VWT_SABRE' set in it's 'vehicles.meta' file.
You get add-on wheel packs with new naming systems anyway ('wheel_hqbrimsspt_01.ydr' for example) so this might actually be possible... If this does work, I apologise for making you read all of ^that^ before getting herelol...
...Trying to find a file that might allow me to define a new wheel category (VWT_SABRE etc) is all that is missing from this hypothesis.
One way that could work (but only for one car) would be to ditch all the say... low rider wheels & only have your one select set of rims in there & then use 'VWT_LOWRIDER' in the vehicle's '<wheelType>' line in 'vehicles.meta' (making sure to remove it from other vehicles also)... or ditch the wheels you don't like from all the categories freeing up space in one category to use in this way.
...Hmmm
, To have a chance of defining a completely new wheel category I would first need to extract every single data file from the game & do a search through all of them for 'VWT_' (no small feat) & see if anything pops up. I can't find anything that looks likely in OpenIV search anyway
. I suspect given that I have never seen a new wheel category defined in any wheel mod packs I have downloaded that it is not possible to create a new category but you never know... maybe. Anyway, I hope you enjoyed my book
Hope some of this might give you a few ideas anyway. I'll certainly let you know if I do figure anything else out that might help you
-
Wow! Didn't expect a whole thesis on my question haha! You really know your stuff, Thank you so much, it certainly looks a lot more complex than I originally thought. Thanks for all the info, now its time for me to poke at those meta files and see if something works
-
@FalqGTAV - Pro tip: Get used to that Guy above and take a day-off whenever you ask Him a question.
-
@FalqGTAV
I did a search of all '.meta', '.dat' & '.xml' files in the game but never found anything I could use to define a new wheel categoryI did discover that lowrider wheels appear to have 3 categories:
VWT_LOWRIDER
VWT_SUPERMOD1--- Benny's originals or bespoke (not sure which is which)
VWT_SUPERMOD2 --- Benny's originals or bespokeSo in total there are 10 different wheel categories in the game:
VWT_SPORT
VWT_MUSCLE
VWT_LOWRIDER
VWT_SUV
VWT_OFFROAD
VWT_TUNER
VWT_BIKE
VWT_HIEND
VWT_SUPERMOD1
VWT_SUPERMOD2Although I'm not sure if 'VWT_SUPERMOD1' & 'VWT_SUPERMOD2' can be used in 'vehicles.meta' '<wheelType>' line & spawn on ambient cars on the streets? I think they might be mod shop only.
I also happened to notice that modded add-on/replace vehicles always spawn with the default wheels defined in their '.yft' so I actually think the easiest way to do this might be to break out ZModeler3 & use that to set a specific wheel in the '.yft'. I also think the wheel that's in the '.yft' overrides any wheel category set in 'vehicles.meta' so if you want to do this with a modded add-on/replace vehicle ZModeler might be a good way to get it done.
Note: The vehiclemodelsets way outlined above will work no matter what. It overrides 'vehicles.meta' '<wheelType>' & the default wheel in the '.yft'