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

Added Mission Story Progression #68

Merged
merged 17 commits into from
Jan 7, 2023

Conversation

moonysolari
Copy link
Member

@moonysolari moonysolari commented Jan 6, 2023

Features:

  • Peacock now no longer treats any mission stories as completed by default. Instead, it tracks the completion of the mission stories in game and writes the repository ID of any completed mission stories to the user data. Deleting the userdata folder will reset the mission story progression.
  • The number of total mission stories and completed mission stories now show on the Destinations page, as well as on the page for each location.

Fix:

  • Club 27 was previously missing the Mission Stories tab on its planning page. It is added back.

Breaking change:

  • static/Destinations.json was deleted, its information merged into static/LocationsData.json.

Note:

The game itself also tracks completed mission stories and send PersistentBools to the server via GamePersistentDataService/SaveData to communicate this information. The PersistentBools are in the following format:

{
    "Polarbear_opp_Jet": true,
    "Octopus_opp_Lunch": true,
    "Showstopper_opp_Cocktail": true,
    "Copperhead_OPP_Pyro": true,
    "GECKO_OPP_GREY01": true
}

The implementation in this PR ignores the PersistentBools sent by the game and instead tracks the mission stories on the server side for the following reasons:

  • Storing the completion data on the server side allows for resetting the mission story progression.
  • It is easier to get the location id of the mission story this way. The chaotic naming convention of the PersistentBools make it more challenging.
  • The PersistentBools contains all the mission stories ever completed in the game on any server, meaning it will also report mission stories that were only completed on official servers but not Peacock.
  • I don't have all the names of the mission-story-related PersistentBools.

@AnthonyFuller
Copy link
Contributor

I've not properly looked at this yet, but from a glance. You do delete the import of Destinations.json, but you never actually deleted the file.

@moonysolari
Copy link
Member Author

I've not properly looked at this yet, but from a glance. You do delete the import of Destinations.json, but you never actually deleted the file.

You are correct. I added a commit to actually delete it.

components/eventHandler.ts Show resolved Hide resolved
@@ -2,6 +2,7 @@
"parents": {
"LOCATION_PARENT_ICA_FACILITY": {
"Id": "LOCATION_PARENT_ICA_FACILITY",
"Opportunities": 4,
Copy link
Member

Choose a reason for hiding this comment

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

Seems dangerous to hard-code this, perhaps we should check all contracts present on that location?

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the data merged from static/Destinations.json, and I think we are safe enough to use it. I haven't seen any mods that attempt at adding mission stories, and I doubt we will get new missions from IOI that add mission stories (even Ambrose does not have any).

@RDIL RDIL merged commit f3803be into thepeacockproject:v6 Jan 7, 2023
@moonysolari moonysolari deleted the mission-story-progression branch January 7, 2023 22:06
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.

None yet

4 participants