66 lines
2.4 KiB
Markdown
66 lines
2.4 KiB
Markdown
# Player's Guide to TaleWeave AI
|
|
|
|
## Contents
|
|
|
|
- [Player's Guide to TaleWeave AI](#players-guide-to-taleweave-ai)
|
|
- [Contents](#contents)
|
|
- [Discord Command Syntax](#discord-command-syntax)
|
|
- [Prompt Syntax](#prompt-syntax)
|
|
- [Prompt Function Syntax](#prompt-function-syntax)
|
|
|
|
## Discord Command Syntax
|
|
|
|
*Note 1:* Because TaleWeave AI offers a dynamic set of actions depending on the game world, it does not currently use
|
|
Discord's command feature. If you know a way to make this work with constantly-changing actions, please let me know.
|
|
|
|
*Note 2:* When interacting with the Discord bot, you need to ping it with each message. Your server admin can allow the
|
|
bot to see all messages, with and without pings, but you must ping the bot by default.
|
|
|
|
The Discord bot offers the following commands:
|
|
|
|
- `!taleweave` or the bot name, if your admin changed it
|
|
- prints the name of the active world
|
|
- `!help`
|
|
- prints the available commands and their parameters
|
|
- `!join <character>`
|
|
- join the game as the specified character
|
|
- `!leave`
|
|
- leave the game, if you are playing
|
|
- `!characters`
|
|
- list the available characters in the game
|
|
- `!players`
|
|
- list the players currently in the game
|
|
|
|
Other messages will be treated as in-character input and used as your character's action or reply, depending on the
|
|
current prompt.
|
|
|
|
## Prompt Syntax
|
|
|
|
The web client displays a menu with all of the available actions on your turn, but you can also input your own actions.
|
|
|
|
### Prompt Function Syntax
|
|
|
|
In order to call functions or use actions from your prompt replies, you (or more likely your GUI) can send valid JSON,
|
|
or you can use this prompt function syntax. Discord and the web client both support this syntax.
|
|
|
|
To use the prompt function syntax, start your prompt with `~` and use the syntax `~action:parameter=value,next=value`
|
|
where `action` is the name of the action (the function being called) and the remainder are parameters to be passed into
|
|
the function.
|
|
|
|
For example:
|
|
|
|
```none
|
|
~action_move:direction=north
|
|
~action_tell:character=Alice,message=Hello
|
|
~action_use:item=potion
|
|
```
|
|
|
|
There are some limits on this syntax:
|
|
|
|
- the function name cannot contain `:`
|
|
- this is true in Python as well and should not be a problem
|
|
- the parameter names cannot contain `=`
|
|
- this is also true in Python and should not be a problem
|
|
- the values cannot contain `,`
|
|
- this is a problem and support for quotes is needed
|