[ Tutorial ] How to disable/remove specific EXTRAS from vehicles/vehicle spawns
As with anything modding related, make backups of everything you intend to edit first.
For GTA V, I wholeheartedly recommend backing up the entire '.rpf' archive, not just the files you are editing.
That has got me out of a few tight spots over the years & can mitigate the task of having to reinstall every edited file to a '.rpf' if things go wrong.
HOW TO REMOVE EXTRAS FROM VEHICLES:
- Export vehicle's '.yft' & '_hi.yft' to '.yft.xml' using Codewalker's RPF Explorer.
- Edit '.yft.xml' files using text editor & reduce scale of selected extras to zero to stop them from appearing in-game.
- Import vehicle's '.yft.xml's back into the game using Codewalker's RPF Explorer.
Make a note of what extras you want to remove:
- Boot up the game, spawn the vehicle & using a trainer make a note of what extras you do not want to appear.
- They are numbered the same in the files as they are in ENT anyway, so figure most trainers will be the same.
Export vehicle '.yft' to '.yft.xml' using Codewalker:
- Grab yourself a copy of CodeWalker. Either, download v0.29 here or join the CodeWalker discord for newer versions
- Once you have a copy of CodeWalker load up it's 'RPF Explorer' (either, CodeWalker > '[<<]' button (top right) > '[Tools]' > 'RPF Explorer...' or in new versions you can find the 'CodeWalker RPF Explorer.exe' in Codewalker's install folder & load it on it's own from there).
- In 'CodeWalker RPF Explorer' track to the location of the vehicle you want to remove extra's from.
- Once there, highlight the vehicle's '.yft' by left clicking on it & then use 'Ctrl+left-click' to also highlight it's '_hi.yft'.
- With both files selected/highlighted, right-click & select 'Export XML...'.
- Select a location for the exported '.yft.xml's & hit '[OK]'
Edit '.yft.xml' using a Text Editor (like Notepad++ etc):
- Track to the '.yft.xml' export location & open them with your text editor of choice
- Search for 'extra' in the '.yft.xml's & near the top you will find sections like this for each of the extras:
<Item> <Name>extra_8</Name> <Tag value="8881" /> <Index value="11" /> <ParentIndex value="0" /> <SiblingIndex value="12" /> <Flags>RotX, RotY, RotZ, TransX, TransY, TransZ</Flags> <Translation x="2.273737E-13" y="-1.966892" z="-0.1955207" /> <Rotation x="0" y="2.710494E-20" z="-2.842159E-14" w="1" /> <Scale x="1" y="1" z="1" /> <TransformUnk x="0" y="4" z="-3" w="0" /> </Item>
- Using their numbering as a guide, find the extra/s you want to remove, & then simply set the x, y & z values in their '<Scale' line to zero.
<Item> <Name>extra_8</Name> <Tag value="8881" /> <Index value="11" /> <ParentIndex value="0" /> <SiblingIndex value="12" /> <Flags>RotX, RotY, RotZ, TransX, TransY, TransZ</Flags> <Translation x="2.273737E-13" y="-1.966892" z="-0.1955207" /> <Rotation x="0" y="2.710494E-20" z="-2.842159E-14" w="1" /> <Scale x="0" y="0" z="0" /> <!-- set x, y & z to zero --> <TransformUnk x="0" y="4" z="-3" w="0" /> </Item>
- Save the file/s & head back to Codewalker's RPF Explorer
Importing edited '.yft.xml''s back into the game:
- In CW's RPF Explorer, hit the '[Edit mode]' button (top right-ish) & accept any warnings by hitting '[Yes]'
- Right-click anywhere in the folder (the folder where you got the original '.yft' from obvs) & select 'Import XML...'
- Track to the location of your edited '.yft.xml' files, select them both & hit '[Open]'
- Codewalker will take a few seconds to import the files, wait for it to complete & then close the 'RPF Explorer' window.
That's it, those extra's, although still technically there in the '.yft', will not appear in game.
Combine this with the info in my previous post on How to make specific vehicle EXTRAS appear on a vehicle EVERY spawn & you will have complete control over what combination of extras appear or do not appear in any given vehicle spawn.
Any questions/issues, give me a shout