GTR2 Weather: Difference between revisions

From Simwiki.net
Jump to navigation Jump to search
Line 79: Line 79:
weather.txt
weather.txt


File Structure and Synatx:
File Structure and Syntax:
- Confirm Rainfall Changeable in-game
- Ensure Rainfall Changeable in-game
- Use spaces not tabs
- Use spaces not tabs
  ^ Symptom: Conditions/Forecast Icons stop working reliably.
- Use space indents to be safe and to be consistent with original weather.txt
- Use space indents to be safe and to be consistent with original weather.txt
- Check brackets
- Check brackets
- End with empty blank line
- End with empty blank line
Troubleshooting:
- Symptom: Conditions/Forecast Icons stop working reliably.
  - Advice: Check file structure and syntax


?Forecast is the last minute of the session for Practice1 45min
?Forecast is the last minute of the session for Practice1 45min
Line 124: Line 127:
100%: Flooded, Cloudy w/Thunderstorm, Cloudy w/Thunderstorm
100%: Flooded, Cloudy w/Thunderstorm, Cloudy w/Thunderstorm


Conditions Icon (Conditions):
Session:
- Weather start offset by 30sec in sessions(?)
 
Temperature:
- Default Temperature Progression: Ambient 20+, Track: 22+
 
Conditions Icon (Conditions: Sunny/Rainy/Stormy):
- Conditions is not the same as Rain
- Conditions is not the same as Rain
- Confirmed 240318:  
- Confirmed 240318:  
Line 131: Line 140:
91-100 Stormy (Cloud w/Rain and Lightning)
91-100 Stormy (Cloud w/Rain and Lightning)


Forecast Icon (Conditions):
Forecast Icon (Conditions: Sunny/Rainy/Stormy):
- Requires Minute{} block
- Requires Minute{} block
- When no Minute{} blocks are specified or if there are no more Minute{} blocks remaining then Forecast seems to be the next closest dry/wet level (not sure if it goes up or down or why)
- When no Minute{} blocks are specified or if there are no more Minute{} blocks remaining then Forecast seems to be the next closest dry/wet level (not sure if it goes up or down or why)
Line 142: Line 151:
91-100 Stormy (Cloud w/Rain and Lightning)
91-100 Stormy (Cloud w/Rain and Lightning)


Track Wetness (On/OffPathWetness):
Track Wetness (Dry/Damp/Wet/Flooded):
- Confirmed 240318 ... actually this may have been just dynamically progressing based on Conditions
- Confirmed 240318 ... actually this may have been just dynamically progressing based on Conditions
0-5 Dry
0-5 Dry
Line 149: Line 158:
76-100 Flooded
76-100 Flooded
- Track wetness (Dry/Damp/Wet/Flooded) is not the same as Conditions (Sunny/Rainy/Storm)
- Track wetness (Dry/Damp/Wet/Flooded) is not the same as Conditions (Sunny/Rainy/Storm)
- Related to:
  - OnPathWetness
  - OffPathWetness
- Track wetness does not progress (drier or wetter) by On/OffPathWetness in Minute{} progression.
- Track wetness does not progress (drier or wetter) by On/OffPathWetness in Minute{} progression.
   - It seems to be based on time, Conditions, and number of laps (the more AI the faster)
   - It seems to be based on time, Conditions, temperature, and number of laps (the more AI the faster)
- Track wetness floods dynamically based on Conditions and un-floods dynamically
- Track wetness floods dynamically based on Conditions and un-floods dynamically
   - Dry->damp_>wet->flooded—>wet->damp-dry:
   - Dry->damp_>wet->flooded—>wet->damp-dry:
Line 194: Line 200:
  - Wet 568 40C
  - Wet 568 40C
  - Wet 573 50C
  - Wet 573 50C
- Flooded Time to Wet by AI Count and Temperature
- Flooded Time to Wet by AI Count and Temperature
   - Starts Flooded, and immediately dries out at Minute=0.10{}
   - Starts Flooded, and immediately dries out at Minute=0.10{}
