Skip to content

Commit

Permalink
Update README, add license
Browse files Browse the repository at this point in the history
### What's done:
* Update README.md
* Add LICENSE
  • Loading branch information
petertrr committed Aug 28, 2021
1 parent db3ec4f commit 77b5f0a
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 12 deletions.
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2021 Petr Trifanov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# Initiative-bot
A simple bot for Discord, that can track initiative in D&D and similar TTRPGs, based on alternative systems - such as
Speed Factor from DMG or Greyhawk initiative from Unearthed Arcana.
Speed Factor from DMG (currently supported) or Greyhawk initiative from Unearthed Arcana (TBD).

## Commands:
## Common commands:
* `!ib start` - start initiative
* `!ib end` - stop initiative, if it was started
* `!ib help` - display help message

## Commands for Speed Factor variant:
* `!ib add <base modifier> [name]` - add a participant `name` (defaults to username) with base initiative modifier
* `!ib remove [name]`
* `!ib round` - start a new round
* `!ib end-round` - end the round
* `!ib roll <modifier> [name]` (`name` defaults to the username) - rolls initiative for the current round, combining `modifier` and base modifier
* `!ib mods` - show modifiers for different actions
* `!ib round` - start a new round, but only if every combatant has rolled a new initiative
* `!ib end-round` - end the round, enable combatants edit and rolling
* `!ib roll <modifier> [name]` (`name` can be omitted if user has added a single character) - rolls initiative for the current round, adds `modifier` and base modifier

## Usage
To start encounter, DM calls `start` command. All combatants join using `add` command, stating their base modifiers. DM then starts
a new round using `round` command. All combatants should state their actions and roll for initiative using
`!ib roll <modifier> [name]` command. Once everyone (i.e., all, who has joined previously) has rolled, the bot will ask the first combatant
to act. Once everyone has acted, the new round begins. If needed, list of combatants can be altered using `add` and `remove` commands.
The bot stores the list of combatants from the previous rounds and won't let the new round start, unless everyone has rolled.
To start encounter, DM calls `start` command. All combatants join using `add` command, stating their base modifiers. All combatants
should state their actions and roll for initiative using `!ib roll <modifier> [name]` command. Once everyone (i.e., all, who has joined previously)
has rolled, DM starts a new round using `round` command, followed by `next` command. The bot will then ask the first combatant to act.
Once everyone has acted, DM should call `end-round`. After that, everyone rolls again. If needed, list of combatants can be altered
using `add` and `remove` commands. The bot stores the list of combatants from the previous rounds and won't let the new round start,
unless everyone has rolled.

# Build and run
This app requires Java installation of version 1.8 or greater.
To build the app, run `./gradlew build`.

To run it for your own server, you'll need to register a new discord app and obtain a token for it. Once this is done, you can either
* run initiative-bot-discord with gradle, run `./gradlew :initiative-bot-discord:run --args="<your discord token>"`.
* build distribution using `./gradlew :initiative-bot-discord:installDist` and run an executable script from `initiative-bot-discord/build/install/initiative-bot-discord-<version>/bin`.
* download a distribution zip from Github releases, unpack it and run an executable script
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies {
}

tasks.withType<KotlinJvmCompile>().configureEach {
kotlinOptions.jvmTarget = "14"
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
}

Expand Down

0 comments on commit 77b5f0a

Please sign in to comment.