[How-to] Split Vehicle YTD Files to Avoid 16Mb Stream Limit (No Texture Compression)

No, you will have to extract the textures and lower the quality in all of them

how would one do this with an MLO interior/YTYP?
Got the YTD’s organized but not sure where to define them

Thank you for this, I will defiantly be using this for my server rewrite!

Where do I put it I dont see txdrelationships

<Item>
      <modelName>so1</modelName>
      <txdName>so1</txdName>
      <handlingId>BALLER6</handlingId>
      <gameName>so1</gameName>
      <vehicleMakeName />
      <expressionDictName>null</expressionDictName>
      <expressionName>null</expressionName>
      <animConvRoofDictName>null</animConvRoofDictName>
      <animConvRoofName>null</animConvRoofName>
      <animConvRoofWindowsAffected />
      <ptfxAssetName>null</ptfxAssetName>
      <audioNameHash>SENTINEL</audioNameHash>
      <layout>LAYOUT_STANDARD</layout>
      <coverBoundOffsets>SHERIFF_COVER_OFFSET_INFO</coverBoundOffsets>
      <explosionInfo>EXPLOSION_INFO_DEFAULT</explosionInfo>
      <scenarioLayout />
      <cameraName>DEFAULT_FOLLOW_VEHICLE_CAMERA</cameraName>
      <aimCameraName>DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA</aimCameraName>
      <bonnetCameraName>VEHICLE_BONNET_CAMERA_MID_HIGH</bonnetCameraName>
      <povCameraName>DEFAULT_POV_CAMERA</povCameraName>
      <FirstPersonDriveByIKOffset x="0.000000" y="-0.060000" z="-0.060000" />
      <FirstPersonDriveByUnarmedIKOffset x="0.000000" y="0.-050000" z="-0.020000" />
      <FirstPersonProjectileDriveByIKOffset x="0.000000" y="-0.075000" z="-0.045000" />
      <FirstPersonProjectileDriveByPassengerIKOffset x="0.000000" y="-0.075000" z="-0.045000" />
      <FirstPersonProjectileDriveByRearLeftIKOffset x="0.000000" y="0.020000" z="0.030000" />
      <FirstPersonProjectileDriveByRearRightIKOffset x="0.000000" y="0.020000" z="0.030000" />
      <FirstPersonDriveByLeftPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
      <FirstPersonDriveByRightPassengerIKOffset x="0.000000" y="-0.060000" z="-0.060000" />
      <FirstPersonDriveByRightRearPassengerIKOffset x="0.000000" y="0.000000" z="0.000000" />
      <FirstPersonDriveByLeftPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
      <FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="0.000000" z="0.000000" />
      <FirstPersonMobilePhoneOffset x="0.155000" y="0.270000" z="0.508000" />
      <FirstPersonPassengerMobilePhoneOffset x="0.136000" y="0.223000" z="0.405000" />
      <FirstPersonMobilePhoneSeatIKOffset>
        <Item>
            <Offset x="0.136000" y="0.156000" z="0.425000" />
            <SeatIndex value="2" />
        </Item>
        <Item>
            <Offset x="0.136000" y="0.156000" z="0.425000" />
            <SeatIndex value="3" />
        </Item>
      </FirstPersonMobilePhoneSeatIKOffset> 
      <PovCameraOffset x="0.000000" y="-0.145000" z="0.645000" />
      <PovCameraVerticalAdjustmentForRollCage value="0.000000" />
      <PovPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
      <PovRearPassengerCameraOffset x="0.000000" y="0.000000" z="0.000000" />
      <vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
      <shouldUseCinematicViewMode value="true" />
      <shouldCameraTransitionOnClimbUpDown value="false" />
      <shouldCameraIgnoreExiting value="false" />
      <AllowPretendOccupants value="true" />
      <AllowJoyriding value="false" />
      <AllowSundayDriving value="false" />
      <AllowBodyColorMapping value="true" />
      <wheelScale value="0.237100" />
      <wheelScaleRear value="0.237100" />
      <dirtLevelMin value="0.000000" />
      <dirtLevelMax value="0.000000" />
      <envEffScaleMin value="0.000000" />
      <envEffScaleMax value="0.000000" />
      <envEffScaleMin2 value="0.000000" />
      <envEffScaleMax2 value="0.000000" />
      <damageMapScale value="0.600000" />
      <damageOffsetScale value="1.000000" />
      <diffuseTint value="0x00FFFFFF" />
      <steerWheelMult value="1.000000" />
      <HDTextureDist value="5.000000" />
      <lodDistances content="float_array">
        1500.000000
        3000.000000
        7000.000000 
        14000.000000    
        50000.000000    
        50000.000000
      </lodDistances>
      <minSeatHeight value="0.839" />
      <identicalModelSpawnDistance value="20" />
      <maxNumOfSameColor value="10" />
      <defaultBodyHealth value="1000.000000" />
      <pretendOccupantsScale value="1.000000" />
      <visibleSpawnDistScale value="1.000000" />
      <trackerPathWidth value="2.000000" />
      <weaponForceMult value="1.000000" />
      <frequency value="100" />
      <swankness>SWANKNESS_1</swankness>
      <maxNum value="2" />
      <flags>FLAG_ATTACH_TRAILER_ON_HIGHWAY FLAG_ATTACH_TRAILER_IN_CITY FLAG_HAS_LIVERY FLAG_EXTRAS_STRONG FLAG_EXTRAS_REQUIRE FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_HAS_INTERIOR_EXTRAS FLAG_DONT_SPAWN_AS_AMBIENT FLAG_DONT_SPAWN_IN_CARGEN FLAG_NO_RESPRAY</flags>
      <type>VEHICLE_TYPE_CAR</type>
      <plateType>VPT_FRONT_AND_BACK_PLATES</plateType>
      <dashboardType>VDT_GENTAXI</dashboardType>
      <vehicleClass>VC_EMERGENCY</vehicleClass>
      <wheelType>VWT_MUSCLE</wheelType>
      <trailers>
        <Item>boattrailer</Item>
        <Item>trailersmall</Item>
      </trailers>
      <additionalTrailers />
      <drivers />
      <extraIncludes />
      <doorsWithCollisionWhenClosed />
      <driveableDoors />
      <bumpersNeedToCollideWithMap value="false" />
      <needsRopeTexture value="false" />
      <requiredExtras />
      <rewards />
      <cinematicPartCamera>
        <Item>WHEEL_FRONT_RIGHT_CAMERA</Item>
        <Item>WHEEL_FRONT_LEFT_CAMERA</Item>
        <Item>WHEEL_REAR_RIGHT_CAMERA</Item>
        <Item>WHEEL_REAR_LEFT_CAMERA</Item>
      </cinematicPartCamera>
      <NmBraceOverrideSet />
      <buoyancySphereOffset x="0.000000" y="0.000000" z="0.000000" />
      <buoyancySphereSizeScale value="1.000000" />
      <pOverrideRagdollThreshold type="NULL" />
      <firstPersonDrivebyData>
        <Item>STD_POLICE_FRONT_LEFT</Item>
        <Item>STD_POLICE_FRONT_RIGHT</Item>
        <Item>STD_POLICE_REAR_LEFT</Item>
        <Item>STD_POLICE_REAR_RIGHT</Item>
      </firstPersonDrivebyData>
     </Item>
     <Item>(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)
    

