Opened 9 months ago

Last modified 8 months ago

#16497 new defect

SHERLOCK: ROSETATTOO: (Chinese) inventory action menu missing due to localized target mismatch

Reported by: yhdgwolf Owned by:
Priority: high Component: Engine: Sherlock
Version: Keywords:
Cc: Game: Sherlock Holmes: Case of the Rose Tattoo

Description

Environment
ScummVM version: 2.9.1
Language of game: Chinese (Simplified)
Version of game: CD
OS: Windows

Description
In the Chinese resources, item target strings are localized to Chinese (matching the item display names). The engine matches actions by comparing item internal (English) names to target, so the localized target no longer matches. As a result, item action menus do not display correctly and the game cannot be progressed. Other localized versions may be affected if they also localize target.

Steps to reproduce

Run The Case of the Rose Tattoo (Chinese, CD) in ScummVM 2.9.1 on Windows.
In a scene with inventory interaction, right-click/use an item.
Observe the missing or incorrect action entries (e.g., Show/出示), blocking progress.
Expected result
The action menu should show the correct verbs for the item, allowing normal progression.

Actual result
The action menu is missing expected actions; progression can be blocked.

Suspected cause
In engines/sherlock/tattoo/widget_inventory.cpp, actions are matched using the item’s internal English name against target. Chinese resources localize target to Chinese item names, so the match fails.

Suggested fix
Allow matching by both internal name and localized name (or use an inventory mapping table) to avoid failures with localized resources.

Attachments (2)

rosetattoo-cn.001​ (23.6 KB ) - added by dreammaster 8 months ago.
rosetattoo.004​ (23.6 KB ) - added by dreammaster 8 months ago.

Download all attachments as: .zip

Change History (6)

comment:1 by tag2015, 9 months ago

Priority: blocker → high
Summary: Sherlock: Rose Tattoo (Chinese) inventory action menu missing due to localized target mismatch → SHERLOCK: ROSETATTOO: (Chinese) inventory action menu missing due to localized target mismatch

comment:2 by dreammaster, 8 months ago

One of the GSOC hopefuls made a PR for this at: ​https://github.com/scummvm/scummvm/pull/7268

Unfortunately, it didn't fix the problem. This is my notes from the PR. I'm also attaching a savegame from outside the club where Watson already has the signet ring. In the English version, you can right-click the ring in the inventory, and you should get a "Show" action in addition to Look (in Chinese).

I tested your code, and whilst it was an interesting attempt, it didn't work at all. FWIW: widget_inventory.cpp:279 is where the main verb list is built up for objects. I checked, and in the Chinese version, these are the values:
obj._use[useNum]._target = "»áÔ±½äÖ¸"
inv[_owner->_invSelect]._description = "@$[�tQ]„vX$@"

So the compareToIgnoreCase fails. Unfortunately, it seems the Chinese version will require more extensive work to set up mappings for Chinese to English so that these actions work. As such, I'm closing this PR.

by dreammaster, 8 months ago

Attachment: rosetattoo-cn.001​ added

comment:3 by dreammaster, 8 months ago

This for idx == 39 and useNum == 0, so you can easily set a breakpoint to see the comparison in question.

by dreammaster, 8 months ago

Attachment: rosetattoo.004​ added

comment:4 by dreammaster, 8 months ago

In 755635a4:

SHERLOCK: TATTOO: Mark Chinese version as unstable

This is related to bug #16497, which will require fixing the
mapping of Chinese to English object names so that item
context menus correctly showing custom extra options.

Note: See TracTickets for help on using tickets.