FFXIV weather forecast library for C# applications.
Credit to Garland Tools for weather data, and XIVAPI and FFCafe for game data.
Install-Package FFXIVWeather or other methods as described here.
Code:
var weatherService = new FFXIVWeatherService(); var zone = "Eureka Pyros"; var count = 15U; var forecast = weatherService.GetForecast(zone, count); Console.WriteLine($"Weather for {zone}:"); Console.WriteLine("|\tWeather\t\t|\tTime\t|"); Console.WriteLine("+-----------------------+---------------+"); foreach (var (weather, startTime) in forecast) { Console.WriteLine($"|\t{(weather.ToString().Length < 8 ? weather.ToString() + '\t' : weather.ToString())}\t|\t{Math.Round((startTime - DateTime.UtcNow).TotalMinutes)}m\t|"); }Output:
Weather for Eureka Pyros: | Weather | Time | +-----------------------+---------------+ | Umbral Wind | -3m | | Blizzards | 20m | | Thunder | 43m | | Umbral Wind | 67m | | Umbral Wind | 90m | | Blizzards | 113m | | Thunder | 137m | | Heat Waves | 160m | | Umbral Wind | 183m | | Blizzards | 207m | | Heat Waves | 230m | | Thunder | 253m | | Blizzards | 277m | | Umbral Wind | 300m | | Thunder | 323m | In the event that I cease to maintain this library and ffxivweather-py before game content updates cease, here's the patch-update process:
- Run the resource generator, which will output the 3 JSON resources into the library's data directory.
- Compile and publish the library.
- Copy the 3 JSON resources to ffxivweather-py's
storedirectory. - Publish that library.