A bot for osu! multiplayer to allow automatic beatmap rotation. This software was created to test capabilities of my Bancho client framework project.
Before starting a game, the bot will wait 3 minutes for everyone to get ready. If everyone is ready before the time runs out - the game will start instantly. If about 70% people are ready when the timer runs out - the game will be force-started.
To use the bot you can type !command
into the chat. Some commands only work in the multiplayer chat, some only in private chat. There are only two permission levels at the moment: user (default) and an operator. Operator is an administrative role and therefore it can use some more commands.
Command | Description |
---|---|
!add [link to beatmap] | Adds a beatmap to a queue of maps to play. The beatmaps must match a criteria decribed below. |
!voteskip | Vote to skip a map. Over 50% of users have to vote to skip the current song. |
!skip | An operator command. Instantly skips a map. |
!wait | An operator command. Resets the waiting timer (default: 3 minutes). |
!isop | Only works in private chat. Tells you whether or not you are an operator. |
!help | Only works in private chat. Links you to this page. |
When you're adding a beatmap, the link should look something like this: https://osu.ppy.sh/b/665240
of just osu.ppy.sh/b/665240
. Notice the /b/
- it denotes that this link point to a specific difficulty in a beatmap set. If the link has /s/
- it points to a beatmap set and therefore is too ambigious and invalid. If you want to get the valid link, on the beatmap set page, click on one of the difficulty tabs.
To setup a beatmap queue, you will need to create beatmaps
folder next to the executable file. This folder should contain various .osu
files of beatmaps to play.
This is the current criteria for using the !add command. This will be configurable later, but for now it's hardcoded to:
First of all, you will need some dependencies. Most of the dependency management is done with Maven. There are two libraries that you will need to reference manually:
First of all compile or download the executable file from releases page.
Then to run the bot, you will first need to make a configuration file settings.conf
like this:
account {
username = "username"
password = "password"
osu-api-key = "apikey" # obtained here https://osu.ppy.sh/p/api
}
general {
operators = [ # user IDs of trusted users
2982427
3872846
]
}
room {
name = "AutoHost testing"
password = null
slots = 16
}
Before running the bot, don't forget to setup a beatmaps
folder. Your file structure should be something like this:
/autohost
|--/beatmaps
| |--beatmap1.osu
| |--beatmap2.osu
| |--etc...
|--settings.conf
|--autohost.jar
Then to actually run the bot the bot use the file as an argument:
java -jar autohost.jar settings.conf