[ Tutorial ] How to make specific vehicle EXTRAS appear on a vehicle EVERY spawn.
SOME USEFUL VEHICLES.META FLAGS & WHAT THEY DO:
FLAG_EXTRAS_REQUIRE - Always spawn ONLY ONE RANDOM EXTRA.
FLAG_EXTRAS_ALL - Always spawn ALL EXTRAS.
FLAG_EXTRAS_RARE - Spawn ONLY ONE RANDOM EXTRA but ONLY ~15% of the time (~85% of the time no EXTRAS will spawn).
These flags (& any others) are written in the 'vehicles.meta' '<flags>' line like so:
<flags>FLAG_EXTRAS_RARE FLAG_SPORTS FLAG_RICH_CAR FLAG_HAS_INTERIOR_EXTRAS</flags>
They should be written all on the same line with a space between each of them.
FORCE SPECIFIC EXTRAS TO ALWAYS SPAWN:
To make this happen you need to make two small edits to your vehicle in 'vehicles.meta'.
For this example I'm going to force EXTRA_4 & EXTRA_11 to always spawn but you can just change these values to the extras you want to have spawn (...'>EXTRA_3 EXTRA_5 EXTRA_10<'... etc for example. You can put as many extras as you like in the lines).
As with the above flags the EXTRAS (below) are separated with a space.
1)- Find the line:
& change it to this format:
<extraIncludes> <Item>EXTRA_4 EXTRA_11</Item> </extraIncludes>
Now find the line:
& change that to this format:
That's it. Now everytime the vehicle spawns EXTRA_4 & EXTRA_11 will ALWAYS spawn also.
Note: If either of these edits are missing or incorrect the game will go back to default random extra spawning. Both are required to make it work.
HOW THESE EDITS WORK IN COMBINATION WITH FLAGS:
These two settings above work in combination with any flags set in the '<flags>' line.
For example if I was to add 'FLAG_EXTRAS_REQUIRE' to the '<flags>' line also, then EXTRA_4, EXTRA_11 & one random EXTRA would spawn all together on the vehicle.
In this scenario it is also possible for the FLAG_EXTRAS_REQUIRE's random extra to also be either EXTRA_4 or EXTRA_11 (rather than a different random extra) resulting in only EXTRA_4 & EXTRA_11 appearing some of the time.
If the 'FLAG_EXTRAS_ALL' flag is used in combination with these edits it will override them & force ALL EXTRAS to appear ALL of the time.
For 'FLAG_EXTRAS_RARE' see below.
STOPPING SPECIFIC EXTRAS FROM SPAWNING:
There doesn't seem to be any easy way of doing this in 'vehicles.meta'. The best I found was using the 'extraIncludes' & 'requiredExtras' edits above in combination with 'FLAG_EXTRAS_RARE' so that ~85%>90% of the time the vehicle spawns with only EXTRA_4 & EXTRA_11 & ~10%>15% of the time there is an additional random extra as well.
Extra: I'm not sure how much use this will be or whether it even applies to any cars other than the Dodge Dart I was testing but I'll mention it anyway.
I was able to enter 'FLAG_EXTRAS_RARE' & 'FLAG_EXTRAS_SCRIPT' in the '<flags>' line in combination with the two edits & was able to have EXTRA_4 & EXTRA_11 spawn all of the time but restict the random (~10%>15% of the time) EXTRA to only be able to select EXTRA_1, EXTRA_2 or EXTRA_3 (no other higher numbered random EXTRAS appeared in ~350 or so spawns). It may be pure luck GTA unicorns but it worked out rather well so try it out if you think that it might suit your need
I have tried it but it seems to not working anymore I suppose
Is there any new way to do this or a mod?
What vehicle are you trying to edit?
Link to it & tell me what extras you want applied etc & I'll test it out in my game, see if I can figure anything out
@a63nt-5m1th Sure. Thank you so much for your reply help.
https://www.lcpdfr.com/downloads/gta5mods/vehiclemodels/12927-2011-crown-victoria-cvpi-18l/ (Red&Blue lights variant)
Extras I want to include: 1, 2, 4, 6, 8, 9, 12
https://www.lcpdfr.com/downloads/gta5mods/vehiclemodels/9726-2011-crown-victoria-lasdlssd/ (Sheriff variant. Not the OSS one)
Extras: 1, 4, 11
https://www.lcpdfr.com/downloads/gta5mods/vehiclemodels/10586-modelchevy-tahoe-variants-arjent-edge-slicktopsiderunners/ (Sheriff variant)
https://www.lcpdfr.com/downloads/gta5mods/vehiclemodels/12322-2016-california-highway-patrol-megapack/ (Replace ones)
2011 CVPI w. Liberty (Police) - Extras: All
2015 Dodge Charger (Police2) - Extras: 3
2016 Ford Explorer (Policeold2) - Extras: 3
Errors in files:
The first (Red&Blue lights variant) one you linked to has a broken 'carcols.meta'.
That might be why it is not working.
It needs this line at the top:
<?xml version="1.0" encoding="UTF-8"?>
Copy this line^ & overwrite the top (comment) line in that 'carcols.meta' & then save it.
The 2nd vehicle installs a full 'vehicles.meta' & 'visualsettings.dat' to 'update.rpf'.
So be aware if you have installed it, you will have lost all previous edits to both those files.
If you installed this after making previous EXTRA edits to the 'update.rpf' 'vehicles.meta', as per tutorial above, installing this '.oiv' will have undone them all.
For the vehicles you want all extras to appear on, all you have to do is add 'FLAG_EXTRAS_ALL' to the flags line in their 'vehicles.meta'.
At this point, I haven't found a single vehicle that I would be happy installing to my game.
I think the reason they are not working for you is that they are not very well made. Each of those downloads I have had a look at so far have glaring mistakes in them & on top of that, are unnecessarily complicated to install, with files going in all kinds of different locations when they could easily all be packaged in one add-on 'dlc.rpf'.
This works at least:
I can however confirm, that forcing 'EXTRA_3' to appear on the '2015 Dodge Charger (Police2)' from your 4th link works perfectly.
If you have installed it, have a look at your 'update.rpf' 'vehicles.meta' & make sure the 'extra' edits look exactly like this:
<extraIncludes> <Item>EXTRA_3</Item> </extraIncludes> <doorsWithCollisionWhenClosed /> <driveableDoors /> <bumpersNeedToCollideWithMap value="false" /> <needsRopeTexture value="false" /> <requiredExtras>EXTRA_3</requiredExtras>
This also (most likely, never tested):
Also, the 2016 Ford Explorer (Policeold2) should work too, the mod author has added 'EXTRA_1' to the 'requiredExtras' line but has forgotten to add it to the 'extraIncludes' part so it will not appear.
Both lines need to be edited for any forced extras to appear all of the time.
They have it looking like this:
<extraIncludes /> <doorsWithCollisionWhenClosed /> <driveableDoors /> <bumpersNeedToCollideWithMap value="false" /> <needsRopeTexture value="false" /> <requiredExtras>EXTRA_1</requiredExtras> <vfxExtraInfos> <Item> <ptFxExtras>EXTRA_1</ptFxExtras> <ptFxName>veh_roof_snow</ptFxName> <ptFxOffset x="0.000000" y="1.000000" z="0.000000" /> <ptFxRange value="80.0" /> <ptFxSpeedEvoMin value="5.0" /> <ptFxSpeedEvoMax value="15.0" /> </Item> </vfxExtraInfos>
you want that part looking like this (ie EXTRA_1 fixed & EXTRA_3 added):
<extraIncludes> <Item>EXTRA_1 EXTRA_3</Item> </extraIncludes> <doorsWithCollisionWhenClosed /> <driveableDoors /> <bumpersNeedToCollideWithMap value="false" /> <needsRopeTexture value="false" /> <requiredExtras>EXTRA_1 EXTRA_3</requiredExtras> <vfxExtraInfos> <Item> <ptFxExtras>EXTRA_1</ptFxExtras> <ptFxName>veh_roof_snow</ptFxName> <ptFxOffset x="0.000000" y="1.000000" z="0.000000" /> <ptFxRange value="80.0" /> <ptFxSpeedEvoMin value="5.0" /> <ptFxSpeedEvoMax value="15.0" /> </Item> </vfxExtraInfos>
All in all, I'd be very careful about installing a lot of these vehicles to your game.
At best it will be a very messy experience, at worst they could undo a lot of hard work, especially with the '.oiv' installers that will completely overwrite some of the most important files in the game.
Extra info concerning '.oiv' Installers:
You can open, edit, extract & rebuild '.oiv' installers using 7zip.
It's a good idea to get into the habit of opening any '.oiv' you intend to install & having a look at the included 'assembly.xml' file to see exactly what files are included & where it installs them.
Easiest way is to right-click the '.oiv' > 7zip > 'Extract to 'name-of-oiv-here'' & then a folder of that '.oiv' name will appear & you can navigate through it & look at the files
Don't replace whole vanilla files, instead, take the parts you need for the vehicle's you are installing & copy & paste them into the vanilla files overwriting the original data (for just that vehicle). That way you don't lose all previous edits.
See how you get on with the '2015 Dodge Charger (Police2)' & '2016 Ford Explorer (Policeold2)' edits & then, if you are determined to install all those vehicles, try some of the messier installs.
Any issues/questions, give me a shout
@a63nt-5m1th Hi there again. I fully agree their installation ways are sucks so I was decided to use Easy Mod Folder to install them as replacer. Basically it gives freedom to put every replace vehicle inside 1 folder ( mods\update\x64\dlcpacks\EMF\dlc.rpf\x64\vehicles.rpf ). However the author says not to put any .meta in EMF so I am putting them outside the EMF.
As for the location of metas, since mpheist3 is the last dlc released for the game with metas included in it I have decided to modify carcols carvariations handling and vehicles.meta in mpheist3 instead of update\update.rpf . I don't know did I do it wrong but it seems that the changes I made are working (carcols, carvariations...). The way I do the changes is I copy the lines from their metas and manually paste it on top of the existing meta at mpheist3. So they all can work and I don't overwrite one with another.
As for .oiv, I never install a vehicle with .oiv. Because very true it creates many complications. Only installing big graphic mods with oiv if they are doing different things. Like Real California Architecture, LA Roads, LA Billboards. Things like changing different things.
Oh and I also should mention. Since dispatch.meta doesn't work on add-on emergeny cars, I had to replace those cars with existing ones and changed their names to fit better with their replaced counterparts. The changes I made;
2011 CVPI w. Liberty (Police) changed to police2
2015 Dodge Charger (Police2) - fbi
2016 Ford Explorer (Policeold2) - policet
Ford Crown Victoria 2011 1.8L - police
Ford Crown Victoria 2011 LASD 1.4A - sheriff
Ford Explorer Valor 1.5 - police3
I have checked Charger and 2016 Explorer. Their metas are same as above you mentioned however they still spawn very randomly. Could it be because I replaced them with another car maybe?
Aye, EMF is a good way to do it, got that myself
Generally, anything in 'update.rpf' will be what is loaded by the game over any other location so for vehicles like 'police' & 'police2', their '.meta' data will be loaded from the ones in 'update.rpf' (unless the entries have been removed).
You can add any vehicle (inc. add-on) to 'dispatch.meta' & have it spawn as dispatch, just make sure it has the 'FLAG_LAW_ENFORCEMENT' flag added to it's 'vehicles.meta' '<flags>' line & then replace the 'police2' etc entries in the '<VehicleSets>' section with the name of the add-on vehicle/s
Example 'dispatch.meta' '<VehicleSets>' section:
<VehicleSets> <Vehicle> <Name>POLICE_CAR</Name> <!-- Relates to the 'DispatchVehicleSets' name in '<WantedResponses>' >>> 'DispatchServices' section (usually near bottom of 'dispatch.meta')--> <ConditionalVehicleSets> <Item> <ZoneType>VEHICLE_RESPONSE_ARMY_BASE</ZoneType> <!-- Vehicles that spawn in zancudo only --> <VehicleModels> <Vehicle>crusader</Vehicle><!-- change 'crusader' here to add-on vehicle name--> <Vehicle>mesa3</Vehicle><!-- change 'mesa3' here to add-on vehicle name--> <Vehicle>barracks</Vehicle><!-- change 'barracks' here to add-on vehicle name--> </VehicleModels> <PedModels> <Ped>S_M_M_Marine_01</Ped> <Ped>S_M_Y_Marine_01</Ped> <Ped>S_M_Y_Marine_03</Ped> </PedModels> </Item> <Item> <ZoneType>VEHICLE_RESPONSE_COUNTRYSIDE</ZoneType> <!-- Vehicles that spawn in countryside only --> <VehicleModels> <Vehicle>SHERIFF</Vehicle> <!-- change 'SHERIFF' here to add-on vehicle name--> <Vehicle>SHERIFF</Vehicle> <!-- change 'SHERIFF' here to add-on vehicle name--> <Vehicle>SHERIFF2</Vehicle> <!-- change 'SHERIFF2' here to add-on vehicle name--> </VehicleModels> <PedModels> <Ped>S_M_Y_Sheriff_01</Ped> </PedModels> </Item> <Item> <!-- No '<ZoneType>' = Vehicles that spawn in City only --> <VehicleModels> <Vehicle>police3</Vehicle> <!-- change 'police3' here to add-on vehicle name--> <Vehicle>police2</Vehicle> <!-- change 'police2' here to add-on vehicle name--> <Vehicle>police</Vehicle> <!-- change 'police' here to add-on vehicle name--> <Vehicle>policet</Vehicle> <!-- change 'policet' here to add-on vehicle name--> </VehicleModels> <PedModels> <Ped>S_M_Y_Cop_01</Ped> </PedModels> </Item> </ConditionalVehicleSets> </Vehicle>
Replace Vehicle Extras:
Replacing another vehicle shouldn't do anything to change extras. They will appear no matter where you put it as the extras are part of the model (.yft) & get carried with it.
Update.rpf overrides everywhere else:
For 'police/police2/sheriff/fbi/police3 & policet, try editing the 'vehicles.meta' in 'update.rpf' instead, that should work
Charger & Explorer - Extra Info:
For the Charger and 2016 Explorer, you should be able to get them to always spawn with your extras of choice, but just be aware, they will also spawn sometimes with one other random extra. You can't stop the random extra from appearing completely, but can reduce it's chance of happening down to about 10>15% of the time by adding 'FLAG_EXTRAS_RARE' to the vehicle's 'vehicles.meta' '<flags>' line ('FLAG_EXTRAS_RARE' won't affect the forced extras you've chosen, they will always appear).
@a63nt-5m1th Holy crap I have been doing this all wrong All of them worked once I put those in update.rpf, ugh..
Can't thank you enough for this, if it wasn't for you, none of my handlings were going to properly work either.. Truly thank you so so much fren. They all working purrfect now
By the by I wanna ask 1 thing. I didn't see any carcols or carvariations inside update.rpf. Do you think I am doing right by putting them in mpheist3 or should I move them to somewhere else too?
Oh actually there is carcols and carvariations in update.rpf as well. I was just looking at the wrong direction, it's at x64 instead of common and works perfectly ))
Thank you so much fren.