[Plugin] rFactor2 Weather Tool 2.3.0 by Gerald Jacobson

[Plugin] rFactor2 Weather Tool 2.3.0 by Gerald Jacobson

Messaggioda MRK37 » 31 marzo 2013, 17:29

Immagine
Immagine

Immagine

NEWS: Now, there are 3 tools
- The original rFactor2 Weather Tool (to update WET files using historical and forecast data)
- The Weather Server (used to inject directly weather into a rF2 dedicated server) - Support "Realtime (Live) weather" and "User weather"
- The Weather Control Plugin (who is the client of the Weather Server)

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

So, 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)


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

>> Download the last version of the application:
http://dl.dropbox.com/u/15864065/rFacto ... eather.zip

>> Download the last version of the XML file (cloud community file)
https://docs.google.com/document/d/1vwx ... format=txt


Here a community contribution initiated by BrokkelPiloot (Thanks to him), to centralize the addition of new tracks and provider parameters on the XML file. So you can download the XML from google drive to have the lastest (most complete) XML file at any time (and add your own data if it does not exists yet in the file, by editing the XLS and XML files).

I have created two files, on clouds (Google Drive) with read/write access for everyone :

1) A spreadsheet containing the meta-data of the current XML file --> Here
Data points in green have been added to the XML file. You can add data (additional locations or missing provider data for existing tracks) to this file. If you then also add it to the XML file, please make the data points green in the spreadsheet to keep the files "identical".*

2) A document containing the XML file (text) itself. So you can add lines and copy from the latest version. --> Here

I am kind of new to using cloud docs on this scale, but I think it will work better than uploading files all the time. If you add something, keep two things in mind:
- add comments if necessary
- keep locations in XML in alphabetical order to keep it easy to read *

Needless to say I am not responsible for the accuracy of the files, but we as a community are. However, I will review changes from time to time. If it will not work I will probably deny public access, but I assume that won't happen :p


Here a screen shot of the tool, and after you will find the ReadMe file content (how to install, use and configure)
screen.png


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

Since v2, you can use it also via command line
Usage: rFactor2WorldWeather.exe <Parameters>
example: rFactor2WorldWeather.exe -prf 1 -prv 1 -c Belgium1966 -R_nbSeg 12 -R_Toffset 3 -R_date 2009-03-25 -R_start 06:12 -R_dur 03:24

Mandatory Parameters:
-prf <id> : profile id, example -prf 1
-c <name> : circuit name, example -c "Istanbul Park"
-prv <id> : provider id, example -prv 1

Optional Parameters:
-PLR : update the PLR file

Optional Parameters (Practice):
-P_nbSeg <num> : Number of weather segment
-P_Toffset <num> : Temperature offset
-P_date <YYYY-MM-DD> : Date of the session
-P_start <HH:mm> : Time of the session
-P_dur <HH:mm> : Duration of the session

Optional Parameters (Qualify):
-Q_nbSeg <num> : Number of weather segment
-Q_Toffset <num> : Temperature offset
-Q_date <YYYY-MM-DD> : Date of the session
-Q_start <HH:mm> : Time of the session
-Q_dur <HH:mm> : Duration of the session

Optional Parameters (Race):
-R_nbSeg <num> : Number of weather segment
-R_Toffset <num> : Temperature offset
-R_date <YYYY-MM-DD> : Date of the session
-R_start <HH:mm> : Time of the session
-R_dur <HH:mm> : Duration of the session


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.


----------------------------------- 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-Mon ... earch=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?product ... &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



Immagine
DOWNLOAD RFACTOR2 WEATHER TOOL (Plugin v2.3.0 and Weather Server v2.3.0) BY GERALD JACOBSON (1,8 Mb)
Non hai i permessi necessari per visualizzare i file allegati in questo messaggio.
Avatar utente
MRK37

37
Admin
Ricerca e Sviluppo Fisica e Modellazione
Pubbliche Relazioni
 
Messaggi: 14086
Iscritto il: 28 dicembre 2008, 13:46

Re: rFactor2 Weather Tool 1.0.6 by Gerald Jacobson

Messaggioda Simone » 9 aprile 2013, 9:01

Rilasciata versione 1.0.6, download al primo post

Changelog:
V1.0.4
- Malaysia and LRP added (Thanks to BrokkelPiloot)
- Fix a crash when saving meteo on a circuit where some directories does not exists.

