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

Add more achievement variable checks #2719

Merged

Conversation

KheirFerrum
Copy link
Collaborator

@KheirFerrum KheirFerrum commented Apr 28, 2023

Summary

SUMMARY: Infrastructure "Add more achievement variable checks."

Purpose of change

Looked at #2613 and hated how it hacked around the event bus to implement skill checking. Also wanted to solve Chaos' issue with skill softlock and improve the UI display.

Describe the solution

New field in achievements that allows you to set skill(s) to check. Sadly right now the only way to check multiple skills is to set the listener to update on every skill level up.

Describe alternatives you've considered

Make each level up send a number of events from level 0 to current level to trigger all the fucking achievements.

  • For one moment I was very tempted to do this and let everyone suffer.

Testing

  • Start a character with Archery level 10. Check that both achievements trigger.
  • Start a character with Archery level 6. Check that only the level 5 achievement triggers.
  • Start a character with Archery level 4. Confirm no achievement trigger.
    • Edit an archery book to max level 5+. Edit Intelligence to 20, read until character gains a level, check that level 5 achievement triggers.

Additional context

  • Note to self: Write documentation for this before this PR is merged.

@github-actions github-actions bot added JSON related to game datas in JSON format. src changes related to source code. labels Apr 28, 2023
@KheirFerrum KheirFerrum force-pushed the add-more-achievement-variables branch from 15a8483 to d98355a Compare April 28, 2023 02:15
Instead of relying on the event like an idiot, reference player skill directly and update when skill gain event triggers instead.
For @chaosvolt to sample
@KheirFerrum KheirFerrum force-pushed the add-more-achievement-variables branch from d98355a to b18949a Compare April 28, 2023 04:10
@github-actions github-actions bot removed the JSON related to game datas in JSON format. label Apr 28, 2023
@KheirFerrum KheirFerrum force-pushed the add-more-achievement-variables branch from b18949a to ab285d8 Compare April 28, 2023 04:38
@github-actions github-actions bot added the JSON related to game datas in JSON format. label Apr 28, 2023
@KheirFerrum KheirFerrum force-pushed the add-more-achievement-variables branch from ab285d8 to 9bc1f2f Compare April 28, 2023 05:12
Copy link
Member

@chaosvolt chaosvolt left a comment

Choose a reason for hiding this comment

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

  1. Checked out this branch and dropped my JSON changes from the skill achievements PR into it.
  2. Compiled and load-tested.
  3. Started up a character with 9 unarmed skill, correctly start off with the level-5 achievement obtained. Confirmed that the level-10 achievement is visible too.
  4. Debugged in Fast Learner, Beast threshold, Apex Predator (so it doesn't take forever to skill-grind), and summoned a debug monster.
  5. Hammered at it a while until unarmed level reached 10, achievement get.
  6. Restarted test with a zero-skill debugged in Fast Reader, 9001 int, and 101 Crafts for Beginners.
  7. Read until level-up, confirmed I did not get an achievement just for obtaining level 1.
  8. Press-gang companion NPC into joining me, debugged their fabrication skill to level 9 and int to 9001, set my int back to normal and fabrication up to 5. Confirmed this does not adjust skill since done in dubug-only.
  9. Read The Art of Japanese Armormaking until they leveled up instead of me, confirmed this does not trigger any achievements I don't deserve.
  10. Kept on reading until I hit level 6, confirmed this retroactively unfucked the level-5 achievement previously softlocked by debugging.

So this PR can be tested on it's own

Co-Authored-By: Chaosvolt <chaosvolt@users.noreply.github.com>
Co-Authored-By: nexusmrsep <39925111+nexusmrsep@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JSON related to game datas in JSON format. src changes related to source code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants