Info {{ currentPage ? currentPage.title : "" }}

SP8_ChatComponent

Option

Description

Max Message Length

Max Characters inside a Message.

NotAllowedWords

Set which Words are not allowed inside normal and private Messages.

Example:

Key: Word, which is not allowed

AddingWarnCount: How many WarnCount’s, the Player will get

WarnReason: Reason for the Warning

MuteMinutesByWarnCount

Set how long the Player will be muted, after warnings.

Key: Warn Count (0, will not mute)

Value: Mute Minutes

All Minutes will be calculated together.

For example, if you call Warn and the AddingWarnCount Input is 3 and the current Warn Count is 1, the Values of the Key’s 1, 2 and 3 will be calculated together, which will be the Muted Minutes.

warnCountInterval

In what Interval (Minutes) the Warn Count will be reduced by 1.

Steps by 10.

Command Prefix

On SendMessage() the Component will check if the Message starts with that Prefix.

If yes, it will be checked, if it’s a valid Command.

Commands

Create new Commands.

Example:

Key: How to call it (Do not add the Prefix)

Replication: Will the Command Entered Function be called on Server or Client?

usableByEveryone: If set to false, the Function “CanSendMessage” will be called

Default Log Color

On ReceiveLog() if the Type or SubType Color could not be found, which Color should be shown?

Log Colors by Type

Changes the Color of the Log by the Type of the Log.

Log Colors by Sub Type

Changes the Color of the Log by the SubType of the Log.

Overwrites the Log Colors by Type!

Chat Logging

Customize Logs

Example:

Key: Select LogType

Type: Can be left empty if not needed

SubType: Can be left empty if not needed (Sometimes it will be overwritten with different Values)

Message: What should be printed to the Chat Box.

OnlyOnDebug: If true, the Message will be only shown, if the “Chat Logging Debug” is set to true.

Chat Logging Debug

If set to true, every Log of the Chat Component will be shown in the Chat.

Function

Callable

Description

Default Use-Case

SendMessage

Server & Client

Send a Message in a Channel.

If the Channel could not be found, the Message will be send to the default Channel set on the SP8_GameState_ChatComponent.

Should be called, when the Player wrote something into the TextBox of the Chat and commited it.

ReceiveLog

Server & Client

Prints a Log to the Chat (Only visible to the Owner)

If a Message should be visible to send to the Player (For example if he gains XP).

getAvailableChannels

Server & Client

Returns all available Channels

Inside the Chat Widget to get, which Channels should be visible.

AddChannelListener

Server

Let the Player listen to a Channel.

You do not need a Listener for Channels, which is visible to everyone!

Could add a Listener for a Group Channel.

On Create Group you need to call Create Channel on GameState Chat Component and after every Member could add a Listener to this Channel.

RemoveChannelListener

Server

Stop listening to a Channel.

Could remove a Listener if a Group gets deleted.

SendGlobalMessage

Server & Client

Send a Global Message to every Player.

Should be only for Admins.

Make a Chat Command for example like this:

/global <Message>

SendPrivateMessage

Server & Client

Send a Private Message to one Player.

Make a Chat Command for example like this:

/msg <Player> <Message>

Warn

Server

Warn the own Player, if he did something wrong.

WarnOtherPlayer

Server & Client

Warn a other Player, if he did something wrong.

Make a Chat Command for example like this:

/warn <Player> <Reason>

MuteOtherPlayer

Server & Client

Mute a other Player for x Minutes.

If Minutes are lower then 1, the Player will be unmuted.

Could be called inside a Admin Panel or as a Chat Command.

Mute

Server

Mute the own Player for x Minutes.

If Minutes are lower then 1, the Player will be unmuted.

Save

Server

Save all variables.

Load

Server

Load all variables.

Should be called on start.

Initialize

Server

If you are using your own Save System, you can use this Function to set the Informations, which this Component needs.

Only if you do not call Load!

Dispatcher

Called

Description

Default Use-Case

MessageReceived

Client

Contains following Infos:

- Channel ID

- Name: Name of Player

- Message

- Name Color

- Color (Message)

- Time

- Channel Type (Global, Area, Guild, Group, Log)

- Channel Type Info: (Log: SubType / AreaName / GroupName / GuildName)

- Channel Type Info GT: Log: Type

Should be bind inside the Chat Widget, to get the Message and add it to the Chat.

showMessageOverHead

Server

Contains following Infos:

- Message

Set a Widget over the Head of the Player and set the Text.

ChannelChanged

Client

Available Channels have changed

Bind it if you want to hide unavailable Channels

SP8_GameState_ChatComponent

What’s the difference between Default Channels and Channels which will be created with AddChannel?

Channels created with AddChannel will not be saved and can be removed whenever you want.

Option

Description

Default Channels

Set the default Channels.

Example:

Key: Channel

DefaultNameColor: The default Color of the Player Name

DefaultColor: The Default Color of the Message

showMessageOverHead: If true, the Dispatcher “showMessageOverHead” will be called.

visibleToEveryone?: If true, everyone will listen to the Server, without calling AddListener.

Range: If >= 0, all Players within a Range will receive the Message. If less then 0, all Players will receive the Message.

allowedMessageInterval: How many seconds till the Player can send a new Message (Prevents Spam)

Default Channel

If on send Message a Channel could not be found, the default Channel will be used.

