Author Topic: Solving ticktock headaches  (Read 759 times)

Offline Lash

  • Acquaintance
  • *
  • Posts: 42
    • View Profile
Solving ticktock headaches
« on: November 25, 2014, 01:23:02 PM »
Default Dead Souls hours in a day is 20 as defined in /lib/include/config.h

The ticktock command is set up for reporting as if the day length is 24 hrs with noon and midnight occurring at 12 pm and 12 am as exemplified by the following code starting at line 32:

Code: [Select]
if(hours >= 12  && hours != 24) {
        if(hours != 12) hours -= 12;
        meridiem = " pm";
    }

    if(!hours || hours == 0) hours = 12;

Change all the 12's to 10's since 10 is mid day and midnight.
Depending on your mud day length you would have to change the 12's to the mid day numbers (for example a 30 hour day mud would be 15).
The weirdness is that mid day is 10am and the time jumps to 1pm. But is that any weirder than going from 12 to 1?

So, change the default day time in config.h or change ticktock and be aware of the mid day times when using the ticktock command.

Offline Lash

  • Acquaintance
  • *
  • Posts: 42
    • View Profile
Re: Solving ticktock headaches
« Reply #1 on: November 29, 2014, 08:08:44 AM »
Following code added to ticktock help function for clarification:

Code: [Select]
string GetHelp(){
    return ("Syntax: ticktock <seconds>\n\n"
            "Changes in-game mud time by the number of seconds "
            "specified. This is useful for changing night to "
            "day and vice versa, when testing ambient light and "
            "variable room descriptions. The timeshift does not "
            "persist between reboots. In this MUD the day length is "
             +DAY_LENGTH+" hrs and the hour length is "+HOUR_LENGTH+" minutes.");
}

Offline Lash

  • Acquaintance
  • *
  • Posts: 42
    • View Profile
Re: Solving ticktock headaches
« Reply #2 on: December 01, 2014, 06:14:44 PM »
Well, I bunged that up a little bit!  :-[

In the if statement in the first post, the value '24' should be set to the max hours of your MUD. In Dead Souls default that value should be '20', otherwise the hour length of the day as indicated in your
/lib/include/config.h file.

And "minutes" should be struck from the help file addendum I put up. I don't know what the units are. Number of heartbeats maybe?




« Last Edit: December 01, 2014, 06:22:31 PM by Lash »