Random Weather Generation

Not long after joining the Know Direction Discord, I had a conversation about random weather generation with Luis Loza. I quickly built a prototype random generator using Paizo’s weather tables, and we were happy! Ultimate Wilderness was releasing that week (which is what prompted the conversation), and so when I got my hands on my copy, I updated the logic to use the newer random weather rules. I took a few liberties with the logic to patch a few holes in the way the tables work (like when you string days of temperatures together), gave the app a skin similar to iOS’s default weather app, and called it a day (ok, a week or so of an hour or two at a time after my kids went to bed). I have since planned and started to make some more upgrades to it (along with a few layout bugs; stupid header buttons and padding), but the base functionality won’t change much, so I thought a quick tutorial would help everybody become addicted.

The header is pretty straight forward. The C and F buttons switch between Celsius and Fahrenheit, while the arrows randomize the weather. Clicking or tapping on the randomize button will generate a completely new set of results for your weekly weather report (just as it creates every time you load/reload the page).

Key / Glossary

The top area is the “now” view and has three lines. First, it displays the location, which is currently just the climate (Cold, Temperate, Tropical) and elevation (Sea Level, Lowland, Highland); future versions will let you create and save locations. The second line shows cloud cover and/or precipitation along with the wind. The third line displays the current temperature, using the time from your browser (which should be the same as your device’s time).

Next, is the “week view”, starting with today and showing seven days. This view lists the day, the overall weather as an icon, then the high and low temperatures. Clicking/tapping on an icon shows the list of weather icons. By default, “today” is expanded to show the weather by the hour (this is one big area I took liberties with the random generation). For simplicity, the app assumes sunrise is 6am and sunset is 6pm, but it is only used for the purpose of showing a sun or a moon in the icon. Each day can be clicked on (tapped on mobile) to expand or collapse that particular day.

The bottom shows a series of circles, which represent the different locations available to view. A click or tap on those circles will navigate between the nine climate / elevation combinations. The first three are Cold (Sea Level, Lowland, Highland) followed by Temperate and then Tropical.

Also, it was configured to allow for saving to the home screen on mobile devices to run as if a standalone app.

Please enjoy, and feel free to let me know about any bugs or requests you have!

http://halfmugtavern.blog/weather

You May Also Like

Leave a Reply