The weather system of Sociopolitical Ramifications was originally developed by Neikrad for Brazilian Dreams (hence the name). This document describes the involved MUF programs in detail. - unci Other weather sources: news weather-use - How to use the weather system for your own building news weather-example - A detailed MUF example of a room with weather news weather-install - How to install new weather zones If you wish to install the weather system on another MUCK, please contact Neikrad (firmiss@cae.wisc.edu) directly for MUF sources and full documentations. ========================================================================== === Brazilian Dreams MUCK Weather System [ Program details ] === === Written by Neikrad of Brazilian Dreams and FurryMUCK, changed for === === SPR by unci (taking out the initial steps and adding dbrefs) === ========================================================================== These programs are the main components of the weather system: __Program Name_______dbref on SPR__Description____________________________ weather-start.muf #9009FWAM3 Triggers 'weather.muf' weather.muf #8998FLM3 Calcs weather and announces changes forecaster.muf #13365FLM3 Show current/forecasted local weather bar-read.muf #9010FLM3 Read props off local barometer object {weather} MPI Macro... like 'bar-read.muf' zone-editor.muf #12875FLM3 Modify props on local recorder object To avoid confustion, ALL the properties ALL these programs use are stored as strings, including numeric values and dbref #s. For dbref numbers, the '#' sign is optional in the string in ALL. The weather is only set up in certain 'zones'. Each zone has one parent room for all rooms, a barometer object and a recorder object. Installing zones is described in 'news weather-install'. Below, I've explained each program in more detail. --[ weather-start.muf (#9009) ]-- INTRO AND PROPERTIES The user guide describes a clock program which runs 'weather.muf'. This is that clock program. It will 'align' itself to run every 15 minutes starting at :00, :15, :30, or :45 after the hour. This program is ONLY ment to be used by wizards. It does very little error checking because its expected that those using it know what they're doing. It needs two properties set on the program in order to run.. They begin with '@' as a way of stating only wizards should deal with these. @weather e.g. @weather:385 @reclist e.g. @reclist:330 554 1929 @weather is set to the dbref number of the weather.muf program. The '#' in the number is optional. @reclist is a list of all the 'recorder object's dbref numbers each separated by a SINGLE space. Again, the '#'s are optional. ~last-fail is a property the program will set on itself if for some reason it is unable to queue weather.muf. STARTING AND STOPPING WEATHER-START.MUF (AND THE ENTIRE WEATHER SYSTEM) Since the program should be set 'A' [AUTOSTART] it should run whenever the MUCK is restarted. You can link an action to this program to start it up. @editing and recompiling the program will also start it up. If for some reason you need to stop this program, find its PID with "@ps" then use "@kill " to stop that process WARNINGS There should be ONLY ONE process running this program. Be careful with any actions linked to this program. Its probably best to wait until at least ONE weather zone is set up before running this program. (Wizards - Best leave your paws off the weather-start program unless it really goes amok. Leave that to unci who installed it. Thanks!) --[ weather.muf (#8998) ]-- INTRO This program is called primarily by weather-start.muf. Weather-start gives it a string in the form of: e.g. 330 The example means, look for 'recorder' object with dbref #330 and begin. If the 'local' time is between 12:00 and 12:14 am (just after midnight) then 'advance_day' runs followed by 'advance_quarter'. Otherwise just 'advance_quarter' runs. 'advance_day' adjusts some of the recorder objects properties while 'advance_quarter' adjusts the recorder object, its associated barometer object, and announces weather changes. ( More info about this in `news weather-install'. ) USAGE You can put an action on a recorder object linked to weather.muf. You can name the action anything but I like to call it 'advance'. Assuming you've done that too you can use the following commands. advance quarter advance day advance quarter would artificially trigger a standard weather event which normally occurs every 15-minutes on that recorder object. advance day would artificially trigger a standard 'daily' weather event (Note.. since routines dealing with the sun and moon read the MUCK's system clock, neither of these will mess up the position of the sun or moon). This is useful when debugging weather.muf. It is also useful when you first create a weather zone. ( more info in `news weather-install'. ) --[ forecaster.muf (#13365) ]-- INTRO This program is used by the global action 'weather' and 'forecast'. It reads assorted properties on the local weather objects and prints out a formatted descriptions of the current weather conditions ('weather') or today's and tomorrow's weather forecast ('forecast'). The global action on #0 called weather;weathe;weath;weat;wea;forecast;forecas;foreca;forec;fore(#13368E) is linked to 'forecaster.muf'. If no weather zone is set up where you are, the user will get.. > Weather is not set up in this region. Here's an example output for 'weather'. (this might change a bit with later updates to the weather program). == Current weather for this region == sky condition cloudy precipitation none precipitation rate last precipitation Sunday March 26, 1995 18:15 last precip type snow wind gusty wind direction north-northeast wind speed 19 mph current temperature 35 F (1 C) temp description cold ground condition wet water table normal tide high-tide moon half waning moon status below horizon Here's an example output for 'forecast'. == Expected weather for this region == Today: sky condition clouds precipitation definite wind hi_winds wind direction north-northwest high temp 42 F (5 C) low temp 23 F (-4 C) Tomorrow: sky condition clouds precipitation probable wind direction east temperature cold --[ bar-read.muf (#9010) ]-- INTRO This short utility program looks for a local barometer object and reads weather properties off of it. It is used in the {weather} MPI macro but can also be used in other MUF programs. The usage is simple. In FORTH commenting notation its... [ s -- s' ] Give it a name of one of the weather properties on the barometer object (s) and it returns the value of that property (s'). All properties on the barometer object begin with '_' HOWEVER when using this program DO NOT INCLUDE the '_' in the input string. (e.g. use 'sky' instead of '_sky') A list of all 21 standard readable properties is as follows: daytime, ground, last_precip, last_ptime, moon, moonstat, prate, precip, season, sky, temp, tempc, tempf, tide, watertable, wind, winddir, winddir#, windspd, windspd_k, windspd_n Their meanings and possible values are given in the MUCK Weather System User's Guide. zone should also be readable as the name of the local weather zone. SPECIAL NOTES The program will return a blank string ("") if there is no weather set up in the user's current location OR if you try to read a nonexistant property off of the barometer object. --[ {weather} ]-- The weather MPI macro is as follows: {muf:#9010,{:1}} Where #9010 is the dbref number of the bar-read program. Usage is {weather:} in any MPI string. SPECIAL NOTES Since this uses bar-read.muf you should not put an '_' in front of the name you wish to read. It returns a null string if it can't find a value. --[ zone-editor.muf (#12875) ]-- This is a 'utility' program for maintaining zones. As of this writing it is far from complete and simply allows for adding, listing, and deleting rooms from a barometer object's '_forward' list (the list of rooms to announce significant weather changes to). Link an action to it and use in the appropriate weather zone. It is only usable by wizards and the owner of the local 'barometer object'. More about this program in 'news weather-install'.