# SurvivalGames > Documentation of SurvivalGames, a Paper plugin for Survival Games, Varo, UHC and Duels - several games per server or one game per server in a network SurvivalGames is a Paper/Purpur plugin (Paper 1.21.11 - 26.3, Java 25) for Survival Games, Varo, UHC and Duels: several games next to each other on one server (network.mode: standalone) or one game per server behind Velocity/BungeeCord (game/lobby). All commands are under /sg (aliases /survivalgames, /varo). Every option that exists is in config.yml and loot.yml (see Configuration) - never invent options, unknown keys are ignored without an error. Texts are MiniMessage in messages.yml/messages_.yml. # Overview # SurvivalGames ![SurvivalGames]() **Survival Games**, **Varo**, **UHC** and **Duels** for Paper: several games next to each other on one server, or one game per server in a network. - **Survival Games:** everybody starts on a spawn point, loots the chests and fights. After a grace period and a deathmatch the last one standing wins; then the next round starts with a fresh copy of the map. - **Varo:** teams play in the same world for days. **Every player may only play a few minutes per day and is out after the first death.** The last team standing wins. - **UHC:** a new world every round, no natural regeneration, the teams start at random places and the world border pushes everybody into the center. - **Duels:** one against one with the same kit, from the queue (`/sg duel`) or a challenge (`/sg duel `). ![Rounds or days]() ![UHC]() ## Where to start - **[Getting started]()**: install the plugin, set up an arena and start the first game - **[Survival Games]()**: map voting, kits, loot, grace period, bounties, sponsors, deathmatch - **[Varo]()**: play time per day, one life, the world border, optional rules, backups, the extras - **[UHC]()**: generated worlds, scatter, golden heads, final heal, scenarios (cutclean, timber) - **[Duels]()**: queue, challenges, a kit per duel, Elo rating - **[Replays]()**: every round and every Varo day is recorded and can be watched again - **[Network]()**: one game per server behind Velocity or BungeeCord, the lobby server - **[Integrations]()**: Vault, parties, join NPCs, Bedrock forms, TAB, EssentialsX, Multiverse - **[Commands and permissions]()**: everything under `/sg` - **[Configuration]()**: `config.yml` and `loot.yml`, statistics, rating, leaderboards, rewards - **[Messages and languages]()**: English, German or your own texts - **[Placeholders]()**: PlaceholderAPI for scoreboards, tab lists and holograms ## Requirements - **Paper 1.21.11, 26.1, 26.2 or 26.3**, or a fork of it like [Purpur](). Folia isn't supported, see the [FAQ]() - **Java 25** (also for Paper 1.21.11) - optional: Vault, PlaceholderAPI, MiniPlaceholders, Parties, Citizens, FancyNpcs, Floodgate, TAB, EssentialsX, Multiverse, see [Integrations]() - for a network: [Velocity]() (or BungeeCord) Found a bug or have an idea? Open an [issue on GitHub](). # Getting started ## Installation The server needs Paper or Purpur 1.21.11 to 26.3 and **Java 25**, also for Paper 1.21.11, which itself still runs on Java 21 (see [requirements]()). 1. Download `SurvivalGames-.jar` and put it into the `plugins` folder of your server. 2. Start the server. The plugin creates `plugins/SurvivalGames/` with `config.yml`, `loot.yml`, the messages and the folder `maps/`. 3. Choose how the server runs (`network.mode` in [`config.yml`]()): - `standalone` (default): the games run on this server next to everything else. Players who aren't in a game aren't affected at all. - `game` / `lobby`: one game per server in a network, see [Network](). All setup commands need the permission `sg.admin` (operators have it). > [!TIP] > > **A game in two clicks** > > `/sg admin` → **New game**: click the game type, then where it is played: a map in `maps/`, a world of the server or a new world. The arena gets its name by itself and the game is created right away, players join with `/sg join`. Lobby, center and spawn points are optional and can be set up later (the steps below). > [!TIP] > > **Everything in a menu** > > `/sg admin` shows the arenas and the games in a menu: a click on an arena leads through the steps below (edit the map, set the lobby, the center and the spawn points where you stand, save, create the game), a click on a game starts or stops it. The lobby world and the numbers of an arena (players, team size, world border) are set there too. Only the name of a new arena has to be typed. ## 1\. The map Every arena plays on a map: a world folder that stays untouched; each game plays in a copy of it. - **Your own map:** put the world folder into `plugins/SurvivalGames/maps/` and run `/sg arena create `. - **A world of the server:** `/sg arena create --world ` copies it into `maps/`. - **Another arena's map:** `/sg arena create --map `; several arenas can share one map. - **A generated world:** `/sg arena create --generate [--seed ]`: a new random world for every game (good for Varo). ### Big maps Every game copies its map (and the [lobby world](<#the-lobby-world>)) before it opens. The copy is made in the background, so the server doesn't lag, but a big map still takes a while and its copies fill the disk. A map that takes long to copy (or is bigger than 50 MB before its first copy) gets a note in `/sg arena info` and `/sg admin`. `/sg map list` shows all maps with their size. `/sg map trim ` makes a map smaller. It first shows what it would remove, `--confirm` removes it: - chunks with nothing but air (a void map is often mostly empty chunks), - chunks the server has only begun to generate (players never see them), - chunks far outside the world border of all arenas that use the map (the border plus the view distance around it are kept). A map without a border, and the lobby world, keep all of their chunks with blocks. The region files that change are saved in `plugins/SurvivalGames/backups/maps/` first: to undo it, unzip the backup into the folder of the map (where its `region` folder is). Once empty chunks have been removed, the copies of the map keep the chunks that aren't in it empty instead of generating terrain there (`sg-map.yml` in the map). If you make a world border bigger after trimming, the area beyond it is generated anew. The game type is Survival Games unless you add `--type varo`, `--type uhc` or `--type duels` (a [UHC]() arena gets a generated world). You can change it later with `/sg arena type` or the button "Game type" of the arena in `/sg admin`. ## 2\. Setting up the arena `/sg arena edit` teleports you into a copy of the map (creative mode, your inventory is kept for later). Then stand at the right place and run: | Command | Sets | | --- | --- | | `/sg arena lobby` | where the players wait before the game (default: the [lobby world](<#the-lobby-world>), without one the center) | | `/sg arena center` | the middle of the world border, the spawn circle and the deathmatch (default: the world spawn) | | `/sg arena spawn add` | a spawn point (the middle of the block you stand on; the players look at the center), once per player | If the arena already has a game, a message offers to get it ready (`/sg arena edit --prepare`): the game is removed while you edit and created again when you save. That only works while nobody is in the game; a running round can be stopped first, a Varo only after it is over. `/sg arena save` saves the copy back into the map and teleports you back. Without spawn points the players spawn in a circle around the center (`spawn-circle-radius`). More settings: `/sg arena players `, `teamsize `, `border `, `displayname `. `/sg arena info` shows the whole setup and what is still missing (click the hints). > [!TIP] > > **Spawn points limit the players** > > With spawn points, at most as many players as there are spawn points can join. ### The lobby world Usually a server has **one lobby** for all arenas: a world of its own the players wait in until their game starts. 1. `/sg lobby setworld `: a world of the server (it is copied into `maps/`) or a map that already is in `maps/`. 2. `/sg lobby edit` teleports you into a copy of it, `/sg lobby setspawn` sets where the players arrive (default: the spawn of the world), `/sg lobby save` saves it. All arenas without a lobby of their own use it from now on; the game itself is played in the map of the arena. An arena that has its own lobby (`/sg arena lobby`) keeps it; `/sg arena lobby remove` switches it to the lobby world. `/sg lobby remove` removes the lobby world again. Every game gets its own copy of the lobby world, so the players of different games don't meet. The copy is removed when the game begins. A change of the lobby world is used by the games nobody is waiting in right away, by the others in their next round. ## 3\. The game `/sg arena creategame` creates the game of the arena, also after every restart. Players join with: - `/sg join [arena]`: without an arena they join the fullest game that is waiting - `/sg games` (or `/sg` and "Play"): a menu with all games, a click joins one or watches it - a **sign** with `[sg]` in the first line and the arena in the second (only admins can create it). It shows the state and the players, a click joins the game (or watches it while it runs). Sneak to break it. - `/sg spectate [arena]` to watch a running game - a **join NPC** of Citizens or FancyNpcs: `/sg npc link ` and a click on the NPC, see [Integrations]() A round of Survival Games starts by itself once enough players are there; admins can start it right away with `/sg game start` (`--force`: with fewer players). A Varo starts with `/sg game start`. `/sg leave` (or the leave item) leaves the game. `/sg arena removegame` stops the game and creates no new one. ## Next - [Survival Games]() and [Varo](): how the games work - [Network](): one game per server # Game types # Survival Games The default game type. The settings are in `survival-games` in [`config.yml`](); arenas override the number of players, the team size and the world border. ## Lobby The players wait in the [lobby world]() or the lobby of the arena: nobody can break blocks, take damage or get hungry. With teams (`team-size` \> 1) they choose a team with the team item or `/sg team`; who has no team at the start gets one. Once `min-players` are there, the **lobby countdown** (`lobby-countdown`) starts. When the game is full it is shortened to `full-countdown`. If too many players leave, it stops. Players with the permission `sg.start` (operators) start the game right away with the start item (green dye) once `min-players` are there. Monsters don't wait for the players: when they are put onto their spawn points, the monsters of the world are removed, and until the game runs none spawn (also with `monsters: true`). ### Map voting With `map-voting.enabled` the players choose the map: the vote item (or `/sg vote [arena]`) lists the arena of the game and up to `map-voting.maps` - 1 other arenas of Survival Games with the same team size that nobody is waiting in. `map-voting.end-seconds` before the start the votes are counted and everybody moves into the arena that has won (a draw: the arena of the game stays). - Players with the permission `sg.vote.2` ... `sg.vote.5` have 2 ... 5 votes. - The map of the last round can't be chosen again right away (`map-voting.block-last`), unless it is the only one. - There is nothing to vote for with only one arena, and on a [game server]() (one arena per server). ### Kits Admins save their inventory as a kit: `/sg kit create `. Armor and off hand are included, the item in the hand is the icon in the menu. With `--permission` only players with `sg.kit.` can choose it. `/sg kit edit ` puts a kit into your (empty) inventory to change it, `/sg kit delete ` deletes it. The players choose their kit in the lobby with the kit item or `/sg kit [kit]` and get it when the game begins. `modules.kits.default` is the kit of everybody who didn't choose one. The kits are saved in `kits.yml`. ## Start Everybody is put onto a spawn point (or into the spawn circle) with an empty inventory and stands still until the **start countdown** (`start-countdown`) is over. Then the round begins. With `start-platforms: explode` players can move, but whoever leaves their spawn point before the end of the countdown is put back and warned (`start-platform-warnings` times; the first 3 seconds and 2 seconds after a warning they are only held back). After that they blow up and are out (jumping and looking around is fine). - **Grace period:** for `grace-period` seconds nobody can hurt the others. The time left is shown above the hotbar. - **Loot:** chests, trapped chests and barrels are filled when they are opened for the first time and again every `refill-minutes`. Every kind of container has its own loot table, containers near the center get better loot and the loot gets better after some refills. See [loot.yml](). - **Blocks:** only the `breakable-blocks` can be broken and only the `placeable-blocks` placed (blocks placed in the game can be broken again). `building: true` allows everything. - The time of day is fixed (`time`), monsters don't spawn (`monsters`). - **Advancements** are paused in the game (`advancements: false`). ## World border The arena's world border (`world-border.size` or `/sg arena border`) starts shrinking `world-border.shrink-after` minutes after the start (everybody is warned a minute before) down to `world-border.final-size` blocks within `world-border.shrink-minutes`. Outside of it players take `world-border.damage` per block and second. With `shrink-after: 0` it only shrinks in the deathmatch. ## Tracker When the grace period is over, everybody alive gets a **player tracker**: a compass that points at the nearest enemy. Holding it shows the name and the distance in the action bar (`modules.tracker`). ## Supply drops Every `modules.supply-drop.minutes` a supply drop is announced with its coordinates near the center. A column of sparks marks the place, `warning` seconds later a chest with the `supply` loot of [loot.yml]() lands there, worth a fight. Not in the deathmatch. ## Lightnings Nobody can hide until the end: after `reveal.minutes`, or once only `reveal.players` are left, a lightning (without damage) strikes where every player alive is, again every `reveal.interval` seconds. `interval: 0` turns it off; in the deathmatch there are no lightnings. ## Bounties With an economy plugin ([Vault]()) the players put money on a player alive: `/sg bounty ` (at least `modules.bounty.min`, at most `max`). The money is taken right away and everybody sees the bounty. **Whoever kills the player gets all of it.** If they die otherwise, win or the round is stopped, everybody gets their money back. `/sg bounty` lists all bounties, `/sg bounty ` shows one. No bounties on yourself, on team mates and on players who are out. In a [Varo]() the bounties are saved with the game. ## Sponsors Spectators, also the players who are out, send items to the players alive: `/sg sponsor` opens the menu (the players, then the items), `/sg sponsor ` the items for one player. The items and their prices are in `modules.sponsor.items`: ``` items: - { item: cooked_beef, amount: 4, price: 10 } - { item: "splash_potion[potion_contents={potion:\"healing\"}]", price: 40 } - { item: bread, price: 0 } # free ``` Items with a price need an economy plugin ([Vault]()). A spectator can send one item every `modules.sponsor.cooldown` seconds. ## Bets With `modules.betting` (off by default) and an economy plugin ([Vault]()) spectators (also the players who are out) bet on the winner: `/sg bet` shows the odds of the teams alive (click one to bet), `/sg bet ` bets on the team of the player. The odds come from the [Elo ratings]() of the teams alive, minus the `margin` of the house (at most `max-odds`), and stay as they were when the bet was placed. **Bets on the winners pay amount × odds**, the others are lost; a draw or a stopped round pays everything back. Once only `close-at` teams are left, no more bets are taken. The players alive can't bet. ## Alliances In games where everybody plays alone, `modules.alliances` (off by default) lets two players (`max-size`) team up: `/sg ally ` offers an alliance, the same command of the other player (or a click on the offer) accepts it. Allies can't hurt each other and the [tracker](<#tracker>) ignores them. `/sg ally leave` breaks the alliance; everybody hears about the betrayal. All alliances break once only `break-at` players are left, in the deathmatch, or when nobody but the allies is left. ## Force field With `modules.force-field` (off by default) the world border throws back what hits it: arrows, tridents, snowballs and ender pearls bounce off and fly back into the arena, players who run into it get a shock (`damage`) and are pushed back. ## The fallen With `modules.fallen` (off by default) everybody in the game hears a cannon shot when a player is out, and every `minutes` minutes the fallen since the last list are announced (with a title). In a [Varo]() the list comes with every new day. ## Training scores With `modules.training-score` (off by default) everybody gets a score from 1 to 12 while they stand on their spawn points: 6 for the start rating, one more (less) for every `points-per-score` rating points above (below) and up to ±`random` by the mood of the Gamemakers. The scores are announced, the best first. ## Reaping With `modules.reaping` (off by default) more players than `max-players` can wait in the lobby (`applicants` × `max-players`). When the game starts, `max-players` of them are drawn; the others watch. Everybody has one lot, plus `missed-lots` for every reaping they weren't drawn in (until they are) and n − 1 with the permission `sg.reaping.lots.` (2 to 10). ## Quells With `modules.quell` (off by default) every `every`-th round of an arena (or by `chance`, in percent) is a Quell with one of the `rules`. A rule changes settings of `survival-games` for that round only: ``` rules: no-grace: { grace-period: 0 } nowhere-to-hide: { reveal: { minutes: 1, interval: 30 } } sudden-border: { world-border: { shrink-after: 1, shrink-minutes: 5 } } no-refill: { refill-minutes: 0 } ``` The players learn the rule in the lobby and when the game begins (its description is the message `quell_rule_`, otherwise its name). Admins choose the rule of the round in the lobby (otherwise of the next one) with `/sg game quell `, also while the module is off. ## Gamemaker events With `modules.arena-events` (off by default) the arena turns against the players every `min-minutes` to `max-minutes` (after the grace period, not in the deathmatch) for `duration` seconds, announced `warning` seconds before: | Event | What happens | | --- | --- | | `poison-water` | the water poisons | | `swarm` | `swarm-size` mobs (`swarm-mob`) attack every player, they disappear afterwards | | `fog` | nobody sees far | | `heat-wave` | hungry and slow under the open sky | `events` lists the ones that can happen. Admins start one right away: `/sg game event `. ## Deathmatch After `deathmatch.minutes` or once only `deathmatch.players` are left, everybody is warned (`deathmatch.warning` seconds) and then teleported back onto the spawn points. The world border around the center shrinks from `deathmatch.border-size` to `deathmatch.final-border-size` within `deathmatch.border-minutes`. `/sg game deathmatch` starts it right away. ## The end Who dies is out and watches the rest (`spectators: true`) or leaves the game. The last player (or team) standing wins. After `ending-seconds` everybody leaves the arena and the next round starts with a fresh copy of the map. Spectators fly around invisibly, can't touch anything and can't be seen by the players. `/sg spectate` lets everybody else watch a running game. - **Inventories:** who was killed gets a message with the health the killer had left; a click shows the killer's inventory, armor, health and effects of that moment. The killer can look at the victim's inventory, and at the end everybody at those of the winners (`modules.inventory-view`). - **Fireworks** for the winners (`fireworks`). - **Rewards:** money and commands for kills, wins and games, see [rewards](). - **Rating:** every player has an Elo rating per game type, see [statistics](). - **Replay:** the round has been recorded; a click on the message at the end (or `/sg replay`) plays it again in a copy of the map, see [replays](). # Varo A Varo runs for days in the same world. The settings are in `varo` in [`config.yml`](). ## Before the start Create the arena with `--type varo`; a generated world (`--generate`) is a good choice. The players join the game (`/sg join ` or a sign) and create teams with `/sg team create [color]` or the team item, the others join with a click or `/sg team join `. Admins can manage the teams with `/sg game team ...`. `/sg game start` starts the game: after `start-countdown` seconds everybody stands on their spawn point (the members of a team next to each other) and the game runs. Players without a team get one. ## Playing every day Players come back to the game with `/sg join ` (or the sign) and leave it with `/sg leave`. **Outside of the game they get their normal inventory and location back**; inside the game they continue where they left. - **Play time:** every player may play `play-time` minutes per day. The time only runs while they are in the game. It is shown on the scoreboard, with warnings before the end; `/sg time` shows it too. When it is over, the player leaves the game (on a [game server](): back to the lobby) and can't join again until the next day. - **No escape from a fight:** while an enemy is within `combat-radius` blocks, the play time doesn't run out. - **Join protection:** after joining, a player can't be hurt for `join-protection` seconds (unless they attack). - **Play hours:** with `play-hours` the game can only be played at certain times of the day (server time), e.g. `[ "18:00-20:00" ]` or different ones for the days of the week: `[ "mon-fri 18:00-20:00", "sat,sun 14:00-22:00" ]`. Outside of them nobody can join and everybody in the game leaves it (with the same warnings as for the play time, and not while an enemy is nearby). `"22:00-02:00"` ends on the next day; choose a `day-start-hour` outside of the play hours then. Empty (default): the game can be played all day. Join signs, NPCs and the games menu show when a running Varo opens again (`Opens Sat 18:00`, also `%sg_opens%`); an admin who starts a Varo outside of its play hours gets a warning, as everybody leaves it right away. Admins change them in the game with `/sg settings varo play-hours 18:00-20:00` (several separated by `;`). - **A new day** starts at `day-start-hour` (server time). Everybody has their full play time again and the **world border** shrinks by `world-border.shrink-per-day` blocks until `world-border.min-size`. ## One life The first death is the last one: the player is out. With `spectators: true` they can watch (but not while they are still alive in the game, no scouting). When the last player of a team is out, the team is out. The last team standing wins. Admins can bring a player back with `/sg game revive `. ## Optional rules All of them are in `varo` in `config.yml` and off by default (except the villager); change them there or with [`/sg settings varo`](). | Option | Rule | | --- | --- | | `peaceful-days` | No PvP during the first days of the game: time to farm and build. Everybody is told when the peaceful days are over. | | `inactive-days` | Players who haven't played for this many days in a row are out (also players who never showed up), so nobody blocks the end of the game. | | `coordinates-from-day` | From this day on the positions of all players alive are announced at the start of every day (of players outside of the game: where they left it). | | `offline-npc-seconds` | **No escape by leaving the server:** a villager with the name and the health of the player stands in for them for this many seconds (default: 60). Enemies can hurt it; if they kill it, the player is out and their items drop. Damage it took stays when the player comes back. Not for `/sg leave`. | ### Banned items `modules.restrictions` (used in Varo by default) keeps items out of the game: ``` modules: restrictions: banned-items: [ totem_of_undying, end_crystal ] banned-potions: [ strength ] # also strong_strength and long_strength max-enchantments: { sharpness: 3, knockback: 0 } # 0: banned ``` Banned items can't be crafted, picked up or used and are taken out of the inventories; banned potions can't be brewed or drunk; enchantments above their limit are lowered, also on items that are already in the game. ## Strikes Who breaks the rules gets a strike from an admin: `/sg game strike [reason]`. Everybody in the game sees it, and `varo.strikes` decides what happens at the 1st, 2nd, 3rd, ... strike: | Consequence | | | --- | --- | | `coordinates` | the position of the player is announced (their saved one if they are not in the game) | | `inventory` | their inventory in the game is cleared | | `out` | they are out of the game | | `warning` | nothing else (also every strike beyond the list) | `/sg game unstrike ` takes back the last strike (not its consequence), `/sg game strikes` lists everybody with strikes. Players see their own with `/sg strikes`, the scoreboard shows the number. ## Saved for days The game is saved in `games/.yml` and its world is kept; restarts don't change anything. `/sg game stop` stops it (it continues with `/sg arena creategame`). `/sg game reset --confirm` starts again from the lobby with a fresh world (everybody alive, the teams stay); `--teams` deletes the teams too. Deleting the arena deletes the saved game and its world. ### Backups When the game begins and at the start of every day, the world and the saved game are zipped into `plugins/SurvivalGames/backups//.zip` (in the background). The newest `varo.backups` files are kept (default: 7, `0`: no backups). Admins make a backup at any time with `/sg game backup` (`_