ICTime

Posted by Polarus on Wed 18 Dec 2002 02:51 AM — 3 posts, 21,130 views.

Canada #0
I want to implement a Roman calendar. I can't seem to get the set ictime thing to work. (I noticed it in ictime.cpp, maybe it's not done?)

What should I do?
United Kingdom #1
That is a pretty open ended question you have asked... "What should you do?".

There are two issues here... the first is the calendar system you want to implement, the second is understanding the current calendar and time system.

You need to generate code for your new calendar system... I would suggest writing it as a small independant application. The system should be able to convert any date time in time_t format (number of in real life seconds past midnight, 1st Jan 1970) (you can see this as "Seconds past 1Jan1970" at the top of the the memory command within the game). Once you can consistantly convert from that value to a date+time in your calendar system, then you are ready to put it into the mud code.

The mud ictime system is based on running 10 times faster than the system time... so 6 seconds = 1 minute. The calendar has the same number of days in a month, making calculations very simple (also so 1 ic year about 25 days instead of 36.5 days).

Look at get_shorticdate_from_time() within ictime.cpp for an idea of what I am meaning about translating time_t into an IC time... the calculations are pretty simple because there is an even number of days in each month.

- Kal
Canada #2
I want to implement the Roman A.U.C calendar. This is the calendar that we use today, except it has latin names, and it might be a few days off, but I could fudge that.