feat(chat): Campaign CH slice CH1 — retail LogTextType color table
Retail colors chat lines by the 34-value wire LogTextType (ACE's ChatMessageType), NOT by acdream's synthetic 9-value ChatKind. The old ChatWindowController.RetailChatColor(ChatKind) collapsed distinct retail colors onto one bucket per ChatKind — e.g. every Channel line rendered colorLightBlue (Magic's slot) when retail's actual palette spans five different colors across the Turbine rooms and legacy allegiance family. Ports ChatInterface::BuildChatColorLookupTable @0x004F31C0 verbatim (RetailChatColorTable, all 34 RGBA floats read from the PDB-paired binary's .data section) and threads a new ChatEntry.LogTextType field through every ingestion site to the correct retail wire value: HearSpeech/Tell pass the wire chatType through verbatim; Emote/SoulEmote hard-code 0x0C; the Tell self-echo hard-codes 0x04; legacy ChatChannel broadcasts derive their type from the channel bit via the new LegacyChannelChatType helper (ported from the decompiled Handle_Communication__ChannelBroadcast dispatch, hear vs. own-send); TurbineChat rooms map through TurbineChatDisplayNames.LogTextType; CombatChatTranslator's hit/miss/evade lines map to ACE's CombatSelf/ CombatEnemy per Player_Combat.cs; kill/death lines use retail's decompiled 0x00 Default (not a combat color). ChatWindowController's transcript now folds LogTextType through RetailChatColorTable with retail's exact "out-of-range keeps the previous line's color" carry rule; ChatPanel's combat highlighting sources the same table. Corrects HearSpeech.cs's doc-comment ChatType legend (4 of 6 entries were wrong). Adds register row AP-175 for the pre-existing (unchanged) Popup-renders-in-chat divergence and updates AP-39's stale per-ChatKind description. Narrows ISSUES #139 — its chat-colors half is done. Retail renders no chat timestamp prefix path exists in acdream today, so the "timestamp is always colorGrey 0x0C" rule has nothing to attach to; noted here per the research doc rather than left silent. Research: docs/research/2026-08-09-chat-retail-color-table.md Full Release suite: 11,833 passed / 4 skipped / 0 failed. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
8df35d1e18
commit
172c6f9aa3
26 changed files with 1360 additions and 85 deletions
|
|
@ -261,7 +261,12 @@ public sealed class LiveSessionEventRouter : ILiveSessionEventRouting
|
|||
speech.SenderName,
|
||||
speech.Text,
|
||||
speech.SenderGuid,
|
||||
speech.IsRanged));
|
||||
speech.IsRanged,
|
||||
// speech.ChatType is passed through VERBATIM — retail's
|
||||
// Handle_Communication__HearSpeech @0x005712A0 feeds the
|
||||
// raw wire word straight into AddTextToScroll with zero
|
||||
// remapping (research doc §3.3 / HearSpeech.cs doc).
|
||||
speech.ChatType));
|
||||
Subscribe<ServerMessage.Parsed>(
|
||||
h => session.ServerMessageReceived += h,
|
||||
h => session.ServerMessageReceived -= h,
|
||||
|
|
@ -481,11 +486,16 @@ public sealed class LiveSessionEventRouter : ILiveSessionEventRouting
|
|||
if (parsed.Body is not TurbineChat.Payload.EventSendToRoom message)
|
||||
return;
|
||||
|
||||
// message.RoomId is an opaque per-session Turbine room GUID, not a
|
||||
// legacy channel bitflag — ChatLog.OnChannelBroadcast's default
|
||||
// (legacy-bit) LogTextType derivation would misclassify it, so the
|
||||
// room's own ChatType maps to LogTextType explicitly here instead.
|
||||
chat.OnChannelBroadcast(
|
||||
message.RoomId,
|
||||
message.SenderName,
|
||||
message.Message,
|
||||
TurbineChatDisplayNames.Resolve(message.RoomId, message.ChatType));
|
||||
logTextType: TurbineChatDisplayNames.LogTextType(message.ChatType),
|
||||
channelName: TurbineChatDisplayNames.Resolve(message.RoomId, message.ChatType));
|
||||
}
|
||||
|
||||
private static void Validate(
|
||||
|
|
|
|||
|
|
@ -19,4 +19,31 @@ internal static class TurbineChatDisplayNames
|
|||
TurbineChat.ChatType.Olthoi => "Olthoi",
|
||||
_ => $"Room 0x{roomId:X8}",
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
/// Map a Turbine room's <c>TurbineChat.ChatType</c> to retail's wire
|
||||
/// <c>LogTextType</c> for the chat color table. Faithful port of
|
||||
/// <c>ChatRoomTracker::GetChatFormat @0x005CD7C0</c>, which writes
|
||||
/// <c>ChatDisplayInfo::m_ltt</c> directly per room field (research doc
|
||||
/// <c>docs/research/2026-08-09-chat-retail-color-table.md</c> §2.2):
|
||||
/// General/Trade/LFG/Roleplay each get their OWN dedicated slot
|
||||
/// (<c>0x1B</c>-<c>0x1E</c>); every Society variant collapses to the
|
||||
/// SAME slot (<c>0x20</c>); Allegiance and Olthoi both reuse the
|
||||
/// Allegiance slot (<c>0x12</c>) rather than getting their own.
|
||||
/// </summary>
|
||||
public static uint LogTextType(uint chatType) =>
|
||||
(TurbineChat.ChatType)chatType switch
|
||||
{
|
||||
TurbineChat.ChatType.Allegiance => 0x12u,
|
||||
TurbineChat.ChatType.General => 0x1Bu,
|
||||
TurbineChat.ChatType.Trade => 0x1Cu,
|
||||
TurbineChat.ChatType.Lfg => 0x1Du,
|
||||
TurbineChat.ChatType.Roleplay => 0x1Eu,
|
||||
TurbineChat.ChatType.Society => 0x20u,
|
||||
TurbineChat.ChatType.SocietyCelHan => 0x20u,
|
||||
TurbineChat.ChatType.SocietyEldWeb => 0x20u,
|
||||
TurbineChat.ChatType.SocietyRadBlo => 0x20u,
|
||||
TurbineChat.ChatType.Olthoi => 0x12u,
|
||||
_ => 0x00u,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue