Make the AI faster or slower in general.
Make the AI faster or slower at one particular track.
Adjust the spread of the AI times, producing either a tightly bunched field, or one that's quite spread out.
One disclaimer - I'm a slow driver, consequently my experience is with slowing the AI down, not speeding it up. It's possible some things don't work quite as described if your aim is to speed up the AI.
When I talk about altering certain files, I'll use their original GPL names. The mods all have their own versions of these files, generally with a two character code representing the mod appearing somewhere within the file name. For track.ini, there may or may not be a track.ini file designed explicitly for the mod you're running. If there isn't, the standard track.ini is used. For driver.ini, some mods have separate driver.ini files for each race that occurred within the championship - these files exist within the track directories and override the normal driver.ini at that track only.
The first concept that needs to be understood is normalized player time, or npt for short. This is a measurement of the skill of the player, with 1.0 representing a par rating. Note that 1.0 should not be interpreted as 'average' - you need to be a very good driver to achieve a 1.0 rating. If you're even better than that, your rating will be less than 1.0 . However most of us will be slower than that, and will have ratings greater than 1.0 .
I don't know the precise details of how the rating is calculated, but conceptually it's done by comparing your lap times at a particular track with the reference_value in track.ini, reference_value being a lap time in seconds, probably representing par. Information on what lap times you've done is stored in the player.sts file in your player directory.
GPL's default behaviour is to adjust the speed of the AI in parallel with your ability - the quicker you are, the quicker the AI will go. However, again by default, it doesn't do this quite the way you might expect, I'll go into the details later.
There are two values in gpl_ai.ini that relate to normalized player time. startup_npt is the rating that GPL uses when you create a new player - at this point you don't have any recorded lap times, so GPL can't calculate npt in the normal fashion. GPL shipped with a value of 1.20 for startup_npt. 1.20 represents an exceptionally slow driver - I'm one of the world's worst GPL drivers, and I guess my rating to be about 1.15. For the mods we generally set startup_npt to 1.05, since most people installing the mod will already be experienced and skillful GPL drivers.
The second value in gpl_ai.ini is npt_override - this is the most important value we will look at. It serves two different purposes, which makes it slightly confusing. Firstly I said that GPL normally adjusts the AI to match your speed - this is true when npt_override is set to 0.0, which is the default value. However if npt_override is set to anything else, when determining AI speed GPL uses the npt_override value instead of your npt rating. This gives you a direct way to control the overall AI speed. The useful range of values is probably around 0.80 - 1.20, beyond that the AI will be insanely fast or stupidly slow. Note also that when npt_override is not 0.0 the player.sts file becomes irrelevant. This is handy since the player.sts file seems to be quite susceptible to corruption with bad lap times. Also for add-on tracks the reference_value may not be set well, resulting in inaccurate values. You'll have more control over AI speeds if you set npt_override to something other than 0.0 .
I believe the AI Speed field in GEM+ sets npt_override in gpl_ai.ini.
So if all you want to do is speed up or slow down the AI overall, this is all you need - set npt_override to an appropriate value, though of course you may need to do some experimentation to find what that value is. Once you've found a value that works for you for one mod, you should be able to use the same value in other mods with approximately similar results.
The next problem you may encounter is that the AI might be too slow or too fast at one particular track. This is easy to fix, just adjust the dlong_speed_adj_coeff value in track.ini . Higher values make the AI quicker, lower slower. These values are normally 1.0 or above, but if you need to set one lower than 1.0 that should still work. If you want to make the AI 1% quicker, I suspect in general you'd need to multiply the value by about 1.015, but really you'll need to experiment.
If you want to adjust speeds for a mod at a track that doesn't have a mod-specific track.ini you're a little bit stuck. Don't just make a copy of the track.ini with the right name - the AI fuel loads, dlong_speed_maximum and reference_value will be wrong. The mod would make adjustments to these values when loading track.ini itself, but will not do so when loading a mod-specific track.ini. The best approach is probably just to temporarily alter dlong_speed_adj_coeff in track.ini itself, then set it back once your race has finished. Of course it's possible that the adjusted value would work perfectly well in 67 and other mods anyway.
For add-on tracks I'm assuming that the AI are already running relatively sensibly. If the AI are currently behaving strangely or are very slow or very fast, that's almost certainly a problem with the .lp files, and won't be fixable via track.ini .
Finally, trickiest of all is controlling the field spread. For this we need to understand two values in driver.ini - hype and global_hype_scaling.
hype is the main measure of an AI driver's skill - you can think of it as being similar to normalized player time, except that confusingly it's the other way around, more skillful AI drivers have higher hype ratings. They tend to fall in the range 1.05 - 0.95, though some less skillful drivers may have even lower ratings. Since this is the primary way of controlling the speed of an AI driver, the rating also encompasses other things. For instance many privateers drove one or even two year old cars, but in terms of GPL physics they'll effectively be driving brand new works cars. Hence their hype values need to be set lower to produce realistic lap times.
The hype rating is used directly when the normalized player time (or npt_override) is 1.0 . When npt is any other value, some scaling of the hype value takes place; this is how GPL adjusts AI speeds to match your own. This is where global_hype_scaling comes in, it controls the amount of scaling applied to each driver. A value of 1.0 represents the full amount of scaling, a value of 0.0 would mean no scaling took place. So for instance if all the global_hype_scaling values were 0.0, the AI would always run at the same speed regardless of npt.
I think if you're running Grand Prix level races, if all the global_hype_scaling values were 1.0, the AI field speeds should adjust in parallel to npt. So if over time you reduce your laptimes by 1.0%, the AI field as a whole should do the same. I believe more scaling is applied at the lower race levels (Novice/Intermediate), so if you're running at those levels global_hype_scaling values of 1.0 might be too high.
In its original configuration, GPL was set up with minimal hype scaling for the quicker drivers (Clark's was 0.05), increasing through the field up to 1.0 for some of the slower drivers. We've followed this general scheme in the mods. The result of that is that if you're rather unskillful, the front end of the AI field will still run quickly, but some of the back markers run quite slowly so that you should have a few of the AI drivers doing similar times to your own.
A lot of people don't like how this works however, particularly those that want to be competing at the front end of the race. The simplest thing to do here is to make the range of global_hype_scaling values much smaller - most likely just setting them all the same. If you're running at GP level (I think Pro is the same but am unsure) setting all the global_hype_scaling values to 1.0 might work well, though you could experiment with somewhat lower values. If you're running Novice or Intermediate races, I think 1.0 will be too high, and would recommend something lower.
For the mods we've tried to produce a realistic AI spread when running with npt at 1.0 . Some of the real privateers really were quite slow, no doubt in part due to the machinery they were running. If you find that even with all the global_hype_scaling values the same the AI spread is wider than you would like, the thing to do would be to increase the hype ratings of the slowest drivers.
Hopefully this will have helped you get the AI running how you want. Please understand that it's not possible for us to deliver the mods in such a way that it runs out of the box exactly how you want - there is a wide range of skills among GPL drivers, and also different tastes in how they want the AI speeds to be. Instead what we aim for is that whatever you have done to tailor you 67 AI should also work reasonably well for the mods.
Edited by npattinson, Apr 05 2009 - 03:25 PM.