How do I get NPC to drive modified cars?
-
In GTA V you will see some NPCs driving a modified Ruiner, Turismo, etc. So I wanted an NPC to drive a Coquette that a tuned to resemble a Corvette ZR7, How do I do that?
-
its randomly picked for what they are customized with I think
-
...\mods\update\update.rpf\common\data\ai\ vehiclemodelsets.meta
In that file you will find all the modded/upgraded vehicles that spawn around Los Santos.
There are various sections headed:
<Item type="CAmbientModelSet">
that define the vehicles that spawn at certain locations. It should be pretty easy to figure out which one you want to replace. Search for '<Name>RUINER</Name>' etc to find the vehicle you want to replace & then change it's name, body colour & upgrades to the values for your modded Coquette.
Note: There are 4 modded Ruiners in there. Use the bodycolour codes:<Name>RUINER</Name> <Variations type="CAmbientVehicleModelVariations"> <BodyColour1 value="54" /> primary colour <BodyColour2 value="81" /> secondary colour <BodyColour3 value="37" /> pearlescent colour <BodyColour4 value="156" /> wheels colour
refering to this chart to tell which is which
Note: 'BodyColour1/2/3/4' = primary/secondary/pearlescent/wheels etc may vary on modded vehicles at the mod authors discretion. Secondary paints the wheels on some cars for example.
Modded Add-on Vehicle Example:
<Item type="CAmbientModelSet"> <Name>LS_CUSTOMS_MODDED_SP</Name> <Models> <Item> <Name>500gtrlam</Name> <Variations type="CAmbientVehicleModelVariations"> <BodyColour1 value="53" /> <BodyColour2 value="92" /> <BodyColour3 value="92" /> <BodyColour4 value="22" /> <WindowTint value="2" /> <ColourCombination value="-1" /> <Livery value="2" /> <ModKit value="0" /> <Mods> <Item> <ModType>VMT_BUMPER_F</ModType> <ModIndex value="15" /> </Item> <Item> <ModType>VMT_BUMPER_R</ModType> <ModIndex value="10" /> </Item> <Item> <ModType>VMT_SPOILER</ModType> <ModIndex value="5" /> </Item> <Item> <ModType>VMT_BONNET</ModType> <ModIndex value="7" /> </Item> <Item> <ModType>VMT_EXHAUST</ModType> <ModIndex value="6" /> </Item> <Item> <ModType>VMT_WHEELS</ModType> <ModIndex value="17" /> </Item> <Item> <ModType>VMT_SUSPENSION</ModType> <ModIndex value="3" /> </Item> <Item> <ModType>VMT_SKIRT</ModType> <ModIndex value="0" /> </Item> <Item> <ModType>VMT_GRILL</ModType> <ModIndex value="8" /> </Item> <Item> <ModType>VMT_CHASSIS</ModType> <ModIndex value="1" /> </Item> <Item> <ModType>VMT_ROOF</ModType> <ModIndex value="0" /> </Item> </Mods> <Extra1>Either</Extra1> <Extra2>Either</Extra2> <Extra3>Either</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> <Item> <Name>500gtrlam</Name> <Variations type="CAmbientVehicleModelVariations"> <BodyColour1 value="3" /> <BodyColour2 value="5" /> <BodyColour3 value="5" /> <BodyColour4 value="158" /> <WindowTint value="2" /> <ColourCombination value="-1" /> <Livery value="3" /> <ModKit value="0" /> <Mods> <Item> <ModType>VMT_BUMPER_F</ModType> <ModIndex value="13" /> </Item> <Item> <ModType>VMT_BUMPER_R</ModType> <ModIndex value="8" /> </Item> <Item> <ModType>VMT_SPOILER</ModType> <ModIndex value="3" /> </Item> <Item> <ModType>VMT_BONNET</ModType> <ModIndex value="5" /> </Item> <Item> <ModType>VMT_EXHAUST</ModType> <ModIndex value="5" /> </Item> <Item> <ModType>VMT_WHEELS</ModType> <ModIndex value="10" /> </Item> <Item> <ModType>VMT_SUSPENSION</ModType> <ModIndex value="3" /> </Item> <Item> <ModType>VMT_SKIRT</ModType> <ModIndex value="0" /> </Item> <Item> <ModType>VMT_GRILL</ModType> <ModIndex value="6" /> </Item> <Item> <ModType>VMT_CHASSIS</ModType> <ModIndex value="1" /> </Item> <Item> <ModType>VMT_ROOF</ModType> <ModIndex value="0" /> </Item> </Mods> <Extra1>Either</Extra1> <Extra2>Either</Extra2> <Extra3>Either</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> </Models> </Item>
Those examples above also spawn on the streets in certain locations. Not just outside LS Customs.
Note: ModIndex value's you enter are offset by 1 - ie 0 = 1 - ie You put 5 in the 'ModIndex value=' line to choose the 6th upgrade listed in trainer etc (liveries work similar I believe).
Example:
<Item> <ModType>VMT_SPOILER</ModType> <ModIndex value="7" /> </Item>
^This would choose the 8th Spoiler in the trainer list.
Extra:
<ModKit value="0" /> -- Chosen Upgrades are applied <ModKit value="1" /> -- Upgrades are disabled & vehicle is standard.
^Something to be aware of if you find yourself unable to upgrade a vehicle etc.
That should be most of what you need to get started. Any questions/problems & I'll help you out