[rFactor2] - rFactor2 Weather Tool - Sezione DOWNLOAD - DrivingItalia.NET simulatori di guida Jump to content

[rFactor2] - rFactor2 Weather Tool


Recommended Posts

Posted

File Name: rFactor2 Weather Tool

File Submitter: Alessandro Pollini

File Submitted: 31 Mar 2013

File Category: Patch & addons

Author : Gerald Jacobson

This application allow you to retrieve weather condition (historic and forecast) and then update a given rFactor2 circuit with this meteo.

You can play your rFactor2 session (practice/qualifying/race) in the same weather condition as a real race.

This application use a configuration file named "WeatherConfig.xml" containing the folowwing informations:
- rFactor2 data directory location
- Proxy credentials (optional)
- rFactor2 profiles list
- Weather providers
- rFactor2 locations (Circuits)
- list of directories for this location (some circuits have several configurations -> several directories under "Settings")
- List of parameters for each weather provider used for this circuit (those parameters allow each provider to know the location of the circuit)
Installation:
- Prerequisite: .Net Framework 4
- If you copy the rFactor2WorldWeather.exe and WeatherConfig.xml file directly under the rFactor2 data directory, you can directly launch the application.
- If you copy elsewhere, please update the WeatherConfig.xml file to set the game dataPath to the rFactor2 data directory
For exemple: C:\Users\<username>\Documents\rFactor2
Note: The rFactor2 data directory is the one containing "UserData", "package", "player", etc...


How To Use:
- Launch rFactor2WorldWeather.exe
- Select a profile
- Select a circuit
- Select a session type
- Define the date, start time and duration of the session
- Choose the weather provider (historic if the session is in the past, forcast if in future)
- Click to collect the weather
- Click on the Save button to update the weather file of your rFactor2

Important:
As rFactor2 read the file when a circuit is selected and write the file when you change the circuit or quit the game, it is not possible to update the weather data for an in-use circuit.
We recommend to use this software when the game is not launched or if in use on another circuit.

Note:
For now rFactor2 allow only 5 meteo segment, even if the file structure allow an unlimited number of sector. May be it would be implemented in a future version of the game.

----------------------------------- How to find parameter(s) value for each weather provider ------------------------------
---------------------------------------------------------------------------------------------------------------------------
1) The Weather Channel
Open a web browser and go to the url: http://uk.weather.com/
In the search field, enter the address of the circuit, and click the search icon. Ex: "Monte-Carlo, Monaco"
Now the URL in your browser is something like:
http://uk.weather.com/weather/today-...romSearch=true

The "Location" parameter of this provider is the code MNXX0001 for this exemple.

So for the Monaco circuit, you will put this XML fragment in the WeatherConfig.xml file:
<Provider id="1">
<Parameters>
<Parameter name="Location" value="MNXX0001"/>
</Parameters>
</Provider>


2) 7Timer!
Open a web browser and go to the url: http://7timer.y234.cn/
In the search field, enter the address of the circuit, and click "Search on map". Ex: "Monte-Carlo, Monaco"
Now mouve your mouse over the orange map pin, a popup is displayed, so click on the "CIVIL" link
Now the URL in your browser is something like:
http://7timer.y234.cn/index.php?prod...g=en&tzshift=0

The "Longitude" is the value of the "lon" url parameter value, and the "Latitude" is the "lat" url parameter value.

So for the Monaco circuit, you will put this XML fragment in the WeatherConfig.xml file:
<Provider id="2">
<Parameters>
<Parameter name="Longitude" value="7.42722219999996"/>
<Parameter name="Latitude" value="43.7397222"/>
</Parameters>
</Provider>


------------------------------------------ How To Use the XML configuration file ------------------------------------------
---------------------------------------------------------------------------------------------------------------------------

