Log in to reply
 

How do I merge multiple addon vehicles into 1 ?



  • I have around 50 addon vehicle folders (most of them have 1 vehicle in them except for example for the batman pack), and I would like to merge them (or some of them) into 1 folder/addon. Whenever I go over 50 folders, my game crashes at startup, so I need to do this to add more addon vehicles. If you guys need any files/info/details, just point it out and I'll do my best to provide them. I'd like to say that I don't only have addon vehicles, I also have some scripts, as well as plugins (.lua). All my requirements are up-to-date like ScripthookV, ScriptHookVDotNet, AsiLoader, etc...
    I've tried following the tutorial from this mod, but it doesn't cover addon vehicle merging, only addon to replacement (and vice-versa):
    https://www.gta5-mods.com/tools/add-on-replace-base-folder
    https://forums.gta5-mods.com/topic/222/tutorial-vehicles-weapons-how-to-do-add-on-s-replacer-s
    If anyone manages to help me figure this out I would be incredibly thankful. If you're just passing by, have a good day ;)



  • @Belial_Lucifer
    Use this mod as a base for your merged add-on pack (or alternatively see 'Useful to know:' below). Once it is installed (as per instructions on the download page you will have to add the 'dlclist.xml' line '<Item>dlcpacks:\addoncars</Item>' manually) the basic procedure is to add your vehicles '.yft' & 'ytd's to the 'vehicles.rpf' here:

    \mods\update\x64\dlcpacks\addoncars\dlc.rpf\x64\vehicles.rpf
    

    & their modifications/upgrades to the 'vehiclemods.rpf' here:

    \mods\update\x64\dlcpacks\addoncars\dlc.rpf\x64\vehiclemods.rpf
    

    Note: you add the independent '.yft' modification files ('pantera_wing1.yft' for example) into the 'vehiclemods.rpf' folder so it looks like this:

    alt text

    Don't put the vehicles 'vehicle-name-here_mods.rpf' archives into there or it will not work. Just the '.yft' files that are contained within any *_mods.rpf you have so that you will have the '.yft' modification files of multiple vehicles all in that same 'vehiclemods.rpf'.

    From there it's just a matter of adding your vehicle's data (carcols, carvariation, handling, vehicles.meta etc) to the files contained within the 'data' folder here:

    \mods\update\x64\dlcpacks\addoncars\dlc.rpf\data
    

    The process is the same as what you do when you add a replace vehicle to the game. You copy & paste the block of data (being careful to maintain the correct syntax) from inside your add-on vehicle's data files to inside the files contained within the folder structure above.

    Note: For the first vehicle you add to the pack you can just overwrite the blank meta files with the ones from your add-on but after that you have to add the data to within the files manually as you do with a replace.

    content.xml:

    \mods\update\x64\dlcpacks\addoncars\dlc.rpf\content.xml
    

    'content.xml' tells the game what dlc files to load. You may have to edit this file (depending on how complex your add-on vehicles are & what files are contained within their dlc.rpf's) so it's worth familiarising yourself with how it works.
    Say for instance your add-ons contain a 'vehiclelayouts.meta' & you want to add this to the 'addoncars' dlc you would edit the addoncars 'content.xml' to look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <CDataFileMgr__ContentsOfDataFileXml>
      <disabledFiles />
      <includedXmlFiles />
      <includedDataFiles />
      <dataFiles>
        <Item>
          <filename>dlc_addoncars:/data/vehicles.meta</filename>
          <fileType>VEHICLE_METADATA_FILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>
        <Item>
          <filename>dlc_addoncars:/data/carcols.meta</filename>
          <fileType>CARCOLS_FILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>
    	<Item>
          <filename>dlc_addoncars:/data/vehiclelayouts.meta</filename>
          <fileType>VEHICLE_LAYOUTS_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
        <Item>
          <filename>dlc_addoncars:/data/carvariations.meta</filename>
          <fileType>VEHICLE_VARIATION_FILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>
        <Item>
          <filename>dlc_addoncars:/data/dlctext.meta</filename>
          <fileType>TEXTFILE_METAFILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>
        <Item>
          <filename>dlc_addoncars:/data/handling.meta</filename>
          <fileType>HANDLING_FILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>	
        <Item>
          <filename>dlc_addoncars:/%PLATFORM%/vehicles.rpf</filename>
          <fileType>RPF_FILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>
        <Item>
          <filename>dlc_addoncars:/%PLATFORM%/vehiclemods.rpf</filename>
          <fileType>RPF_FILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>
    	<Item>
          <filename>dlc_addoncars:/data/carraddonContentUnlocks.meta</filename>
          <fileType>CONTENT_UNLOCKING_META_FILE</fileType>
          <locked value="true"/>
    	  <disabled value="true"/>
    	  <persistent value="true"/>
    	  <overlay value="true"/>
        </Item>
      </dataFiles>
      <contentChangeSets>
    	<Item>
    	  <changeSetName>addoncars_AUTOGEN</changeSetName>
    	  <filesToDisable />
    	  <filesToEnable>
            <Item>dlc_addoncars:/data/handling.meta</Item>
            <Item>dlc_addoncars:/data/vehicles.meta</Item>
            <Item>dlc_addoncars:/data/vehiclelayouts.meta</Item>
            <Item>dlc_addoncars:/data/carcols.meta</Item>
            <Item>dlc_addoncars:/data/carvariations.meta</Item>
            <Item>dlc_addoncars:/data/dlctext.meta</Item>	
    		<Item>dlc_addoncars:/data/carraddonContentUnlocks.meta</Item>	
            <Item>dlc_addoncars:/%PLATFORM%/vehicles.rpf</Item>
    		<Item>dlc_addoncars:/%PLATFORM%/vehiclemods.rpf</Item>
    	  </filesToEnable>
    	  <txdToLoad />
    	  <txdToUnload />
    	  <residentResources />
    	  <unregisterResources />
    	</Item>
      </contentChangeSets>
      <patchFiles />
    </CDataFileMgr__ContentsOfDataFileXml>
    
    

    & then add your 'vehiclelayouts.meta' here:

    \mods\update\x64\dlcpacks\addoncars\dlc.rpf\data\vehiclelayouts.meta
    

    It's reasonably simple to do. For the most part you just add the new lines in the right place. Compare 'content.xml' files to get an idea of how it works & then copy & paste the relevant data to the correct place in your addoncars 'content.xml'.

    Note: Different dlc's can have different folder structures so the main thing to look out for here when copying & pasting from one 'content.xml' to another is that the folder structure within 'content.xml' matches the actual location of the file in your merged add-on folder structure.

    Example:

    A 'content.xml' line like this:

    <Item>dlc_addoncars:/data/vehiclelayouts.meta</Item>
    

    would mean that your 'vehiclelayouts.meta' should be here:

    \mods\update\x64\dlcpacks\addoncars\dlc.rpf\data\vehiclelayouts.meta
    

    After that, any new 'vehiclelayouts.meta' data for more cars would be added within that same 'vehiclelayouts.meta'.

    Tip: 7zip can be used to extract files from a .oiv installer for examination before installing the .oiv. Install 7zip & then it is as simple as right-clicking the .oiv & selecting 'extract here/extract to ...' etc

    Extract the downloaded 'AddonCarsOIV.oiv' using 7zip & examine (or alternatively install the 'AddonCarsOIV.oiv' & then use OpenIV to examine) 'content.xml' & compare it to what I have pasted above to give you an idea of how adding a new file to the dlc works.

    Tip: Sites like Diff Checker can be used to examine & highlight the difference between the data contained within 2 files or separate blocks of data.

    Useful to know: If you find your add-ons are very complex (ie lots of different files & file locations) & you are having trouble sorting out your 'content.xml' & getting it to work correctly then it may be useful to know that you can use any dlc as a add-on merge pack (watch out for dlc file size limits though).
    What I would do in this situation would be to choose a relatively complex add-on that I have (so that the 'content.xml' is already written correctly for all the possible necessary files for a wide spread of different vehicles. Say using a pre-made merged add-on pack & then removing it's vehicles yft's & ytd's & the vehicle data in it's vehicle meta files) & then add my vehicles & their data, using the process outlined above, to that dlc instead. That way you are just adding data to pre-existing files with no need to edit 'content.xml'.



  • @a63nt-5m1th Thank you for this great reply. I'm going to try what you suggested and see how it works. I'm familiar with code so it shouldn't take long to do this.



  • @Belial_Lucifer
    Nice one :slight_smile: Best of luck. Let us know how you get on :thumbsup:



  • @a63nt-5m1th I have a few questions. First one is what do I do if the addon doesn't have the "Data" folder in their dlc.rpf in the same location as you showed. The base addon I'm using to merge is the "batman" pack with all the batman vehicles, and the "data" folder is in a different location (https://i.imgur.com/9ikLqF4.png). Also if there's different files other than carcols.meta and handling.meta, what do I do with them ? Do I just put them in with the others ? Check the screenshot to see what new files there are.



  • @Belial_Lucifer
    So I take it you are starting with the Batman pack & making it the base that you will then add other vehicles to?
    If that is the case (& the Batman pack works correctly on it's own) there's no real need to edit 'content.xml'. The 'content.xml' will be written correctly already for you.
    You will only need to edit the batman base 'content.xml' if you want to add a file that is not contained within the default batman pack. All you need to do is add the new vehicles data to the pre-existing files & add the vehicles '.yft' & '.ytd' to 'batmanvehicles.rpf' & everything should work correctly. :thumbsup:
    The files can be stored in any folder structure you like. The only thing that matters is that the 'content.xml' folder structure lines match the same folder structure that is in the dlc.

    Batman Pack Example:

    A 'content.xml' line like this:

    <filename>dlc_batman:/common/data/vehiclelayouts.meta</filename>
    

    would mean that your 'vehiclelayouts.meta' should be here:

    \mods\update\x64\dlcpacks\batman\dlc.rpf\common\data\vehiclelayouts.meta
    

    From what I can see you have all the files necessary for an add-on pack already contained in the batman dlc, bar perhaps a 'weapons.meta' or similar for vehicles with a modded weapon.
    If for example you add a vehicle with a modded weapon file (we'll call it 'weapons.meta' for this example but it can be named anything you like) to the pack you would edit the 'content.xml' to look like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <CDataFileMgr__ContentsOfDataFileXml>
      <disabledFiles />
      <includedXmlFiles />
      <includedDataFiles />
      <dataFiles>
    	<Item>
          <filename>dlc_batman:/common/data/vehicles.meta</filename>
          <fileType>VEHICLE_METADATA_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
    	<Item>
          <filename>dlc_batman:/common/data/carvariations.meta</filename>
          <fileType>VEHICLE_VARIATION_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
        <Item>
          <filename>dlc_batman:/common/data/carcols.meta</filename>
          <fileType>CARCOLS_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
    	<Item>
          <filename>dlc_batman:/common/data/vehiclelayouts.meta</filename>
    	  <fileType>VEHICLE_LAYOUTS_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
        <Item>
          <filename>dlc_batman:/common/data/dlctext.meta</filename>
          <fileType>TEXTFILE_METAFILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="true" />
        </Item>
        <Item>
          <filename>dlc_batman:/common/data/handling.meta</filename>
          <fileType>HANDLING_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
        <Item>
          <filename>dlc_batman:/common/data/caraddoncontentunlocks.meta</filename>
          <fileType>CONTENT_UNLOCKING_META_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
        <Item>
          <filename>dlc_batman:/%PLATFORM%/vehicles/batmanvehicles.rpf</filename>
          <fileType>RPF_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="true" />
        </Item>
    	<Item>
          <filename>dlc_batman:/common/data/weapons.meta</filename>
          <fileType>WEAPONINFO_FILE</fileType>
          <overlay value="false" />
          <disabled value="true" />
          <persistent value="false" />
        </Item>
      </dataFiles>
      <contentChangeSets>
        <Item>
          <changeSetName>batman_AUTOGEN</changeSetName>
          <mapChangeSetData />
          <filesToInvalidate />
          <filesToDisable />
          <filesToEnable>
            <Item>dlc_batman:/common/data/handling.meta</Item>
            <Item>dlc_batman:/common/data/dlctext.meta</Item>
            <Item>dlc_batman:/common/data/vehicles.meta</Item>
    		<Item>dlc_batman:/common/data/vehiclelayouts.meta</Item>
            <Item>dlc_batman:/common/data/carcols.meta</Item>
            <Item>dlc_batman:/common/data/carvariations.meta</Item>
            <Item>dlc_batman:/%PLATFORM%/vehicles/batmanvehicles.rpf</Item>
    		<Item>dlc_batman:/common/data/weapons.meta</Item>
    	  </filesToEnable>
          <txdToLoad />
          <txdToUnload />
          <residentResources />
          <unregisterResources />
         </Item>	
    	    <Item>
          <changeSetName>batman_UNLOCKS_AUTOGEN</changeSetName>
          <mapChangeSetData />
          <filesToInvalidate />
          <filesToDisable />
          <filesToEnable>
            <Item>batman:/common/data/caraddoncontentunlocks.meta</Item>
          </filesToEnable>
    	  <txdToLoad />
          <txdToUnload />
          <residentResources />
          <unregisterResources />
          <requiresLoadingScreen value="false" />
        </Item>
      </contentChangeSets>
      <patchFiles />
    </CDataFileMgr__ContentsOfDataFileXml>
    

    If the weapons file was named something else you can either change the file name to 'weapons.meta' & leave the 'content.xml' as it is above or edit the 2 'weapons.meta' references in the 'content.xml' example above to the same as the name of the file.
    Use Diff Checker to compare the code block above the previous paragraph to the default Batman Pack 'content.xml' & you will see how I have added the 'weapons.meta'.

    alt text

    It's a similar process for any other files you may want to add to your batman add-on pack.

    • Search for the file name in the 'content.xml' of the mod you are taking the file from.
    • Copy & Paste (in the correct place) all the lines that contain that filename to the batman pack 'content.xml'
    • & then (if needed) edit the new batman 'content.xml' lines so they match the folder structure of the Batman dlc

    If you are still using the 'addoncars' dlc as your base I would advise you at this point to ditch it & use the batman one as your base instead. It will be a far simpler process with less likelihood of you having to edit 'content.xml' as the batman dlc already contains most if not all of the files you need all correctly placed & referenced in it's 'content.xml'. :thumbsup:

    Extra:
    I notice you are not using a 'mods' folder. It really is a good idea to do so. Sometimes '.rpf' archives can corrupt for no good reason. Just purely the fact that you have edited the files within them. In this case it's very useful to have a guaranteed working archive to fall back on for testing.
    If you continue to use the game folder instead make sure you have a thorough backup strategy in place. One where you are backing up the entire '.rpf' archives you edit. You should be safe enough if you are just editing add-on dlc's but if you are editing any main game files (update.rpf etc) I strongly suggest you start using a 'mods' folder :thumbsup:


Log in to reply
 

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.