Log in to reply
 

How to fix tuning parts and lights not working on addons or making your own car packs


  • MODERATOR

    @LeeC2202 LOL, I just tried that MetaTool.exe thingy you found on the game carcols.ymt, just for shits and giggles. :) And it actually decrypts it, but with hash names.



  • @meimeiriver I couldn't get it to work on that file. :( Is that the beta or the normal version?


  • MODERATOR

    @LeeC2202 said in How to fix tuning parts and lights not working on addons or making your own car packs:

    Aha... the carcols.ymt download has version 791 in it as well... testing time. :D

    Edit: Version 791, carcols.ymt still only went up to 86, so that means that in 877 and 944 where new cars were added, nothing changed in carcols.ymt.

    So, the decrypted one s up-to-date then, right?


  • MODERATOR

    @LeeC2202 said in How to fix tuning parts and lights not working on addons or making your own car packs:

    @meimeiriver I couldn't get it to work on that file. :( Is that the beta or the normal version?

    Probably beta: MetaToolkitPreview-170122



  • @meimeiriver Ooooh, it did work. I must have been using the wrong version of the tool. :astonished: Oooh, let me check the latest version then.

    Edit: The latest version still only goes up to 86... now that makes me think that the game expects nothing above that value as far as modkits are concerned in carcols.ymt and expects all the data to be in the meta files.


  • MODERATOR

    @LeeC2202 said in How to fix tuning parts and lights not working on addons or making your own car packs:

    @meimeiriver Ooooh, it did work. I must have been using the wrong version of the tool. :astonished: Oooh, let me check the latest version then.

    Edit: The latest version still only goes up to 86... now that makes me think that the game expects nothing above that value as far as modkits are concerned in carcols.ymt and expects all the data to be in the meta files.

    But Willief23 said he put hundreds of cars in there. confused



  • @meimeiriver Possibly you can but I think the fact that nothing has been added since version 678 to that file, indicates that it might not be the way the game expects to find data.

    Because of the way data files tend to naturally superseded earlier files, the game shouldn't care where the data comes from... it's just data.

    In theory, it should be no different putting all your addons into one big carcols.meta file as it is putting them into that carcols.ymt file... in theory anyway.


  • MODERATOR

    @LeeC2202 said in How to fix tuning parts and lights not working on addons or making your own car packs:

    In theory, it should be no different putting all your addons into one big carcols.meta file as it is putting them into that carcols.ymt file... in theory anyway.

    Unless, what Willief23 seemed to suggest -- or what I understood him to suggest, rather -- is that all car IDs found in their own 'secret' carcols.ymt file are automagically deemed valid by the game. if not, there would, indeed, be little to no point shifting large portions of data around.



  • @meimeiriver said in How to fix tuning parts and lights not working on addons or making your own car packs:

    Unless, what Willief23 seemed to suggest -- or what I understood him to suggest, rather -- is that all car IDs found in their own 'secret' carcols.ymt file are automagically deemed valid by the game. if not, there would, indeed, be little to no point shifting large portions of data.

    There is only one carcols.ymt file though, sorry two if you count the one in x64a.rpf

    So that would imply that the meta files are treated equally with the ymt version. So unless there is a file that we haven't found yet, that somehow throws a blanket of validity over certain files/IDs, I'm not quite sure what else we could be missing. :confused:

    We're mimicking the game's own storage process, so that shouldn't affect anything. If using the meta files in addon folders was the problem, the game's default cars would suffer from it as well. It is very confusing, that's 100% certain.


  • MODERATOR

    @LeeC2202 said in How to fix tuning parts and lights not working on addons or making your own car packs:

    We're mimicking the game's own storage process, so that shouldn't affect anything. If using the meta files in addon folders was the problem, the game's default cars would suffer from it as well. It is very confusing, that's 100% certain.

    And again you make an excellent point!



  • @meimeiriver I am just looking at the setup2.xml file from the mpspecialraces pack, patchday14ng and the one I use in my addon pack and there is definitely differences in what I am using and what they are using and that's without looking at content.xml

    Any of those differences could be a critical factor with respect to how that data is interpreted and treated... I think this requires further investigation.

    Edit: I don't quite know how my pack worked. I have an entry stacked inside completely the wrong element pair. :blush:



  • So I have repaired my setup2.xml file based on the mplowrider2 patch and it still loads okay and the one car I spawned still tunes ok. God knows where I got those template files from but that was a mess. :blush:


  • MODERATOR

    Okay, I tried this out with my second car DLC, which only has 2 entries in it. Being tired of both having invalid IDs, yet again, I decided to try this carcols.ymt trick. i moved the pertinent sections from carcols.meta to the game's carcols.ymt; then I deleted my own carcols.meta (which is to say, I had content.xml no longer refer to it). And, lo and behold, both cars work now!

    Cautiously optimistic here. :) But it would appear as if, indeed, the game treats all IDs in carcols.ymt as 'per-definition valid.' More at 11.


  • MODERATOR

    Following with disbelief but hope. Something to explore then.

    But the big question is can we get past 255 valid modkit_ID's then?

    @kizacudo wrote
    @wernhard I went to 270 add-on modkits, but after that i start loosing tuning options randomly. Try deleting from dlclist, patchday13,12,11,10. That prolonged my add-on capabilities. That patchdays have same old cars but use new resources.



  • @ReNNie said in How to fix tuning parts and lights not working on addons or making your own car packs:

    because the big question is can we get past 255 valid modkit_ID's then?

    That sounds awfully like a programming restriction.

    0 for the default ID and then 255 additional ID values. 256 values, that's a nice round programming number... that can't be just coincidence.


  • MODERATOR

    @LeeC2202 That's my bet yes. And probably hard-coded and not a value set via gameconfig.xml...

    Which is why I would love a solution where a script would read xxx for an add-on modkit set in the meta files and would automagically transform it to a valid number when the car is spawned. .



  • @ReNNie said in How to fix tuning parts and lights not working on addons or making your own car packs:

    Which is why I would love a solution where a script would read xxx for an add-on modkit set in the meta files and would automagically transform it to a valid number when the car is spawned. .

    We can only dream I suspect... you will probably find that the people capable of such a task, don't bother with tuning cars enough for them to have even thought about it... if it's even possible of course.

    However, what I do find curious, is that the game uses 225 modkit ID's. One of my packs now seems to have 24 vaild ID's, making that 249 (in theory), so that puts one pack already pushing at the limit and yet I am sure ones from my 1st pack still work.

    So the question is, is there a limit of 255 for everything, or is there 255 for vanilla cars (i.e. those that shipped with the game) and then another 255 for DLC cars? That would be interesting to know. Or is there even 255 per dlc pack?

    You have a lot of cars, have you ever checked just how many actually have tuning, on top of how many the game already has?


  • MODERATOR

    @LeeC2202 Unsure from the comfort of my couch.
    But my Excel list will tell how many I had found working in my add-on collection. I did find that just by merely adding cars (without tuning even) previously working modkit_ID's would break.

    Which was around the time I sorta gave up for now and just continued on a single test_ID upon import and first test. After that I change to xxx and move on...


  • MODERATOR

    @LeeC2202 said in How to fix tuning parts and lights not working on addons or making your own car packs:

    @ReNNie said in How to fix tuning parts and lights not working on addons or making your own car packs:

    because the big question is can we get past 255 valid modkit_ID's then?

    That sounds awfully like a programming restriction.

    0 for the default ID and then 255 additional ID values. 256 values, that's a nice round programming number... that can't be just coincidence.

    Indeed, the highest modKitId a vehicle can have is 255 as it is stored as an 8-bit value. But as you can see here
    alt text
    the number of mod kit IDs is actually stored as a 16-bit value (movzx...). Theoretically, the game can store 65535 mod kits for a vehicle but the vehicle itself can only use 256 because the modKit item in CVehicleDrawHandler is stored as an 8-bit value (last line in the pic).


  • MODERATOR

    That is like abacadabra for footfolk like me :)

    I have around 178 extra modkit_ID's working in add-on's ranging from 400 up to 2253
    http://pastebin.com/iEM5bYvk

    Or would the game only read the first three digits then?

    //edit: @Unknown-Modder but are you talking about number of modkit's or modkit_ID's? because I have found the meta's support multiple modkit's indeed so I can refer to both eg 422_ferrari_modkit AND 0_default_modkit in the <kits> section



  • @Unknown-Modder said in How to fix tuning parts and lights not working on addons or making your own car packs:

    Indeed, the highest modKitId a vehicle can have is 255 as it is stored as an 8-bit value.

    That's interesting because my modkitID of 1023, in fact anything from 1000 - 1023 work fine. Does that mean that basically anything above 255 is getting ignored and it is in fact only using the lower 8-bits of that value?

    That would throw an interesting curveball into the mix if so, because a lot of people use ID values over 255.

    Edit: That is an interesting prospect actually, as 1023 equates to an 8-bit value of 255 (lowest 8-bits = 11111111, so anything lower than 1023 are values lower than 255. In fact, 221 - 255 and as the game seems to have a top end ID value of 225.... hmmm, this might provide a bit of insight into why I have been lucky.


  • MODERATOR

    @LeeC2202 Here's some pseudocode for you:

    char __fastcall SET_VEHICLE_MOD_KIT(signed int vehicle, unsigned int modKitId)
    {
      __int64 v2; // rbx@1
      __int64 v3; // rax@1
      __int64 v4; // rdx@2
      __int64 v5; // rcx@4
      __int64 v6; // rdx@4
    
      v2 = modKitId;
      v3 = GetScriptHandleAddressVehicleCheck(vehicle); // CVehicle
      if ( v3 )
      {
        v4 = *(_QWORD *)(v3 + 0x20); // CVehicleModelInfo
        if ( (signed int)v2 >= 0 && (unsigned int)v2 < *(_WORD *)(v4 + 0x290) ) // numModKits (16-bit)
        {
          v5 = *(_QWORD *)(v4 + 0x288); // pointer to the mod kits
          v6 = *(_QWORD *)(v3 + 0x48); // CVehicleDrawHandler
          LOBYTE(v3) = *(_BYTE *)(v2 + v5); // get mod kit from the mod kit list (lower 8 bits)
          *(_BYTE *)(v6 + 0x3F4) = v3; // set the mod kit (8-bit value)
        }
      }
      return v3;
    }
    

    I'll look a bit more into it when I have some time on my hands.



  • @Unknown-Modder I appreciate you providing that because it does seem to tie in with what I was thinking.

    If the game is only ever using the lower 8 bits of any value that it is given, then anything over 255 is meaningless. 255 = 1023 = 7935 etc... they all end up as 255.


  • MODERATOR

    I decided to quickly dump all the mod kits and they don't seem to be the same as in carvariations.meta :thinking:

    adder = 2
    airbus = *NONE*
    airtug = *NONE*
    akuma = 11
    alpha = 92
    ambulance = 0
    annihilator = *NONE*
    armytanker = *NONE*
    armytrailer = *NONE*
    armytrailer2 = *NONE*
    asea = 24
    asea2 = *NONE*
    asterope = 0
    avarus = 172
    bagger = 63
    baletrailer = *NONE*
    baller = 22
    baller2 = 4
    baller3 = 0
    baller4 = 0
    baller5 = 0
    baller6 = 0
    banshee = 51
    banshee2 = 140
    barracks = *NONE*
    barracks2 = *NONE*
    barracks3 = *NONE*
    bati = 7
    bati2 = 81
    benson = *NONE*
    besra = *NONE*
    bestiagts = 149
    bf400 = 168
    bfinjection = 0
    biff = *NONE*
    bifta = 87
    bison = 4
    bison2 = 4
    bison3 = 0
    bjxl = 41
    blade = 99
    blazer = 0
    blazer2 = 0
    blazer3 = 0
    blazer4 = 184
    blazer5 = 0
    blimp = *NONE*
    blimp2 = *NONE*
    blista = 36
    blista2 = 210
    blista3 = 211
    bmx = *NONE*
    boattrailer = *NONE*
    bobcatxl = 4
    bodhi2 = 14
    boxville = *NONE*
    boxville2 = *NONE*
    boxville3 = *NONE*
    boxville4 = *NONE*
    boxville5 = 0
    brawler = 120
    brickade = 0
    brioso = 157
    btype = 0
    btype2 = 130
    btype3 = 141
    buccaneer = 25
    buccaneer2 = 123
    buffalo = 13
    buffalo2 = 66
    buffalo3 = 207
    bulldozer = *NONE*
    bullet = 2
    burrito = 0
    burrito2 = 0
    burrito3 = 0
    burrito4 = 0
    burrito5 = 0
    bus = *NONE*
    buzzard = *NONE*
    buzzard2 = *NONE*
    cablecar = *NONE*
    caddy = *NONE*
    caddy2 = *NONE*
    camper = *NONE*
    carbonizzare = 76
    carbonrs = 7
    cargobob = *NONE*
    cargobob2 = *NONE*
    cargobob3 = *NONE*
    cargobob4 = *NONE*
    cargoplane = *NONE*
    casco = 0
    cavalcade = 15
    cavalcade2 = 4
    cheetah = 70
    chimera = 182
    chino = 121
    chino2 = 128
    cliffhanger = 169
    coach = *NONE*
    cog55 = 0
    cog552 = 0
    cogcabrio = 3
    cognoscenti = 0
    cognoscenti2 = 0
    comet2 = 56
    comet3 = 192
    contender = 0
    coquette = 69
    coquette2 = 104
    coquette3 = 122
    cruiser = *NONE*
    crusader = *NONE*
    cuban800 = *NONE*
    cutter = *NONE*
    daemon = 19
    daemon2 = 178
    defiler = 174
    diablous = 0
    diablous2 = 194
    dilettante = 1
    dilettante2 = 1
    dinghy = *NONE*
    dinghy2 = *NONE*
    dinghy3 = *NONE*
    dinghy4 = *NONE*
    dloader = 0
    docktrailer = *NONE*
    docktug = *NONE*
    dodo = *NONE*
    dominator = 33
    dominator2 = 208
    double = 21 0
    dubsta = 8
    dubsta2 = 30
    dubsta3 = 102
    dukes = 209
    dukes2 = 0
    dump = *NONE*
    dune = 0
    dune2 = *NONE*
    dune4 = 6
    dune5 = 6
    duster = *NONE*
    elegy = 193
    elegy2 = 37
    emperor = 0
    emperor2 = 0
    emperor3 = 0
    enduro = 112
    entityxf = 68
    esskey = 183
    exemplar = 3
    f620 = 3
    faction = 0
    faction2 = 124
    faction3 = 144
    faggio = 7
    faggio2 = 7
    faggio3 = 187
    fbi = 0
    fbi2 = 0
    fcr = 201
    fcr2 = 200
    felon = 34
    felon2 = 5
    feltzer2 = 10
    feltzer3 = 117
    firetruk = *NONE*
    fixter = *NONE*
    flatbed = *NONE*
    fmj = 154
    forklift = *NONE*
    fq2 = 0
    freight = *NONE*
    freightcar = *NONE*
    freightcont1 = *NONE*
    freightcont2 = *NONE*
    freightgrain = *NONE*
    freighttrailer = *NONE*
    frogger = *NONE*
    frogger2 = *NONE*
    fugitive = 6
    furoregt = 0
    fusilade = 49
    futo = 9
    gargoyle = 156
    gauntlet = 5
    gauntlet2 = 0
    gburrito = 0
    gburrito2 = 110
    glendale = 100
    gp1 = 206
    graintrailer = *NONE*
    granger = 4
    gresley = 39
    guardian = 111
    habanero = 6
    hakuchou = 7
    hakuchou2 = 176
    handler = *NONE*
    hauler = *NONE*
    hexer = 7
    hotknife = 62
    huntley = 95
    hydra = *NONE*
    infernus = 79
    infernus2 = 205
    ingot = 0
    innovation = 7
    insurgent = 0
    insurgent2 = 0
    intruder = 75
    issi2 = 40
    italigtb = 198
    italigtb2 = 199
    jackal = 29
    jb700 = 2
    jester = 90
    jester2 = 106
    jet = *NONE*
    jetmax = *NONE*
    journey = *NONE*
    kalahari = 88
    khamelion = 53
    kuruma = 113
    kuruma2 = 113
    landstalker = 42
    lazer = *NONE*
    le7b = 160
    lectro = 7
    lguard = 0
    limo2 = 0
    lurcher = 129
    luxor = *NONE*
    luxor2 = *NONE*
    lynx = 158
    mamba = 135
    mammatus = *NONE*
    manana = 64
    manchez = 185
    marquis = *NONE*
    marshall = 212
    massacro = 94
    massacro2 = 107
    maverick = *NONE*
    mesa = 4
    mesa2 = *NONE*
    mesa3 = 4
    metrotrain = *NONE*
    miljet = *NONE*
    minivan = 0
    minivan2 = 148
    mixer = *NONE*
    mixer2 = *NONE*
    monroe = 5
    monster = 7
    moonbeam = 0
    moonbeam2 = 125
    mower = *NONE*
    mule = *NONE*
    mule2 = 0
    mule3 = *NONE*
    nemesis = 7
    nero = 195
    nero2 = 196
    nightblade = 175
    nightshade = 132
    nimbus = *NONE*
    ninef = 32
    ninef2 = 18
    omnis = 159
    oracle = 3
    oracle2 = 72
    osiris = 114
    packer = *NONE*
    panto = 101
    paradise = 89
    patriot = 4
    pbus = *NONE*
    pcj = 47
    penetrator = 197
    penumbra = 35
    peyote = 67
    pfister811 = 150
    phantom = *NONE*
    phantom2 = 0
    phoenix = 31
    picador = 6
    pigalle = 103
    police = 0
    police2 = 0
    police3 = 16
    police4 = 0
    policeb = *NONE*
    policeold1 = *NONE*
    policeold2 = *NONE*
    policet = 0
    polmav = 86
    pony = 0 0
    pony2 = 0
    pounder = *NONE*
    prairie = 55
    pranger = 0
    predator = *NONE*
    premier = 43
    primo = 54
    primo2 = 126
    proptrailer = *NONE*
    prototipo = 151
    radi = 0
    raketrailer = *NONE*
    rallytruck = 165
    rancherxl = 4
    rancherxl2 = 0
    rapidgt = 77
    rapidgt2 = 80
    raptor = 0
    ratbike = 179
    ratloader = 27
    ratloader2 = 108
    reaper = 155
    rebel = 48
    rebel2 = 4
    regina = 0
    rentalbus = *NONE*
    rhapsody = 97
    rhino = *NONE*
    riot = *NONE*
    ripley = *NONE*
    rocoto = 4
    romero = 0
    rubble = *NONE*
    ruffian = 17
    ruiner = 44
    ruiner2 = 0
    ruiner3 = 0
    rumpo = 85
    rumpo2 = 0
    rumpo3 = 0
    ruston = 204
    sabregt = 71
    sabregt2 = 143
    sadler = 4
    sadler2 = 0
    sanchez = 82
    sanchez2 = 82
    sanctus = 173
    sandking = 59
    sandking2 = 60
    savage = *NONE*
    schafter2 = 52
    schafter3 = 133
    schafter4 = 134
    schafter5 = 136
    schafter6 = 137
    schwarzer = 58
    scorcher = *NONE*
    scrap = *NONE*
    seashark = *NONE*
    seashark2 = *NONE*
    seashark3 = *NONE*
    seminole = 4
    sentinel = 50
    sentinel2 = 61
    serrano = 46
    seven70 = 153
    shamal = 84
    sheava = 166
    sheriff = 0
    sheriff2 = 0
    shotaro = 188
    skylift = *NONE*
    slamvan = 109
    slamvan2 = 109
    slamvan3 = 142
    sovereign = 7
    specter = 189
    specter2 = 191
    speeder = *NONE*
    speeder2 = *NONE*
    speedo = 0
    speedo2 = 0
    squalo = *NONE*
    stalion = 0
    stalion2 = 0
    stanier = 6
    stinger = 2
    stingergt = 2
    stockade = *NONE*
    stockade3 = *NONE*
    stratum = 0
    stretch = 0
    stunt = 83
    submersible = *NONE*
    submersible2 = *NONE*
    sultan = 45
    sultanrs = 139
    suntrap = *NONE*
    superd = 2
    supervolito = *NONE*
    supervolito2 = *NONE*
    surano = 28
    surfer = 0
    surfer2 = 0
    surge = 26
    swift = 105
    swift2 = 105
    t20 = 118
    taco = *NONE*
    tailgater = 12
    tampa = 138
    tampa2 = 162
    tanker = *NONE*
    tanker2 = *NONE*
    tankercar = *NONE*
    taxi = 0
    technical = 0
    technical2 = 6
    tempesta = 202
    thrust = 96
    tiptruck = *NONE*
    tiptruck2 = *NONE*
    titan = *NONE*
    tornado = 65
    tornado2 = 65
    tornado3 = 0
    tornado4 = 0
    tornado5 = 146
    tornado6 = 186
    toro = 0
    toro2 = 0
    tourbus = *NONE*
    towtruck = *NONE*
    towtruck2 = 0
    tr2 = *NONE*
    tr3 = *NONE*
    tr4 = *NONE*
    tractor = *NONE*
    tractor2 = *NONE*
    tractor3 = *NONE*
    trailerlogs = *NONE*
    trailers = *NONE*
    trailers2 = *NONE*
    trailers3 = *NONE*
    trailersmall = *NONE*
    trash = *NONE*
    trash2 = *NONE*
    trflat = 0
    tribike = *NONE*
    tribike2 = *NONE*
    tribike3 = *NONE*
    trophytruck = 163
    trophytruck2 = 164
    tropic = *NONE*
    tropic2 = *NONE*
    tropos = 167
    tug = *NONE*
    turismo2 = 203
    turismor = 91
    tvtrailer = *NONE*
    tyrus = 161
    utillitruck = *NONE*
    utillitruck2 = *NONE*
    utillitruck3 = *NONE*
    vacca = 78
    vader = 7
    valkyrie = *NONE*
    valkyrie2 = *NONE*
    velum = *NONE*
    velum2 = *NONE*
    verlierer2 = 131
    vestra = *NONE*
    vigero = 57
    vindicator = 119
    virgo = 115
    virgo2 = 145
    virgo3 = 0
    volatus = *NONE*
    voltic = 38
    voltic2 = 190
    voodoo = 127
    voodoo2 = 6
    vortex = 181
    warrener = 98
    washington = 0
    wastelander = 0
    windsor = 116
    windsor2 = 152
    wolfsbane = 180
    xls = 0
    xls2 = 0
    youga = 23
    youga2 = 177
    zentorno = 93
    zion = 73
    zion2 = 74
    zombiea = 170
    zombieb = 171
    ztype = 20
    

    The game probably does some changes when loading the values...



  • @Unknown-Modder That's a similar list to what I had in this post (There's an excel file in the link)... https://forums.gta5-mods.com/topic/5105/how-to-fix-tuning-parts-and-lights-not-working-on-addons-or-making-your-own-car-packs/62

    I have a programme that extracts all the vehicles and IDs from vehicles.meta, carcols.meta and carcols.ymt. The highest ID I found was 225 but couldn't find any below 8, so we're getting slightly different values.

    carcols.ymt seemed to contain all IDs up to and including 86, carcols.meta in the DLC packs seemed to start at 87 and go up to 225 with no overlap or duplication between the two file types.


Log in to reply
 

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