1) Structure
<WeatherConfig>
<Game/>
<Proxy/>
<Providers>
<Provider/> // This tag can be added several times
</Providers>
<Profiles>
<Profile/> // This tag can be added several times
</Profiles>
<Locations>
<Location> // This tag can be added several times
<Providers>
<Provider> // This tag can be added several times
<Parameters>
<Parameter/> // This tag can be added several times
</Parameters>
</Provider>
</Providers>
<Directories>
<Directory/>
</Directories>
</Location>
</Locations>
</WeatherConfig>

2) Tag detail
2.1) WeatherConfig
It is the root tag. The is no additionnal information on it.

2.2) WeatherConfig/Game
This tag is used to reference the rFactor2 directory
2.2.1) dataPath attribut
This attribut allow you to point the rFactor2 data directory (not the core directory)
If you let the default value ".", you must copy the exe and the xml file directly under the rFactor2 data directory

2.3) WeatherConfig/Proxy
You need to uncomment this tag only if you are beyound a securized proxy. This tag contains several attributs:
- "user" : The username account
- "password" : The password account
- "domain" : The domain account

2.4) WeatherConfig/Providers
It is only a container tag. It contains the list of supported weather Provider

2.5) WeatherConfig/Providers/Provider
This tag define a supported provider.
You CANNOT add your own providers, at least for now, as each provider need a corresponding software implementation. Please look the comment of each Provider in the XML file to know which parameters are expected.
This tag contains several attributs:
- "id" : an identifier used later in the XML to reference this provider (see WeatherConfig/Location/Providers/Provider@id)
- "class" : The implementation class to use

2.6) WeatherConfig/Profiles
It is only a container tag. It contains the list of existing game Profile

2.7) WeatherConfig/Profiles/Profile
This tag define a game profile. By default, rFactor2 create a unique profile named "player". Many rFactor2 game settings are stored by game profile.
You can add as many xml Profile tag as you have rFactor2 game profile.
This tag contains several attributs:
- "id" : an identifier used later in the XML to reference this profile (see WeatherConfig/Location@inProfiles)
- "name" : the displayed name of this profile
- "path" : the directory name of this profile

2.8) WeatherConfig/Locations
It is only a container tag. It contains the list of existing Location (circuit)

2.9) WeatherConfig/Locations/Location
This tag define a game circuit and all data needed to retrieve and apply weather on it.
You can add as many xml Location tag as you have rFactor2 circuit.
This tag contains several attributs:
- "name" : the displayed name
- "inProfiles" : a comma separated list of game Profile "id" where this circuit exists

2.10) WeatherConfig/Location/Providers
It is only a container tag. It contains the list of available weather Provider and there parameters for this circuit.

2.11) WeatherConfig/Location/Providers/Provider
This tag allow you to define wich provider can be used with this circuit.
You can add as many xml Provider tag as you have weather Provider defined.
This tag contains one attribut:
- "id" : reference the id of one defined weather Provider

2.12) WeatherConfig/Location/Providers/Provider/Parameters
It is only a container tag. It contains the list of available Parameter for the weather provider. (generally, the parameters are used to define the location of the circuit in the weather provider coordinate)

2.13) WeatherConfig/Location/Providers/Provider/Parameters/Parameter
This tag define a key/value pair used to configure the provider for this circuit.
You can add as many xml Parameter tag as the selected provider need
This tag contains several attributs:
- "name" : the name of the parameter
- "value" : the value of the parameter

Generally those parameters are used to build the URL used to request the weather data

2.14) WeatherConfig/Location/Directories
It is only a container tag. It contains the list of directories for this circuit. Indeed, sometimes a given circuit exist in several configuration, and each configuration are stored in a dedicated directory.

2.15) WeatherConfig/Location/Directories/Directory
This tag allow you to define the directory path for this circuit.
You can add as many xml Directory tag as you have variant of a given circuit.
This tag contains one attribut:
- "path" : the name of the directory for this variant

This application come from a preexisting configuration file containing:
- A forecast weather provider (7timer!)
- An Historic weather provider (The Weather Channel)
- 5 circuits
- Brianza
- Croft
- Poznan
- Sebring
- Spa

Click here to download this file

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.