feature/party xp bonus#758
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a new experience bonus system for parties to encourage group play and diversity in character classes. It updates the party logic to calculate experience based on party size and composition, while simultaneously removing the previous random factor in XP distribution to provide more predictable rewards. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request implements a dynamic experience bonus system for parties, rewarding larger groups and diverse character class compositions. It refactors the experience distribution logic in Party.cs and Player.cs, notably removing the random variation from solo experience gains. A critical issue was identified in the new party experience calculation, which currently omits the multiplier for the number of recipients, resulting in party members receiving significantly less experience than intended.
sven-n
left a comment
There was a problem hiding this comment.
I'd like to keep the original season 6 behavior, and that was with random exp. I'm also not sure if the exp bonuses for a full party of mixed classes was just 2%, I remember it was even higher.
It would be great if you could add some Stats, so that every admin can configure the desired behavior.
| experience *= gameRate; | ||
| experience *= this.Attributes[expRateAttribute] + this.Attributes[Stats.BonusExperienceRate]; | ||
| experience *= this.CurrentMap?.Definition.ExpMultiplier ?? 1; | ||
| experience = Rand.NextInt((int)(experience * 0.8), (int)(experience * 1.2)); |
There was a problem hiding this comment.
Please revert. You could add new Stats to be able to configure that:
- Stats.ExperienceRandomMinMultiplier: 0.8
- Stats.ExperienceRandomMaxMultiplier: 1.2
added to theGameConfiguration.GlobalBaseAttributeValues.
| { | ||
| foreach (var member in this._partyMembers) | ||
| var (levelSum, maxLevel) = this.CalculatePartyLevels(recipients); | ||
| var baseExp = killed.CalculateBaseExperience(maxLevel); |
There was a problem hiding this comment.
Please apply a randomizer, as described for the Player class.
| .Count(); | ||
|
|
||
| // General bonus: 2 players=1.02, 3 players=1.03, etc. | ||
| double bonus = 1.0 + (count * 0.01); |
There was a problem hiding this comment.
I think hardcoding the 0.01 and 0.02 is not optimal.
You could add new Stats to be able to configure that:
- Stats.ExperienceRatePerPartyMemberBonus for
0.01 - Stats.ExperienceRateBonusForDiverseParty for
0.02
added to theCharacterClass.BaseAttributeValues.
There was a problem hiding this comment.
I've created 4 new configurations.
I'm also not sure if the exp bonuses for a full party of mixed classes was just 2%, I remember it was even higher.
The 2% is additive to the party bonus. In a full party example, it would be 5% + 2%. This is according to the GMO values: https://muonline.webzen.com/en/gameinfo/guide/detail/45
/// <summary>
/// Gets the experience random min multiplier attribute definition.
/// </summary>
public static AttributeDefinition ExperienceRandomMinMultiplier { get; } = new(new Guid("536BF8B0-D24B-4314-95B7-5D651F5892DF"), "Experience Random Min Multiplier", "Defines the minimum multiplier for the randomized experience gain.");
/// <summary>
/// Gets the experience random max multiplier attribute definition.
/// </summary>
public static AttributeDefinition ExperienceRandomMaxMultiplier { get; } = new(new Guid("74CE26C6-6D59-4420-AF3F-457E138AE41C"), "Experience Random Max Multiplier", "Defines the maximum multiplier for the randomized experience gain.");
/// <summary>
/// Gets the experience rate per party member bonus attribute definition.
/// </summary>
public static AttributeDefinition ExperienceRatePerPartyMemberBonus { get; } = new(new Guid("851DE4C6-0F57-44BB-9A43-2FEE3751FCDE"), "Experience Rate Per Party Member Bonus", "Defines the bonus experience rate per party member. Default is 0.01.");
/// <summary>
/// Gets the experience rate bonus for set party attribute definition.
/// </summary>
public static AttributeDefinition ExperienceRateBonusForSetParty { get; } = new(new Guid("8FF5C2C7-51DE-4E0A-89D9-36CFDBB11775"), "Experience Rate Bonus For Set Party", "Defines the additional bonus experience rate for a set party (3+ different classes). Default is 0.02.");
Implement #755
To disable random XP calculation and party bonus XP, update the new configs to 0.