Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Support game version 1.0.2 #10

Closed
Opinion opened this issue Nov 10, 2022 · 6 comments · Fixed by #11
Closed

Support game version 1.0.2 #10

Opinion opened this issue Nov 10, 2022 · 6 comments · Fixed by #11
Assignees

Comments

@Opinion
Copy link
Owner

Opinion commented Nov 10, 2022

Slowroads.io just updated to v1.0.2. Userscript v1.2 will not support this version even if I add the modified game script.

Before I modify the game script I have to check if I can still use the same method for exposing the game's state.

Required changes

  • Change Core.settings.supportedVersion to 1.0.2
  • Add new modified game script for main.131c9059.chunk.js to the /dist directory

Changelog for v1.0.2

slowroads-v1 0 2-changelog

@Opinion Opinion added this to the Userscript v1.3 milestone Nov 10, 2022
@Opinion Opinion self-assigned this Nov 10, 2022
@Opinion
Copy link
Owner Author

Opinion commented Nov 10, 2022

Good news, I have just checked the game script for v1.0.2 on main.131c9059.chunk.js. Here are my findings:

  • ✔ I can use the same method for exposing the game's state
  • ✔ All handling keys accessed through the handling editor still exist
    slowroads-v1 0 2-handlingKeys
  • ✔ There are no new handling keys (metrics) I would want to implement (green = implemented)
    slowroads-v1 0 2-metrics

@Opinion
Copy link
Owner Author

Opinion commented Nov 10, 2022

The modified game script will be kept in the branch userscript-v1.3 while I test it. It will be pushed to main along with v1.3.
Meanwhile I have to remember to edit the CDN URL to point to the correct branch.

@Opinion
Copy link
Owner Author

Opinion commented Nov 10, 2022

Relevant:

Opinion referenced this issue Nov 10, 2022
Note: No modified game script available right now.
Opinion referenced this issue Nov 10, 2022
Add text '@userscript-v1.3' specifying branch.
@Opinion
Copy link
Owner Author

Opinion commented Nov 10, 2022

Relevant:

I always forget to tag issues in commit messages :(

@Opinion
Copy link
Owner Author

Opinion commented Nov 10, 2022

Breaking change - game version checking (v1.0.2)

The game can now auto-load, i.e. you don't have to click "begin" sometimes when reloading. This conflicts with the way we check for the game's version. Currently we use the begin/pause screen to check for a version number.

This is actually a blessing. Getting the game version from the game script is much better than getting the game version from the begin/pause screen. This change will actually prevent old scripts from executing scripts for game versions they don't support.

Required change:

  • Expose another variable from the game's script. Make game version available in window.exposedVersion.

Opinion added a commit that referenced this issue Nov 10, 2022
Opinion added a commit that referenced this issue Nov 10, 2022
 - Move version getter to 'WindowInteraction.getExposedVersion()'
   - Get version from new exposed game variable 'window.exposedVersion'
   - Replace all uses of 'DocumentInteraction.getGameVersion()'

See issue #10
@Opinion
Copy link
Owner Author

Opinion commented Nov 10, 2022

Alright, I think the release is just about ready.
Hold on

Opinion added a commit that referenced this issue Nov 10, 2022
Remove text '@userscript-v1.3' specifying branch

See issue #10
Opinion added a commit that referenced this issue Nov 10, 2022
Opinion added a commit that referenced this issue Nov 10, 2022
Opinion added a commit that referenced this issue Nov 10, 2022
@Opinion Opinion linked a pull request Nov 10, 2022 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant