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

+23
View File
@@ -126,6 +126,29 @@ std::wstring GameText(uint32_t id) {
: std::wstring();
}
std::wstring GameTextByKey(const char* key) {
// The key's hash (0x80e010, cdecl), looked up "by key" as GetTextByKey does.
using HashFn = uint32_t(__cdecl*)(const char*);
const uint32_t hash = reinterpret_cast<HashFn>(0x0080e010)(key);
return hash ? GameText(hash | 0x80000000) : std::wstring();
}
std::wstring WideStringText(const void* string) {
const auto* s = static_cast<const GameString*>(string);
return s && s->begin && s->end > s->begin ? std::wstring(s->begin, s->end) : std::wstring();
}
void SetWideString(void* string, const std::wstring& value) {
auto* s = static_cast<GameString*>(string);
if (s->begin) {
s->end = s->begin;
*const_cast<wchar_t*>(s->begin) = L'\0';
}
// The game's wide string append (0x592ef0, thiscall (first, last, unused), ret 0xc).
using AppendFn = void*(__fastcall*)(void*, void*, const wchar_t*, const wchar_t*, uint32_t);
reinterpret_cast<AppendFn>(0x00592ef0)(string, nullptr, value.data(), value.data() + value.size(), 0);
}
const void* __fastcall TextManager_GetText(void* self, void* edx, uint32_t id) {
if (id >= kFirstOwnText && id < 0x80000000) {
std::lock_guard guard(g_lock);