Changelog¶
All notable changes to FWChatSystem are documented in this file.
v1.0 -- Initial Release¶
Components¶
- UFWChatStateComponent -- Local chat state management with per-channel message history ring buffers, unread count tracking, player name caching with configurable TTL, whisper reply target tracking, party info storage, and player presence caching.
- UFWChatRouterComponent -- Chat input entry point with slash command parsing (
/s,/p,/g,/w,/r,/e,/help), channel-based message routing, input validation, default channel management, and local system/error message injection. - UFWSocketIOChatTransportComponent -- Socket.IO WebSocket transport layer with JWT authentication, automatic reconnection with exponential backoff, per-channel message sending (local, global, whisper, party, guild, emote), presence updates, party room sync/leave, guild room sync/leave, DM conversations, and configurable external Socket.IO client support.
Interfaces¶
- IFWChatGuildProvider -- C++ interface for external guild system integration. Receives guild roster data, update events, info changes, and guild chat messages through typed callbacks.
- IFWChatUIController -- C++ interface for UI-layer chat management. Provides chat input focus activation/deactivation, active channel selection, and multi-window lifecycle (create, close, focus, list windows).
Types and Enums¶
EFWChatChannel-- Local, Party, Guild, Whisper, System, Global, EmoteEFWChatConnectionState-- Disconnected, Connecting, Connected, Reconnecting, FailedEFWChatSendResult-- Success, NotConnected, RateLimited, TargetNotFound, InvalidMessage, NotInParty, NotInGuild, Muted, FailedFFWChatMessage-- Full message struct with channel, sender/target IDs and names, body, timestamp, zone, position, and outgoing flagFFWChatOutgoingMessage-- Outgoing message request with channel, target, and bodyFFWChatPresence-- Player presence with ID, name, zone, position, online status, and last updateFFWChatPartyInfo-- Party info with ID, member IDs/names, and leader IDFFWChatTokenResponse-- API token response with JWT token, server URL, and expirationFFWChatConfig-- Configuration struct with history limits, message length, name cache TTL, presence interval, and reconnection settingsFFWChatWindowHandle-- FName-based thin handle for identifying chat windowsFFWChatWindowInfo-- Window descriptor with handle, channel, title, whisper target, and primary flag
Utility Functions¶
FFWChatTypeUtils::ChannelToEventType()-- Convert channel enum to Socket.IO event stringFFWChatTypeUtils::EventTypeToChannel()-- Convert Socket.IO event string to channel enumFFWChatTypeUtils::GetChannelDisplayName()-- Get human-readable channel nameFFWChatTypeUtils::GetChannelDefaultColor()-- Get default color for a channel (hex)
Delegates (UFWChatStateComponent)¶
FOnChatMessageReceived-- New message added to historyFOnChatUnreadCountChanged-- Unread count changed for a channelFOnChatPresenceUpdated-- Player presence updatedFOnChatPartyUpdated-- Party info changedFOnLastWhisperTargetChanged-- Last whisper target changed
Delegates (UFWChatRouterComponent)¶
FOnChatHelpRequested-- Help command invokedFOnChatMessageDisplay-- Message ready for UI displayFOnChatInputSubmitted-- Chat input submitted (before processing)FOnChatFocusChanged-- Chat input focus changedFOnActiveChannelChanged-- Active channel changedFOnChatWindowRequested-- UI should create a chat windowFOnChatWindowClosed-- UI should destroy a chat windowFOnFocusedWindowChanged-- Focused chat window changed
Delegates (UFWSocketIOChatTransportComponent)¶
FOnChatConnectionStateChanged-- Connection state transitionFOnChatTransportMessageReceived-- Message received from serverFOnChatSystemNotice-- System notice from serverFOnChatTransportPartyUpdated-- Party info updated from serverFOnChatTransportGuildRosterReceived-- Guild roster data receivedFOnChatTransportGuildUpdateReceived-- Guild update event receivedFOnChatTransportError-- Error from chat server
Features¶
- Seven built-in chat channels with independent history and unread tracking
- Slash command parser with
/s,/p,/g,/w,/r,/e,/help - Whisper reply chain tracking (
/rreplies to last whisper sender) - Per-channel message history with configurable ring buffer limits
- Player name caching with configurable TTL
- Party chat room sync/leave lifecycle
- Guild chat room sync/leave with IFWChatGuildProvider interface
- Player presence system with zone and position tracking
- Automatic reconnection with exponential backoff
- JWT-based authentication via token response
- Multi-window chat support via IFWChatUIController interface
- Input mode management (GameOnly/GameAndUI switching)
- Local system and error message injection
- External Socket.IO client support for custom lifecycle management