Line 231: Line 235:
     - But Wetness does progress so it seems it's a function of time-conditions-temperature and those do progress in Minute{} blocks
     - But Wetness does progress so it seems it's a function of time-conditions-temperature and those do progress in Minute{} blocks


Default Temperature Progression: Ambient 20+, Track: 22+
Real Time Weather and Time Scaled Weather:
 
- Time Scaled Weather does not seem to be related to Daylight Acceleration
Weather start offset by 30sec in sessions(?)
- Time Scaled Weather does not seem to be have any effect for custom weather.txt files
  ^ This implies that Time Scaled Weather is for game generated weather files
  ^ Which means it's not the weather.txt Minute{}s being Time Scaled but the game weather generation algorithm scaling based on session length.
  ^ This probably means that a few weather events play out over longer rather than the game generating many weather events to fill in the time
  ^ Should be able to confirm by checking weather.txt for a 24h race with Real Time vs Time Scaled Weather
- For 24h Race Game Generated Weather Files
  - Real Time weather.txt has many more Minute{}s, a much more granular Minute{} progression, in steps of 1-2 minutes each
  - Time Scaled weather.txt has much less Minute{}s, a broader Minute{} progression, in steps of ~10 minutes each
  - Real Time weather.txt has more variability in Conditions (ex. 0-40)
  - Time Scaled weather.txt has less variability in Conditions (ex. 65-74)
  - AmbientTemp seems to have a +/- 10C range for both
 
Weather seems to interpolate between Minute{}s in some fashion although it's difficult to say how
- In a 15min Warmup with Real Time Weather:
  - Stormy->Sunny Minute=0.10:  Becomes clean around --:--
  - Stormy->Sunny Minute=1.00:  Becomes clean around --:--
  - Stormy->Sunny Minute=2.00:  Becomes clean around 14:40
  - Stormy->Sunny Minute=3.00:  Becomes clean around 14:15
  - Stormy->Sunny Minute=4.00:  Becomes clean around 13:45
  - Stormy->Sunny Minute=5.00:  Becomes clean around 13:30
  - Stormy->Sunny Minute=10.00: Becomes clear around 11:30
  - Stormy->Sunny Minute=15.00: Becomes clear around 9:30
  - Stormy->Sunny Minute=20.00: Becomes clear around 7:30
  - Stormy->Sunny Minute=25.00: Becomes clear around 5:30
  - Stormy->Sunny Minute=30.00: Becomes clear around 4:00
  - Stormy->Sunny Minute=35.00: Becomes clear around 2:00
  - Stormy->Sunny Minute=40.00: Becomes clear around 0:00
  - Warmup{} in weather.txt:
    Warmup
    {
    Conditions=100.00
    AmbientTemp=20
    Minute=15
    {
      Conditions=0.00
    }
    }
  - Time Scaled Weather seems to act the same as Real Time Weather
  - Time Scaled Weather: 10min warmup, 5min weather: Stopped on minute 5 and held the weather
  - Real Time Weather: 10min warmup, 5min weather: ...
  - Pit camera and Conditions Icon seem to be in sync
  - Minute=0.00{} is the initial conditions / It appears to be skipped / Must start with Minute=1.00{} or higher
  - Session Length vs Minute{}s:
    - At the end of a session, when there are more Minutes{}s then session minutes, weather keeps progressing through Minute{}s
    - When there are less Minute{}s than session minutes, weather stops at last Minute{} and there are no other changes
    - Applies for Real Time and Time Scaled Weather
- Basically, weather always plays through right to the end


5 Minute{}s +20 steps:
5 Minute{}s +20 steps:
Line 254: Line 304:
- 10m45s to *Forecast* rainy but never gets there
- 10m45s to *Forecast* rainy but never gets there
   - Minute 18 = 60 (59.994) Conditions
   - Minute 18 = 60 (59.994) Conditions
Real Time Weather and Time Scaled Weather:
- Time Scaled Weather does not seem to be related to Daylight Acceleration
- Case: No acceleration of Damp to Dry in 15min warmup
  - I had no Minute{} blocks and only the initial Wetness params so no progress of Wetness I guess
