|
1 | 1 | # Storyteller
|
2 |
| -## A Slack Bot for playing Fighting Fantasy Gamebooks |
| 2 | +## A Slack Bot for playing Fighting Fantasy Gamebooks (v1.0) |
3 | 3 |
|
4 | 4 | ## Introduction
|
5 | 5 | Storyteller is a bot for use with Slack which helps a group of people play through a Fighting Fantasy gamebook co-operatively. It was designed for _Warlock on Firetop Mountain_, but should work fine with any other book using compatible rules.
|
6 | 6 |
|
7 |
| -Storyteller adds commands to read the story, manage your character and roll dice for fights and other challenges. Warlock Bot is designed to assist your game, but does not strictly enforce rules - replicating the experience of playing with a real book and dice. |
| 7 | +Storyteller adds commands to read the story, manage your character and roll dice for fights and other challenges. It will assist you in playing the game but does not strictly enforce rules - replicating the experience of playing with a real book and dice. |
8 | 8 |
|
9 | 9 | Storyteller is programmed in PHP, requires no database and is state-based. This means it can be installed on an ordinary web-server, without the need to setup a complicated chat-bot.
|
10 | 10 |
|
11 | 11 | ## Set-Up
|
12 | 12 | Download and extract the bot to start.
|
| 13 | + |
13 | 14 | ### 1. Set-Up Slack
|
14 | 15 | First you must create an incoming and outgoing webhook. In Slack, go to **Administration > Manage Apps > Custom Integrations**.
|
| 16 | + |
15 | 17 | #### Incoming Webhook
|
16 | 18 | 
|
17 | 19 |
|
18 |
| -Set the channel to where you want the story to be told. You will probably want to dedicate a channel to the story. |
19 |
| -Give the bot a good name. I suggest Storyteller or StorytellerBot. |
20 |
| -**Make a note of the Webhook URL.** Open `config.php` and set `SLACK_HOOK` to this URL. |
| 20 | +- Set the channel to where you want the story to be told. You will probably want to dedicate a channel to the story. |
| 21 | +- Give the bot a good name. I suggest Storyteller or StorytellerBot. |
| 22 | +- **Make a note of the Webhook URL.** Open `config.php` and set `SLACK_HOOK` to this URL. |
| 23 | + |
21 | 24 | #### Outgoing Webhook
|
22 | 25 | 
|
23 | 26 |
|
24 |
| -Set the channel to the same channel as the incoming hook. |
25 |
| -Set the trigger word. I suggest using `!` to keep things simple. The trigger word must be prefixed to every command. |
26 |
| -Set the URL to where your installation will be located. |
27 |
| -**Make a note of the Webhook Token.** Open `config.php` and set `SLACK_TOKEN` to this value. |
| 27 | +- Set the channel to the same channel as the incoming hook. |
| 28 | +- Set the trigger word. I suggest using `!` to keep things simple. The trigger word must be prefixed to every command. |
| 29 | +- Set the URL to where your installation will be located. |
| 30 | +- **Make a note of the Webhook Token.** Open `config.php` and set `SLACK_TOKEN` to this value. |
28 | 31 |
|
29 | 32 | ### 2. Get the story
|
30 | 33 | By default Storyteller ships with a very short and simple sample book. It isn't very fun, so you'll likely want to replace it. You have 3 options.
|
| 34 | + |
31 | 35 | #### Option 1: Download pre-prepared _Warlock on Firetop Mountain_
|
32 | 36 | Importing from an official source is painful (see the next section.) So I am reluctantly providing a link to _Warlock on Firetop Mountain_ that has been pre-prepared for use. Download this file and replace the contents of `book.php` with it.
|
33 | 37 |
|
34 | 38 | [Pre-prepared WoFM book.php](https://pastebin.com/raw/wBr63c10)
|
35 | 39 |
|
36 | 40 | This link will be removed hastily if anyone ever objects. Don't be a jerk. If use this, make sure you own the book. [It's still in print.](https://www.amazon.co.uk/Fighting-Fantasy-Warlock-Firetop-Mountain/dp/1407181300)
|
| 41 | + |
37 | 42 | #### Option 2: Import a book you own
|
38 | 43 | Unfortunately, the _Fighting Fantasy_ books can no longer be bought in an eBook format. If they were, I'd provide a script to automate extraction. Since they aren't your only option is to scan, OCR and input the text yourself from a paper book. If you're mad enough to attempt this, see `book.php` for details.
|
| 44 | + |
39 | 45 | #### Option 3: Write your own adventure
|
40 | 46 | Storyteller doesn't have to play the official books. Perhaps one of the best ways to get a story in to the bot is to write your own. So long as you are compatible with the _Fighting Fantasy_ ruleset, this will work. If anyone does do this, please consider submitting your story back here. I'd love to include longer stories with this distribution.
|
| 47 | + |
41 | 48 | ### 3. Get the code online
|
42 |
| -Upload the installation to your PHP enabled web-server. No database is needed. The uploaded directory must be writable. |
43 |
| -Make sure it's location matches what you step up for the outgoing hook in step 1. If it's different go back and alter the hook. |
44 |
| -If you are _not_ using apache, you must replicate the rules in `.htaccess` to ensure the installation is secure. |
| 49 | +- Upload the installation to your PHP enabled web-server. No database is needed. The uploaded directory must be writable. |
| 50 | +- Make sure it's location matches what you step up for the outgoing hook in step 1. If it's different go back and alter the hook. |
| 51 | +- If you are _not_ using apache, you must replicate the rules in `.htaccess` to ensure the installation is secure. |
| 52 | + |
45 | 53 | ### 4. Ready to play!
|
46 | 54 | Type `!newgame` in the channel you chose for the webhook to get started. Type `!help` to see the basic commands or `!helpmore` for the complete list.
|
47 | 55 |
|
48 | 56 | ## Usage Tips and Hints
|
49 | 57 | - Remember, you have to enforce the rules!
|
50 |
| -- If the book asks you to do something there isn't a command for, you can always manually roll dice with `!roll` and apply any effects manually. |
51 |
| -- To easily restore a stat to max, just set it to 99 and it'll set it to the highest possible value |
| 58 | +- If the book asks you to do something there isn't a command for, you can always roll dice with `!roll` and apply any effects manually. |
| 59 | +- To easily restore a stat to max, just set it to 99 and it'll get set to the highest possible value. |
52 | 60 | - `!use` doesn't do anything on it's own. You must still apply the item's effects manually. e.g. `!use Potion of Skill;!skill 99`
|
53 | 61 | - If the book asks you to do something after a certain number of rounds in a fight, you can make the fight end early by putting the number of rounds end the end of the command. e.g. To stop after 3 rounds: `!fight Squirrel 5 5 3`
|
54 |
| -- If the book says you get a bonus to your attack for one fight, you can apply it to your weapon bonus and remove it at the end of the fight. e.g. `!weapon +1;!fight Squirrel 5 5;!weapon -1` |
| 62 | +- If the book says you get a bonus to your attack for just one fight, you can apply it to your weapon bonus and remove it at the end. e.g. `!weapon +1;!fight Squirrel 5 5;!weapon -1` |
55 | 63 |
|
56 | 64 | ## Technical Information
|
57 | 65 | **Do you accept bug reports?**
|
58 | 66 |
|
59 |
| -Yes. Particularly security issues should be reported. Please provide a test case for the issue and post it on the github project's issue page. |
| 67 | +Yes. Particularly security issues should be reported. Please provide a test case and post it on the github project's issue page. |
60 | 68 |
|
61 | 69 | **What about support requests and feature ideas?**
|
62 | 70 |
|
|
0 commit comments