fix(ui): preserve retail item titles and spacing

Carry PublicWeenieDesc material type into the live object model so examination titles use the DAT-authored material prefix. Preserve retail AddItemInfo empty appends and embedded armor separator, restoring the deliberate blank rows between appraisal sections.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-24 05:21:01 +02:00
parent d78d09cfbc
commit 6718ee45a0
19 changed files with 341 additions and 46 deletions

View file

@ -181,6 +181,23 @@ SetAppraiseInfo(guid, profile):
show examination window
```
`ACCWeenieObject::GetObjectName @ 0x0058E6E0` does more than pluralize:
```text
baseName = singular or plural name selected for the live stack size
if PublicWeenieDesc.MaterialType > 0:
material = AppraisalSystem.InqMaterialName(MaterialType)
remove material from baseName when it is already authored there
trim the remaining baseName
baseName = material + " " + remaining baseName
return baseName
```
The title therefore uses the live CreateObject material field. For example,
an authored `Steel Toed Boots` object whose material is `Reed Shark Hide`
is titled `Reed Shark Hide Steel Toed Boots`; appraisal property 131 is for
description decoration and is not a substitute for this live name field.
Only the first response to an explicit request forces the window visible.
Background refreshes update the current object without reopening a closed
window.
@ -348,6 +365,9 @@ AddItemInfo(text, fontColorIndex, sameParagraph):
append sameParagraph ? "\n" : "\n\n"
append text with font-list index 0 and the requested color-list index
# Empty text is meaningful. The separator is still appended, so
# AddItemInfo("", ..., true) preserves an intentional blank row.
ShowValueAndBurden(profile):
if profile contains int 19:
append "Value: <grouped value>"
@ -537,6 +557,7 @@ ShowTinkering:
"Workmanship: <adjective of rounded average> (<average, two decimals>)"
blank line
"Salvaged from %d items."
append an empty same-paragraph entry unconditionally
ShowSet:
EquipmentSetId (265) selects the literal EoR set-name table.
@ -550,6 +571,9 @@ ShowRatings:
render as "Ratings: Dam 3, Crit 2" (there is no plus sign)
positive Vitality (379) is a separate
"This item adds %d Vitality."
if any rating or Vitality was emitted:
append an empty same-paragraph entry
SetAppraiseInfo appends one more empty entry when Set or Ratings emitted
ShowWeaponAndArmorData:
only interpret WeaponProfile inside weapon/shield valid-location bits
@ -559,6 +583,16 @@ ShowWeaponAndArmorData:
Upper Legs, Lower Legs, Feet"
selecting the names from ClothingPriority bits in that exact order
ShowArmorModsData:
the first "Armor Level" string itself begins with "\n"
AddItemInfo also contributes its ordinary separator, leaving one blank
row between clothing coverage and Armor Level
ShowSpecialProperties:
begin with an empty same-paragraph entry
carry-limit text has another empty entry before it
shared cooldown metadata and cleave have their retail trailing empty entry
ShowShortMagic:
list only ordinary spell ids (high bit clear)
a failed appraisal prints "Spells: unknown."
@ -583,6 +617,7 @@ ShowItemLevel:
nextThreshold = ItemLevelToTotalXP(min(currentLevel + 1, maxLevel), ...)
"Item Level: <displayedLevel> / <maxLevel>"
"Item XP: <grouped total> / <grouped nextThreshold>"
append an empty same-paragraph entry after Item XP
ItemLevelToTotalXP(level, base, max, style):
clamp level to [0, max]