Getting Attributes with Roomformat
Okay. I'm fiddling with @roomformat (as well as exit and name and conformat) but right now I am having troubles figuring out what I need to use in @roomformat to pull an attribute off the room. I specifically mean the details in the attribute. I tried the things I know and can't find a connecting helpfile that will tell me.
Get(), v(), or u() if you need it evaluated.
@Mercutio I tried all of those with %#, %!, %0, %L, etc. and it just returns a blank line. SO, it is breaking down in pulling the attribute details.
OH! I figured it out. Apparently I missed the attribute.
Okay. This is sort of not and sort of related to this. I am trying to make a simple weather system (very simple). At least looks wise. The details are:
Weather/time (extremely simple, I hope)
- It tracks the season by changing it every 3 months (to do 4 times a year). It simply changes an attribute called something like ‘currentseason’. It’ll just do ‘Spring, Summer, Fall, Winter’ So, the automatic change would start at, say, spring, and after 3 months turn over to summer and so on.
- It’ll just give the current weather in a couple words, give or take (IE it’ll say Rainy), pulling from a list related to the season going on. IE: It’s spring so it’d pull from an attribute that is something like: &list.spring <object>=<list of spring weather choices> and so on for each seasons.
- A 12 hour clock. It’d basically just track the IC time. The ability to adjust the time speed would be nice. For example 2 IC days happens every 1 RL day.
How would I go about making it so a cron runs according to the change of season every 4 months and the change of weather every day. Basically how I explained it. Trying to code for my game myself so.. yup. I am ignoring the clock and time ratio. I couldn't find a weather system that is this simple.
@icanbeyourmuse Here's a fairly simple weather system you can use for ideas. It relies on Myrddin's Cron System, which you can find in various places to do the periodic cron job. Here's Volund's Version of the cron, and here's mine. I'm sure the original is around somewhere but I can't find it.
@faraday I was looking up a cron on MUSHCode (I think) and couldn't figure it out. Yours seems to make more sense. One question.. If I wanted to make it run daily to weather would I need a cron time thing for each day? Same with making it change every 4 months.
@icanbeyourmuse There's some help for the cron system here. You just need to create attributes for each cron job telling the cron system when you want your thing to run, and what to do when it runs. The cron system has a loop running in the background like every minute checking to see "is it time for any of these cron jobs to run?"
So you would probably want a cron job to change the weather every day. An hourly cron job could look like this (I think):
|||12|00|<-- runs every day at 12:00
I'm not sure why you need a second cron job to change the season. You can figure out what season it is from the current date. But if you wanted to set that with a cron you can have one that runs every four months.
@faraday The 'args' would be the thing it does?
@icanbeyourmuse No the thing it does goes into a matching attribute named CRON_JOB_xxx that is triggered when the time in CRON_TIME_xxx matches. I forget what args is for.