Skip to content

feat(items): every item name comes from the item data (#815 step 5d-2) - #834

Open
ezequielzacca wants to merge 436 commits into
sven-n:mainfrom
ezequielzacca:feat/item-names-from-data
Open

ezequielzacca wants to merge 436 commits into
sven-n:mainfrom
ezequielzacca:feat/item-names-from-data

Conversation

@ezequielzacca

@ezequielzacca ezequielzacca commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

This step's own changes: compare with #833. The diff of this PR also holds every earlier step of #815, since a PR from a fork can only target this repository's branches.

Summary

Step 5d-2 of #815 (data-driven item tooltips; design). Stacked on #833 (→ #830 → … → #813): only the last commit, feat(items): every item name comes from the item data, is this step.

#833 moved the tooltip's item name into the items' nameLines. Three more copies of the same name chain remained in ZzzInventory.cpp, and now each of them reads the name lines too:

  • GetItemName(), used by the mix and quest windows, the server's messages and the control socket. It now calls GetItemNameText(type, level, item), which gives the text of the first name line that holds; without one, it gives the item's name with " +level" above +0. When only the type and level are known, a line's condition on the item's durability or options reads 0, so a Horn of Fenrir is plain "Horn of Fenrir".
  • The repair window writes the tooltip's name in the tooltip's color.
  • The ground labels write the same text. They keep their own colors and fonts, and still add the set name and the "+Skill/+Luck/+Option" suffixes themselves.

Removed: the Korean event prize table (ChaosEventName), the Transformation Ring's monster table (SommonTable), and 12 .resx texts only these chains printed. Texts that a dynamic lookup can still reach stay:

  • 101–117, through the map-name fallback Lookup(30 + iMap);
  • 809–929, through the server message ranges Lookup(710/725 + …);
  • 1413/1414, which the mix recipes name.

Names that change

Only levels that exist on the server are listed (its item definitions' maximum levels). At other levels the old chains also differed, but no such item exists.

  • Bundled jewels: the tooltip says "Bundle of Jewel of Bless +2", as the windows and messages already did; it said "Jewel of Bless +2". The "+2" is the client's count of tens: a level-1 bundle holds 20 jewels.
  • Symbol of Kundun: "Symbol of Kundun +3" everywhere. Only the tooltip changes; it said "Kundun mark +3 level".
  • Lost Map +0: "Lost Map" everywhere. Only the tooltip changes; it said "Lost Map +0".
  • Spirit, Life Stone, Weapon of Archangel, Moonstone Pendant and Box of Luck +4: windows and messages now use the tooltip's name. Examples: "Spirit of Dark horse" instead of "Dark horse Spirit"; "Scroll of Guardian" instead of "Order (Guardian/Life Stone)"; "Moonstone Pendant" without its level.
  • Heart +2: "Chaos Event Gift Certificate" everywhere. Its tooltip showed a garbled Korean prize name by durability, while its ground label already used this text. No server item uses the Heart.
  • The repair window shows an ancient item's set name, and the tooltip's color for the name (ancient, socket, the item's own color).

Every other tooltip is unchanged for both heroes, in the test and in the game's tooltip-snapshot. A local comparison of the old GetItemName() and GetItemNameText(), for every item at levels 0 to 15, gave the differences above.

Screenshots

Before (#833) and after this PR.

Bundle of Jewel of Bless (level 1, 20 jewels)

The tooltip named the bundle after the jewel; it now uses the bundle's own name, as the windows and messages do.

Legacy theme Modern theme
Before
After
The item's name lines (English only)
{
  "number": 30,
  "name": "Bundle of Jewel of Bless",
  "nameLines": [
    {
      "text": "{name} +{levelPlusOne}",
      "color": "yellow"
    }
  ]
}

Lost Map +0

The tooltip said "Lost Map +0"; it now names it as the windows did.

Legacy theme Modern theme
Before
After
The item's name lines (English only)
{
  "number": 28,
  "name": "Lost Map",
  "nameLines": [
    {
      "text": "{name}",
      "color": "yellow",
      "levels": [0, 0]
    },
    {
      "text": "{name} +{level}",
      "color": "yellow"
    }
  ]
}

Symbol of Kundun +3

The tooltip said "Kundun mark +3 level"; it now uses the name the windows and the ground labels used.

Legacy theme Modern theme
Before
After
The item's name lines (English only)
{
  "number": 29,
  "name": "Symbol of Kundun",
  "nameLines": [
    {
      "text": "{name}",
      "levels": [0, 0]
    },
    {
      "text": "{name} +{level}"
    }
  ]
}

The repair window has no screenshot: none of the test characters' repairable items changes its name.

Related issues

Step 5d-2 of #815. Builds on #833, #830, #829, #828, #827, #825, #824, #823, #822, #821, #820, #819, #818, #817, #816 and #813.

Checklist

  • I have read and followed docs/CODING_RULES.md.
  • I have built the project locally (see docs/build/README.md).
    • Windows x64 Release: all 1014 tests pass.
    • New test: "The item names of windows and ground labels come from the name lines".
    • Changed lines pass clang-format 21.1.8 as CI checks them.
    • In game: tooltip-snapshot of two heroes before and after, and the screenshots above, in both themes for the tooltips.
  • Changes are focused on one concern; the diff is as small as it reasonably can be.

…em-tooltip-chain-values

# Conflicts:
#	docs/item-data.md
#	src/source/Data/GameData/ItemData/ItemDataValidation.cpp
#	src/source/Data/GameData/ItemData/ItemDescriptionPlaceholders.h
#	src/source/Data/GameData/ItemData/ItemJsonFormat.cpp
#	src/source/Engine/Object/ZzzInventory.cpp
…tem-tooltip-third-chain

# Conflicts:
#	docs/item-data.md
…em-tooltip-names

# Conflicts:
#	docs/item-data.md
#	src/source/Data/GameData/ItemData/ItemDataValidation.cpp
#	src/source/Data/GameData/ItemData/ItemDescriptionPlaceholders.h
#	src/source/Data/GameData/ItemData/ItemJsonFormat.cpp
…es-from-data

# Conflicts:
#	docs/item-data.md
…ip-values-to-data

# Conflicts:
#	tests/data/test_item_description_placeholders.cpp
… names its tier's tables

The unused-table warning moves out of the placeholder check into
ValidateTableUses, run where that check is (Load, Save Items, bmd import).
It also warns about a wing whose description names other tables than most of
the other wings of its tier, cape tag and group: the tooltip code chose the
wings' damage and absorption lines by the tier, so a new wing without them, or
a re-tiered wing that keeps its old tier's tables, is pointed out.
…t are the game's

"Zwiększa prędkość" as the game's "Increase speed" text has it, and the
Imp's Portuguese text without its broken "de % of".
…ooltip-values

# Conflicts:
#	src/source/Data/GameData/ItemData/ItemDescriptionPlaceholders.h
#	tests/data/test_item_description_placeholders.cpp
…oltip-layouts

# Conflicts:
#	src/source/Data/GameData/ItemData/ItemDataValidation.h
…ooltip-durability

# Conflicts:
#	src/source/Data/DataHandler/ItemData/ItemDataHandler.cpp
#	src/source/Data/GameData/ItemData/ItemDataValidation.h
#	tests/data/test_item_database_files.cpp
…m-tooltip-shared-texts

# Conflicts:
#	src/bin/Data/Items/Group12_Wing.json
#	src/source/Data/DataHandler/ItemData/ItemDataHandler.cpp
#	src/source/Data/GameData/ItemData/ItemDataValidation.cpp
#	src/source/Data/GameData/ItemData/ItemDataValidation.h
#	tests/data/test_item_database_files.cpp
#	tests/data/test_item_description_placeholders.cpp

@sven-n sven-n left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed the migration of GetItemName and other name consumers to data-backed name lines. No independently actionable defect identified in the inspected code. A particularly important compatibility check is that item names used by quests, mixes, server messages and ground labels remain correct at every item level, not just in the tooltip; please retain those cross-consumer tests. Build not run.

Reviewed with AGENTS.md and docs/CODING_RULES.md as the quality baseline.

…em-tooltip-translations

# Conflicts:
#	src/bin/Data/Items/Group13_Helper.json
…em-tooltip-chain-values

# Conflicts:
#	tests/data/test_item_description_placeholders.cpp
…m-tooltip-shared-texts

# Conflicts:
#	src/bin/Data/Items/Group13_Helper.json
…tat words aren't the game's texts

The "i" of "%% increase" leaked into seven translations of "Damage +20% increase effect" ("iefecto", "infeito",
"inувеличение", ...). The level lines' test no longer compares the Fruits' stat words with the game's texts, which
keep the words this step corrects.
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.

3 participants