- ? Time is scaled down but not up
- ? If you have less minutes in weather.txt than the actual session then the weather plays out in real-time. It doesn't get stretched to the length of the session.
  - ? If you have more minutes in weather.txt than the actual session then the weather plays in in compressed time so that it can complete in the length of the session (TODO: Confirm)
</nowiki></pre>
</nowiki></pre>


[[Category: Driving Sims]] [[Category: GTR2]]
[[Category: Driving Sims]] [[Category: GTR2]]

Revision as of 06:38, 20 March 2024

Weather.txt

  • Weather.txt is in UserData\Log
  • It is automatically generated every race session
  • To prevent it from being re-generated, set it read-only: Right Click > Properties > Attributes: Read-only
  • Game generated weather.txt files are pretty boring and rarely exhibit any changing weather, even when Changeable weather is set in-game
  • Use an app like Autosim Weather Generator for GTR2 to generate more plausible weather scenarios. It has a rather nice and intuitive visual, drag-and-drop style interface that anyone can grasp.

Autosim Weather Generator:

Gtr2-autosim-weather-generator.jpg

(1) Autosim Weather Generator Demonstration, (2) Using the Autosim generated weather.txt in GTR2:

Changeable Weather

  • Setting Rain to Changeable in-game is the only setting which will use Weather.txt

Threads

Apps

Car Setups

Modding

Related

Shovas's Weather Scratchpad

weather.txt

File Structure and Syntax:
- Ensure Rainfall Changeable in-game
- Use spaces not tabs
- Use space indents to be safe and to be consistent with original weather.txt
- Check brackets
- End with empty blank line

Troubleshooting:
- Symptom: Conditions/Forecast Icons stop working reliably.
  - Advice: Check file structure and syntax

?Forecast is the last minute of the session for Practice1 45min
~ Practice2 45min
~ Qualify1 30min
~ Qualify2 30min
~ Warmup 10min
~ Race 60min: Forecast is Minute 1
  - Race is special: Time is stopped until you start race, then you can't get back to the timing screen with the weather forecast
  - Any Minute with a different Conditions?
- There's something weird about 'minimum threshold of change' to update the Forecast icon
  
SCRATCH: HAT file caching appears to cache weather file data so consider enabling auto rebuilding:

  Always Rebuild HAT="1" // Build HAT database everytime tracks are loaded (for development purposes)
  
  ^ SCRATCHED: Nope, still happens.

Minute{} Blocks:
- Must specify numeric minute Minute=1.23, not just "Minute" or else GTR2 seems to think the last Minute is the initial conditions and the other Minutes are ignored 

Rain:
- Rain is not the same as Conditions
- No, doesn't seem to be: Does Rain specify max Conditions? Ex. Rain 80% means max Conditions=80?
- Rain:
  - Can't test because Rainfall < Changeable doesn't generate weather.txt
	Rainfall:	Track,		Conditions,				Forecast
	None: 		Dry,		Sunny,					Sunny
	10%:  		Damp, 		Cloudy w/Rain,			Cloudy w/Rain
	20%:  		Damp, 		Cloudy w/Rain,			Cloudy w/Rain
	30%:  		Damp, 		Cloudy w/Rain,			Cloudy w/Rain
	40%:  		Wet,		Cloudy w/Rain,			Cloudy w/Rain
	50%:  		Wet,		Cloudy w/Rain,			Cloudy w/Rain
	60%:  		Wet,		Cloudy w/Rain,			Cloudy w/Rain
	70%:  		Wet,		Cloudy w/Rain,			Cloudy w/Rain
	80%:  		Flooded,	Cloudy w/Thunderstorm,	Cloudy w/Thunderstorm
	90%:  		Flooded,	Cloudy w/Thunderstorm,	Cloudy w/Thunderstorm
	100%: 		Flooded,	Cloudy w/Thunderstorm,	Cloudy w/Thunderstorm

Session:
- Weather start offset by 30sec in sessions(?)

Temperature:
- Default Temperature Progression: Ambient 20+, Track: 22+

