Repository navigation
feat: award activity points for MMOCore profession XP - #9
Closed
JustinasLa wants to merge 1 commit into
Closed
JustinasLa wants to merge 1 commit into
JustinasLa wants to merge 1 commit into
Conversation
Adds an optional `profession:` key on an activity so an admin can set a weekly goal like "gain 500 xp in Forager". Profession ids are normalised the same way MMOCore normalises them (lowercase, `_` and space to `-`), so a config key copied from the profession filename matches. MMOCore multiplies profession XP by boosters, so gains are routinely fractional. Flooring each event would permanently under-count and would never credit a profession tuned below 1 xp per action, so the listener carries the remainder per player per activity and evicts it on quit. Entries ship commented out: without MMOCore they would render as GUI rows stuck at zero. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Superseded by #10 — same commit without the attribution trailer. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional
profession:key on an activity, so a weekly goal can beexpressed as "gain 500 xp in Forager". Ships entries for
crafter,foragerandherborist.Notes
listens to MMOCore level-ups and mints its own separate profession-point
currency, so the XP source here is MMOCore's
PlayerExperienceGainEvent.(lowercase,
_and space to-). Without this, a futuremining_expert.ymlwould silently never match the config key the docstell you to write.
values. Flooring per event would under-count permanently (~9% at x1.1)
and would never credit a profession tuned below 1 xp/action, so the
remainder is carried per player per activity and evicted on quit.
otherwise render as GUI rows permanently stuck at 0. Uncomment to enable.
Professionimplements a MythicLib interface, so javac cannot resolve
getId()without it. Verified compile-only, nothing shaded into the output jar.
Blocked on
CI will fail its
sha256sum -cstep until these two jars are uploaded tothe
JustinasLa/tfmc-depsv1release under exactly these names:MMOCore-1.13.1.jarMythicLib-dist-1.7.1.jarHashes in
libs/SHA256SUMSmatch the jars installed on the live server.Verification
mvn -B clean packagelocally: BUILD SUCCESS, 78 tests, 0 failures.Reviewed by code-reviewer (APPROVE, 0 findings after a fix round) and
security-specialist (PASS, 0 critical/high).