If you do not want to use the default Channel, you can just leave this Field empty or set the Name to a Channel which does not exists.

Function

Callable

Description

Default Use-Case

SendLogToPlayer

Server

Send a Log to a Player.

SendLog

Client

Send a Log to your own Player.

Call Receive Log on the SP8_ChatComponent, if you are inside your Player.

getChannel

Server

Get the Info of a Channel.

AddChannel

Server

Add a Channel.

For example a Group Channel on Create Group.

RemoveChannel

Server

Remove a Channel.

For example a Group Channel on Delete Group.

getChannels

Server

get all Channels.

SendGlobalMessage

Server

Send a Global Message to everyone.

Could be used for automatic Events.

SP8_BPI_Chat (Only if you are not using SP8_PlayerTemplate)

Function

Called

Description

When is it called?

SP8_getChatColor

Server

Overrides the default Name Color and/or the Message Color.

Will be called if you call SendMessage.

SP8_CanSendMessage

Server & Client

Check if the Player can send a Message.

Will be called if you call SendMessage.

SP8_canUseCommand

Server & Client

Check if the Player can send a Command.

Will be called if you call SendMessage, starts with the CommandPrefix and if the Command is not usable by everyone.

SP8_CommandEntered

Server or Client

Depends if the Command Options is set to Server or Client.

In this Function you can set what is going to happen, if the Command is called.

The Input Variable contains everything after <Prefix><Command>.

Example: /Mute 1 2 3

The Input would contain [1,2,3].

Called if the Message is a valid Command and the Player is allowed to send it.

SP8_canMuteOtherPlayer

Server & Client

Check if the Player can Mute other Players.

Will be called if you call MuteOtherPlayer

SP8_CanSendGlobalMessage

Server & Client

Check if a Player can send a Global Message.

Will be called if you call SendGlobalMessage.

SP8_canWarnOtherPlayer

Server & Client

Check if the Player can Warn other Players

Will be called, if you call WarnOtherPlayer

Chat LogTypes

LogType

Description

Info_Interval

Player can't send Message, because the seconds since the last Message is less, then the allowedMessageInterval Variable.

Overwrite SubType with Seconds till the Player can send a new Message.

Info_Message_Length

Player can't send Message, because the Message is longer, then the maxMessageLength Variable.

Error_Message_Empty

Player can't send Message, because the Message is empty.

Info_BPI_CanNotSendMessage

Player can't send Message, because the Blueprint Interface Function (Can Not Send Message) returns true.

Error_GameState_MissingComponent

Player can't send Message, because the GameState does not contain SP8_GameState_ChatComponent

Error_ChannelMissing

Player can't send Message, because the ChannelID does not exists on SP8_GameState_ChatComponent

Error_LogAsNormalMessage

Player can't send Log as Message. Log should be called with PrintLog or ReceiveLog.

Error_CommandNotFound

Written Command was not valid.

Info_BPI_CanNotUseCommand

Interface Function CanUseCommand returned false.

If using the PlayerTemplate: Sp8_Override_canUseCommand.

Info_CommandSucceded

Returned from Interface Function CommandEntered.

If using the PlayerTemplate: Sp8_Override_CommandEntered.

Error_CommandWrongFormat

Returned from Interface Function CommandEntered.

If using the PlayerTemplate: Sp8_Override_CommandEntered.

Error_BPI_CanMuteOtherPlayer_ReturnedFalse

Interface Function CanMuteOtherPlayer returned false.

If using the PlayerTemplate: Sp8_Override_canMuteOtherPlayer.

Error_PlayerNotOnline

Player could not be found or he is not online.

Error_PlayerNotMuted

Unmuting failed, because the Player is not muted.

Info_OwnPlayerIsMuted

Called if someone Muted the owning Player.

Overwrite SubType like that: <Minutes>|<Reason>

The Reason WarnCountExceeded means, that the Player was warned and the Warn Count exceeded.

Info_OwnPlayerUnmuted

Called if someone unmuted the owning Player or if the Muted Minutes are lower then 0.

Error_SendMessageFailed_Muted

Player can’t send Message, because he is Muted.

Overwrite SubType with Minutes

Error_AddListenerFailed_isVisibleToEveryone

Could not add a Listener for Channel, because the Channel will send Messages to all Players.

Error_AddChannelFailed_NameExists

Could not add a Channel, because the Name already exists.

Error_RemoveChannelListenerFailed_NotListeningToChannel

Could not remove Channel Listener, because the Player is not listening to this Channel.

Error_BPI_CanSendGlobalMessage_ReturnedFalse

Interface Function CanSendGlobalMessage returned false.

If using the PlayerTemplate: Sp8_Override_CanSendGlobalMessage.

Info_PrivateMessageSend

Private Message was send to a other Player.

Info_PlayerMuted

Player was Muted.

Overwrite SubType with UserKey.

Info_NotAllowedWordWasSend

Not allowed Word was send.

Only called, when Adding Warn Count is less or equal 0.

Info_OwnPlayerWasWarned

When own Player was warned.

Overwrite SubType with Reason.

Info_WarnOtherPlayerSucceded

Called, when the Function WarnOtherPlayer succeded.

Info_BPI_CanWarnOtherPlayer_ReturnedFalse

Interface Function canWarnOtherPlayer returned false.

If using the PlayerTemplate: Sp8_Override_CanWarnOtherPlayer.

{{{ content }}}