Repository navigation
feat(items): the second item chain's cases with values come from the data - #829
Open
ezequielzacca wants to merge 304 commits into
Open
ezequielzacca wants to merge 304 commits into
ezequielzacca wants to merge 304 commits into
Conversation
This was referenced Oct 21, 2026
This was referenced Oct 21, 2026
…m-tooltip-shared-texts # Conflicts: # docs/item-data.md # src/source/Data/DataHandler/ItemData/ItemDataHandler.cpp # src/source/Data/GameData/ItemData/ItemDefinition.h # src/source/Engine/Object/ZzzInventory.cpp
…n texts As the review of sven-n#813 asked for description texts: an item's level values with their translations get the checks names get (the English text is required, a language code has only letters, digits and "-", and a language the game has no texts in is a warning). One helper checks a description line's and a level value's text.
…em-tooltip-translations
…em-tooltip-chain-values # Conflicts: # docs/item-data.md # src/source/Engine/Object/ZzzInventory.cpp
…at/item-tooltip-values-to-data
…/item-description-levels
…m-tooltip-chain-texts
…ooltip-durability
…m-tooltip-shared-texts
…em-tooltip-translations
…em-tooltip-chain-values
…at/item-tooltip-values-to-data # Conflicts: # docs/item-data.md
…/item-description-levels # Conflicts: # docs/item-data.md # src/source/Engine/Object/ZzzInventory.cpp
…m-tooltip-chain-texts
…ooltip-values # Conflicts: # src/source/Engine/Object/ZzzInventory.cpp # tests/data/test_item_descriptions.cpp
…em-tooltip-chain-values
…em-tooltip-translations
…em-tooltip-chain-values
Contributor
Author
|
Thanks. "The Command Fruit's class line and the Wizard's Ring's lines follow the hero and the level" adds both:
The level texts of the Fruits and other level items were already pinned by "The tooltip texts by item level come from the descriptions as from the old code". |
…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
…ooltip-durability
…m-tooltip-shared-texts # Conflicts: # src/bin/Data/Items/Group13_Helper.json
…em-tooltip-translations
…em-tooltip-chain-values
…ooltip-durability
…m-tooltip-shared-texts
…em-tooltip-translations
…em-tooltip-chain-values
…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.
…em-tooltip-chain-values
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This step's own changes: compare with #828. 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-1 of #815 (data-driven item tooltips; design). Stacked on #828 (→ #827 → … → #813): only the last three commits are this step.
#820 (5a) left 34 cases of the second item chain as code, because they need values, logic or texts the data couldn't express yet. With what 5b added, 30 of them become the items' descriptions, and so does the Weapon of Archangel's separate case.
The commits
feat(items): the second item chain's cases with values come from the data. The 30 cases, plus what they need.fix(items): the Command Fruits' class line follows the hero's class. One deliberate color change.feat(items): the Weapon of Archangel's tooltip comes from the data. Including its skill's mana.What moved
The new lines go at the start of each item's description, where the chain wrote them:
Texts that several items share are shared texts of
Tooltip.json(24 new).Stays code (4 cases), because the lines need the game:
New in the data
{addOptionValue1},{addOptionValue2}and{addOptionDuration}(a text, "1 Hour"). They're the item's add option from the game's ItemAddOption data, read as the code read it, for the potions', scrolls', seals' and charms' effects.skillMana:<skill>as a line's value, the mana a skill costs, by its number as"skill"writes it:{"text": {"en": "Cyclone Cutting skill (Mana:{mana})", …}, "values": {"mana": "skillMana:22"}, "color": "blue", "levels": [1, 1]}class:<class>conditions, true when the hero is of that class (written as inclassRequirements).colorsandboldon description lines, as layout lines have.Tooltips that changed, on purpose
RenderTipTextList(), and the modern theme too). Only blank lines came after it, so the visible tooltips are the same; the recorded lines lose the empty one. (Corrected after feat(items): the item chain after the options comes from the data #830.)The snapshot
"Every item's tooltip is as recorded" now records blank lines without color or style. A blank line shows none, and what its slot keeps of an earlier tooltip made unrelated tooltips' hashes change. It's re-recorded for the changes above.
Every other tooltip matches the old code for both heroes, in the test and in the game's
tooltip-snapshot. The comparison counts a line that now wraps as the same line when its pieces join back to the old one..resx
75 texts that only these cases printed are gone from every language, among them the numbered potion, scroll, elixir and charm texts (2500–2516, 2732–2742). The ones still reachable through a computed
Lookup()stay:Screenshots
Before (#828) and after this PR, for a level 400 Dark Knight. The other changed tooltips are listed above; the server has none of the cards, cherry branches, seals or scrolls, so they're not shown.
Weapon of Archangel +1
The reward sword's preview, by item level. The Cyclone Cutting mana (9) comes from the skill data through
"values": {"mana": "skillMana:22"}. The two long "acquisition rate" lines now wrap.The item's data (English only)
{ "number": 19, "name": "Absolute Weapon of Archangel", "tags": [ "valuable", "noDurabilityLine" ], "description": [ { "text": "@questItem" }, { "text": "Reward received when returned to the Archangel", "color": "darkRed" }, { "text": "" }, { "text": "Wizardry Damage: 107 ~ 110", "levels": [ 0, 0 ] }, { "text": "One-Handed Damage: 110 ~ 120", "levels": [ 1, 1 ] }, { "text": "Two-Handed Damage: 120 ~ 140", "levels": [ 2, 2 ] }, { "text": "Attack speed: 20", "levels": [ 0, 0 ] }, { "text": "Attack speed: 35", "levels": [ 1, 1 ] }, { "text": "Attack speed: 35", "levels": [ 2, 2 ] }, { "text": "Strength Requirement: 132", "levels": [ 0, 0 ] }, { "text": "Strength Requirement: 381", "levels": [ 1, 1 ] }, { "text": "Strength Requirement: 140", "levels": [ 2, 2 ] }, { "text": "Agility Requirement: 32", "levels": [ 0, 0 ] }, { "text": "Agility Requirement: 149", "levels": [ 1, 1 ] }, { "text": "Agility Requirement: 350", "levels": [ 2, 2 ] }, { "text": "" }, { "text": "Luck (success rate of Jewel of Soul +25%)", "color": "blue" }, { "text": "Luck (critical damage rate +5%)", "color": "blue" }, { "text": "Wizardry Dmg 53% rise", "color": "blue", "bold": true, "levels": [ 0, 0 ] }, { "text": "Increase Wizardry Dmg +level/20", "color": "blue", "levels": [ 0, 0 ] }, { "text": "Increase Wizardry Dmg +2%", "color": "blue", "levels": [ 0, 0 ] }, { "text": "Cyclone Cutting skill (Mana:{mana})", "values": { "mana": "skillMana:22" }, "color": "blue", "levels": [ 1, 1 ] }, { "text": "Increase Damage +level/20", "color": "blue", "levels": [ 1, 1 ] }, { "text": "Increase Damage +2%", "color": "blue", "levels": [ 1, 1 ] }, { "text": "Triple Shot skill (Mana:{mana})", "values": { "mana": "skillMana:24" }, "color": "blue", "levels": [ 2, 2 ] }, { "text": "Increase Damage +level/20", "color": "blue", "levels": [ 2, 2 ] }, { "text": "Increase Damage +2%", "color": "blue", "levels": [ 2, 2 ] }, { "text": "Excellent Damage rate +10%", "color": "blue" }, { "text": "Increase Attacking(Wizardry)speed +7", "color": "blue" }, { "text": "Increases acquisition rate of Life after hunting monsters +life/8", "color": "blue" }, { "text": "Increases acquisition rate of Mana after hunting monsters +Mana/8", "color": "blue" } ] }Its shared texts in
Tooltip.json(English):Scroll of Emperor
The quest item lines, from the shared texts
@questItem,@cannotStoreInVaultand@cannotBeTraded.The item's data (English only)
{ "number": 23, "name": "Scroll of the Emperor", "tags": [ "secondClassQuestItem" ], "description": [ { "text": "@questItem" }, { "text": "@cannotStoreInVault", "color": "red" }, { "text": "@cannotBeTraded", "color": "red" } ] }Its shared texts in
Tooltip.json(English):Suspicious Scrap of Paper ×3
{durability} / 5, and a long line that now wraps.The item's data (English only)
{ "number": 101, "name": "Suspicious Scrap of Paper", "description": [ { "text": "{durability} / 5" }, { "text": "It's a worn piece of paper containing incomprehensible text." } ] }Command Fruits +4
The one deliberate color change: for this Dark Knight, "Can be equipped by Dark Lord" is dark red now, as every class line is for a hero who can't use the item. A Dark Lord sees it white.
The item's data (English only, the class line only)
{ "number": 15, "name": "Fruits", "tags": [ "valuable" ], "description": [ { "text": "Can be equipped by Dark Lord", "color": "darkRed", "colors": [ { "when": [ "class:darkLord" ], "color": "white" } ], "levels": [ 4, 4 ] } ], "levelValues": { "stat": [ "ENG", "STA", "AGI", "STR", "Command" ] } }Related issues
Step 5c-1 of #815. Builds on #828, #827, #825, #824, #823, #822, #821, #820, #819, #818, #817, #816 and #813.
Checklist
docs/CODING_RULES.md.docs/build/README.md).skillManaand the Archangel's mana.tooltip-snapshotof two heroes before and after, and the screenshots above in both themes.