Skip to content

Save play time, support timer display options#1213

Merged
Eblo merged 2 commits intoHarbourMasters:developfrom
Eblo:save-real-time
Nov 23, 2025
Merged

Save play time, support timer display options#1213
Eblo merged 2 commits intoHarbourMasters:developfrom
Eblo:save-real-time

Conversation

@Eblo
Copy link
Contributor

@Eblo Eblo commented Jul 23, 2025

Currently, save files have a timer display that shows the naive difference between the current time and the time when the file was created. This PR improves the time tracking so that it tracks the time actually spent between saves and not real time elapsed regardless of play.

2ship needs to update the tracked time in chunks with SavingEnhancements_AdvancePlaytime(). This gets called when:

  • Saving or speaking to an owl statue
  • Defeating Majora's Wrath, i.e. beating the game

Some logic for initializing and marking game completion were handled in the timer display element. I moved that to SavingEnhancements.cpp.

This necessitates and adds a save migration.

Build Artifacts

@balloondude2
Copy link
Contributor

I don't think the original timer was naive, but meant to be an RTA timer. I think we shouldn't replace it, but instead add this Play Time timer as an additional option.

@Eblo
Copy link
Contributor Author

Eblo commented Jul 23, 2025

Fair enough. I think giving the display different options is a good idea. I'll return to this.

@Eblo Eblo force-pushed the save-real-time branch from 1fcec89 to 9db560a Compare July 24, 2025 19:43
@Eblo Eblo changed the title Save play time instead of real time Save play time, support timer display options Jul 24, 2025
@Eblo
Copy link
Contributor Author

Eblo commented Jul 24, 2025

I reworked it so that the timer display is not a toggle, but a list of options. Supports RTA, IGT, or no display (default).

image image image

@Eblo Eblo mentioned this pull request Aug 21, 2025
44 tasks
@Caladius
Copy link
Contributor

Thank you for adding this, as with #1266 my intention here was for Speedruns specifically. The thought of just In Game Play-time was there but wasn't my priority at the time.

@Eblo Eblo mentioned this pull request Nov 11, 2025
45 tasks
@Eblo
Copy link
Contributor Author

Eblo commented Nov 14, 2025

This has been rebased against develop and is ready for re-review.

Copy link
Contributor

@garrettjoecox garrettjoecox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move lastTimeLog to ShipSaveContext, aside from that LGTM.

Clever use of timestamps to avoid incrementing a number every frame. Both that and the ability to have both RTA & gametime should be back-ported to SoH if you're feeling adventurous.

@Eblo
Copy link
Contributor Author

Eblo commented Nov 22, 2025

Moved the intermediate time tracking variable to ShipSaveContext. I noticed that completion time was not being properly tracked in Triforce Hunt, so I added a hook for OnGameCompletion that fires on completing the Triforce and defeating Majora. Given that this could do other things in the future, I left time splits alone, so they still set the completed time directly as before.

@Eblo Eblo merged commit 74950f5 into HarbourMasters:develop Nov 23, 2025
4 of 5 checks passed
@Eblo Eblo deleted the save-real-time branch November 23, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants