Weather System
Overview
Weather is generated deterministically using a seeded random number generator. The seed is based on the season, round, and circuit ID - meaning the same race will always have the same weather forecast.
Weather Conditions
Each weather condition adds a lap time penalty based on the circuit's weather sensitivity (rated 1-10). The higher the sensitivity, the bigger the penalty. Light rain adds a small amount, while heavy rain can add a lot. A skilled driver (high Technical) can reduce the rain penalty:
| Condition | Lap Time Penalty | Plain English |
|---|---|---|
| ----------- | ----------------- | --------------- |
| Dry | No effect | Perfect conditions, no penalty |
| Drying | +0.02 x weather_sensitivity | Track is drying, small penalty |
| Light Rain | +0.05 x weather_sensitivity | Light rain, modest penalty |
| Rain | +0.10 x sensitivity minus tech reduction | Steady rain, significant penalty. High Technical skill helps |
| Heavy Rain | +0.18 x sensitivity minus tech reduction | Downpour, big penalty. Technical skill helps even more |
The Technical skill reduction in Rain is: effectiveTech x 0.006. In Heavy Rain it is stronger: effectiveTech x 0.008. A driver with effective Technical of 10 would reduce the Rain penalty by 0.06 seconds and the Heavy Rain penalty by 0.08 seconds.
Rain Probability
The chance of rain during a race depends mostly on the circuit's weather sensitivity. Multiply the sensitivity by 8 to get the base percentage. For example, a circuit with sensitivity 7 has a 56% chance of rain.
- <strong>European circuits</strong> get a 10% bonus added on top (more rain in Europe)
- <strong>Desert countries</strong> (Bahrain, Saudi Arabia, Qatar, UAE, Kuwait) have a fixed 5% chance regardless of sensitivity
- The maximum chance is capped at around 90-95%, so rain is never guaranteed
Rain Timing
When rain occurs, the system generates:
- <strong>Start lap</strong> - when rain begins (early/mid/late race)
- <strong>Duration</strong> - 12-40% of the race distance
- <strong>Intensity</strong> - Light Rain (20%), Rain (45%), Heavy Rain (35%)
Weather Sensitivity
Each circuit has a weather_sensitivity rating (1-10). Higher values mean:
- Greater chance of rain
- Larger lap time penalties when wet
- Bigger impact on tyre wear
Driver Technical Skill
Technical skill helps in wet conditions:
- Reduces the lap time penalty
- Higher skill = smaller penalty
- Becomes increasingly valuable in heavy rain
Notes
There is currently no tyre choice system - all cars use the same generic tyre model regardless of weather. The race_setup table has tyre compound columns reserved for future implementation.