Skip to content

feat(items): the item chain after the options comes from the data - #830

Open
ezequielzacca wants to merge 342 commits into
sven-n:mainfrom
ezequielzacca:feat/item-tooltip-third-chain
Open

ezequielzacca wants to merge 342 commits into
sven-n:mainfrom
ezequielzacca:feat/item-tooltip-third-chain

Conversation

@ezequielzacca

@ezequielzacca ezequielzacca commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

This step's own changes: compare with #829. 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 5c-2 of #815 (data-driven item tooltips; design). Stacked on #829 (→ #828 → … → #813): only the last commit, feat(items): the item chain after the options comes from the data, is this step.

The third item chain writes after the item's options (excellent, luck, skill), at the end of the tooltip. Its cases become description lines drawn there:

{"text": "@unableToEquipWithADifferentTransformationRing", "color": "red", "after": "options"}

What moved

  • the horn materials' crafting hints (Splinter of Armor, Bless of Guardian, Claw of Beast, Fragment of Horn, Broken Horn);
  • the transformation rings' effects and "Unable to Equip with a Different Transformation Ring": Transformation, Elite Skeleton, Jack O'Lantern, Christmas, Panda, Skeleton, Game Master and Snowman;
  • the Firecracker, GM Gift, Christmas Star and Lucky Coin;
  • the Pet Skeleton's and the Invitation to Santa Village's lines.

Stays code: the Horn of Fenrir. Its lines come from the skill code, depend on which excellent option it has, and show the hero's level divided by 2, 12 and 25. The inventory charms' case stays too: it's behind LJH_ADD_SYSTEM_OF_EQUIPPING_ITEM_FROM_INVENTORY, which nothing defines, so it's never compiled.

New in the data

  • "after": "options" on a description line: drawn after the options instead of with the description.
  • {heroLevel}, for the Elite Skeleton Transformation Ring's "vitality +{heroLevel}".
  • The tag noBlankAfterOptions, which leaves out the blank line after the options. The Pet Skeleton and the Invitation to Santa Village have it, because their code wrote over that blank line.

Tooltips that changed, on purpose

  • The rings' warning wraps at the tooltip's width, as description lines do since feat(items): item descriptions in the item data #813 (14 items).
  • The Jack O'Lantern ring has one warning line. Its code wrote the warning, then an empty line, then the warning again. The tooltip stops drawing at an empty line (RenderTipTextList(), and the modern theme too), so players only ever saw the first one. The data has just that line.

Every other tooltip is unchanged for both heroes, in the test and in the game's tooltip-snapshot. A line that now wraps counts as the same line.

A correction to #825 and #829

There I called the dropped empty lines (lucky item tickets, cash shop cards, cherry blossom branches) "empty full-height lines". They were really where the tooltip stopped drawing. Only blank lines came after them, so nothing hidden shows up now, and the visible tooltips are the same; those PRs are corrected.

.resx

20 texts that only these cases printed are gone from every language. The attribute mastery texts (976–982) stay: the Game Master ring used them, and so do the set options, through Lookup(971 + …).

Screenshots

