Alessandro Pollini Posted March 31, 2013 Posted March 31, 2013 File Name: rFactor2 Weather Tool File Submitter: Alessandro Pollini File Submitted: 31 Mar 2013 File Category: Patch & addons Author : Gerald JacobsonThis 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 directoryFor exemple: C:\Users\<username>\Documents\rFactor2Note: 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 rFactor2Important: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 ChannelOpen 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=trueThe "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" linkNow the URL in your browser is something like:http://7timer.y234.cn/index.php?prod...g=en&tzshift=0The "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 detail2.1) WeatherConfigIt is the root tag. The is no additionnal information on it.2.2) WeatherConfig/GameThis tag is used to reference the rFactor2 directory2.2.1) dataPath attributThis 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 directory2.3) WeatherConfig/ProxyYou 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 account2.4) WeatherConfig/ProvidersIt is only a container tag. It contains the list of supported weather Provider2.5) WeatherConfig/Providers/ProviderThis 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 use2.6) WeatherConfig/ProfilesIt is only a container tag. It contains the list of existing game Profile2.7) WeatherConfig/Profiles/ProfileThis 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 profile2.8) WeatherConfig/LocationsIt is only a container tag. It contains the list of existing Location (circuit)2.9) WeatherConfig/Locations/LocationThis 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 exists2.10) WeatherConfig/Location/ProvidersIt is only a container tag. It contains the list of available weather Provider and there parameters for this circuit.2.11) WeatherConfig/Location/Providers/ProviderThis 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 Provider2.12) WeatherConfig/Location/Providers/Provider/ParametersIt 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/ParameterThis 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 needThis tag contains several attributs:- "name" : the name of the parameter- "value" : the value of the parameterGenerally those parameters are used to build the URL used to request the weather data2.14) WeatherConfig/Location/DirectoriesIt 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/DirectoryThis 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 variantThis 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now