Increase max vehicle WheelType slots available

Old topic title: [+B1604] SetVehicleWheelType native don’t accept any id over 12

SetVehicleWheelType is changing any id over 12 to 5, becaming impossible to use custom wheels types slots (This became more problematic in the B2372, as the game is now using all the ids below 13, so there’s no ids empty to be used by us).

Reproducible steps to help you guys in seeing this game limitation:

  • Create a car, and trigger the SetVehicleWheelType native with any id which is over 12, and print the current wheel type using the native GetVehicleWheelType. As output, you gonna get the number 5 (even when the default wheel type from that vehicle was not 5).

If you prefer, use this repro resource (Look below to how use it): wheelstyperepro.rar (1.1 KB)

  • Using the repro resource:
    • You should use the command “/wheelstyperepro”, it gonna spawn a futo, put the player ped inside it and create a thread setting the WheelType to the id 20 and will print the current vehicle wheel type after 0.5s. If you wanna test it using any id below 13, just change the “wheelTypeToBeDefined” to any other id. (The repro resource also includes an carcols.meta with a example wheel in the wheel type 20, just to make sure there’s nothing which checks if there’s any wheel on certain wheel types)

Is this a bug report or a feature request? The Wheels field in CVehicleModelInfoVarGlobal is explicitly defined as an AtArray of size 13. Moreover, GetVehicleWheelType returns 5, VWT_TUNER, because that is the default wheel type specified in CVehicleModelInfo as the provided wheel type is invalid, e.g.,

  v3 = *(a1 + 960);
  if ( v3 > 0xCu )
    result = *(*(a2 + 32) + 0x34Ci64); // VWT_TUNER

Or am I missing something here?

Well, now knowing the reason for that, would be better to put this under the Feature request section (I don’t know if i can move this topic by myself). I was expecting this to be a bug, because i have seen sometime ago servers using some custom wheels already, but they probably was using just some empty ids (This made me think the possibility to use ids over 12 was already a thing). Sorry.