Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ SMAUG
➜ SMAUG coding
➜ Time passage changes
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Luna
(6 posts) Bio
|
| Date
| Sat 21 Feb 2004 01:58 PM (UTC) |
| Message
| I've spent several hours now looking for the basic thing I would need to change to make time pass more slowly (I'm looking for 1 month per real life day, approximately.) Currently, I have three problems with it:
1) Using a stopwatch and checking 'time' it appears that 1 minute real time = 1 hour game time. This would mean time is passing at (approximately) 1/10th of a year per real day. I shortened the number of months per year to 16 (to make it even for seasons) and changed all of the various files accordingly, but 1/10th of a year per day is still a bit faster than I'd like it to be.
2) I've had the mud up for four days now, but my character has aged 10 years. This is not in keeping with the 1 minute = 1 hour thing. Why does my character appear to be aging 2.5 years per day? I don't know.
3) The nearest I could track this code to was a line in db.c where there is a formula about lhour = current_time-someobscenenumber / 70 (which is what the various pulse/tick things came out to). I tried multiplying this by 40 and doing a full compile (I got 40 from the second rate, the one I assumed my character was aging 2.5 years per day) then rebooted the mud and timed an hour again - still the same.
I'm using Smaug 1.4a with mxp - is anyone out there familiar with how to change the rate of time passage? I'd love to hear from you. Thanks, in advance! | | Top |
|
| Posted by
| Nick Gammon
Australia (23,169 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 22 Feb 2004 11:30 PM (UTC) |
| Message
| Try this in handler.c:
/*
* Retrieve a character's age.
*/
sh_int get_age( CHAR_DATA *ch )
{
return 17 + ( ch->played + (current_time - ch->logon) ) / 7200;
}
By increasing 7200 to some higher amount, the age would increase more slowly.
This wouldn't make time pass more slowly as such, but you would age more slowly. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
10,107 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top