🛠️ Server Configuration
All server configuration is done in config/servers.js
and multiple servers are supported. This file contains all configuration variables/options that apply on a (DayZ) server-specific level. For example, you can have a DayZ server with a live-chat module, while your second server has this entirely disabled. Configuration is shared between Discord guilds/servers.
Creating the file
- Navigate into the
/config
folder - Copy & Paste
servers.example.js
and rename the file toservers.js
- Fill in your server configuration values
.example
file intact. This is used to point out the differences in configuration when you update to later versions. Aside form that, renaming the .example
file directly will also create merge issues when updating to later versionsServer configuration options explained
This section will explain what the different configuration options mean. The configuration options can be categorized into separate modules:
Global (required)
Configuration that is required for most of our functionality to work, these should be considered required, meaning you will have to change these values to your own. Everything else can be considered optional and therefor left on the default values
Configuration Option | Description | Type |
---|---|---|
NAME | The name used to identify this server, used internally and when selecting servers in Discord | string |
CFTOOLS_SERVER_API_ID | Your CFTools Server API-ID, refer to the guide | string |
SERVER_IPV4 | Your DayZ game-server's public IP address, your users use this to connect to your server | string |
SERVER_PORT | Your DayZ game-server port, not your steam-query port | number |
Webhook Configuration
Configure a CFTools webhook for your server, this is used for (including, but not limited to) the live-chat module and delayed kill-feed.
This configuration instructs the bot to extract information from the CFTools webhook messages (game events, like player.kill
and user.join
) to be used across multiple different modules. This approach was chosen to avoid having to setup an HTTPS-enabled web-server.
Check out our guide if you need help setting up your CFTools webhook - it's made for a different project, but the process is the same. (step 7 is not relevant for this project)
Configuration Option | Description | Type |
---|---|---|
CFTOOLS_WEBHOOK_CHANNEL_ID | The id of the channel where CFTools webhook messages are send | string |
CFTOOLS_WEBHOOK_USER_ID | The id of the user/webhook that sends the CFTools webhook messages | string |
Command Configuration
These configuration options apply changes to commands/functionality that aren't considered modules
Configuration Option | Description | Type |
---|---|---|
STATISTICS_INCLUDE_ZONES_HEATMAP | Include the zones heatmap image in the /statistics command | boolean |
STATISTICS_KEEP_PUPPETEER_BROWSER_OPEN | Keep the Chromium browser open - this generates the heatmap faster, but uses ~20 MB more RAM | boolean |
STATISTICS_HIDE_PLAYER_NAME_HISTORY | Set this to false if you want a player's in-game name history to be public | boolean |
SERVER_INFO_INCLUDE_MOD_LIST | Include mod list output/embeds in /server-info | boolean |
Live Chat Module
This application offers a module that let's you dynamically forward/relay chat from members in Discord, to your DayZ server - use these configuration options to modify/personalize the module
Message Content Intent
- check out this guide if you need more information)256
characters, and a members tags and display name count towards thatadvancedChatInterface
in your Gamelabs mod configuration, this is due to mod conflictsConfiguration Option | Description | Type |
---|---|---|
USE_CHAT_FEED | Enable or disable the chat feed module | boolean |
CHAT_FEED_CHANNEL_IDS | The channels where members can send messages that get forwarded to DayZ | string[] |
CHAT_FEED_REQUIRED_ROLE_IDS | Required roles for a message to be broadcasted to DayZ. Public if empty. All roles defined are required | string[] |
CHAT_FEED_USE_DISCORD_PREFIX | Enable or disable the "(Discord)" prefix in the in-game message | boolean |
CHAT_FEED_USE_DISPLAY_NAME | By default displayed the members nickname, can be disabled to display username instead | boolean |
CHAT_FEED_MESSAGE_COOLDOWN | Members messages get forwarded to DayZ once every X seconds. Set to false to disable throttling | number or false |
CHAT_FEED_MAX_DISPLAY_NAME_LENGTH | Maximum allowed length of Discord display names | number |
CHAT_FEED_DISCORD_TAGS | List of Discord role tags to display in-game. If member has multiple roles the first role tag will be used | array |
CHAT_FEED_DISCORD_TAGS#roleIds | Roles a member should have for this to check true | string or string[] |
CHAT_FEED_DISCORD_TAGS#displayTag | The tag displayed in-game when true | string |
Teleport Configuration
Configure the use of premade teleport locations
Configuration Option | Description | Type |
---|---|---|
USE_TELEPORT_LOCATIONS | Should the /teleport-location command be available | boolean |
TELEPORT_LOCATIONS_FILE_NAME | Teleport file to use for this server configuration. Loaded from /config/teleport-locations/ | string |
Watch List configuration
Configure the use of custom role-ping notifications when players that are in a custom managed list log in to any of your servers
Message Content
intentuser.join
eventConfiguration Option | Description | Type |
---|---|---|
WATCH_LIST_CHANNEL_ID | The id of the channel where notifications should be send | string |
WATCH_LIST_NOTIFICATION_ROLE_ID | The id of the role that should be pinged in notifications | string |
Delayed Kill Feed configuration
Configure a custom delayed killfeed, forwarding webhook messages to a different/public channel after a specified delay
Message Content
intent - information is read from CFTools webhoook with player.kill
eventConfiguration Option | Description | Type |
---|---|---|
USE_KILL_FEED | Should the module be enabled for this server configuration | string |
KILL_FEED_DELAY | How long to wait (in seconds) before forwarding the killfeed message | string |
KILL_FEED_CHANNEL_ID | The id of the channel where killfeed messages should be forwarded/send to | string |
KILL_FEED_MESSAGE_IDENTIFIER | The string that indicates if something should be included in the kill-feed relay, more info | string |
KILL_FEED_REMOVE_IDENTIFIER | Should the identifier be removed from the message before forwarding/relaying | boolean |
Kill Feed Message Identifier
The kill feed message identifier is a string that is used to determine if a message should be included in the kill feed relay. This is used to prevent messages that are not kill-feed messages from being relayed, and to include other CFTools webhook events as desired by your community.
The default value is got killed by
, which only matches the default CFTools message for the player.kill
event.
If you want to include other events, you can (for example):
Update your configuration (servers.js)
- Use
KILL_FEED_INCLUDE |
as theKILL_FEED_MESSAGE_IDENTIFIER
value - Change
KILL_FEED_REMOVE_IDENTIFIER
totrue
, this will removeKILL_FEED_INCLUDE |
from the message before relaying it
Update your CFTools webhook templates
- Navigate to your CFTools Dashboard (opens in a new tab)
- Navigate to your server >
Manage
>Integrations
- Find the webhook that is being used for the kill-feed relay
- Click
Templates
and copy-paste theKILL_FEED_MESSAGE_IDENTIFIER
value at the start of every event you want to include as displayed below
This feature was funded for public use by RAGEx from Full Throttle DayZ (opens in a new tab) - thank you for your support and contribution to the community!
Leaderboard Configuration
Global /leaderboard
command configuration. Configure sorting stats, output format and your leaderboard blacklist,
Configuration Option | Description | Type |
---|---|---|
OVERALL_RANKING_STAT | What stat should be used to determine player rank when using OVERALL statistics | one of LEADERBOARD_STATS |
LEADERBOARD_DEFAULT_SORTING_STAT | What stat should be used as the default sorting stat | one of LEADERBOARD_STATS |
LEADERBOARD_PLAYER_LIMIT | How many players to display - min 10 , max 100 | number |
LEADERBOARD_BLACKLIST | Players (steam64/CFToolsID) to exclude from leaderboard | string[] |
LEADERBOARD_STATS | What stats should be enabled in the leaderboard module | string[] |
Automatic Leaderboard
A module that sets a channel as a dedicated, always up-to-date leaderboard feed
Configuration Option | Description | Type |
---|---|---|
AUTO_LB_ENABLED | Should we automatically update/post the leaderboard | boolean |
AUTO_LB_CHANNEL_ID | The id of the channel to post the leaderboard | string |
AUTO_LB_INTERVAL_IN_MINUTES | Time between messages in minutes | number |
AUTO_LB_REMOVE_OLD_MESSAGES | Should we delete our old messages | boolean |
AUTO_LB_PLAYER_LIMIT | Amount of players to display on automatic leaderboard, min 10 , max 100 | number |
AUTO_LB_STAT | The stat to rank players by in auto leaderboard module | one of LEADERBOARD_STATS |
Multiple servers
To add a second, or more, servers - copy-paste your entire server block and modify the configuration. Afterwards, make sure your syntax is still valid:
[
{
...
}, <-- Notice the comma - always add this when adding a new server block
{
...
}
]