Assign a specific car class from the upgrades file.

Discussion in 'Car Modding' started by JParra, Jul 21, 2020.

  1. JParra

    JParra Registered

    Joined:
    Jul 13, 2017
    Messages:
    262
    Likes Received:
    93
    Hello community. I would like to know if there is a way to assign or change the class of a vehicle through the file upgrades.ini

    My intention is to restrict on the server a specific type of upgrades. If I can assign a class according to the chosen improvements, on the server I can enable only that class so that all the pilots use certain upgrades.

    This is the solution I am trying, seeing that the usual method of fixed upgrades does not work for me.

    Thank you.
     
    lagg likes this.
  2. JParra

    JParra Registered

    Joined:
    Jul 13, 2017
    Messages:
    262
    Likes Received:
    93
    Good Morning.
    Should I understand the silence as the answer is not known or as it is not possible?
     
  3. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,382
    Likes Received:
    6,600
    I can half answer the question, but you'll need to test to see if it does anything useful.

    You can assign an UpgradeClass, which specifies which of the available upgrades are used in that class. By then selecting those upgrades you end up in that class of car. Whether that ends up working on a server is another matter entirely, as it's possible the base class will come through regardless.

    Syntax is like this: (this from old rF1 base files, first example I found)

    Code:
    UpgradeClass="Hammer6"
    {
      AIList
      {
        Spoiler=0
        Cockpit=0
        Side Skirt=0
        Front End=0
        Rear End=0
        Hood=0
        Exhaust=0
        Tires=0
        Brakes=0
        Weight Reduction=0
        Suspension=0
        Computer Chip=0
        Engine Tuning=0
        Clutch=0
        Flywheel=0
        Transmission=0
        Differential=0
        Fuel Tank=0
        Horn=0
      }
    }
    
    
    Note that each of those entries matches the name ("UpgradeType") of the upgrade, and 0 is the first option listed, 1 is the second, etc.

    So this same upgrade file has the first actual upgrade starting with:

    Code:
    UpgradeType="Spoiler"
    {
      Instance="RWING"
    
      UpgradeLevel="Stock - No Spoiler"
      {
        GEN=<RWINGEXISTS>="//"
        GEN=<RWING>=
      }
    
    *I think I looked too hard, the Skip Barber has this also in devmode :p
     
    Last edited: Aug 4, 2020
  4. JParra

    JParra Registered

    Joined:
    Jul 13, 2017
    Messages:
    262
    Likes Received:
    93
    I understand. First I have to specify the upgrades and then with the UpgradeClass assign a class and specify some values for the updates.

    I will test it to see if it works and if it also changes the class.

    I was misusing the UpgradeClass, thank you very much.
     

Share This Page