Advance Chat Documentation

Complete guide for the Advance Chat System for MFPS

Overview

The Advance Chat System is a comprehensive replacement for the default MFPS lobby chat. It introduces modern chat features such as multiple channels, private messaging, emoji support, command systems, and a built-in profanity filter.

Key Features:
  • Multi-Channel Support: Global, Friends, Party, Team, and Room channels.
  • Rich Media: Pixel art emoji support.
  • Commands: Built-in commands for moderation and navigation.
  • Security: Profanity filter and spam protection (rate limiting).
  • Customization: Fully customizable UI colors and settings via ScriptableObject.

Installation

1. Enable the Addon

First, you need to enable the addon in the project settings:

  1. Go to the Unity top menu: MFPS > Addons > BlinkBox > AdvanceChat > Enable.
  2. Wait for the script recompilation to finish.

2. Scene Integration

Once enabled, integrate the chat system into your MainMenu scene:

  1. Open your MainMenu scene.
  2. Go to MFPS > Addons > BlinkBox > AdvanceChat > Integrate.
  3. Click the Integrate button in the wizard window.
  4. The tool will automatically:
    • Disable the default bl_LobbyChat.
    • Instantiate the Advance Lobby Chat prefab.
    • Migrate your previous chat settings (like history length).

Configuration

All settings are managed via the ChatSettings ScriptableObject located in the Resources folder.

Location: Resources/ChatSettings.asset

Channel Settings

Message Settings

UI & Debug

Features

Channels

The system supports dynamic channel switching:

Profanity Filter

The ChatProfanityFilter automatically censors offensive language. It comes with a pre-populated list of block words but can be extended via the ChatBlockList script.

Behavior: Bad words are replaced with ***.

Emojis

Users can send pixel art emojis. These are rendered as sprites within the chat UI. Emojis are stored in the AdvanceChat/Arlan Trindade/Free emojis pixel art folder.

Chat Commands

Users can execute commands by typing / followed by the command keyword.

Command Alias Description Usage Example
/help - Displays a list of available commands. /help
/clear - Clears the local chat history. /clear
/join /j Join a specific channel. /join Trade
/msg /w Send a private whisper to a user. /msg PlayerName Hello!
/team /t Send a message to your team (in-game). /team Defend A!

Script Reference

bl_Advance_LobbyChat

Path: Scripts/bl_Advance_LobbyChat.cs

The core controller script. Handles Photon Chat connection, channel subscriptions, and message instantiation.

ChatSettings

Path: Scripts/ChatSettings.cs

Singleton ScriptableObject for global configuration. Access via ChatSettings.Instance.

ChatCommandSystem

Path: Scripts/ChatCommandSystem.cs

Parses and executes chat commands. New commands can be registered via RegisterCommand(string name, Action<string[]> action).