Skip to content

feature/party xp bonus#758

Open
eduardosmaniotto wants to merge 3 commits intoMUnique:masterfrom
eduardosmaniotto:feature/party-xp
Open

feature/party xp bonus#758
eduardosmaniotto wants to merge 3 commits intoMUnique:masterfrom
eduardosmaniotto:feature/party-xp

Conversation

@eduardosmaniotto
Copy link
Copy Markdown
Contributor

@eduardosmaniotto eduardosmaniotto commented Apr 21, 2026

Implement #755

  1. Party Size Bonus - XP multiplier increases with party size (1% per member: 2 players = 1.02x, 3 players = 1.03x, etc.)
  2. Set Party Bonus - Additional 2% bonus when party has 3+ members, each with a different character class
  3. Created 4 new server configurations:
    /// <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.");

To disable random XP calculation and party bonus XP, update the new configs to 0.

@eduardosmaniotto eduardosmaniotto marked this pull request as ready for review April 21, 2026 17:28
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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

  • Party Size XP Bonus: Implemented a dynamic XP multiplier based on party size, granting a 1% bonus per party member.
  • Set Party Bonus: Added an additional 2% XP bonus for parties with 3 or more members, provided each member has a unique character class.
  • XP Calculation Refinement: Removed the random variance from XP calculations to ensure consistent experience rewards.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/GameLogic/Party.cs
Copy link
Copy Markdown
Member

@sven-n sven-n left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/GameLogic/Player.cs
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));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert. You could add new Stats to be able to configure that:

  • Stats.ExperienceRandomMinMultiplier: 0.8
  • Stats.ExperienceRandomMaxMultiplier: 1.2
    added to the GameConfiguration.GlobalBaseAttributeValues.

Comment thread src/GameLogic/Party.cs
{
foreach (var member in this._partyMembers)
var (levelSum, maxLevel) = this.CalculatePartyLevels(recipients);
var baseExp = killed.CalculateBaseExperience(maxLevel);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply a randomizer, as described for the Player class.

Comment thread src/GameLogic/Party.cs Outdated
.Count();

// General bonus: 2 players=1.02, 3 players=1.03, etc.
double bonus = 1.0 + (count * 0.01);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the CharacterClass.BaseAttributeValues.

Copy link
Copy Markdown
Contributor Author

@eduardosmaniotto eduardosmaniotto Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.");

@eduardosmaniotto eduardosmaniotto requested a review from sven-n April 27, 2026 23:59
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.

2 participants