19 Mar, 2010, Igabod wrote in the 1st comment:
Votes: 0
I'm just curious whether changing the amount of months per year in smaugfuss would have any significant and damaging effect on the mud. The stock release has the calendar at 24 hours per day, 7 days per week, 31 days per month, 17 months per year and 527 days per year. I am considering changing this to 12 months per year to more closely match the gregorian calendar. I know it won't be quite the same but it'll be closer than the stock calendar. I just want to make sure this won't cause any real problems.
19 Mar, 2010, Skol wrote in the 2nd comment:
Votes: 0
Shouldn't Ig, unless you have some kind of seasons/weather patterns that require certain months (I'm assuming Smaug/fuss never went into that yet?).

You might check the tables for like month names etc, and make sure it doesn't do something like 'for (month something; month < MAX_MONTH; month++).. If it does, make sure to change the max value to whatever the total of your own months is.
19 Mar, 2010, Kayle wrote in the 3rd comment:
Votes: 0
Went over this on IMC but I figured I'd post the info here in case anyone else has this same question.

Changing the calendar in SmaugFUSS is done by changing the months-per-year, days-per-week, and hours-per-day fields in cset, and adjusting the arrays in calendar.c to match. So if you set it to 20 months, you need to make sure you have 20 month names in the array in calendar.c or you'll crash when someone tries to check the time command and its one of the months that doesn't have a name.

When you change the values in cset, the code will automatically recalculate seasonal lengths based on the new values, and then of course the weather will acclimate to the new seasons over the course of a few weather updates.

Skol said:
unless you have some kind of seasons/weather patterns that require certain months (I'm assuming Smaug/fuss never went into that yet?).

It does have seasonal weather patterns in my weather system replacement, but as I said, it automatically adjusts things based on the calendar settings.
19 Mar, 2010, Kline wrote in the 4th comment:
Votes: 0
Igabod said:
I'm just curious whether changing the amount of months per year in smaugfuss would have any significant and damaging effect on the mud.


You seem to be playing it very safe with your recent questions – what happened to the fun of messing with something, seeing what (if anything) it breaks, then reverting/editing as needed? Just dive in!
20 Mar, 2010, Skol wrote in the 5th comment:
Votes: 0
Sounds good Kayle!
I would suggest something like
// blah
sprintf(buf, "It is the %d day of the month of %s", day, month_table[month] != NULL ? month_table[month_name] : "Unnamed Month");


Obviously I don't know the structure, but something so that if someone does make it a 30 month year, it just calls them silly instead of crashing due to trying to point at a non-existent part in the table. Sound like a nice system though, was that part of Smaug or something you and Samson came up with? (The c-set along with seasonal changes/weather etc).
20 Mar, 2010, David Haley wrote in the 6th comment:
Votes: 0
Checking for null isn't necessarily enough: if you're going past the bounds of the table, you can very well end up on something that isn't null but basically string-gibberish.
20 Mar, 2010, Kayle wrote in the 7th comment:
Votes: 0
Skol said:
Sounds good Kayle!
I would suggest something like
// blah
sprintf(buf, "It is the %d day of the month of %s", day, month_table[month] != NULL ? month_table[month_name] : "Unnamed Month");


Obviously I don't know the structure, but something so that if someone does make it a 30 month year, it just calls them silly instead of crashing due to trying to point at a non-existent part in the table. Sound like a nice system though, was that part of Smaug or something you and Samson came up with? (The c-set along with seasonal changes/weather etc).


The Calendar code was actually pulled out of AFKMud, but the weather is all my work, with a basic structure provided by FearItself to get me started way back before I really had a plan for how to do what I wanted to try and do. I'd been considering trying to move the arrays for month names and day names out of the code and convert them to OLC, but I've just never gotten around to it. I supposed some kind of check to prevent the crash could work as a holdover until I actually find time and motivation to conver them to OLC.
20 Mar, 2010, quixadhal wrote in the 8th comment:
Votes: 0
Skol said:
Sounds good Kayle!
I would suggest something like
// blah
sprintf(buf, "It is the %d day of the month of %s", day, month_table[month] != NULL ? month_table[month_name] : "Unnamed Month");


sprintf(buf, "It is the %d%s day of the month of %s", day, ordinal(day), month < MAX_MONTH ? month_table[month] : "Skittering Bugs");

Or, if you're using OLC, MAX_MONTH would be some regular variable that gets set there.
0.0/8