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 service for mastery data #30

Merged
merged 4 commits into from
Jan 20, 2023

Conversation

LennardF1989
Copy link
Member

@LennardF1989 LennardF1989 commented Nov 16, 2022

Depends on: #25 Added by RDIL, but this is not true. It has portions of which Evergreen can benefit, however.

This PR includes:

  • A service to handle/retrieve mastery data
  • Mastery data for all locations, including Evergreen (SNUG).
  • Added initial support for profile progression on the Player Profile screen as well as when viewing mastery of locations.

This PR does not include:

  • Actual progression saving/drops on /MissionEnd, even though I already sorted out mastery drops as part of my custom scoring plugin for Evergreen and the storing of that progression per location in the player profile. I will backport that to general purpose later.

General note:

  • This has been tested on Hitman 3 for Epic, and technically the Steam version though the playtest.
  • Most likely will work on Hitman 1 and Hitman 2. Otherwise it would be rather easy to exclude this based on game version.

@AnthonyFuller AnthonyFuller self-requested a review November 16, 2022 22:56
@RDIL RDIL self-requested a review November 16, 2022 22:57
@RDIL RDIL added progression Related to the gaining of mastery and other in-game progress. major This will need to be in a semver-major release. labels Nov 16, 2022
@RDIL
Copy link
Member

RDIL commented Nov 16, 2022

That was unexpected.

Copy link
Contributor

@AnthonyFuller AnthonyFuller left a comment

Choose a reason for hiding this comment

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

All in all a good PR and an especially welcome one! Thanks a lot!

contractdata/AMBROSE/_AMBROSE_MASTERY.json Outdated Show resolved Hide resolved
packaging/buildTasks.mjs Show resolved Hide resolved
packaging/buildTasks.mjs Outdated Show resolved Hide resolved
components/candle/masteryService.ts Outdated Show resolved Hide resolved
components/candle/masteryService.ts Show resolved Hide resolved
components/controller.ts Outdated Show resolved Hide resolved
contractdata/CARPATHIAN/_CARPATHIAN_MASTERY.json Outdated Show resolved Hide resolved
packaging/buildTasks.mjs Outdated Show resolved Hide resolved
static/EvergreenMasteryDataForLocationTemplate.json Outdated Show resolved Hide resolved
components/candle/masteryService.ts Outdated Show resolved Hide resolved
@RDIL RDIL added this to the v6 milestone Nov 17, 2022
@LennardF1989 LennardF1989 force-pushed the mastery branch 2 times, most recently from d53f5a7 to 46d04b4 Compare November 17, 2022 22:38
@LennardF1989
Copy link
Member Author

Added new commits with the requested changes. Purposely didn't squash so you can easily spot the changes.

While I've fixed a performance issue now that everything is generated runtime, I must add it happens quite often: Every time you go into a Destination. So when you are casually browsing to decide the contract to play, you are constantly doing a lot of calculations to build this object with drops.

If that is acceptable in order to safe some memory, then I'm okay with it.

components/index.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@AnthonyFuller AnthonyFuller left a comment

Choose a reason for hiding this comment

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

This is definitely getting closer to how I envisioned a mastery system. Just a few final things.

contractdata/AMBROSE/_AMBROSE_MASTERY.json Outdated Show resolved Hide resolved
components/contracts/dataGen.ts Show resolved Hide resolved
components/candle/masteryService.ts Outdated Show resolved Hide resolved
@LennardF1989
Copy link
Member Author

LennardF1989 commented Nov 18, 2022

Since all final changes are most likely fully conform agreements, I went ahead and squashed the branch already for a final review.

Copy link
Contributor

@AnthonyFuller AnthonyFuller left a comment

Choose a reason for hiding this comment

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

We're almost there, I can feel it! Just one final thing.

components/candle/masteryService.ts Outdated Show resolved Hide resolved
components/candle/masteryService.ts Outdated Show resolved Hide resolved
components/candle/masteryService.ts Outdated Show resolved Hide resolved
components/candle/masteryService.ts Outdated Show resolved Hide resolved
components/candle/masteryService.ts Outdated Show resolved Hide resolved
"Could not get CompletionData for location ${locationId}",
)

return <CompletionData>{
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

Copy link
Contributor

Choose a reason for hiding this comment

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

This cast is still here!

components/candle/masteryService.ts Outdated Show resolved Hide resolved
@RDIL RDIL changed the base branch from v5 to v6 January 17, 2023 21:46
Copy link
Contributor

@AnthonyFuller AnthonyFuller left a comment

Choose a reason for hiding this comment

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

A few final final things!

"Could not get CompletionData for location ${locationId}",
)

return <CompletionData>{
Copy link
Contributor

Choose a reason for hiding this comment

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

This cast is still here!

contractdata/SNUG/_SNUG_MASTERY.json Outdated Show resolved Hide resolved
components/contracts/dataGen.ts Outdated Show resolved Hide resolved
LennardF1989 and others added 4 commits January 20, 2023 21:09
Added simplified mastery data for all locations
Added runtime generation of the full mastery data
Added initial support for profile progression
Reworked code around loading of resources to be more generic
Fixed typo in the MasteryDataTemplate
Removed unnecessary casts
Removed unused controller reference
Copy link
Contributor

@AnthonyFuller AnthonyFuller left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you so much for implementing this!

@AnthonyFuller AnthonyFuller requested a review from RDIL January 20, 2023 20:26
@LennardF1989 LennardF1989 merged commit 85a55d4 into thepeacockproject:v6 Jan 20, 2023
@LennardF1989 LennardF1989 deleted the mastery branch January 20, 2023 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major This will need to be in a semver-major release. progression Related to the gaining of mastery and other in-game progress.
Projects
Development

Successfully merging this pull request may close these issues.

3 participants