Written by @LegendKiller21 and @multimokia
If used, please leave credit to the creators above or link the repository.
Please do not claim the code in these files as your own.
With that said: These utilities offer an interface with the openweathermap API to be used within Ren'Py.
https://openweathermap.org/api
These utilities offer connection checking, getting weather observations, sunrise and sunset times, and a way to (while simplified) convert them to a form your game can use.
In order to be able to use this, the user must generate an API key from the link above. (Alternatively you can do this and release it with your game, but it's free if you generate it yourself and on a per user basis)
In order to get weather observations for your desired location, you'll need to either prompt the user for what city they live in, or alternatively use geocoder and get their location via their ip (libraries are included to do so)
NOTE: It is possible that there are cities missing from citylookup.txt. If this is the case, please feel free to submit a pull request adding the location, simply add a line in the form of city_name,country_code,latitude,longitude,state_or_province (Your help is appreciated)
NOTE: Some sys.path manipulation may be needed to import some of these libs.
All of these functions are initialized before init 0. They're ready to be used from init -17.
Instruction - https://github.com/multimokia/Renpy-Wea ... /README.md
Github - https://github.com/multimokia/Renpy-Weather-Utils
Auto Weather Change weather-utils
Forum rules
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Do not post questions here!
This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Auto Weather Change weather-utils
Last edited by Andredron on Thu Dec 19, 2019 7:57 pm, edited 1 time in total.
Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
Sawa - a game of the Drow Nation
Honest Critique
Poses in visual novels, or how to hold a character properly in the frame
Help save articles to the webarchive. [/color]
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3801
- Joined: Mon Dec 14, 2015 5:05 am
- itch: Imperf3kt
- Location: Your monitor
- Contact:
Re: Auto Weather Change weather-utils
Interesting, I can think of a few uses for this feature.
Thanks for posting it.
Thanks for posting it.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Twitter
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Who is online
Users browsing this forum: No registered users