What is Discord Boss Tracker?
Discord Boss Tracker is a Discord bot for tracking bosses in Black Desert Online. Users with certain discord roles can call up bosses in a status channel, where all other users can view and update a given boss's health.
Boss Timers
World bosses in Black Desert spawn on a fixed schedule. The bot pulls this schedule from a Google Calendar which must be made when setting up this bot. Once the bot receives the schedule, it formats it using a Discord embed which it sends to a timers channel every minute.
By default, 5 minutes before a boss is scheduled to spawn, the bot will send a notification to all users telling them the boss is about to spawn. Then at spawn time, the bot will automatically call up the boss, allowing users to start updating its health. While the boss is alive, the timers embed will show it in a separate section labeled 'Active Bosses'.
Field bosses work a little differently from world bosses in that they do not have a fixed spawn time. They instead have windows where they can spawn and not spawn. This is also tracked by the timers bot. The bot relies on users to call up these field bosses, so if it is not called up by the end of its window, the boss will show as late.
When set by a moderator the timers bot will show when the next scheduled game maintenance is. All field bosses will have their window times adjusted based on when maintenance ends.
See timersMessage.js
27/09/2023 Update
Timers will now show bosses even when their next spawn or window is unknown. They will be marked with a '??' in place of the countdown. This prevents blank messages from being sent when first setting up the bot. It also lets users know when a boss has been removed from the schedule.
Boss Status Chart
When a boss is active, a status chart will appear showing the health of a given boss. This chart will be regenerated once every minute, or when a user updates the boss's health. The chart is made using Canvas and will change in size according to the number of channels in the database.
The bot uses an event listener to listen for new/edited messages and then parses through them to check for a status update. The flow works like this:
- Check if the message contains the phrase 'revive'. This is used by moderators to resend the chart for a boss that has already been cleared.
- Loop through the boss list and see if the message matches a boss's alias regex.
- If it matches and the boss is not active, restart the boss session.
- Match the message against a list of ignored words. If it matches, ignore the message.
- Check the message for a boss alias. (bheg, bh, mud, etc.)
REGEX: katz?v?a?r?i?a?k?
- If the matched boss is a field boss, check for a channel alias. (kama2, b5, season 1, etc.)
REGEX: b(?:a|al|ale|alen|aleno|alenos)?\s?2
- If no channel is matched, remind the user to specify a channel.
- Check the message for health value. (100%, 70, dead, despawn, etc.)
- Set the boss's health and send the updated chart.
Examples
This user's call passes all checks and the chart is updated.
kama3
matches channelKamasylvia 3
rn
matches bossRed Nose
100
matches alive health regex
In this call, the user does not specify a channel. The user is reminded with a message that auto-deletes after 10 seconds.
World bosses share health across all channels so a channel does not need to be specified.
Boss Clear Message
Once a boss has been cleared, a summary embed will be sent to the status channel which includes which servers the boss died, despawned, did not spawn, and was uncalled on. It will also display the time it took to clear the boss.
To prevent the chart from staying up forever, the bot will auto-clear a boss once it reaches its forceClearTime
. The summary embed will show that the boss's window was adjusted based on the force despawn time.
See Boss.clearBoss()
Adding More Channels
If more channels are added to Black Desert, they can be entered into the bot's database and will start showing in the boss chart. The new Rulupee channels have a higher ID in the database and thus appear at the end of the chart.
See canvas.js