Installation
Set up a Duels network: which product goes on which server, the Kernel groups and regions it needs, and the Aegis config for each server.
Network layout
A Duels network has three kinds of Paper server. All of them need Bridge set up first, and all of them must use the same MongoDB and Redis.
| Server | Product in the loader | Kernel group | What it does |
|---|---|---|---|
| Duels lobby | DuelsLobby | Must end in lobby, for example duels-lobby | Queues, duel requests, parties, kit editor, stats, staff menus. |
| Game server | DuelsGame | Anything else, for example duels-game | Hosts matches. Run as many as you need. Also runs matchmaking and builds the vanilla arenas. |
| Replay server | DuelsGame | Exactly stasis | Plays back replays and community reviews. It does not host matches. |
You need at least one lobby and one game server. Add a replay server if you want /replay and /stasis to work.
Scaffold, Bridge, Kernel and Stash are required by both Duels products. The loader adds them for you when your licence includes them. Scaffold is included with Duels. Bridge is sold separately.
Install the loader products
Products are delivered through your personal Aegis loader. If the loader is not on the server yet, follow Installation first.
Add DuelsLobby to the lobby
On the lobby server, add DuelsLobby under products:.
products:
DuelsLobby:
enabled: true
release: latest
channel: stable
required: trueAdd DuelsGame to each game server
On every game server and on the replay server, add DuelsGame instead.
products:
DuelsGame:
enabled: true
release: latest
channel: stable
required: trueInstall packetevents
Put the packetevents plugin in plugins/ on every Duels server. Duels uses it and the loader does not ship it.
Set the Kernel group, region and server id
Each server needs a unique server id and the right group. Lobby and game servers that should work together need the same region. These keys live in Kernel's config.
serverId: duels-game-1
region: eu
group: duels-gameYou can set the same values with the BRIDGE_SERVER, NEXUS_REGION and BRIDGE_GROUP environment variables. When one is set, it wins over the file.
Restart every server
On first start each product creates its files:
plugins/DuelsLobby/andplugins/DuelsGame/getsettings.yml,messages.yml,menus.yml,common-settings.,yml common-messages.andyml common-menus..yml plugins/Scaffold/getsscaffold.yml,settings.yml,messages.ymlandmenus.yml.
How servers find each other
Duels does not need a list of servers. Every server publishes its server id, group, region and online players to Redis twice a second, and the others read that list.
- Matches stay in the lobby's region. When two players are matched, the match goes to the game server with the fewest players in the region of the server they queued from. If that region has no game server, the players get an error message instead of a match.
- Matchmaking prefers same-region players. A player is paired with someone from their own region first, and with anyone in range if no one fits.
- Players go back to a lobby. After a match, players are sent to the lobby with the fewest players. A game server in group
name-gameprefers lobbies in groupname-lobby.
Leave gameServer: true in plugins/Scaffold/scaffold. on game and replay servers. It is the default. A game server with gameServer: false does not host matches.
First-time setup
- Join the lobby with an account that has
duels.admin. - Stand where players should appear and run
/duels setspawn. The spawn is shared by every Duels lobby. - Create a kit. See Kits.
- Give the kit the
VanillaTerrainflag so it has arenas. See Arenas. - Give players
duels.rankedif they should play ranked. See Permissions. - Queue the kit with
/playon two accounts to check that a match starts.
Check it works
- Once an enabled kit has the
VanillaTerrainflag, a game server logsgenerating 5 vanilla arena(s). Game servers check 10 seconds after startup and then every 5 minutes while they have no match running. /map liston any Duels server lists the arenas.- Queueing two players for the same kit sends both to a game server.