Conditions Icon (Conditions: Sunny/Rainy/Stormy):
- Conditions is not the same as Rain
- Confirmed 240318: 
	0-61 Sunny (Sun)
	62-90 Rainy (Cloud w/Rain)
	91-100 Stormy (Cloud w/Rain and Lightning)

Forecast Icon (Conditions: Sunny/Rainy/Stormy):
- Requires Minute{} block
- When no Minute{} blocks are specified or if there are no more Minute{} blocks remaining then Forecast seems to be the next closest dry/wet level (not sure if it goes up or down or why)
  - Maybe it assumes a return to initial session conditions
    - This seems to be confirmed 240319
- Forecast seems to change 30sec ahead of Minute{} with the change or maybe it's 1 Minute{} block ahead
- Confirmed 240318
	0-61 Sunny (Sun)
	62-90 Rainy (Cloud w/Rain)
	91-100 Stormy (Cloud w/Rain and Lightning)

Track Wetness (Dry/Damp/Wet/Flooded):
- Confirmed 240318 ... actually this may have been just dynamically progressing based on Conditions
	0-5 Dry
	6-35 Damp
	36-75 Wet
	76-100 Flooded
- Track wetness (Dry/Damp/Wet/Flooded) is not the same as Conditions (Sunny/Rainy/Storm)
- Track wetness does not progress (drier or wetter) by On/OffPathWetness in Minute{} progression.
  - It seems to be based on time, Conditions, temperature, and number of laps (the more AI the faster)
- Track wetness floods dynamically based on Conditions and un-floods dynamically
  - Dry->damp_>wet->flooded—>wet->damp-dry:
    - 20C Amb 30C Track
    - 90min Practice:
	  - 0 AI 40min still flooded, ...
	  - 1 AI 40min still flooded, ...
	  - 10 AI 30min flooded->wet, ...
	  - 20 AI 20min flooded->wet, ...
	  - 29 AI 15min flooded->wet, never dry
	- 180min Practice:
      - Damp ~65:00 (-115min)
    - 300min practice 
      - Wet 285:00 (-15min)
      - Damp 185:00 (-115min)
    - 600min practice 1
	  - 29 AI
	  - Cars stop lapping 485:00 (-115min)
	  - Wet 585:00 (-15min)
	  - Damp 486:00 (-114min)
	  - Dry ~275:00 (-325min)
	- 600min practice 2
	  - 3 AI
	  - Cars stop lapping 515:00 (-85min)
	  - Wet 548:00 (-52min)
	  - Damp 472:00 (-128min)
	  - Dry 253:00 (-347min)
	- 600min practice 3
	  - 0 AI
	  - Cars stop lapping  N/A
	  - Wet 515:00 (-85min)
	  - Damp 393:00 (-207min)
	  - Dry 248:00 (-352min)
    - Start Flooded > Wet (Minute 0.10)
      - 600min Practice, 0 AI
      - Wet 516 0C
	  - Wet 541 10C
	  - Wet 552 20C
	  - Wet 564 30C
	  - Wet 568 40C
	  - Wet 573 50C
- Flooded Time to Wet by AI Count and Temperature
  - Starts Flooded, and immediately dries out at Minute=0.10{}
  - 600min Practice
    - 0 AI
	  - Wet 516 0C
	  - Wet 541 10C
 	  -  Wet 552 20C
	  - Wet 564 30C
	  - Wet 568 40C
	  - Wet 573 50C
    - 10 AI
      - Wet 584 0C
      - Wet 584 10C
      - Wet 586 20C
      - Wet 587 30C
      - Wet 587 40C
      - Wet 588 50C
    - 20 AI
      - Wet 588 0C
      - Wet 587 10C
      - Wet 587 20C
      - Wet 588 30C
      - Wet 588 40C
      - Wet 589 50C
    - 29 AI
      - Wet 590 0C
      - Wet 590 10C
      - Wet 591 20C
      - Wet 591 30C
      - Wet 591 40C
      - Wet 591 50C
- Scratch: I bet I could include and progress any of the parameters inside Minute{} blocks (eg. OnPathWetness, OffPathWetness)
  ^ Scratched: Wetness does not seem to progress in Minute{} blocks.
    - But Wetness does progress so it seems it's a function of time-conditions-temperature and those do progress in Minute{} blocks

