Art tooltips: "Verbessert durch" lists what improves each art

Arts are objects (game::Art) built from the game's definitions: name,
launch type, damage source, regeneration group and the skills' art lists.
The tooltip gets one line per effect of a skill or attribute, sorted by
size; unlearned class skills are greyed out at 0%. Weapon arts list only
the damage types the held weapon deals and the held weapon's skill.
Tooltip line wrap ignores colour codes; art tooltips wrap wider.
Blitzschlag's tooltip rewrite becomes a tooltip filter.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
khallaandClaude Opus 5.5 committed 2026-10-18 23:04:22 +02:00
1 parent 5d80a33e9b
commit c875d7d6b9
12 files changed
+933 -46

No files matched your search

+9 -8
View File
@@ -29,6 +29,7 @@
#include "game/engine/arts.h"
#include "game/engine/objects.h"
#include "game/engine/skills.h"
#include "game/ui/events.h"
#include "game/ui/text.h"
#include "mods/hud.h"
@@ -46,7 +47,7 @@ constexpr size_t kPlusButtons = 0x2cc;
constexpr size_t kMinusButtons = 0x8ac; // unused by the game
constexpr size_t kButtonSize = 0xbc;
constexpr int kRows = 8;
constexpr int kAttributeRows = 6;
constexpr int kAttributeRows = game::kAttributeCount;
// cUI_Button (vtable 0x895308).
constexpr size_t kControlFlags = 0x10;
@@ -85,13 +86,13 @@ constexpr float kIconSize = 16.0f;
// The − sits left of the value column (values end at the + at x 232).
constexpr int kMinusX = 184;
// cCreatureArts fields (see the top).
constexpr size_t kAttributes = 0x1c;
constexpr int kFreeAttributesIndex = 7;
constexpr size_t kSkillIds = 0x24;
constexpr size_t kSkillLevels = 0x2c;
constexpr size_t kSkillBonus = 0x34;
constexpr size_t kSkillChoices = 0x44;
// cCreatureArts fields (see the top, game/engine/skills.h).
using game::kFreeAttributesIndex;
constexpr size_t kAttributes = game::kArtsInvested;
constexpr size_t kSkillIds = game::kArtsSkillIds;
constexpr size_t kSkillLevels = game::kArtsSkillLevels;
constexpr size_t kSkillBonus = game::kArtsSkillBonus;
constexpr size_t kSkillChoices = game::kArtsSkillChoices;
using AddAttributeFn = void(__fastcall*)(void* arts, void*, int index, int delta);
using AddSkillLevelsFn = void(__fastcall*)(void* arts, void*, int row, int delta, int spendPoints);