Skip to content

Plugin that allows reset stats via chat command#780

Merged
sven-n merged 3 commits into
MUnique:masterfrom
nolt:stat-reset-plugin
May 22, 2026
Merged

Plugin that allows reset stats via chat command#780
sven-n merged 3 commits into
MUnique:masterfrom
nolt:stat-reset-plugin

Conversation

@nolt
Copy link
Copy Markdown
Contributor

@nolt nolt commented May 22, 2026

Stat Reset Plugin for OpenMU

A plugin that allows players to reset their character's stats back to base values and refund all invested points.

Features

  • Resets all increasable character attributes to their base values
  • Refunds all invested stat points as level-up points
  • Configurable requirements (level, money, item)
  • Chat command /resetstats (toggleable)
  • Optional teleport to home safezone after reset
  • Optional logout to character selection after reset
  • Disabled by default, requires explicit activation

Configuration

Setting Description Default
RequiredLevel Minimum character level 0
RequiredMoney Zen cost 1,000,000
RequiredResetItem Required item (optional) null
ChatCommandEnabled Allow /resetstats command true
MoveHome Teleport to safezone after reset true
LogOut Log out to character selection true

Files

  • GameLogic/Resets/StatResetFeaturePlugIn.cs - Feature plugin (implements IFeaturePlugIn)
  • GameLogic/Resets/StatResetConfiguration.cs - Configuration model
  • GameLogic/Resets/ResetStatsAction.cs - Core reset logic
  • GameLogic/Resets/ResetStatsChatCommandPlugIn.cs - /resetstats chat command handler
  • GameLogic/Properties/PlayerMessage.Designer.cs + .resx - Localized player messages
  • GameLogic/Properties/PlugInResources.Designer.cs + .resx - Localized plugin display names

@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 feature plugin for OpenMU that enables players to reset their character stats. It includes a comprehensive configuration model to define requirements such as level, cost, and items, and provides a chat command interface for players to execute the reset. The implementation also handles post-reset actions like teleporting to a safezone or logging out to the character selection screen.

Highlights

  • Feature Implementation: Added a new stat reset system that allows players to reset character attributes and refund invested points.
  • Configuration: Introduced a configurable system supporting requirements like level, Zen, and specific items.
  • Chat Command: Implemented the /resetstats command to trigger the reset process, with support for optional teleportation and logout.
New Features

🧠 You can now enable Memory (public preview) 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 the 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 counterproductive. 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 introduces a stat reset feature, allowing players to reset their character attributes to base values and reclaim invested points via a new /resetstats chat command. The implementation includes a configurable plugin system, localized messaging, and logic for handling costs (money or items) and post-reset actions like teleportation or logout. Feedback from the review highlights the need to use standard teleportation methods to maintain client synchronization, improve safety in attribute calculations, refactor duplicated cost-checking logic, and ensure the client UI correctly reflects updated level-up points. Additionally, a hardcoded display name in the configuration should be replaced with a localized resource key.

Comment thread src/GameLogic/Resets/ResetStatsAction.cs
Comment thread src/GameLogic/Resets/ResetStatsAction.cs Outdated
Comment thread src/GameLogic/Resets/ResetStatsAction.cs
Comment thread src/GameLogic/Resets/ResetStatsAction.cs
Comment thread src/GameLogic/Resets/StatResetConfiguration.cs Outdated
@sven-n sven-n merged commit d6689f0 into MUnique:master May 22, 2026
2 checks passed
@sven-n
Copy link
Copy Markdown
Member

sven-n commented May 22, 2026

Thanks :)

@nolt nolt deleted the stat-reset-plugin branch May 23, 2026 05:04
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