AI Mistakes decimal

Discussion in 'Technical & Support' started by Booth_doberman, Apr 25, 2023.

  1. Booth_doberman

    Booth_doberman Registered

    Joined:
    Oct 5, 2015
    Messages:
    187
    Likes Received:
    84
    I found this tonight while trying to "fix" the level of mistakes being made by the Gen3 FEs at Berlin. I went into player.json and changed the AI mistakes to .5. On track it was like a demolition derby. When I went back into player.json, I discovered that it said 5 and not .5. My mistake, thought I. I changed it to .5 and went back on the track and it was a crash fest. Back into player.json and it was 5 again. I learned that if you don't enter the number as 0.5, it will get changed to 5. You can do 1 as 1 or 1.0 and it works fine but any number less than 1 has to be entered as 0.x. To be fair, the documentation says, "a range of (intentional) AI mistakes from 0.0 (none) to 1.0 (sometimes)."
     
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,386
    Likes Received:
    6,602
    Similar has happened in some vehicle files I think (at least recently, possibly prior but without error messages), where entering parameter values as .1 instead of 0.1 stopped it being read properly.

    It's a good idea to always put the 0 for visibility purposes anyway :D
     
  3. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    Smart bit of code: "User entered .5 so ignore the decimal point and use 5… on a value with a range specified as up to 1" :rolleyes:
     
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    12,386
    Likes Received:
    6,602
    Above 1 has always been valid.

    "AI Mistakes#":"a range of (intentional) AI mistakes from 0.0 (none) to 1.0 (sometimes). Anything above 1.0 multiplies the frequency",


    I think anyone somewhat familiar with coding should avoid colouring code intention that way as well - those with no idea about code can do that well enough already...
     
  5. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    Ah, I was relying on the quote in the OP.
     

Share This Page