Skip to content

feat: award activity points for MMOCore profession XP - #9

Closed
JustinasLa wants to merge 1 commit into
mainfrom
feat/profession-xp-activities
Closed

JustinasLa wants to merge 1 commit into
mainfrom
feat/profession-xp-activities

Conversation

@JustinasLa

@JustinasLa JustinasLa commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds an optional profession: key on an activity, so a weekly goal can be
expressed as "gain 500 xp in Forager". Ships entries for crafter,
forager and herborist.

Notes

  • Professions are MMOCore's, not RPCharacters'. RPCharacters only
    listens to MMOCore level-ups and mints its own separate profession-point
    currency, so the XP source here is MMOCore's PlayerExperienceGainEvent.
  • Profession ids are normalised exactly as MMOCore normalises them
    (lowercase, _ and space to -). Without this, a future
    mining_expert.yml would silently never match the config key the docs
    tell you to write.
  • MMOCore multiplies profession XP by boosters, so events carry fractional
    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.
  • Entries ship commented out — on a server without MMOCore they would
    otherwise render as GUI rows permanently stuck at 0. Uncomment to enable.
  • MythicLib is a second compile-only dependency: MMOCore's Profession
    implements 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 -c step until these two jars are uploaded to
the JustinasLa/tfmc-deps v1 release under exactly these names:

  • MMOCore-1.13.1.jar
  • MythicLib-dist-1.7.1.jar

Hashes in libs/SHA256SUMS match the jars installed on the live server.

Verification

mvn -B clean package locally: BUILD SUCCESS, 78 tests, 0 failures.
Reviewed by code-reviewer (APPROVE, 0 findings after a fix round) and
security-specialist (PASS, 0 critical/high).

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>
@JustinasLa

Copy link
Copy Markdown
Contributor Author

Superseded by #10 — same commit without the attribution trailer.

@JustinasLa JustinasLa closed this Sep 10, 2026
@JustinasLa
JustinasLa deleted the feat/profession-xp-activities branch September 10, 2026 22:27
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.

1 participant