I have been trying to use this method for the ford gt police car. Link: 2017 Ford GT | Hot Pursuit Police [Add-On / Replace | Template] - GTA5-Mods.com
I hope you can help me fix it somehow. but it doesnt work still so i dont know what could be wrong

Great tutorial, has helped me a lot when converting some vehicles, but I am having one issue now, I have been converting a big pack of vehicles, and I had to split some of the textures, but only some of those, that I have split are in the txdRelationship table or how do you call it, I don’t know, so I assume, that I have to add the remaining ones to the table aswell, but I don’t know what to set the parent to on the last one. Could you help me with this please?

1 Like

Ive been trying very hard to try and find the part where I enter the scripts into the vehicle.meta file, I ddi word search and I scrolled through the entire thing, and I am very confused, so should I just add it myself

here is my Vehicle.meta

<?xml version="1.0" encoding="UTF-8"?>

<CVehicleModelInfo__InitDataList>
vehshare



SV4
SV4
FBI
2018 Dodge Charger PPV (Marked)

null
null
null
null

null
BUFFALO2
LAYOUT_STANDARD
SHERIFF_COVER_OFFSET_INFO
EXPLOSION_INFO_DEFAULT

DEFAULT_FOLLOW_VEHICLE_CAMERA
DEFAULT_THIRD_PERSON_VEHICLE_AIM_CAMERA
VEHICLE_BONNET_CAMERA_MID_HIGH
DEFAULT_POV_CAMERA



