Real Time Weather and Time Scaled Weather:
- Time Scaled Weather does not seem to be related to Daylight Acceleration
- Time Scaled Weather does not seem to be have any effect for custom weather.txt files
  ^ This implies that Time Scaled Weather is for game generated weather files
  ^ Which means it's not the weather.txt Minute{}s being Time Scaled but the game weather generation algorithm scaling based on session length.
  ^ This probably means that a few weather events play out over longer rather than the game generating many weather events to fill in the time
  ^ Should be able to confirm by checking weather.txt for a 24h race with Real Time vs Time Scaled Weather
- For 24h Race Game Generated Weather Files
  - Real Time weather.txt has many more Minute{}s, a much more granular Minute{} progression, in steps of 1-2 minutes each
  - Time Scaled weather.txt has much less Minute{}s, a broader Minute{} progression, in steps of ~10 minutes each
  - Real Time weather.txt has more variability in Conditions (ex. 0-40)
  - Time Scaled weather.txt has less variability in Conditions (ex. 65-74)
  - AmbientTemp seems to have a +/- 10C range for both
  
Weather seems to interpolate between Minute{}s in some fashion although it's difficult to say how
- In a 15min Warmup with Real Time Weather:
  - Stormy->Sunny Minute=0.10:  Becomes clean around --:--
  - Stormy->Sunny Minute=1.00:  Becomes clean around --:--
  - Stormy->Sunny Minute=2.00:  Becomes clean around 14:40
  - Stormy->Sunny Minute=3.00:  Becomes clean around 14:15
  - Stormy->Sunny Minute=4.00:  Becomes clean around 13:45
  - Stormy->Sunny Minute=5.00:  Becomes clean around 13:30
  - Stormy->Sunny Minute=10.00: Becomes clear around 11:30
  - Stormy->Sunny Minute=15.00: Becomes clear around 9:30
  - Stormy->Sunny Minute=20.00: Becomes clear around 7:30
  - Stormy->Sunny Minute=25.00: Becomes clear around 5:30
  - Stormy->Sunny Minute=30.00: Becomes clear around 4:00
  - Stormy->Sunny Minute=35.00: Becomes clear around 2:00
  - Stormy->Sunny Minute=40.00: Becomes clear around 0:00
  - Warmup{} in weather.txt:
    Warmup
    {
     Conditions=100.00
     AmbientTemp=20
     Minute=15
     {
      Conditions=0.00
     }
    }
  - Time Scaled Weather seems to act the same as Real Time Weather
  - Time Scaled Weather: 10min warmup, 5min weather: Stopped on minute 5 and held the weather
  - Real Time Weather: 10min warmup, 5min weather: ...
  - Pit camera and Conditions Icon seem to be in sync
  - Minute=0.00{} is the initial conditions / It appears to be skipped / Must start with Minute=1.00{} or higher
  - Session Length vs Minute{}s:
    - At the end of a session, when there are more Minutes{}s then session minutes, weather keeps progressing through Minute{}s 
    - When there are less Minute{}s than session minutes, weather stops at last Minute{} and there are no other changes
    - Applies for Real Time and Time Scaled Weather
	- Basically, weather always plays through right to the end

5 Minute{}s +20 steps:
2.5m to Rainy, 4m5s to Stormy for both Real Time and Time Scaled Weather
- Minute 3 = 60 Conditions
- Minute 4 = 80 Conditions

10 Minute{}s +10 steps:
6min to Rainy, 9min to Stormy for both Real Time and Time Scaled Weather
- Minute 6 = 60 Conditions
- Minute 8 = 80 Conditions

15 Minute{}s +6.666 steps:
9min to rainy, 13min to Stormy for Real Time and Time Scaled Weather
- Minute 9 = 60 (59.994) Conditions
- Minute 13 = 80 (86.658) Conditions

30 Minute{}s +3.333steps:
Never gets to rain, never gets to Stormy on Real Time or Time Scaled Weather (
- 10m45s to *Forecast* rainy but never gets there
  - Minute 18 = 60 (59.994) Conditions