6M62 change in time-of-day math?

I was helping someone with an issue they were having using Emily Short’s “Transit Systems” extension, freshly downloaded via the 6M62 interface.

There seems to be an issue with the way the waiting duration property of trains is being handled. It’s set up as a time, not a number. In the code that handles setting of the next departure time, this waiting duration is added to time of day. The result is an improper setting of train’s next departure time, because the waiting duration seems to be being interpreted as the number of minutes past midnight. Since the default time is 9:00AM, the number of minutes for a “zero” wait duration (the default value) is 540.

Is this a change from previous versions of Inform time-of-day math? In other words, was 9:00AM the previous “zero value” for time of day math? It seems unlikely that this was a bug in the original version of the extension.

The extension is easily fixed by making waiting duration a number and changing the departure time update rule to use the phrase “time of day plus waiting duration of relevant train minutes”.

inform7.com/mantis/view.php?id=441 looks relevant. (But that was several years ago, not a change in the most recent version of Inform.)

I encountered a problem like this like five years ago. I’m back into writing the same thing and am having the same problem again. As soon as something changes the time of day, either i advance the time of day at start. Or if I want looking and examining to take 0 min, so set the time not day to 1 minute before in a rule. In BOTH cases the scheduled transport doesn’t come. I used showme on it and the waiting time is listed as a time of day, not minutes. Not sure if that has anything to do with it.

Not being able to advance the game in the beginning is something I could write around, i suppose. Maybe there is a way to have waiting and looking take 0 minutes, instead of turning back the clock. I’ve looked but haven’t been able to find anything about changing the duration of an action. Though I could swear I read it in the inbuilt docs. I can’t find it.

Edit:

Just found it.

Variable Time Control by Eric Eve (Version 4). Allows individual actions to take a different number of seconds, or no time at all. Also allows the standard time taken per turn to be defined as so many seconds, which can be varied during the course of play.

(Alt link since the extensions on the original website are currently out of order)

https://i7el.herokuapp.com/extensions/variable-time-control-by-eric-eve

I wasn’t sure whether you mean the passage in the inbuilt docs, when you say that you just found it, or whether you mean Eric Eve’s extension. Just for reference and for others coming across this thread in the future, one of the relevant places in the docs is section 4.1. (“The Passage of Time”) in chapter 4 (“Time and Plot”) of the Recipe Book: 4.1. The Passage Of Time.

The most up-to-date place to get extensions is currently the “Friends of I7” Github repository; here’s Variable Time Control, for example: extensions/Eric Eve/Variable Time Control-v4.i7x at 10.1 · i7/extensions · GitHub.

3 Likes

Thank you! I knew I had seen that in the documentation. I have looked over that chapter three or four times in the last week and couldn’t find it. The documentation can really hide some gems. Some really important points are hidden away in the examples, and barely or not at all mentioned in the chapter.