hi all,
i want to create lore-friendly emergency vehicles from vanilla cars. However i can´t figure out how i can create a resource from the games vehicles.
I know where to find .yft and .ytd files as well where to finde the coresponding vehicle.meta
I also allready added some stuff to certain cars in Zmod.
The server recognizes my modified cars as resource and there aren´t any warnings or errors. But if i want to spawn the car there is an error called “The player could not be seated in the vehicle”
other add-on cars work fine.
Thank you in advance and have a nice day
Can you provide your resource manifest. Did you register the meta files (if any) in the resource manifest properly?
sure, i used the following __resource.lua but didn´t try using a manifest yet.
resource_manifest_version '77731fab-63ca-442c-a67b-abc70f28dfa5'
files {
'vehicles.meta',
'carvariations.meta',
'carcols.meta',
}
data_file 'VEHICLE_METADATA_FILE' 'vehicles.meta'
data_file 'CARCOLS_FILE' 'carcols.meta'
data_file 'VEHICLE_VARIATION_FILE' 'carvariations.meta'
for the vehicles.meta i copied the original (BUFFALO4 in this case) code from the gamefiles and just changed the vehicle names
<?xml version="1.0" encoding="UTF-8"?>
<CVehicleModelInfo__InitDataList>
<residentTxd>vehshare</residentTxd>
<residentAnims />
<InitDatas>
<Item>
<modelName>lspd1</modelName>
<txdName>lspd1</txdName>
<handlingId>BUFFALO4</handlingId>
<gameName>lspd1</gameName>
<vehicleMakeName>BRAVADO</vehicleMakeName>
<expressionDictName>null</expressionDictName>
<expressionName>null</expressionName>
<animConvRoofDictName>null</animConvRoofDictName>
<animConvRoofName>null</animConvRoofName>
<animConvRoofWindowsAffected />
<ptfxAssetName>weap_ba_vehicle_weapons</ptfxAssetName>
<audioNameHash />
<layout>LAYOUT_STANDARD_BUFFALO4</layout>
<coverBoundOffsets>BUFFALO4_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_STANDARD_LONG</bonnetCameraName>
<povCameraName>DEFAULT_POV_CAMERA</povCameraName>
<FirstPersonDriveByIKOffset x="0.000000" y="-0.085000" z="-0.055000" />
<FirstPersonDriveByUnarmedIKOffset x="0.000000" y="0.000000" z="-0.020000" />
<FirstPersonProjectileDriveByIKOffset x="0.050000" y="-0.120000" z="-0.080000" />
<FirstPersonProjectileDriveByPassengerIKOffset x="-0.060000" y="-0.100000" z="-0.05000" />
<FirstPersonProjectileDriveByRearLeftIKOffset x="0.000000" y="-0.070000" z="-0.080000" />
<FirstPersonProjectileDriveByRearRightIKOffset x="-0.050000" y="-0.070000" z="-0.060000" />
<FirstPersonDriveByLeftPassengerIKOffset x="0.070000" y="-0.080000" z="-0.010000" />
<FirstPersonDriveByRightPassengerIKOffset x="-0.060000" y="-0.090000" z="-0.040000" />
<FirstPersonDriveByRightRearPassengerIKOffset x="-0.090000" y="-0.060000" z="0.000000" />
<FirstPersonDriveByLeftPassengerUnarmedIKOffset x="0.000000" y="0.040000" z="0.000000" />
<FirstPersonDriveByRightPassengerUnarmedIKOffset x="0.000000" y="-0.020000" z="0.000000" />
<FirstPersonMobilePhoneOffset x="0.135000" y="0.240000" z="0.570000" />
<FirstPersonPassengerMobilePhoneOffset x="0.196000" y="0.203000" z="0.435000" />
<FirstPersonMobilePhoneSeatIKOffset>
<Item>
<Offset x="0.136000" y="0.156000" z="0.455000" />
<SeatIndex value="2" />
</Item>
<Item>
<Offset x="0.136000" y="0.156000" z="0.455000" />
<SeatIndex value="3" />
</Item>
</FirstPersonMobilePhoneSeatIKOffset>
<PovCameraOffset x="0.000000" y="-0.145000" z="0.680000" />
<PovCameraVerticalAdjustmentForRollCage value="-0.025000" />
<PovPassengerCameraOffset x="0.000000" y="-0.005000" z="-0.050000" />
<PovRearPassengerCameraOffset x="0.018000" y="-0.045000" z="0.000000" />
<vfxInfoName>VFXVEHICLEINFO_CAR_GENERIC</vfxInfoName>
<shouldUseCinematicViewMode value="true" />
<shouldCameraTransitionOnClimbUpDown value="false" />
<shouldCameraIgnoreExiting value="false" />
<AllowPretendOccupants value="true" />
<AllowJoyriding value="true" />
<AllowSundayDriving value="true" />
<AllowBodyColorMapping value="true" />
<wheelScale value="0.288000" />
<wheelScaleRear value="0.288000" />
<dirtLevelMin value="0.000000" />
<dirtLevelMax value="0.550000" />
<envEffScaleMin value="0.000000" />
<envEffScaleMax value="0.000000" />
<envEffScaleMin2 value="0.000000" />
<envEffScaleMax2 value="0.000000" />
<damageMapScale value="0.900000" />
<damageOffsetScale value="0.700000" />
<diffuseTint value="0x00FFFFFF" />
<steerWheelMult value="1.000000" />
<HDTextureDist value="5.000000" />
<lodDistances content="float_array">
15.000000
30.000000
65.000000
130.000000
500.000000
500.000000
</lodDistances>
<minSeatHeight value="0.818" />
<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_3</swankness>
<maxNum value="999" />
<flags>FLAG_AVERAGE_CAR FLAG_RECESSED_HEADLIGHT_CORONAS FLAG_USE_AIRCRAFT_STYLE_WEAPON_TARGETING FLAG_HAS_BULLET_RESISTANT_GLASS</flags>
<type>VEHICLE_TYPE_CAR</type>
<plateType>VPT_BACK_PLATES</plateType>
<dashboardType>VDT_RACE</dashboardType>
<vehicleClass>VC_MUSCLE</vehicleClass>
<wheelType>VWT_SPORT</wheelType>
<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>STANDARD_BUFFALO4_FRONT_LEFT</Item>
<Item>STANDARD_BUFFALO4_FRONT_RIGHT</Item>
<Item>STANDARD_BUFFALO4_REAR_LEFT</Item>
<Item>STANDARD_BUFFALO4_REAR_RIGHT</Item>
</firstPersonDrivebyData>
</Item>
</InitDatas>
<txdRelationships>
</txdRelationships>
</CVehicleModelInfo__InitDataList>
for the carcols and carvariations.meta i copied the files from a add-on police car i downloaded and changed the modelName to fit my vehicles.meta.
Hmmm - In your resource.meta, try to comment out the 4 lines corresponding to:
- carcols.meta
and
- carvariations.meta.
Start with 1 file on your resource and see if you get the same result;
Also, people are going to start asking you to leverage fxmanifest.lua, but I’ll say even if you’re not, at LEAST leverage the latest manifest version:
44febabe-d386-4d18-afbe-5e627f4af937
Please give this a try and let us know the results;
Hi,
so with the new manifest version the car finaly spawns… BUT i´m not seated in the car, it falls down on my char and when i try to get in the car my game crashes with following error
this is the coresponding crash dump:
CfxCrashDump_2023_07_28_07_57_06.zip (1.5 MB)
the game crashes with and without the carcols and carvariations metas commented out.
PS: sorry for the irregular responses (dont have a lot of time for modding)
So for everyone having the same issue. The solution is the the vehicles layout inside the vehicles.meta.
I changed it from this
<layout>LAYOUT_STANDARD_BUFFALO4</layout>
to this
<layout>LAYOUT_STANDARD</layout>
and now its working fine
1 Like