Seed default potion hotkeys for new characters#805
Conversation
A newly created character received an all-zero KeyConfiguration. The game client maps the four potion quick-slots (Q/W/E/R) from that blob, and a zero value binds the apple (potion group offset 0, which the client treats as a healing item) to every slot, so all four act as a health potion. Seed a sensible default instead: Q -> healing potion, W -> mana potion, E and R unbound.
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 addresses an issue where newly created characters were incorrectly defaulting all potion quick-slots to health potions due to an uninitialized key configuration blob. By introducing a sensible default configuration during character creation, the game now correctly maps healing and mana potions to their respective keys, improving the initial player experience. Highlights
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 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 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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a default key configuration for newly created characters in CreateCharacterAction.cs. Instead of initializing character.KeyConfiguration with an empty 30-byte array, it now calls CreateDefaultKeyConfiguration(), which sets up default bindings for potion quick-slots (Q and W) and leaves others unbound (E and R) to prevent the client from defaulting all slots to health potions. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Seed default potion hotkeys for new characters
Problem
A freshly created character has all four potion quick-slots (Q, W, E, R) behaving as health potions. Every slot consumes/displays the HP potion; the mana slot never works as a mana slot.
Root cause
CreateCharacterActioninitializes a new character with an all-zero key configuration:KeyConfigurationis an opaque blob that is interpreted by the game client (the server stores and echoes it verbatim viaApplyKeyConfigurationPlugIn). Within that blob the client reads the four potion quick-slots as offsets into the potion item group:21→ Q, byte22→ W, byte23→ E, byte25→ RA value of
0resolves to potion-group offset0, which is the apple. The client treats the apple as a healing item (it falls in theapple … large healing potionrange), so with an all-zero configuration all four slots bind to a health potion. The intended default (Q = healing potion, W = mana potion) is never set.Fix
Seed a sensible default key configuration on character creation instead of an all-zero array:
1)4)0xFF)This is a data-only change — no packet, serialization, or client change. The client already renders a slot only when a matching item is present in the inventory, so the slots still appear empty until the player actually picks up a potion; they simply now light up under the correct key (HP under Q, mana under W) instead of HP under all four.
Scope
Testing
dotnet publish -c Release -p:ci=true), no new analyzer warnings on the changed file.Notes
KeyQWE[0..2]andKeyR, each as an offset from the potion item group); they are documented in the method's<remarks>.