Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Excerpt

Chat makes it easy for players to interact with scripts using the in-game chat interface.

 

Overview

Chat is used to communicate with all players in the game via the in-game chat system.Chat has two methods for interacting with messages:

  • Command Mode – allow players to trigger actions within a script.
  • Conversation Mode – allow scripts to engage in multi-message conversations with a player.

From the perspective of your script, each player in the game will be in one of the two modes: Command mode or Conversation mode (not both at the same time). For example, players 1 and 2 might be in Command mode but player 3 might be in Conversation mode.

Command mode

In Command Mode, Chat monitors all incoming messages from a player to look for command keywords. When a keyword is identified, it's associated Command Handler Function is triggered to process the message.

This mode is best suited to fairly static commands like "help" or "attack beacon". Commands can also be used to switch a player over to Conversation Mode...

Conversation mode

In Conversation Mode, Chat relays all incoming messages from a player to your Conversation Handler Function. It's up to your conversation handler to decide what to do with messages it receives.

This mode is best suited to interactive conversations with a player, specifically where multiple messages will be sent back and fourth in order to achieve some desired outcome without accidental triggering of commands. A common example might be discussing potential alliance pacts with players, or allowing players to define multi-stage battle plans.

Brownie points will be given to the first person who ports Eliza or some other chatterbot to Warzone (smile)

Future plans

Allow one instance of Chat API to act as the "manager" for a team. This way a human player won't get spammed by multiple AI allies all responding to every command they type – instead, one of the ally AIs would be in charge of communications with the humans and relay messages on to the other ally AIs behind the scenes.

Div
classbox
Availability
Status
colourYellow
titleBeta

Requires:

Warzone 3.2 or above is required to actually use the chat features. In Warzone 3.1 the API features will be present but no chat messages will be sent or received.

Div
classbox
Contents

Jump to:

Table of Contents
maxLevel5

Div
classbox

Chat API

Topics:

Child pages (Children Display)
alltrue
depthall
excerpttrue