V1.0.5
Now the start and duration of each session is loaded from PLR file at startup, then the application memorize the current values of each session, so switching from a session to another and go back, will not reload time and duration from PLR file, but from memorized value.

V 1.0.6
- Fix application crash:
Add messages when the XML file is invalid, or when a directory does not exist.
Avatar utente
Simone

99
Admin
Coordinatore F1 Swiss
Pilota GTC
 
Messaggi: 13934
Iscritto il: 20 agosto 2009, 16:28
Località: Perugia - Umbertide

Re: rFactor2 Weather Tool 1.2.0.1 by Gerald Jacobson

Messaggioda Simone » 19 giugno 2014, 15:51

Rilasciata v1.2.0.1 Weather Server
Avatar utente
Simone

99
Admin
Coordinatore F1 Swiss
Pilota GTC
 
Messaggi: 13934
Iscritto il: 20 agosto 2009, 16:28
Località: Perugia - Umbertide

Re: rFactor2 Weather Tool 2.0 by Gerald Jacobson

Messaggioda Simone » 27 giugno 2014, 9:30

Rilasciata v2.0 Weather Control Plugin

Changelog:
- No functional change, but now you have the WeatherControlPlugin.dll for 32 bits (like previously) and the WeatherControlPlugin_x64.dll for the future rF2 64bit
Avatar utente
Simone

99
Admin
Coordinatore F1 Swiss
Pilota GTC
 
Messaggi: 13934
Iscritto il: 20 agosto 2009, 16:28
Località: Perugia - Umbertide

Re: rFactor2 Weather Tool 2.1.0.1 by Gerald Jacobson

Messaggioda Simone » 11 luglio 2014, 10:31

Rilasciata v2.1.0.1 Weather Plugin

- Add support for the new JSON format (support PLR & JSON)
- Fix bug retreiving lat/long from PLR/JSON (thanks R-B)
- now save session start / duration into JSON player file
Avatar utente
Simone

99
Admin
Coordinatore F1 Swiss
Pilota GTC
 
Messaggi: 13934
Iscritto il: 20 agosto 2009, 16:28
Località: Perugia - Umbertide

Re: rFactor2 Weather Tool 2.2 by Gerald Jacobson

Messaggioda Simone » 24 luglio 2014, 10:01

Rilasciata versione Plugin v2.2 e Weather Server v2.2.1
Avatar utente
Simone

99
Admin
Coordinatore F1 Swiss
Pilota GTC
 
Messaggi: 13934
Iscritto il: 20 agosto 2009, 16:28
Località: Perugia - Umbertide

Re: rFactor2 Weather Tool 2.2.1 by Gerald Jacobson

Messaggioda Simone » 4 novembre 2014, 18:11

#rFactor2 Weather Tool 2.2.1 by Gerald Jacobson: Aggiornato Plugin v2.2.1

Changelo Plugin 2.2.1 (only the plugin DLLs have been updated):
- Fix a bug: the weather server stop to call website when the dedicated server is set to "be paused when there is no human player on it".
Avatar utente
Simone

99
Admin
Coordinatore F1 Swiss
Pilota GTC
 
Messaggi: 13934
Iscritto il: 20 agosto 2009, 16:28
Località: Perugia - Umbertide

Re: rFactor2 Weather Tool 2.3.0 by Gerald Jacobson

Messaggioda Simone » 23 dicembre 2014, 16:34

#rFactor2 Weather Tool by Gerald Jacobson: Aggiornato Plugin v2.3.0

Changelog:

- Now the cloudiness is managed

Note:
- The cloudiness is "immediatly" applied (when starting a new session or it is the first time you send a weather info to the plugin)
- In any other case i let the game making transition to clodiness change (else it would be very disturbing for drivers - sky would be fully regenerated at each weather update) - so the rF2 algorhytme can take several minute (10/15 min) to go from a clear sky to a heavy loaded sky
Avatar utente
Simone

99
Admin
Coordinatore F1 Swiss
Pilota GTC
 
Messaggi: 13934
Iscritto il: 20 agosto 2009, 16:28
Località: Perugia - Umbertide


Torna a Download

 


  • Argomenti correlati
    Risposte
    Visite
    Ultimo messaggio

Chi c’è in linea

Visitano il forum: Nessuno e 1 ospite

cron