v1.0.8.6: Fix crafting action tooltips - use CraftAction.Description instead of ActionTransient

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-08 00:47:35 -05:00
parent cb3d6b5e0b
commit 01426d3c30
4 changed files with 106 additions and 32 deletions
+3 -3
View File
@@ -9,9 +9,9 @@
<PropertyGroup> <PropertyGroup>
<AssemblyName>HSUI</AssemblyName> <AssemblyName>HSUI</AssemblyName>
<AssemblyVersion>1.0.8.5</AssemblyVersion> <AssemblyVersion>1.0.8.6</AssemblyVersion>
<FileVersion>1.0.8.5</FileVersion> <FileVersion>1.0.8.6</FileVersion>
<InformationalVersion>1.0.8.5</InformationalVersion> <InformationalVersion>1.0.8.6</InformationalVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
+1 -1
View File
@@ -2,7 +2,7 @@
"Author": "Knack117", "Author": "Knack117",
"Name": "HSUI", "Name": "HSUI",
"InternalName": "HSUI", "InternalName": "HSUI",
"AssemblyVersion": "1.0.8.5", "AssemblyVersion": "1.0.8.6",
"Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.", "Description": "HSUI provides a highly configurable HUD replacement for FFXIV, recreated from DelvUI using KamiToolKit, FFXIVClientStructs, and Dalamud. Features unit frames, castbars, job gauges, nameplates, party frames, status effects, enemy list, configurable hotbars with drag-and-drop, and profiles.",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"RepoUrl": "https://github.com/Knack117/HSUI", "RepoUrl": "https://github.com/Knack117/HSUI",
+81 -10
View File
@@ -1196,21 +1196,63 @@ namespace HSUI.Interface.GeneralElements
LuminaAction? actionRow = null; LuminaAction? actionRow = null;
var actionSheet = Plugin.DataManager.GetExcelSheet<LuminaAction>(); var actionSheet = Plugin.DataManager.GetExcelSheet<LuminaAction>();
var actionRowOpt = actionSheet?.GetRow(slot.ActionId); if (actionSheet != null)
if (actionRowOpt.HasValue)
{ {
actionRow = actionRowOpt.Value; if (actionSheet.TryGetRow(slot.ActionId, out var actionRowOpt))
{
actionRow = actionRowOpt;
} }
else if (slot.SlotType == RaptureHotbarModule.HotbarSlotType.CraftAction) else if (slot.SlotType == RaptureHotbarModule.HotbarSlotType.CraftAction)
{ {
// Crafting actions: hotbar may store CraftAction sheet row ID (1-based). Action sheet uses 100000+ range (100001 = Basic Synthesis). // Crafting actions: hotbar may store CraftAction sheet row ID (1-based). Action sheet uses 100000+ range (100001 = Basic Synthesis).
const uint CraftActionToActionOffset = 100000; const uint CraftActionToActionOffset = 100000;
uint mappedId = slot.ActionId + CraftActionToActionOffset; uint mappedId = slot.ActionId + CraftActionToActionOffset;
var mappedRow = actionSheet?.GetRow(mappedId); if (actionSheet.TryGetRow(mappedId, out var mappedRow))
if (mappedRow.HasValue)
{ {
actionIdForLookup = mappedId; actionIdForLookup = mappedId;
actionRow = mappedRow.Value; actionRow = mappedRow;
}
}
}
// CraftAction fallback: when Action sheet lookup failed, try CraftAction sheet directly (hotbar stores CraftAction row ID).
if (!actionRow.HasValue && slot.SlotType == RaptureHotbarModule.HotbarSlotType.CraftAction)
{
var craftSheet = Plugin.DataManager.GetExcelSheet<Lumina.Excel.Sheets.CraftAction>();
if (craftSheet != null && craftSheet.TryGetRow(slot.ActionId, out var craftRow))
{
try
{
var nameSe = craftRow.Name;
string name = nameSe.ToString();
if (string.IsNullOrWhiteSpace(name))
name = nameSe.ToDalamudString().ToString();
if (!string.IsNullOrWhiteSpace(name))
{
// CraftAction sheet has its own Description column with the full text
string desc = "";
try
{
var descSe = craftRow.Description;
var descRaw = descSe.ToDalamudString().ToString();
if (!string.IsNullOrEmpty(descRaw))
{
try
{
var evaluated = Plugin.SeStringEvaluator.Evaluate(descSe.AsSpan());
desc = evaluated.ExtractText();
if (string.IsNullOrEmpty(desc)) desc = descRaw;
}
catch { desc = descRaw; }
if (!string.IsNullOrEmpty(desc))
desc = EncryptedStringsHelper.GetString(desc);
}
}
catch { /* ignore */ }
return (name, desc);
}
}
catch { /* ignore */ }
} }
} }
@@ -1219,14 +1261,42 @@ namespace HSUI.Interface.GeneralElements
{ {
string name = row.Value.Name.ToString(); string name = row.Value.Name.ToString();
string desc = ""; string desc = "";
var descRow = Plugin.DataManager.GetExcelSheet<ActionTransient>()?.GetRow(actionIdForLookup);
string descRaw = ""; string descRaw = "";
if (descRow.HasValue) // For CraftAction, use CraftAction.Description; ActionTransient returns the name instead of the full description
if (slot.SlotType == RaptureHotbarModule.HotbarSlotType.CraftAction)
{
var craftSheet = Plugin.DataManager.GetExcelSheet<Lumina.Excel.Sheets.CraftAction>();
if (craftSheet != null && craftSheet.TryGetRow(actionIdForLookup, out var craftRow))
{ {
try try
{ {
var descSeStr = descRow.Value.Description; var descSe = craftRow.Description;
descRaw = descRow.Value.Description.ToDalamudString().ToString(); var craftDescRaw = descSe.ToDalamudString().ToString();
if (!string.IsNullOrEmpty(craftDescRaw))
{
try
{
var evaluated = Plugin.SeStringEvaluator.Evaluate(descSe.AsSpan());
desc = evaluated.ExtractText();
if (string.IsNullOrEmpty(desc)) desc = craftDescRaw;
}
catch { desc = craftDescRaw; }
if (!string.IsNullOrEmpty(desc))
desc = EncryptedStringsHelper.GetString(desc);
}
}
catch { /* ignore */ }
}
}
else
{
var descSheet = Plugin.DataManager.GetExcelSheet<ActionTransient>();
if (descSheet != null && descSheet.TryGetRow(actionIdForLookup, out var descRow))
{
try
{
var descSeStr = descRow.Description;
descRaw = descRow.Description.ToDalamudString().ToString();
try try
{ {
var evaluated = Plugin.SeStringEvaluator.Evaluate(descSeStr.AsSpan()); var evaluated = Plugin.SeStringEvaluator.Evaluate(descSeStr.AsSpan());
@@ -1242,6 +1312,7 @@ namespace HSUI.Interface.GeneralElements
} }
catch { /* ignore */ } catch { /* ignore */ }
} }
}
bool isCombatAction = IsCombatAction(slot.SlotType, row.Value); bool isCombatAction = IsCombatAction(slot.SlotType, row.Value);
int? potencyValue = isCombatAction ? TryGetPotencyValue(row.Value) : null; int? potencyValue = isCombatAction ? TryGetPotencyValue(row.Value) : null;
string potencyLine = potencyValue.HasValue ? $"Potency: {potencyValue.Value}" : ""; string potencyLine = potencyValue.HasValue ? $"Potency: {potencyValue.Value}" : "";
+3
View File
@@ -1,3 +1,6 @@
# 1.0.8.6
- **Hotbars**: Fixed crafting action tooltips showing the action name instead of the full description — use CraftAction.Description directly instead of ActionTransient, which returns the name for crafting actions.
# 1.0.8.5 # 1.0.8.5
- **Hotbars**: Fixed other HSUI elements disappearing when hovering over hotbar icons — overlay is now a child of the main HUD window instead of a separate window. - **Hotbars**: Fixed other HSUI elements disappearing when hovering over hotbar icons — overlay is now a child of the main HUD window instead of a separate window.