Weather Script Generator?

Discussion in 'General Discussion' started by Alejandro López Arjona, Jul 22, 2018.

  1. Alejandro López Arjona

    Alejandro López Arjona Registered

    Joined:
    Jul 18, 2018
    Messages:
    34
    Likes Received:
    10
    Recently, Weather Underground stopped providing API Keys. I still have my API key working, but my experience says that Real Time weather in rFactor 2 is not very good: strange changes (from sunny to rain in less than a second), track temperature not changing, etc...

    I got tired about real time weather and I would like to find a program to make scripted weather.

    I remember in rFactor 1 an amazing program called RFEWAS, it was working with AccuWeather (personally I think its more professional and has better data than Weather Underground), and it basically generates a random script from real world data.

    So, for example, there is a race in Monaco, and you set the program like this: Practice 3, take real data from 20 July at 11:00, Qualifying take real data from 21 July 14:00 and Race take real data from 22 July 15:00.

    The program takes data from AccuWeather (min temp, max temp, wind, % rain probability...) and then generates a random script from the data received. It was amazing. Then, there was another program that allowed to read scripts, so you could open the generated script and make a capture of weather forecast and post it for the league drivers.

    So, my question is: do we have something similar using AccuWeather for rFactor 2? If not, at least I would like to find a program to generate random scripts from X data that is manually introduced.
     
    KittX likes this.
  2. Booth_doberman

    Booth_doberman Registered

    Joined:
    Oct 5, 2015
    Messages:
    91
    Likes Received:
    37
    I did one in python that does historical weather using WU. I don't guarantee it, but it works for me. It uses Python 3.5. You enter the name of a track and the date and then a practice start and duration, qualifying start and duration and race start and duration. You have to have the coordinates of the track in the python file. And the wet file for the track has to exist prior to running it. The code I have uses some stuff I found at various locations and from several people. I can't remember who so I can't give them attribution. Just be aware that I'm not claiming any of this code is original. If you want to use it, fine. I don't think it would be difficult to generate fictional weather patterns for a race based on the wet file setup. I haven't looked at this in several years and I don't know what Accuweather offers.
     

    Attached Files:

  3. Will Mazeo

    Will Mazeo Registered

    Joined:
    Sep 12, 2015
    Messages:
    2,227
    Likes Received:
    1,584
    Real time weather is nice but very weird indeed, specially as the game seems to not handle the clouds well. Something like you described would end up being much better
    Wish S397 would do something about it. But chances of listening a "make it yourself" is high is you request lol
    Anyway track temperature do not affect tires so this part is irrelevant
     
  4. KittX

    KittX Registered

    Joined:
    Jan 11, 2012
    Messages:
    147
    Likes Received:
    62
    I join the request, the idea of generating the .wet file from the forecasts (but skipping the realroad/groove instances) is simple and elegant. It worked very well back in RFE days.
     
  5. ceecee

    ceecee Registered

    Joined:
    Jan 10, 2012
    Messages:
    692
    Likes Received:
    285
    We have been using rFactor2 Weather Tool for quite some time for scripted weather and weather forcast for the upcoming 10 days.
    You will need the coordinates of the circuit and check to see if the installed path is mentioned in the xml file.
    If the circuit is a popular one, the coordinates should already be in the xml file.
    https://forum.studio-397.com/index.php?threads/rfactor2-weather-tool.37366/
     
  6. Alejandro López Arjona

    Alejandro López Arjona Registered

    Joined:
    Jul 18, 2018
    Messages:
    34
    Likes Received:
    10
    Could you please explain me a little more into how to use this python file?
     
  7. Booth_doberman

    Booth_doberman Registered

    Joined:
    Oct 5, 2015
    Messages:
    91
    Likes Received:
    37
    You need to install python 3.5 on windows, first of all. You need to edit the python script and put in your WeatherUnderground API key. This could be a problem if WU is no longer giving out any and may make this worthless to anyone who doesn't have one already. You would also need to add the track name, a default race date, the coordinates and the name/location of the wet file for each track. There are several in the script already, so any new ones would be added this way.
    When you run the script, you get a list of the tracks you have in the file. You type in the track name you want. Then it asks for the practice start time in 2400 hours time and then the practice duration (in minutes). Then you enter the Qualifying start and duration and finally you put in the Race start and the time it ends (note that the end time is really only relevant if you are running timed races). If you are running a fixed number of laps, you're going to set that in the Session Settings in game. That's it. It rewrites the wet file and the player.JSON with the information for the race event. Final note: I did this because the weather tool that existed at the time stopped working for historical weather for me, so this script does historical weather only.
     

Share This Page