Skip to content
austin-lopez edited this page Apr 9, 2024 · 2 revisions

General overview of how the passage of time works.

Time is accelerated in two ways:

  • During a DialogueEntry
  • During Travel

How does Time flow in DialogueEntry?

Time is progressed upon the display of a DialogueEntry either automatically or by a specific input.

Automatic

DialogueUtility.cs calculates the amount of time a node will automatically consume. This is determined by the number of text characters found in a DialogueEntry.currentDialogueText field.

In the Unity Editor, this field is populated here:

Screenshot 2024-04-09 at 6 01 32 PM

Notice there is a field above Dialogue Text called Menu Text. When the Dialogue Text field blank, the game will use Menu Text instead, which will always provide an automatic time calculation of zero. This is useful for inserting in-game dialogue that shouldn't accelerate time, such as Tutorial lines.

Manual

To manually determine how much time a node will consume, use the Timespan custom field. More information can be found here.

How does time flow in travel?

Time flows when travelling to a new location. This calculation is determined by the coordinate distance between locations. A lot of these calculations can be seen in Location.cs.

Somewhat confusingly, Goob decided to create a Location class even though the Dialogue System already has a Location class, and the Location tab in the Dialogue System also lists all of the game's locations. However, these are two distinct things.

How to adjust time flow?

Check and adjust values found in Clock.TimeScales.

Actually, if there's anything you need regarding Time, there's a good chance you'll find it there.

What about the in-game UI clock?

Th UI clock's observed time almost certainly but does not necessarily reflect raw actual in-game time, as there is a short transition animation that plays when time is updated. If there are any oddities with the observed game time, you might want to make sure ClockUI.cs isn't fucking anything up, since it isn't written too smartly.

Clone this wiki locally