Page 1 of 5 123 ... LastLast
Results 1 to 10 of 48

Thread: Customizing Car Classes

  1. #1

    Customizing Car Classes

    In order to improve support of moddable games, we've added a carClassData.json configuration file. File is usually located in the Crew Chief installation folder.

    If you want get down to business of customizing Car Classes, you can skip straight to "carClassData.json file explained" section.

    Why would I want to customize car classes?
    The main reason to care about car classes in Crew Chief, is to enable good CC experience for modded vehicle classes, that CC does not support out of the box. Through Class definition, CC knows about wheel sizes, brake types etc. There's a lot of awesome 3rd party content, but CC team can't cover it all (although we will add class mappings as well). That's where this mechanism becomes helpful.

    Single-class vs Mult-class event
    CC uses Car Class to distinguish between multi-class and single class races. If race is a multi-class race, CC will compare your lap times with lap times of vehicles of the same class. The problem is, that sometimes mods are authored in a way, that car class name is different for vehicles in a same class. For example, there might be "A GT3" class name for vehicle of brand A, and "B GT3" for vehicle of brand B. If you would like Crew Chief to treat both classes as same class, you will need to map "A GT3" and "B GT3" class names to CC GT3 class. That way, such race becomes a single class race.

    Check Crew Chief console window output when you start a new session. CC will print if event is single or multi-class. It also prints each opponent and associated car class. If mod car class is not mapped to CC built in class, CC creates new class on the fly (using vehicle class coming from the mod). If mod does not use same vehicle class string for all vehicle (and there's no appropriate mapping in carClassData.json), you might get multi class race, when all vehicles are actually in a same class.

    What is customizable by using this mechanism?
    • Map vehicle to some pre-defined CC class. For example, if your vehicle class is "Super Mod GT3", you can map it to GT3 class.


    • You can customize pre-defined CC car classes. For example, if you are driving a vehicle with very large wheels, CC might announce that you're locking your wheels all the time (because wheel rotates way slower than we expect). Car class configuration mechanism allows you to specify wheel sizes.

    Customizing Car Classes
    There are two ways in which you can customize Crew Chief Car Classes:
    • by modifying the main carClassData.json file
    • overriding provided classes by creating your own definition file.

    You can edit this file in the Crew Chief install folder, or create another file called carClassData.json in your Documents folder in a new subfolder called CrewChiefV4 (i.e. Documents/CrewChiefV4/carClassData.json). Use the carClassData.json from the installation folder as a template. The car classes defined in the Documents/CrewChiefV4 folder will override any with the same name in the app's install folder, and you can also add your own here.

    The carClassData.json in the app's install folder will be overwritten each time the app is updated.

    Adding new car class
    See: https://forum.studio-397.com/index.p...17#post-903314

    Adding new car class to the Crew Chief
    As our team can't physically drive every single mod/series out there, we can't add them all. Here's how you can help:
    - Start CC
    - Pick a series to race
    - Start a session
    - Stop CC
    - CTRL+A/CTRL+C in CC Console window.
    - Send that text to us with brief description what series/class it is.

    carClassData.json file explained
    A car class will
    inherit the defaults values for things if they're not specified.

    The valid params are:
    Code:
    {
       "carClassEnum": this is the built-in car class group (see complete list below). It must match on of these built in types.
       "pCarsClassNames": this is a comma (,) separated array of pCars classnames. * or ? denote wildcards. The app searches for classes which have full matches before considering wildcards
       "rf2ClassNames": as above, for rFactor2
       "rf1ClassNames": as above, for rFactor1, AMS, GSC, FTruck, and other RF1 based games (the Reiza games)
       "acClassNames": as above, for Assetto Corsa
       "raceroomClassIds": this is an array of integers or R3E class IDs  
       "brakeType": can be "Carbon", "Ceramic", "Iron_Race" or "Iron_Road"
       "maxColdTyreTemp": used to override cold tyre temperature (celsius) upper threshold.  Specifies max temperature at which tyre is still considered cold.  If not specified, comes from the built in defaultTyreType.
       "maxWarmTyreTemp": used to override warm (ok) tyre temperature (celsius) upper threshold.  Specifies max temperature at which tyre is still considered warm/ok.  Above that value, tyres are overheating.  If not specified, comes from the built in defaultTyreType.
       "maxHotTyreTemp":  used to override hot tyre temperature (celsius) upper threshold.  Specifies max temperature at which tyre is still considered hot.  Above that value, tyres are "cooking".  If not specified, comes from the built in defaultTyreType.
       "maxColdBrakeTemp": used to override cold brake temperature (celsius) upper threshold.  Specifies max temperature at which brakes are still considered cold.  If not specified, comes from the built in brakeType.
       "maxWarmBrakeTemp": used to override warm (ok) brake temperature (celsius) upper threshold.  Specifies max temperature at which brakes are still considered warm/ok.  Above that value, brakes are overheating.  If not specified, comes from the built in brakeType.
       "maxHotBrakeTemp":  used to override hot brake temperature (celsius) upper threshold.  Specifies max temperature at which brake are still considered hot.  Above that value, brakes are "cooking".  If not specified, comes from the built in brakeType.
    
       "defaultTyreType": can be "Road", "Bias_Ply", "Unknown_Race", and various others that the app doesn't really use (still to be worked on...)
       "maxSafeWaterTemp": water temp above this (celsius) will trigger a warning
       "maxSafeOilTemp": oil temp above this (celsius) will trigger a warning
       "minTyreCircumference": used to override default tyre size settings, used when calculating wheel locking and spinning. Only karts should need to override this.  Decrease this value if your class gets too many "wheel spinning" messages.
       "maxTyreCircumference": used to override default tyre size settings, used when calculating wheel locking and spinning. Only karts should need to override this.  Increase this value if your class gets too many "locking wheel" spinning messages.
       "spotterVehicleLength": specifies vehicle length (meters) for spotter to use in calculations.  Defaults to spotter_*_vehicle_length preference value (4.5 by default).
       "spotterVehicleWidth": specifies vehicle width (meters) for spotter to use in calculations.
       "acTyreTypeData": 
        {  
            "Trofeo M Slicks (M)" : name of the specific tyre you want to override the buildin values for.
            {    
                "maxColdTyreTemp": used to override cold tyre temperature (celsius) upper threshold.  Specifies max temperature at which tyre is still considered cold.  If not specified, comes from the built in defaultTyreType Or from buildin Assetto Corsa tyres.
                "maxWarmTyreTemp": used to override warm (ok) tyre temperature (celsius) upper threshold.  Specifies max temperature at which tyre is still considered warm/ok.  Above that value, tyres are overheating.  If not specified, comes from the built in defaultTyreType. Or from buildin Assetto Corsa tyres.
                "maxHotTyreTemp": used to override hot tyre temperature (celsius) upper threshold.  Specifies max temperature at which tyre is still considered hot.  Above that value, tyres are "cooking".  If not specified, comes from the built in defaultTyreType. Or from buildin Assetto Corsa tyres.
            },
        }
        "timesInHundredths": if true, lap times and gaps under 0.2 will be reported in hundredths, otherwise in tenths.
        "enabledMessageTypes": list of message types allowed for this class in "Real Mode".  Possible values are: TYRE_TEMPS, TYRE_WEAR, BRAKE_TEMPS, BRAKE_DAMAGE, FUEL, LOCKING_AND_SPINNING, ALL, NONE.  The purpose here is to increase realism by not including modern era messages on old classe.  For example, Karts have no communication at all, hence this value is NONE.
    }
    The default values are:
    Code:
    {
       "brakeType": "Iron_Race"
       "defaultTyreType": "Unknown_Race"
       "maxSafeWaterTemp": 105
       "maxSafeOilTemp": 125
       "minTyreCircumference": 0.4 * pi (40cm diameter wheel)
       "maxTyreCircumference": 1.2 * pi (120cm diameter wheel) 
    }
    Crew Chief built-in car classes are:
    GT1X, GT1, GTE, GT2, GTC, GTLM, GT3, GT4, GT5, Kart_1, Kart_2, KART_JUNIOR, KART_F1, LMP1, LMP2, LMP3, ROAD_B, ROAD_C1, ROAD_C2, ROAD_D, ROAD_SUPERCAR, GROUPC, GROUPA, GROUP4, GROUP5, GROUP6, GTO, VINTAGE_INDY_65, VINTAGE_F3_A, VINTAGE_F1_A, VINTAGE_F1_A1, VINTAGE_GT3, VINTAGE_GT, HISTORIC_TOURING_1, HISTORIC_TOURING_2, VINTAGE_F1_B, VINTAGE_F1_C, STOCK_CAR, F1, F2, F3, F4, FF, TC1, TC2, TC1_2014, AUDI_TT_CUP, AUDI_TT_VLN, CLIO_CUP, DTM, DTM_2013, V8_SUPERCAR, DTM_2014, DTM_2015, DTM_2016, TRANS_AM, HILL_CLIMB_ICONS, FORMULA_RENAULT, MEGANE_TROPHY, NSU_TT, KTM_RR, INDYCAR, HYPER_CAR, HYPER_CAR_RACE, STOCK_V8, BOXER_CUP, UNKNOWN_RACE

    Car classes can skip an entry if they're using the default - e.g. most cars skip defaultTyreType so they use Unknown_Race - this is only overridden in road cars.

    IMPORTANT....

    This file in [install_dir]/ will be *overwritten without warning* on update. If you want to define your own car classes or modify the built in ones, create a new file [My Documents]/CrewChiefV4/carClassData.json. This only needs to contain additions and overrides - the app parses the default car classes defined in this file and found in install_dir, then classes in the My Documents version override and add to the default classes.

  2. #2
    Crew Chief Mega Corp CEO mr_belowski's Avatar
    Join Date
    Feb 2017
    Posts
    1,017
    Crew Chief will add and override any car classes defined in Documents/CrewChiefV4/, so if you want to add your own classes or override the defaults, create a file carClasses.json in that folder and add your customisations there

  3. #3
    Feel free to edit my posts in line, I think it will be easier to have all the info in first post

  4. #4
    Beginning with 4.6.4.0, we've added functionality to override
    * tyre temps. Note, for Assetto Corsa per-tyre type overrides allowed, for the rest of a games temps apply to all tyre types.
    * brake temps
    * spotter vehicle dimensions

    See first post for more details.

  5. #5
    Junior Member
    Join Date
    May 2017
    Posts
    16
    I tried to update in notepad, a class, with revised brake temps and it told access was denied when I attempted to save the revised json.

    Just wondering how to fix?
    cheers

  6. #6
    Hello smbrm,
    You are editing json in Program Files, right?

  7. #7
    Crew Chief Mega Corp CEO mr_belowski's Avatar
    Join Date
    Feb 2017
    Posts
    1,017
    You need to create a CrewChief folder in your Documents folder and copy which ever classes you want to modify in to a new carclasses.json in that folder, and edit it there. See trackLandmarks.json for more info (if memory serves me correctly)

  8. #8
    Junior Member
    Join Date
    May 2017
    Posts
    16
    Quote Originally Posted by mr_belowski View Post
    You need to create a CrewChief folder in your Documents folder and copy which ever classes you want to modify in to a new carclasses.json in that folder, and edit it there. See trackLandmarks.json for more info (if memory serves me correctly)
    Thanks for the reply

    I added this to a carClassData.jon located in (Windows 8.1) Documents/CrewChiefV4/

    These lines replaced the original lines for this particular class entry. All other classes included in the documents file and remained as original.

    {
    "carClassEnum": "INDYCAR",
    "raceroomClassIds": [ 5383 ],
    "pCarsClassNames": [ "Indycar" ],
    "brakeType": "Carbon",
    "maxSafeWaterTemp": 105,
    "maxSafeOilTemp": 140,
    "maxColdBrakeTemp": 411,
    "maxWarmBrakeTemp": 675,
    "maxHotBrakeTemp": 1570
    },

    I continue to get warnings of brake overheating for the Dallara DW12. Data logging shows max temps are 1073 & 767. Hot brake reports are inconsistent with when hot brakes might actually occur.

    UPdated to latest version of Crewchief 4.6.5.0. File as above in documents remains unchanged, as is and was not impacted by Crewchief update.

    Is my file in the wrong place?

    So just trying to find out if this is working correctly?

  9. #9
    Crew Chief Mega Corp CEO mr_belowski's Avatar
    Join Date
    Feb 2017
    Posts
    1,017
    it looks like you have it in the correct place, and it's got the correct name - by default Windows will hide the suffix of known file types, so if you created this as a text file make sure it's not actually called carClasses.json.txt (there's an option to show the full file name or show type of known file types somewhere in the File Explorer options).

    When you start the app the console should include something like: "loaded 68 default car classes and 0 user car classes". If it's loading your car classes the second number will not be zero.

    You only need to include the car class block for the class you're changing in you carClasses.json file - you can safely remove the others.

    It sounds like I also need to incorporate your temperature range fixes into the default classes - I'll do this this the next release

  10. #10
    If I am understanding the situation correctly, this is for rFactor 2 and I see no rF2 mapping in a block you pasted. So, what you need to do is check Monitor in garage, and see which vehicle class name does DW12 has. Then, you need to add to above block you pasted:


    {
    "carClassEnum": "INDYCAR",
    "raceroomClassIds": [ 5383 ],
    "pCarsClassNames": [ "Indycar" ],
    "rf2ClassNames": [ "DW12 CLASS NAME" ],
    "brakeType": "Carbon",
    "maxSafeWaterTemp": 105,
    "maxSafeOilTemp": 140,
    "maxColdBrakeTemp": 411,
    "maxWarmBrakeTemp": 675,
    "maxHotBrakeTemp": 1570
    }

    What this does, is it maps rF2 car class to a car class known and understood by CC. CC covers classes in controlled games, like R3E or pCars, but moddable games need mapping.

    Then, if mapping is correct, when you start session you will see text like this in CC console window:
    27 : No landmarks defined for this track
    05:59:21.447 : Using unmapped driver last name murphy for raw driver name john murphy
    05:59:21.449 : New driver john murphy is using car class KART_JUNIOR at position 3
    05:59:21.451 : Using unmapped driver last name tamm for raw driver name maki tamm
    05:59:21.453 : New driver maki tamm is using car class KART_JUNIOR at position 1
    05:59:21.455 : Using unmapped driver last name johansson for raw driver name ari johansson
    05:59:21.457 : New driver ari johansson is using car class KART_JUNIOR at position 2
    05:59:21.460 : New session, trigger data:

    In your case, car class should be INDYCAR. Once this is mapped, your temperatures should get picked up, unless we messed something up

Page 1 of 5 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •