Log in to reply
 

Those hateful car ID's!



  • Tired of endlessly looking for car ID's, I decided to just steal one from mpbiker, 180, in this case (and gave the old biker a 0_biker_modkit). Then, having assigned 180 to my new addon car, $%^&*($# car still won't tune!

    This game is starting to damage my calm, LOL. So, why wouldn't it tune?!



  • @meimeiriver How many addons do you have?



  • @CP said in Those hateful car ID's!:

    @meimeiriver How many addons do you have?

    Like 50 or so. Shouldn't make a difference: if the game starts, and you can spawn the car, and it has a valid ID, it should be tunable.

    Turns out 180 is used in like a trillion other carvariations.meta files (one dlc pack replacing older model cars). So, I search for all car ID's. 129 didn't appear to be used anywhere. Still, darn thing won't tune.



  • @meimeiriver That is your problem. ID nunber is not so important, the most important thing is overall used ID's. If there are more than 256 mod kits, game won't accept any new one.



  • @CP said in Those hateful car ID's!:

    @meimeiriver That is your problem. ID nunber is not so important, the most important thing is overall used ID's. If there are more than 256 mod kits, game won't accept any new one.

    According to my list, there are currently only 199 in use. And 129 isn't listed as being in use anywhere.



  • Probably other addons has modkits.



  • @meimeiriver go under carcols.ymt and <Kits> section and delete all modkit ids of the vanilla cars you dont use. Personally i could care less about the crappy vanilla cars so i deleted everything under kits section except the ids that have 0 in them. Added all my addon cars modkit info under <kits> section and now all my addon cars have working tuning parts.



  • @CP said in Those hateful car ID's!:

    Probably other addons has modkits.

    Like I said, I pulled all carcols.meta files, and looked for car ID assigments. And there are 215 of those in total (not 199, as I thought: I didn't account for wildcars space in my initial search) that have a line that says:

     <id value
    

    129 appeared to be in use, after all. 200 wasn't, and that finally worked. :)



  • @Willief23 said in Those hateful car ID's!:

    @meimeiriver go under carcols.ymt and <Kits> section and delete all modkit ids of the vanilla cars you dont use. Personally i could care less about the crappy vanilla cars so i deleted everything under kits section except the ids that have 0 in them. Added all my addon cars modkit info under <kits> section and now all my addon cars have working tuning parts.

    That's a good tip! :) Stealing an ID from a random carcols.meta wasn't all that useful, as (like I said) all these vanilla DLC packs seem to redefine older cars/bikes elsewhere, so you'd have to painstakingly remove all instances of those.

    Thanks for all your help, guys. :) I'm at 216 car ID's now; and I think Lee once said you can really only use 223 or so. So, the bucket is nearly dry; but at least I found another one for today. :)



  • I still wish someone comes up with a trick to dynamically assign a modkit_ID when spawning an add-on. Having 1000+ vehicles in add-on I really could use more then 256 valid numbers :P

    That's something I'd gladly pay for btw. Who's up for the challenge?



  • @ReNNie said in Those hateful car ID's!:

    I still wish someone comes up with a trick to dynamically assign a modkit_ID when spawning an add-on. Having 1000+ vehicles in add-on I really could use more then 256 valid numbers

    Yeah. The funny thing is, you'd only ever need exactly 1 available dynamic ID (for the car you're spawning into), which can be used for every subsequent spawns.

    That's something I'd gladly pay for btw. Who's up for the challenge? :)



  • @meimeiriver Don't have much knowledge in this area so sorry if I come across as naive/ inexperienced but.. what is the purpose of the ID field anyway? Is it actually used anywhere or just internally? Why does it need a <kitName> and <ID> field?



  • @CamxxCore said in Those hateful car ID's!:

    @meimeiriver Don't have much knowledge in this area so sorry if I come across as naive/ inexperienced but.. what is the purpose of the ID field anyway? Is it actually used anywhere or just internally? Why does it need a <kitName> and <ID> field?

    If your car has no valid car ID, it can't be tuned: aka, you can't set color, wheels, spoilers, or any other option; and typically your dials won't work either. With no valid ID, the car can basically only spawn 'as is' (and it can obviously be driven). But that's about it.


  • MODERATOR

    @meimeiriver I would try to do something like that but I'm too busy at the moment. If nobody else (e.g. CamxxCore) comes up with a solution until I get the time, I can look into it.



  • @Unknown-Modder said in Those hateful car ID's!:

    @meimeiriver I would try to do something like that but I'm too busy at the moment. If nobody else (e.g. CamxxCore) comes up with a solution until I get the time, I can look into it.

    And it's greatly appreciated! :)



  • @Unknown-Modder said in Those hateful car ID's!:

    @meimeiriver I would try to do something like that but I'm too busy at the moment. If nobody else (e.g. CamxxCore) comes up with a solution until I get the time, I can look into it.

    P.S. Whoever manages to accomplish this, would have created the biggest sought-after mod in GTA V, as everyone seems to run out of car ID's, these days. :)



  • let's hope one of you finds a way :angel_tone2:

    preferably the solution works 'stand-alone' so it can co-exist next to sjaak's trainer, ikt's or ImNotMetnal's add-on spawner. But that's probably hard?

    I myself am using Lee's Pick Your Ride script to select the add-on's and that even randomly displays various tuning parts if available on the car when spawned



  • @Unknown-Modder
    What about @drp4lyf ?

    It seems pretty involved, especially if that type is 1 byte everywhere after parsing. Not sure if it is though.

    @ReNNie
    My spawner shouldn't be affected too much, at most it incorrectly displays the mod kit number in the vehicle details. @ImNotMentaL's spawner needs manual adding of things so it's even less affected. Not sure if @sjaak327's trainer uses the modkit ID explicitly as tuning stuff can be gotten dynamically on a vehicle.



  • Did a bit of investigating and I can confirm the internal 'modKitId' member is indeed 1 byte (8 bits) in size. So, yes, the maximum value is hard-coded to 255. Higher values just overflow and get truncated to 8 bits. i.e. 256 becomes 0, 257 becomes 1 and so on.



  • Interesting that no one discovered this already. I know a lot of addons define kit ID numbers well out of that range.


  • MODERATOR

    @CamxxCore There's a thread somewhere on the forums where I explained a few things about the mod kits (can't remember where). It was kinda rushed so not really that much info but it's something.



  • @CamxxCore said in Those hateful car ID's!:

    Interesting that no one discovered this already. I know a lot of addons define kit ID numbers well out of that range.

    It was discovered a long time ago already. :) Unknown Modder has proven (from the source code), that, without a shadow of a doubt, the car ID value is 8-bit. That is what's all the fuss is all about: people (including yours truly) are fast running out of usuable car ID's. If car ID were a 16-bit value, nobody would ever have uttered a peep about it.

    What we'd need, basically, is the ability to assign 1 valid (fixed) car ID to a car when it's being spawned. Ideally this'd be a still open ID; but it could also simply be stolen/reasigned from one of the low-level vanilla cars nobody gives a shit about.



  • P.S. IIRC, modkit ID's are assigned at a very early stage (before loadscreen even). So, any .asi tool or whatever solution would have likely have to reassign the process for the requested car upon spawning (but then with fixed temp ID, as it were).

    EDIT: I think one of the Trainers out there already does this (Simple Trainer?); but said Trainer can't save/load your cars in tuned state, which kinda makes the point moot.



  • Sorry, I didn't do my research apperently xD Anyway, I think it will be somewhat of a low- level hack no matter how we do it. It seems the internal pool that handles those files also limits itself to 256 possible items at any one time. Meaning, we will have to somehow break that limit as well so the files are actually being loaded in the first place. At that point we may be able to hook a function early on when the model gets loaded and use a custom version of the CVehicleDrawHandlerClass to store an extra 32-bit member that holds the kit ID. Then we could modify any instructions that reference the kit ID to point to the new variable at the end of the class. Problem with that is it might mean sacrificing nearby instructions. So a chance it would never work... Another option would be to store the kit ID in a std::map and somehow assign it a value within the 0-255 range when the vehicle is being used. Problem with that is that it could get complicated fast, since the implementation was never designed for that. SO yeah, those are my ideas. Just thinking aloud. Will continue to experiment and report back with any findings.


  • MODERATOR

    @CamxxCore Exactly my thoughts. I will gladly help as soon as I have enough time but it's not possible at the moment sadly :(


Log in to reply
 

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