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.
- Andredron
- Miko-Class Veteran
- Posts: 535
- Joined: Thu Dec 28, 2017 2:37 pm
- Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
- Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
- Location: Russia
- Contact:
Auto Weather Change weather-utils
Last edited by Andredron on Thu Dec 19, 2019 7:57 pm, edited 1 time in total.
I'm writing a Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18
Help me to register in QQ International
Honest Critique
Help me to register in QQ International
Honest Critique
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- 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
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
Who is online
Users browsing this forum: No registered users