This AI is still in early stages of development.
Chat API
- Aubergine
Overview
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
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.
Availability BETA
Requires:
- Warzone 3.1 or above
- Util API
- Hook API
- Define API
- Define.chat.js
- Events API
- Diag API
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.
Contents
Jump to:
Chat API
Topics:
- Chat API Diagnostics — The Chat API provides the following diagnostic routines...
- Conversation Descriptor Object — Each player is assigned a Conversation Descriptor Object that defines the current state of their chat conversation...
- Conversation Mode — Quick start guide for making and using conversations...
- chat.isActive() — Determine conversation state for a specific player.
- chat.get() — Get the object associated with a multi-message conversation with a specific player.
- chat.stop() — Stop a conversation with a specific player.
- chat.extend() — Extend the "Time to Live" of the most recent conversation with a player.
- Conversation Handler Functions — How to define a conversation handler function....
- chat.start() — Start a multi-message conversation with a player.
- Command Mode — Quick start guide for creating and using commands...
- Command Handler Functions — How to define a command handler function....
- chat.on() — Define a chat command and it's handler function.