Before (#829) and after this PR, for a level 400 Dark Knight.

Panda Transformation Ring

Its effects and the transformation ring warning, drawn after the options. The warning now wraps.

Legacy theme Modern theme
Before
After
The item's lines drawn after its options (English only)
{
  "number": 76,
  "name": "Panda Ring",
  "tags": [
    "pandaOrSkeleton",
    "transformationRing",
    "valuable"
  ],
  "description": [
    {
      "text": "Transform into Panda.",
      "color": "blue",
      "after": "options"
    },
    {
      "text": "Zen increase 50%",
      "color": "blue",
      "after": "options"
    },
    {
      "text": "Damage/Wizardry/Curse +30",
      "color": "blue",
      "after": "options"
    },
    {
      "text": "",
      "after": "options"
    },
    {
      "text": "@unableToEquipWithADifferentTransformationRing",
      "color": "red",
      "after": "options"
    }
  ]
}

Shared texts (English):

"unableToEquipWithADifferentTransformationRing": "Unable to Equip with a Different Transformation Ring"

Jack O'Lantern Transformation Ring

One warning line, as players saw it. The old code wrote an empty line after it, where the tooltip stops drawing, and a second copy that never showed.

Legacy theme Modern theme
Before
After
The item's lines drawn after its options (English only)
{
  "number": 40,
  "name": "Jack Olantern Ring",
  "tags": [
    "transformationRing"
  ],
  "description": [
    {
      "text": "@unableToEquipWithADifferentTransformationRing",
      "color": "red",
      "after": "options"
    }
  ]
}

Shared texts (English):

"unableToEquipWithADifferentTransformationRing": "Unable to Equip with a Different Transformation Ring"

Elite Skeleton Transformation Ring

"vitality +{heroLevel}": 400 for this hero.

Legacy theme Modern theme
Before
After
The item's lines drawn after its options (English only)
{
  "number": 39,
  "name": "Eilte Transfer Skeleton Ring",
  "tags": [
    "transformationRing"
  ],
  "description": [
    {
      "text": "Increase defensive skill +10%",
      "color": "blue",
      "after": "options"
    },
    {
      "text": "vitality +{heroLevel}",
      "color": "blue",
      "after": "options"
    },
    {
      "text": "",
      "after": "options"
    },
    {
      "text": "@unableToEquipWithADifferentTransformationRing",
      "color": "red",
      "after": "options"
    }
  ]
}

Shared texts (English):

"unableToEquipWithADifferentTransformationRing": "Unable to Equip with a Different Transformation Ring"

Splinter of Armor

The crafting hint after the options.

Legacy theme Modern theme
Before
After
The item's lines drawn after its options (English only)
{
  "number": 32,
  "name": "Splinter of Armor",
  "tags": [
    "noDurabilityLine"
  ],
  "description": [
    {
      "text": "Fragment of horn can be made using the Divine protection of Goddess and fragment of armor.",
      "color": "yellow",
      "after": "options"
    }
  ]
}

Related issues

Step 5c-2 of #815. Builds on #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 1012 tests pass, also as one run of the whole data test executable.
    • New test: "An item's lines drawn after its options follow them" (the hero level, and noBlankAfterOptions).
    • 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.
  • Changes are focused on one concern; the diff is as small as it reasonably can be.

…list

The event item 14/12 is named at +2 after a prize, ChaosEventName[durability]; a durability past its 10 prizes read
past the list, and the tooltip had no name at other levels (the row an earlier tooltip left). The tooltip snapshot,
which draws every level with full durability, recorded what happened to be there, so macOS and Windows differed.
Past the list or at another level the tooltip names the item itself; GetItemName leaves the name empty there, so
its callers' fallback writes the name with " +level" as before (sven-n#840's helper filters check that).
The client reads the item set names of ItemSetOption_<lang>.bmd as UTF-8, but eight weren't: the English
"Chrono's" and "Semeden's" had their typographic apostrophe in the Korean code page (CP949 A1 AF), and four Spanish
and two Portuguese names had their accents in Windows-1252. Windows showed replacement characters ("Chrono??s",
"de An?nimo"), and macOS and Linux an empty name, which made the tooltip snapshot differ between platforms. The
names are UTF-8 now (Chrono's, Semeden's, anonimo/nevoa, Anonimo/Hiperion/Energumeno/Odin with their accents), the
files' checksums written again; nothing else in the files changed. The snapshot is recorded again for these items
(the ancient Red Wing pieces) and the event item 14/12.
…ooltip-durability

# Conflicts:
#	tests/data/item_tooltip_snapshot.txt
…em-tooltip-chain-values

# Conflicts:
#	src/source/Engine/Object/ItemTooltipSnapshot.h
#	src/source/Engine/Object/ZzzInventory.cpp
#	tests/data/item_tooltip_snapshot.txt
#	tests/data/test_item_tooltips.cpp
…or every language and the levels

Three Polish Fruits texts were from before main corrected them (17fc723): Dowodzenie, "Można użyć po zdjęciu
ekwipunku." and "Może być używany przez: Dark Lord". A test now compares the level lines whose texts other code still
prints with the game's texts in every language, another that a line is only written at its levels. The levels note
says the level variants' lines move into their items later.
…m-tooltip-chain-texts

# Conflicts:
#	tests/data/test_item_database_files.cpp
…ooltip-durability

# Conflicts:
#	docs/item-data.md
…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.
@Mosch0512 Mosch0512 self-assigned this Oct 24, 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.

3 participants