BTCC Tyre Selection Soft/Wet only

Discussion in 'Car Modding' started by DanRZ, May 23, 2023.

  1. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Hello i want to make an upgrade to the BTCC cars and add Soft/Wet only tyre selection which for reasons doesn't exist.

    Here is the medium part of the upgrade.ini :
    Code:
      UpgradeLevel="Medium and wet only"
      {
        Description="Availability of tyres restricted to Medium and Wet compounds."
        CPIT=TireCompoundMap=(1,3)
        CPIT=SpinnerCompound=1
    
        HDV=[GENERAL]
        HDV=TireBrand="Cupra_Leon_BTCC_mw.tbc"
        HDV=FrontTireCompoundSetting=0
        HDV=RearTireCompoundSetting=0
        HDV=
      }
    And here is the soft part i want to add in the upgrade.ini :
    Code:
      UpgradeLevel="Soft and wet only"
      {
        Description="Availability of tyres restricted to Soft and Wet compounds."
        CPIT=TireCompoundMap=(2,3)
        CPIT=SpinnerCompound=1
    
        HDV=[GENERAL]
        HDV=TireBrand="Cupra_Leon_BTCC.tbc"
        HDV=FrontTireCompoundSetting=0
        HDV=RearTireCompoundSetting=0
        HDV=
      }
    
    It doesn't work as expected, i still have all selectable tyres ...

    2 questions :
    1 - Am i setting TireCompoundMap and SpinnerCompound the good way ?
    Same for FrontTireCompoundSetting and RearTireCompoundSetting (These seem ok for me).
    2 - Do i have to use Cupra_Leon_BTCC_sw.tbc ? Does this file exist ?

    I join the all upgrade ini file i am using for the Cupra, which works for other sets Std, Hard, Medium, etc ...

    Thanks for the help ...
     

    Attached Files:

  2. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Crash when i try Cupra_Leon_BTCC_sw.tbc ... :(

    Log :
    Code:
     138.71s tire_manager 1457: Non-existent tire brand "CUPRA_LEON_BTCC_SW"
     138.71s hdvehicle.cp 7055: *.hdv file references unknown tire compound "CUPRA_LEON_BTCC_SW"
     138.75s main.cpp      358: onFatalError 11
    It looks like i can use only Cupra_Leon_BTCC.tbc or Cupra_Leon_BTCC_smw.tbc file.
     
    Last edited: May 23, 2023
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    They'll probably only have .tbc files for the combos they were using. You'd need to add your own .tbc file in the package.
     
  4. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Thanks, how can i get a "base tbc" i can modify and add to my mas and rfcmp ?

    And finally, after a few tests, it seems to work almost properly with my inital try with upgrade.ini.

    Setup is fixed on Soft and it works on all sessions. Car starts always in Soft.
    Upgrades are fixed to "Soft and Wet" in my upgrade.

    I was a bit confused ...

    On Pits Menu :
    In Practice you can select Soft/Medium/Hard/Wet without any constraints (Probably intended as is).
    In Qualification, Soft only (From setup ? Why not the Wets ?)
    In Warmup and Race, Soft and Wet (as intended in upgrade set)

    Everything is OK finally, i get what i need, except that weird behaviour on Qualification,
    which should also have Wet ... I tried other cars (GT3) and same behaviour in Qualification, no Wet selectable in Pits.
     
  5. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    The .tbc sets (defines) which tyre compounds are available. It defines the AI parameters (grip, slip curves, wear, etc) and some values important for the player (radius, ...) and it links to the relevant TGM file(s) for each compound (ie the player tyres).

    You can find the linked TGM in the trace file I think, but if the .tbc files are in the encrypted MAS I don't think you'll be able to match their properties for everything else with your own .tbc.

    CPIT entries:
    TireCompoundMap: tells the game which tyre textures to use for each of the currently available compounds. It doesn't change which compounds are available.
    SpinnerCompound: sets which compound to show in the spinner (car selection). No other effects.

    HDV:
    FrontTireCompoundSetting: The default compound index to use for the front tyres, from the available compounds. It doesn't change which compounds are available.
    Rear: as above for the rear tyres.

    Simply put: The .tbc is used to define which compounds are available, but you need info in there you probably don't have.
     
  6. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Thanks again for all those details.

    I found a tbc in ModDev for other cars, and there are lots of very detailed datas that i will never be able to reconstruct.

    I still managed to achieve what i was looking for.

    ;)
     
  7. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    Off the top of my head I can't think why your available compounds are changing with the standard .tbc. Hopefully someone can enlighten me.
     
  8. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    I think this part is making it :
    Code:
    CPIT=TireCompoundMap=(2,3)
    Fixed setup forces to Soft at start, and
    TireCompoundMap ensures that you will only have Soft and Wet selectable in pits menu at least in Qualification and Warmup/Race.
    And that is what i wanted.

    If i remove the Fixed setup it won't work as i needed i think, and leave all tyres types selectable in setup menu because it is available in the tbc with all tyres types.
    In Pits menu, there will still have only Soft and Wet in Quali, Warmup and Race on forced Upgrades.

    The only way to fix tyre type selection in setup menu is by modifying/adding a tbc file ...
     
    Last edited: May 24, 2023
  9. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    I can't tell you something isn't happening when it is, but that parameter maps the defined compounds to the textures. Per skip barber:

    GraphicalTireCompounds=2 // number of graphical tire compounds (may be less than number of physical tire compounds if some look the same)
    //TireCompoundMap=(0,1) // up to 16 entries allowed, maps the physical compound to the graphical one
    //SpinnerCompound=0 // index to use for spinner display tyres.

    If you have 3 WheelSpeedAnims, and 4 defined compounds, you have 12 tread textures for varying speeds, 00-11. By default the first compound will be 00-02, 2nd 03-05, etc. Changing the compound map to (2,3, ..., ...) would mean the first compound uses the third (0, 1, 2) set of textures, so 06-08, while the second compound will use 09-11.

    Having the TireCompoundMap with fewer entries than there are GraphicalTireCompounds feels like a recipe for undefined behaviour, and having it somehow relate to which compounds you can choose from in the setup is even weirder. Hey, I can't rule it out, something's obviously happening, but I can't see any logic to it.

    *edit to fix number... and seeing your edit, fixed setup will just be fixed regardless, no?
     
    Last edited: May 24, 2023
  10. DanRZ

    DanRZ Registered

    Joined:
    Aug 22, 2021
    Messages:
    720
    Likes Received:
    220
    Yes, no problem with the fixed setup which works perfectly.
    For full control i need to make sure people can only use same tyres as defined in setup. That doesn't work if you don't fix selections in an upgrade.
    Medium only upgrade works perfectly.
    It's just Soft that are not in a "native" upgrade with them only for a probably good reason.
    You never use Softs only on a real race probably ...
     

Share This Page