Skip to content

Conversation

@Mosch0512
Copy link

@Mosch0512 Mosch0512 commented Dec 28, 2025

Also fixes some tool tip calculation stat issues like defence for wings and armor and shield

…nsole`, and `InputBlocker` into separate classes
…rrides` and rename `GetItemName` to `get_item_name`.
…tion and update related usage in `CalcDefense` and item tooltip rendering cap of lord calculation is not working yet
…cellent/armor bonuses and ensure consistent tooltip display wings of elf are not right yet
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Mosch0512, 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 powerful, in-game editor built with ImGui, designed to streamline development and debugging by allowing real-time inspection and modification of game data. The editor provides a user-friendly interface with a toolbar, a comprehensive console for all game output, and a dedicated item editor for adjusting item attributes on the fly. A key architectural decision was to ensure the editor's presence only in debug builds through conditional compilation, maintaining a lean and performant release client. The integration also necessitated significant refactoring of item-related game logic to support dynamic updates and improve code maintainability.

Highlights

  • ImGui Integration: Integrated the ImGui library as a Git submodule and configured the Visual Studio project to include its source files and necessary build flags, enabling the use of an immediate mode GUI within the game.
  • In-Game Editor Module: Introduced a new MuEditor module with core components for editor management, a dual-panel console for logging, an item editor for real-time attribute modification, and input blocking mechanisms to prevent game input from interfering with the UI.
  • Conditional Compilation: All editor-related code is encapsulated within #ifdef _EDITOR directives, ensuring that the editor is only compiled into debug builds and has no impact on release builds.
  • Console Redirection and Logging: Implemented a system to redirect standard console output (e.g., wprintf, fwprintf, std::cout, std::cerr, g_ConsoleDebug->Write) to the in-game ImGui console, and also to a timestamped log file, suppressing the default Windows console window.
  • Item Attribute Calculation Refactoring: Refactored several item attribute calculation functions (e.g., stat requirements, defense) into modular helper functions (CalcStatRequirement, CalculateDefenseValue, etc.) to improve code organization and support real-time data updates from the editor.
  • Item Name Function Rename: The GetItemName function has been consistently renamed to get_item_name (lowercase) across multiple game files for naming convention consistency.
  • New README.md for Editor: Added a comprehensive README.md file detailing the MU Editor's features, architecture, integration points, and usage instructions.

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

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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.

@Mosch0512 Mosch0512 marked this pull request as ready for review December 28, 2025 09:43
Copy link
Contributor

@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 an in-game editor module, 'MU Editor', built with ImGui, primarily for debug builds. The editor includes a core system for initialization, updates, and rendering, a dual-panel console with logging to file and redirection of standard output/error streams, an item editor for real-time modification of item attributes (strength, dexterity, energy, vitality, charisma, damage, attack speed, defense, durability), and an input blocker to prevent game input from interfering with the editor UI. Project files (.gitignore, .vcxproj) were updated to include ImGui and editor-specific files, with conditional compilation (#ifdef _EDITOR) ensuring the editor is excluded from release builds. Several game logic files were refactored to use new helper functions for calculating item stat requirements (CalcStatRequirement), Dark Raven charisma requirements (CalcDarkRavenCharismaRequirement), and defense values (CalculateDefenseValue), and GetItemName was renamed to get_item_name. Input handling in Winmain.cpp and NewUICommon.cpp was adjusted to integrate ImGui's input processing and block game input when the editor is active or UI elements are hovered. Console output is now fully redirected to the ImGui console, and a new README.md file documents the editor's features and architecture.

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.

1 participant