Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The main menu should show latest patch notes after version update #3868

Closed
hhyyrylainen opened this issue Nov 23, 2022 · 13 comments · Fixed by #4101
Closed

The main menu should show latest patch notes after version update #3868

hhyyrylainen opened this issue Nov 23, 2022 · 13 comments · Fixed by #4101

Comments

@hhyyrylainen
Copy link
Member

the next time the player opens the game and it has been updated, there should be patch notes shown in the main menu, probably to the left of the main menu buttons? The patch notes should be accessible in full also from the options menu in case the player wants to check them later if they missed them. We probably need to store the patch notes in a JSON form in the repository. They probably shouldn't be translated as they are very technical and the chance of having timely community translations (this makes timing releases much more difficult) is not very good.

@k-agau
Copy link

k-agau commented Nov 30, 2022

Hey Henri, is there a good way to efficiently get all the patch notes into the JSON? Also, where should the button be placed? Right now I have it in Options > Misc all the way at the bottom (as well as at the bottom of the Extras menu on the MainMenu screen, which I'm going to remove soon).

@hhyyrylainen
Copy link
Member Author

Well I don't really have that good ideas other than manually keeping the patch notes up to date. Though now that I think about it, it should be possible to use the Github API to get the descriptions of each release and then with some logic it'd probably be possible to extract the changes. That should obviously be a script in the Scripts folder and not something the game does on startup. I think the misc options is a good place. Also what should be added to the main menu is showing the latest patch notes when first time playing a new Thrive version to the left of the main menu buttons. I plan to use the right side for a news feed.

@k-agau
Copy link

k-agau commented Nov 30, 2022

Sounds good. For the patch notes, are there any current models you'd like me to use as a background/container for the patch notes?

@hhyyrylainen
Copy link
Member Author

The existing used style for panels should be used.

@k-agau
Copy link

k-agau commented Nov 30, 2022

Sounds good. Thanks for the help!

@k-agau
Copy link

k-agau commented Dec 23, 2022

Hey Henry, apologies for the delay. What's the easiest way to check if the version has been updated?

@hhyyrylainen
Copy link
Member Author

Something like:

  • On startup try to read a new file placed in user:// folder that contains JSON data, that file would have the version number. Compare the version number to currently running Thrive and show patch notes (this should probably be another JSON or maybe a markdown file with specific syntax markers to easily find the patch notes for each version in it)
  • After doing the version comparison write the current version to that info file

That way the game can detect if the played version is different than previous. Though maybe as the launcher allows playing different versions, it would be better to actually keep a list of played versions in that file, that way going back to an old version won't trigger the patch notes again (unless that's actually wanted, but I'm not sure it is).

@k-agau
Copy link

k-agau commented Jan 19, 2023

Hey Henry, how do I run scripts?

@84634E1A607A
Copy link
Contributor

What scripts? If you are asking about localization script, run dotnet run --project Scripts -- localization and if it says you have missing dependencies, install them.

Refer to setup instructions

@hhyyrylainen
Copy link
Member Author

For retrieving patch notes, a new script should be created for that. There's already various scripts, like that localization script in the Scripts project. So you can look at Scripts/Program.cs to see how they are registered and implemented (by looking at the other files in that folder).

@k-agau
Copy link

k-agau commented Jan 23, 2023

Hey Henry, I have everything working and I just had two quick questions before I submit the PR.

There are a few key errors because the version tags on Github don't include the extra informational number (e.g. it is 0.5.10 on Github rather than 0.5.10.0). I believe that the latter of which is what's computed when Constants.Version is called, but I just wanted to confirm whether the extra informational number should always be present.

In terms of displaying the patch notes on the main menu, what dimensions/position would you prefer? Everything is pushed to my branch if you'd like to take a look. The script I wrote won't work on your end because some code from the RevolutionaryGamesCommon repo is missing.

Thank you!

@hhyyrylainen
Copy link
Member Author

There are a few key errors because the version tags on Github don't include the extra informational number (e.g. it is 0.5.10 on Github rather than 0.5.10.0). I believe that the latter of which is what's computed when Constants.Version is called, but I just wanted to confirm whether the extra informational number should always be present.

They are not always present. When publicly talking about releases we always exclude the last number if it is zero.
For the launcher automatic update checking I just added a bit of code to make the last number a 0 if it is unknown (-1) when parsing a version number.

In terms of displaying the patch notes on the main menu, what dimensions/position would you prefer? Everything is pushed to my branch if you'd like to take a look.

To the left of the main menu buttons with about similar height to the menu button area and a bit more width. But it's hard to say for certain without seeing screenshots of the possible options.

@hhyyrylainen hhyyrylainen added this to the Release 0.6.1 milestone Feb 2, 2023
@hhyyrylainen hhyyrylainen moved this from Backburner to Features for next release in Thrive Planning Feb 2, 2023
@hhyyrylainen hhyyrylainen self-assigned this Feb 3, 2023
@hhyyrylainen hhyyrylainen moved this from Features for next release to In progress in Thrive Planning Feb 3, 2023
@hhyyrylainen
Copy link
Member Author

I've now started working on my own variant of this feature: #4101

Thrive Planning automation moved this from In progress to Done Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment