feat: add bonus experience game mechanic#1026
Merged
Merged
Conversation
Contributor
Author
Greg and I discussed via Discord that this interface wasn't introduced until the end of 2011, Client scripts were not available yet. We will need to update the cache to implement bonus xp orb and this interface in the future. |
GregHib
approved these changes
Jun 12, 2026
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.

Description
Implements Bonus XP Weekend: while active (
events.bonusExperience.enabled), players earnboosted experience starting at 2.7x, decaying every 30 minutes spent online down to 1.1x.
Progress shows in the XP counter orb hover tooltip (multiplier, time elapsed, bonus xp earned).
Changes
Engine
Experience.multiplier— per-player multiplier applied on top ofworld.experienceRate;not persisted, resets to 1.0 each login. Reusable by other xp-boosting content (auras, pendants).
BonusExperience.kttable matches the client's own table in clientscript 338 exactly (verified by disassembling the
cache), including the inclusive ≤30 minute first interval
experiencehook accrues the bonus portion into the bonus xp counter (varp 1878, x10 units,persisted) and reruns the orb refresh script (776)
Data & config
gameframe.varbits.toml/gameframe.varps.tomlrefresh_bonus_experience(776) mapping inclient.scripts.tomlevents.bonusExperience.enabledgame property, defaultfalseTests
BonusExperienceWorldTest— activation on login, 2.7x grant + bonus tracking, decay after31 minutes online, progress reset when disabled
BonusExperienceTest— multiplier decay table boundariesExperienceTableTest— engine multiplier applied with/without rateKnown limitation
The 634 client has no bonus-xp orb art (sprite 5568 absent), so the only display is the XP orb
hover tooltip. The tooltip box wraps the trailing "xp" of "Multiplier: 2.7xp" onto a second line —
client-side layout in clientscripts 776/569; fixing it needs a cache edit.