Skip to content

fix(npc): wandering merchant Zyro proper model + allow interactions#310

Open
olisikh wants to merge 1 commit intosven-n:mainfrom
olisikh:fix/wandering_merchant
Open

fix(npc): wandering merchant Zyro proper model + allow interactions#310
olisikh wants to merge 1 commit intosven-n:mainfrom
olisikh:fix/wandering_merchant

Conversation

@olisikh
Copy link
Copy Markdown
Contributor

@olisikh olisikh commented Apr 1, 2026

Uses proper model for Wandering Merchant Zyro instead of falling back to a non-interactive Bull model.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

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 updates the NPC initialization logic to correctly map the Wandering Merchant Zyro to the intended merchant model, preventing the use of an incorrect fallback model.

Highlights

  • NPC Model Correction: Added the MONSTER_WANDERING_MERCHANT_ZYRO case to the monster creation logic to ensure the correct merchant model is used.

🧠 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
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 adds the MONSTER_WANDERING_MERCHANT_ZYRO monster type to the CreateMonster function, mapping it to the human merchant model and setting its display name. I have no feedback to provide.

@olisikh olisikh marked this pull request as draft April 2, 2026 00:01
@olisikh
Copy link
Copy Markdown
Contributor Author

olisikh commented Apr 2, 2026

The Merchant is showing, however he is not interactive, so something else is missing.

@jkok25
Copy link
Copy Markdown

jkok25 commented Apr 3, 2026

'Wandering Merchant Zyro' does not have the same appearance as 'Wandering Merchant Harold'.
'Wandering Merchant Zyro' has the same appearance as 'Moss the Merchant'.
Zrzut ekranu 2026-04-03 154548

@olisikh
Copy link
Copy Markdown
Contributor Author

olisikh commented Apr 3, 2026

Merchant Zyro is now shown with a proper model (same as Merchant Moss in Elbeland), he can be interacted with, but I'm not sure if interactions are as expected.

Well at least he's not showing as a bull anymore :D

Thanks @jkok25 for the hint!

@olisikh olisikh force-pushed the fix/wandering_merchant branch from 2e94317 to 2d3bde0 Compare April 3, 2026 22:35
@olisikh olisikh marked this pull request as ready for review April 3, 2026 22:35
Copy link
Copy Markdown
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 refactors the monster and NPC classification logic into a centralized DetermineMonsterObjectKind function and introduces the MONSTER_WANDERING_MERCHANT_ZYRO NPC. Review feedback highlights that the manual assignment of the NPC name is redundant and should be handled via data files for better localization. Additionally, it is recommended to move the modification of global model action speeds out of the character creation logic to prevent unintended side effects on other NPC instances.

case MONSTER_WANDERING_MERCHANT_ZYRO:
OpenNpc(MODEL_GAMBLE_NPC_MOSS);
c = CreateCharacter(Key, MODEL_GAMBLE_NPC_MOSS, PositionX, PositionY);
wcscpy(c->ID, L"떠돌이 상인");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The manual assignment of the NPC name using wcscpy is redundant. Setting_Monster is called at the end of CreateMonster (line 14811), which automatically populates c->ID from the MonsterScript data. Removing this hardcoded string ensures that the name is managed consistently through data files and supports localization.

Comment on lines +14291 to +14294
for (int i = 0; i < 6; i++)
{
Models[MODEL_GAMBLE_NPC_MOSS].Actions[i].PlaySpeed = 0.33f;
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Modifying the PlaySpeed of global model actions within CreateMonster is inefficient and creates side effects. Since Models is a global array, this change affects every instance using MODEL_GAMBLE_NPC_MOSS (including other NPC types like MONSTER_MOSS_THE_MERCHANT). This initialization should ideally be performed once when the model is loaded or during a central initialization phase, rather than every time an instance is created.

@olisikh olisikh changed the title fix(npc): map lorencia wandering merchant to correct client model fix(npc): wandering merchant Zyro proper model + allow interactions Apr 5, 2026
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