VFXVEHICLEINFO_CAR_GENERIC





















1500.000000
3000.000000
7000.000000
14000.000000
50000.000000
50000.000000










SWANKNESS_1

FLAG_HAS_LIVERY FLAG_EXTRAS_STRONG FLAG_EXTRAS_REQUIRE FLAG_LAW_ENFORCEMENT FLAG_EMERGENCY_SERVICE FLAG_HAS_INTERIOR_EXTRAS FLAG_DONT_SPAWN_AS_AMBIENT FLAG_DONT_SPAWN_IN_CARGEN FLAG_NO_RESPRAY
VEHICLE_TYPE_CAR
VPT_FRONT_AND_BACK_PLATES
VDT_GENTAXI
VC_EMERGENCY
VWT_MUSCLE




S_M_Y_Sheriff_01











WHEEL_FRONT_RIGHT_CAMERA
WHEEL_FRONT_LEFT_CAMERA
WHEEL_REAR_RIGHT_CAMERA
WHEEL_REAR_LEFT_CAMERA






STD_POLICE_FRONT_LEFT
STD_POLICE_FRONT_RIGHT
STD_POLICE_REAR_LEFT
STD_POLICE_REAR_RIGHT



</CVehicleModelInfo__InitDataList>

I noticed a lot of people have asked where to place the txdRelationships. If you looked at other handling files, a lot contain them. But for those who need some help here ya go.

It goes at the bottom of your vehicle.meta sheet before the vehicles are closed. example below:

<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfo__InitDataList>
  <residentTxd>vehshare</residentTxd>
  <residentAnims />
  <InitDatas>
      <Item>

**normal vehicle data**

</Item>
</InitDatas>

After you locate </InitDatas> ADD your txd relationships:

<txtRelationships>
      <Item>
            <parent>car1</parent>
            <child>car</child>
      </Item>
      <Item>
           <parent>car2</parent>
            <child>car1</child>
      </Item>
       <Item>
            <parent>vehicles_dom_interior</parent>
            <child>car2</child>
      </Item>
</txdRelationships>

Make sure you close the whole document at the very end by typing </CVehicleModelInfo__InitDataList>

Hey, i tried this method to get a custom ped working on my server and it worked!! however on my ped.meta there is no txdrelationships. is there an equivalent i can type to make the game read the 2 ytd files i separated the textures to?

i followed all the steps and still have the car spawn corrupted :frowning:

Btw, quick tip : you musn’t put <txdRelationships> and </txdRelationships> everytime if you have multiple cars in the same “'stream” folder.
Do things like this :

<txtRelationships>
      <Item>
            <parent>carA1</parent>
            <child>carA</child>
      </Item>
      <Item>
           <parent>carA2</parent>
            <child>carA1</child>
      </Item>
       <Item>
            <parent>vehicles_dom_interior</parent>
            <child>carA2</child>
      </Item>
       <Item>
           <parent>carB1</parent>
            <child>carB</child>
      </Item>
       <Item>
            <parent>vehicles_dom_interior</parent>
            <child>carB1</child>
      </Item>
</txdRelationships>

thank you!

Hey man, So i did this with a vehicle i had made with really high quality stuff, Unfortunately when i spawn the vehicle in there is no vehicle sign for the livery, I only moved 3 car signs to each ytd and all other textures are in the main one, I followed your steps apart from the interior part as my vehicle does not offer that.

When I split do I have the right to randomly select dds files to make them not >16MB?

yes thats right

There is a much more simpler approach to this.

Rather than leaving the dds files large from the original .ytd file,
Export all to a temp folder. Using OpenIV go thru the textures and find the ones that are larger than a resolution of 2048x2048. By using Paint.net, you can actually reduce these by changing the image size down to 1024x1024. Most liveries are now put as 4096x4096, which in a perfect world would look like 4k, but due to the limitations of FiveM, this won’t work.

Once you’ve reduced these in size, save them in DDS format. With OpenIV in edit mode, drag the modified files back to the ytd file, and click save. Take the new ytd file and put it in your stream folder.

This is a much easier way to do this, and keeps the file structure the same without any additional coding needed. You’ll find that by doing so it greatly reduces the ytd file size so that FiveM can properly stream this. I usually make it a point to keep the Ytds less than 10mb if possible.

Hope this helps.