|
4 | 4 |
|
5 | 5 | - [Player's Guide to TaleWeave AI](#players-guide-to-taleweave-ai)
|
6 | 6 | - [Contents](#contents)
|
| 7 | + - [Discord Command Syntax](#discord-command-syntax) |
7 | 8 | - [Prompt Syntax](#prompt-syntax)
|
8 | 9 | - [Prompt Function Syntax](#prompt-function-syntax)
|
9 | 10 |
|
| 11 | +## Discord Command Syntax |
| 12 | + |
| 13 | +*Note 1:* Because TaleWeave AI offers a dynamic set of actions depending on the game world, it does not currently use |
| 14 | +Discord's command feature. If you know a way to make this work with constantly-changing actions, please let me know. |
| 15 | + |
| 16 | +*Note 2:* When interacting with the Discord bot, you need to ping it with each message. Your server admin can allow the |
| 17 | +bot to see all messages, with and without pings, but you must ping the bot by default. |
| 18 | + |
| 19 | +The Discord bot offers the following commands: |
| 20 | + |
| 21 | +- `!taleweave` or the bot name, if your admin changed it |
| 22 | + - prints the name of the active world |
| 23 | +- `!help` |
| 24 | + - prints the available commands and their parameters |
| 25 | +- `!join <character>` |
| 26 | + - join the game as the specified character |
| 27 | +- `!leave` |
| 28 | + - leave the game, if you are playing |
| 29 | +- `!characters` |
| 30 | + - list the available characters in the game |
| 31 | +- `!players` |
| 32 | + - list the players currently in the game |
| 33 | + |
| 34 | +Other messages will be treated as in-character input and used as your character's action or reply, depending on the |
| 35 | +current prompt. |
| 36 | + |
10 | 37 | ## Prompt Syntax
|
11 | 38 |
|
| 39 | +The web client displays a menu with all of the available actions on your turn, but you can also input your own actions. |
| 40 | + |
12 | 41 | ### Prompt Function Syntax
|
13 | 42 |
|
14 | 43 | In order to call functions or use actions from your prompt replies, you (or more likely your GUI) can send valid JSON,
|
15 |
| -or you can use this prompt function syntax. |
| 44 | +or you can use this prompt function syntax. Discord and the web client both support this syntax. |
16 | 45 |
|
17 | 46 | To use the prompt function syntax, start your prompt with `~` and use the syntax `~action:parameter=value,next=value`
|
18 | 47 | where `action` is the name of the action (the function being called) and the remainder are parameters to be passed into
|
19 | 48 | the function.
|
20 | 49 |
|
| 50 | +For example: |
| 51 | + |
| 52 | +```none |
| 53 | +~action_move:direction=north |
| 54 | +~action_tell:character=Alice,message=Hello |
| 55 | +~action_use:item=potion |
| 56 | +``` |
| 57 | + |
21 | 58 | There are some limits on this syntax:
|
22 | 59 |
|
23 | 60 | - the function name cannot contain `:`
|
| 61 | + - this is true in Python as well and should not be a problem |
24 | 62 | - the parameter names cannot contain `=`
|
| 63 | + - this is also true in Python and should not be a problem |
25 | 64 | - the values cannot contain `,`
|
| 65 | + - this is a problem and support for quotes is needed |
0 commit comments