Repository navigation
feat(party): make party experience bonus configurable - #1610
eduardosmaniotto wants to merge 3 commits into
Conversation
Replace the hard-coded party bonus with the Party Experience Multiplier and Set Party Experience Bonus attributes, add defaults and update plugins, and document and test the new behavior.
Not up to standards ⛔🔴 Issues
|
| Category | Results |
|---|---|
| CodeStyle | 1 minor |
🟢 Metrics 50 complexity
Metric Results Complexity 50
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
sven-n
left a comment
There was a problem hiding this comment.
Thanks, making the party experience bonus configurable is useful. But the PR also changes the default for every server, including existing ones through the update plugins:
| Members | current (1.05^(n−1)) |
new default (1 + n × 0.01) |
|---|---|---|
| 2 | +5% | +2% |
| 3 | +10.25% | +3% |
| 5 | +21.6% | +5% |
These values come from the Season 8 EXP formula (see the links in #755), and as asked there, Webzen changed the party experience after Season 6. The Season 6 and older data shouldn't silently get a Season 8 balance, and an update plugin shouldn't nerf the party experience of running servers.
Please keep the current behaviour as the default for the existing data initializations (0.75, 0.95d, Season 6), and make the Season 8 style values an option an operator can configure. If the linear formula can't express 1.05^(n−1), the calculation needs a mode (or a factor per member which is multiplied) so the default reproduces today's numbers exactly. A test for the default numbers above would guard that.
The set-party detection (≥ 3 members of different class lines) and the "no negative bonus" guard look good.
Generated by Claude Code
|
Thanks for the review, good catch. I reworked it so the defaults keep today's behavior:
|
Summary
Implements #755
Makes the hard-coded party experience bonus (
Math.Pow(1.05, memberCount - 1)) configurable. The defaults keep the current behavior, so existing servers and the 0.75, 0.95d and Season 6 data are unchanged.Party Experience Multiplier: multiplied once per additional party member. Default1.05.Values below
1penalize larger parties. A value of0or less disables the bonus.Set Party Experience Bonus: flat bonus added for a set party. Default0(disabled). Zero or negative values are ignored, so a misconfiguration cannot turn the bonus into a penalty.A set party has at least three members who all belong to different character class lines (e.g. Dark Wizard, Dark Knight, Fairy Elf).
With the defaults, 2 to 5 members get 5%, 10.25%, 15.76% and 21.55%, exactly as before. The attribute values are floats, so they are rounded to seven decimals. Otherwise
1.05fwould give1.0499999…and differ slightly from the old literal.Changes
Stats.cs, andPartyExperienceBonusto calculate the multiplier.Party.csuses it instead of the hard-coded value.075,095dandSeason 6. The update only adds missing attributes and values, so operator customizations are preserved.game-configuration.md.NextGenerationClass. It is not cached across kills, because character classes can be edited at runtime.Testing
dotnet build src/MUnique.OpenMU.sln: resultdotnet test tests/MUnique.OpenMU.Tests --filter "FullyQualifiedName~PartyExperienceBonus": resultdotnet test tests/MUnique.OpenMU.Persistence.Initialization.Tests --filter "FullyQualifiedName~PartyExperienceBonusAttributes": result