Skip to content

Creating and editing a game

Edson Passos edited this page Feb 26, 2024 · 5 revisions

Creating a game

  1. Create a game file using the command /tb create <name>
  2. Head to the TitansBattle/games/ folder and open the file you just created
  3. Let's configure it!

Configuring

Announcements

When the game is started, the starting announcement will be displayed X times with an interval of Y seconds between each message.
This starting announcement usually contains a message with the remaining time for the battle to begin and the command to join.
If you leave it default, the battle begins after 1 minute (5 times * 20 seconds interval).
The game info announcement is a message displayed every X seconds with details of the game (usually how many players are still alive or the current and next duels).

announcement.game_info.interval: 30
announcement.starting.interval: 20
announcement.starting.times: 5

Delete groups

This option is useful for punishing players for not participating in a game.
If this is true, groups that didn't participate in the game are deleted.

delete_groups: false

Destinations

You need to set all destinations for the game to start.
Use the command /tb setdestination to do that.

destination.arena: #where the battle happens
destination.exit: #where they are teleported to when they leave
destination.lobby: #where they wait for the battle
destination.watchroom: #where they can watch the game

Elimination Tournament or Free for all

TitansBattle has 2 game modes.
Free for all: groups or players fight each other all at once and the last alive wins.
Elimination Tournament: groups or players fight each other in duels until only a participant remains (group or player). It also has a fight for the third place (for participants that lost in the semifinals).

type: FreeForAllGame
#or
type: EliminationTournamentGame

Group mode

This control if the game is group based or not.
If true, players must be in a group to join and groups fight each other.

group_mode: false

Killer

Killer is the Player that had the highest kill count in the game.
If enabled, they will get a custom prefix and can receive prizes.

killer: true

Amount of participants

You can define the minimum amount of participants for the game to start.
Also the maximum players (generally or per group) allowed in the game.
Power of two is an option to only allow a number of participants in this set (2, 4, 8, 16, 32, ...). Excessive players get kicked.

maximum.groups: 0
maximum.players: 100
maximum.players_per_group: 0
minimum.groups: 2
minimum.players: 10
power_of_two: false

Join and quit messages

Here you can enable server announcements for when a winner/killer of a game joins or leaves the server.

message.killer.join: false
message.killer.quit: false
message.winner.join: false
message.winner.quit: false

Prefixes

You can set custom prefixes for Killers and Winners of games.

prefix.killer: '&c[Killer] '
prefix.winner: '&a[Winner] '

Preparation and expiration

Set in seconds the time for the game to expire and the time for players to get ready for the battle.

time.expiration: 3600
time.preparation: 30

Use kits

If you want to give kits for players, enable this option and use the command /tb setkit.
When this is enabled, players won't be able to join if their inventory contains items.
Kits are cleared when they leave or the game ends.

use_kits: false

Prizes

In this section, you can define the prizes for the winners of the game.
In Elimination Tournament games, prizes for the FIRST, SECOND and THIRD winners can be set. In Free for all, use only FIRST.
KILLER is for the Player that killed the most in the game.
Prizes can be different for group leaders and members (if group mode is enabled). Enabling treat_leaders_as_members will make the leaders receive the same prizes as members.
items_give_interval is an interval in seconds for trying to give items when their inventory is full.
leader.commands.command_list and member.commands.command_list are lists of commands executed on winners.
leader.items.item_list and member.items.item_list are lists of items that are given to winners (they can be set using /tb setprize).
some_number.divided and some_number.value are used for dividing (or not) money (or anything at all) between the winners of a group.
Note: if group mode is false or when giving prizes to the killer, the prizes used are the ones for members.

  prizes:
    FIRST:
      ==: me.roinujnosde.titansbattle.types.Prizes
      items_give_interval: 30
      leader.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      leader.commands.enabled: false
      leader.commands.some_number.divided: false
      leader.commands.some_number.value: 100.0
      leader.items.enabled: false
      leader.items.item_list: null
      member.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      member.commands.enabled: false
      member.commands.some_number.divided: false
      member.commands.some_number.value: 100.0
      member.items.enabled: false
      member.items.item_list: null
      treat_leaders_as_members: false
    SECOND:
      ==: me.roinujnosde.titansbattle.types.Prizes
      items_give_interval: 30
      leader.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      leader.commands.enabled: false
      leader.commands.some_number.divided: false
      leader.commands.some_number.value: 100.0
      leader.items.enabled: false
      leader.items.item_list: null
      member.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      member.commands.enabled: false
      member.commands.some_number.divided: false
      member.commands.some_number.value: 100.0
      member.items.enabled: false
      member.items.item_list: null
      treat_leaders_as_members: false
    THIRD:
      ==: me.roinujnosde.titansbattle.types.Prizes
      items_give_interval: 30
      leader.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      leader.commands.enabled: false
      leader.commands.some_number.divided: false
      leader.commands.some_number.value: 100.0
      leader.items.enabled: false
      leader.items.item_list: null
      member.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      member.commands.enabled: false
      member.commands.some_number.divided: false
      member.commands.some_number.value: 100.0
      member.items.enabled: false
      member.items.item_list: null
      treat_leaders_as_members: false
    KILLER:
      ==: me.roinujnosde.titansbattle.types.Prizes
      items_give_interval: 30
      leader.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      leader.commands.enabled: false
      leader.commands.some_number.divided: false
      leader.commands.some_number.value: 100.0
      leader.items.enabled: false
      leader.items.item_list: null
      member.commands.command_list:
      - give %player% diamond_sword %some_number%
      - eco give %player% %some_number%
      member.commands.enabled: false
      member.commands.some_number.divided: false
      member.commands.some_number.value: 100.0
      member.items.enabled: false
      member.items.item_list: null
      treat_leaders_as_members: false