Channels Guide
ElysChat routes messages through configurable channels, each with its own scope, permissions, and formatting.
Channel Scopes
| Scope | Routing | Use Case |
|---|---|---|
| Proximity | Players within ProximityRadius world units from sender | Local roleplay, overheard dialogue |
| Global | All connected players | Server announcements, OOC chat |
| Group | Members of the sender's current group | Party/raid coordination |
| Guild | Players sharing the same GuildId | Guild communication |
| DirectMessage | Single target player | Private whispers |
| GameMaster | Players with GameMaster or Admin role | Staff coordination |
Defining Channels
Channels are defined in your UERPChatConfig Data Asset:
FERPChannelDefinition LocalChannel;
LocalChannel.ChannelId = TEXT("local");
LocalChannel.DisplayName = FText::FromString("Local");
LocalChannel.Scope = ERPChannelScopeEnum::Proximity;
LocalChannel.ProximityRadius = 2000.0f; // 20 meters
LocalChannel.SlashCommands = { TEXT("local"), TEXT("l") };
LocalChannel.RequiredRole = ERPPlayerRoleEnum::Player;
LocalChannel.FormatTemplate = TEXT("[{Channel}] {Sender}: {Message}");
LocalChannel.ChannelColor = FLinearColor(0.8f, 0.8f, 0.8f);
Channel Permissions
Each channel has a RequiredRole:
| Role | Access |
|---|---|
| Player | Default — all players |
| GameMaster | GMs and Admins only |
| Admin | Admins only |
Switching Channels
Players switch channels using slash commands or programmatically:
/global Hello everyone!
/l *waves to nearby adventurers*
/w PlayerName Secret message
Or via code:
ChatComponent->SetActiveChannel(TEXT("global"));