Kingdoms - Rumsfield/konquest GitHub Wiki

Updated for version 1.7.0

This page covers all details about kingdoms in Konquest. On this page...

  1. Overview
  2. Kingdom Types
  3. Membership
  4. Protection
  5. Management
  6. Diplomacy
  7. Payments
  8. Properties

Overview

A Kingdom is a group of players that has a Capital and many Towns, which are used to claim land in the world. Kingdom members can travel (teleport) to any town in the kingdom, but they can only build in towns where they are a resident. Once a player joins a kingdom, they still need to be added as a resident to the capital or other towns in order to build in claimed land. Players cannot attack other towns in their kingdom, they can only attack towns in enemy kingdoms at war.

Claimed Land Benefits

The claimed land of towns and the capital of a kingdom will always protect chests and other containers from other kingdom's players when core.yml options core.kingdoms.protect_containers_use, core.kingdoms.protect_containers_break, and core.kingdoms.protect_containers_explode are set to true. Enemy players cannot use the travel command inside of claimed kingdom land when core.kingdoms.no_enemy_travel: true. Enemies also cannot use ender pearls inside of kingdom land when core.kingdoms.no_enemy_ender_pearl: true.

Smallest Kingdom EXP Boost

When core.kingdoms.smallest_exp_boost_percent is greater than 0, the players in the kingdoms with the fewest members receive bonus EXP from normal sources, as a percentage from the setting. This setting can help give smaller kingdoms an advantage against larger kingdoms, and best works when players cannot create their own kingdoms (core.kingdoms.create_admin_only: true), or else the newest player kingdom will get the EXP boost.

Kingdom Types

There are two main types of kingdoms (Player or Admin), and two more types of kingdom behavior (Standard or Peaceful). This means there are 4 combinations of kingdom types and behaviors:

  1. Standard Player Kingdom
  2. Standard Admin Kingdom
  3. Peaceful Player Kingdom
  4. Peaceful Admin Kingdom
Type Created by Has Master Has Officers Has Members Managed by
Player Players, with /k kingdom create Yes Yes, promoted by master Yes Master, Officers
Admin Admins, with /k admin kingdom create No Yes, promoted by admins Yes Admins
Behavior Set by Members PvP Members attack enemy towns Kingdom's towns can be attacked Kingdom can change diplomacy
Standard Default Yes Yes Yes Yes
Peaceful Admins, with /k admin flag No No No No

The type and behavior of a kingdom can be viewed in-game through the kingdom info menu, /k info kingdom. The paper icon for kingdom properties shows Admin Kingdom and Peaceful indicators.

The default gameplay is for players to create their own Standard Player kingdoms where the creator becomes the kingdom master, and the kingdoms members can pvp and attack other kingdoms through diplomacy. Admins can create Standard Admin or Peaceful Admin kingdoms in the server if they want to set up fixed kingdoms for players to join.

Membership

By default, players belong to no kingdom and are barbarians. Players may become a member of a kingdom by creating their own or joining an existing one. Kingdoms have 3 types of membership:

  1. Member - Joins the kingdom.
  2. Officer - Member gets promoted by master.
  3. Master - Created the kingdom, or transferred by previous master.

| Player | Settle Towns | Invite/Requests | Kick | Change Diplomacy | Purchase Towns | Promote/Demote Officers | Transfer Master | Open/Closed | Change Template | Disband | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | Member | Yes | No | No | No | No | No | No | No | No | No | Officer | Yes | Yes | Yes | Yes | Yes | No | No | No | No | No | Master | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |

Creating a Kingdom

If core.yml setting core.kingdoms.create_admin_only: false, players can create their own kingdoms using command /k kingdom create (template) (name). There must be at least 1 valid monument template available to choose from when creating a kingdom. Once the kingdom is created, the player becomes the kingdom master. Creating a new kingdom also creates a new Capital territory (similar to a Town) with land claims and a Monument.

The capital of a kingdom is a special town that is named after the kingdom, with a suffix defined by config option core.kingdoms.capital_suffix. This suffix can be changed into a prefix by setting option core.kingdoms.capital_prefix_swap to true. The capital is placed at the player's location when they create the kingdom, using the same placement rules as towns.

Joining a Kingdom

Players use the Kingdom Menu to join and list kingdoms, using command /k kingdom or /k kingdom menu. The menu contents change depending on your current kingdom. By default, new players are Barbarians and have no kingdom. The menu will always contain a top row with at least 4 pages:

  1. Join an existing kingdom (saddle)
  2. Exile from your kingdom to become a Barbarian (arrow)
  3. Respond to invitations to join other kingdoms (book)
  4. View a list of all kingdoms in the server (paper)

image

Clicking on the saddle brings you to the Join page, where you can choose from available kingdoms to join. Clicking on open kingdoms will join instantly. Clicking on closed kingdoms will send a request to join to the kingdom officers/master. A note on kingdom icon appearance:

  • Player kingdoms are diamond helmets, Admin kingdoms are gold helmets.
  • Kingdoms that are protected from attack have an enchantment effect, unprotected kingdoms do not.

image

Membership Restrictions

Players cannot join a kingdom if it has more members than the smallest kingdom by an amount set by core.kingdoms.max_player_diff (set to 0 to disable). For example, if it's set to 4, then no kingdom will be able to have more than 4 members greater than any other kingdom. This feature allows the server to control the membership size of kingdoms by not letting a single kingdom grow too large relative to the others. This setting works best when players cannot create their own kingdoms (core.kingdoms.create_admin_only: true).

In addition, players cannot join a kingdom if it has reached the maximum number of members, set by core.kingdom.max_player_limit (set to 0 to disable). This member limit applies to all kingdoms in the server.

Switching Kingdoms

If core.kingdoms.allow_exile_switch: false, then players cannot change kingdoms after they join their first kingdom as a new barbarian player. They may only re-join their original kingdom after becoming a barbarian, and an admin would have to manually add them to another kingdom. This setting is intended for servers where players must choose a fixed admin kingdom and stick with it.

Join/Exile Cooldowns

There are cooldown timers for joining and leaving kingdoms, set by core.kingdoms.join_cooldown and core.kingdoms.exile_cooldown respectively. Players cannot repeatedly join or leave kingdoms within the cooldown times in seconds from these settings. This setting can be used to prevent players from frequently joining and leaving kingdoms, possible with intent to grief.

Per-Kingdom Join Permissions

If core.kingdoms.per_kingdom_join_permissions: true, then every player needs a unique permission node in order to join every kingdom. The permission is konquest.join.(kingdom), where (kingdom) must match the kingdom's name. For example, a player needs to have the permission konquest.join.rome in order to join a kingdom named Rome. This setting works best when players cannot create their own kingdoms (core.kingdoms.create_admin_only: true).

Offline Player Pruning

When core.kingdoms.offline_timeout_days is greater than 0, Konquest periodically checks for players that have been offline for more than the amount of days given by the setting. If a player has been offline for too long, their camp is removed if they are a Barbarian, else they get pruned from their kingdoms or towns, depending on core.kingdoms.offline_timeout_exile.

  • core.kingdoms.offline_timeout_exile: True - Removed from all towns and kingdom membership, becomes an exiled Barbarian. If the player was the last kingdom member, and the kingdom is not an Admin Kingdom, then the kingdom is disbanded and all towns removed.
  • core.kingdoms.offline_timeout_exile: False - Removed only from all town residencies. The player remains as a kingdom member.

Protection

A kingdom becomes protected when not enough members are online, which is controlled by core.yml options. If core.kingdoms.no_enemy_edit_offline: true, any kingdom becomes protected when the number of online members drops below the amount given by core.kingdoms.no_enemy_edit_offline_minimum. Once there are not enough online members, a warmup timer counts down in seconds given by core.kingdoms.no_enemy_edit_offline_warmup. When the warmup timer ends, the kingdom becomes protected. This helps prevent members abusing protection by logging off during a raid, and gives the attackers some time to continue capturing a town.

Once a kingdom is protected, enemy players cannot break/place blocks, or otherwise attack any towns in the kingdom. Protection ends when enough kingdom members log back onto the server.

Capital Immunity

If the core.yml option core.kingdoms.capital_immunity_towns is greater than 0, then the kingdom capital will be immune from attacks while there are at least that many other towns in the kingdom. For example, if the option is set to 3, and there are 3 towns controlled by the kingdom, then its capital cannot be attacked by enemy players. The enemies must first capture at least 1 of the towns to disable the capital immunity.

Kingdom Conquering

When a kingdom's capital is captured by enemies destroying the critical blocks within the Monument, the kingdom is conquered and removed from the game. When this happens...

  • Any remaining towns in the conquered kingdom are removed (Monument deleted, land claims disappear, but any surrounding buildings remain).
  • The capital turns into a regular town with the same name as the conquered kingdom, now owned by the enemy kingdom.
  • The kingdom is removed and all member players are exiled as Barbarians.

A kingdom's capital can be set up to prevent it from being captured. Use the command /k admin flag capital (kingdom) CAPTURE false to set the CAPTURE property flag of the capital to false, which will prevent any attacks on the capital's Monument.

Management

Kingdoms have the following management features:

Feature Officer Access Master Access Command Kingdom Menu Icon
Invite players to join and become members Yes Yes /k kingdom manage member invite (player) None
Kick members from the kingdom to exile them into Barbarians Yes Yes /k kingdom manage member kick (player) None
Rename the kingdom No Yes /k kingdom manage rename (name) None
Change the color of kingdom land on web maps (Dynmap) No Yes /k kingdom manage webcolor [(color)] None
Change diplomatic relations with other kingdoms Yes Yes /k kingdom manage diplomacy (kingdom) [(relation)] Gold Sword
Make purchase offers to buy towns from other kingdoms Yes Yes /k kingdom manage purchase (town) (amount) Gold Hoe
Respond to offers to purchase this kingdom's towns Yes Yes `/k kingdom manage offers [(town)] [(player)] accept deny`
Respond to requests by other players to join Yes Yes /k kingdom manage requests [player] accept|deny Glass Bottle
Promote and demote kingdom officers No Yes /k kingdom manage member promote|demote (player) Iron Horse Armor / Leather Chestplate
Transfer master to another member/officer No Yes /k kingdom manage member master (player) Iron Helmet
Destroy towns in the kingdom and remove their land claims No Yes /k kingdom manage destroy (town) Flint and Steel
Change the capital to another town No Yes /k kingdom manage capital (town) Piston
Change to open (anyone can join) or closed (requires invite) No Yes /k kingdom manage access open|closed Iron Door
Change the kingdom's monument template No Yes /k kingdom manage template [(name)] Crafting Table
Disband the kingdom and remove all towns No Yes /k kingdom manage disband Bone

When the player is only a member, only the first menu row is visible. When the player is an officer, the first two rows are visible. When the player is the kingdom master, all 3 rows are visible.

image

Destroying Towns in the Kingdom

When the core.yml option core.towns.allow_destroy_master is true, the kingdom master can choose to destroy and remove any town in their kingdom, even if they are not a resident of the town. This allows players to remove towns from their kingdom, which is useful when there is a town limit. When a town is destroyed, the monument structure and all land claims are removed. No blocks outside of the monument are modified, so a new town could be settled in its place.

Purchasing Towns from Other Kingdoms

When the core.yml option core.kingdoms.purchase_towns is true, the kingdom master and officers can make offers to purchase towns from any other kingdom. The player that makes the offer must pay the amount from their own Favor account. If the offer is accepted by the other kingdom's master or officers, then the town transfers ownership to the new kingdom. The player that made the offer becomes the new town lord. The offer amount of Favor is paid to the kingdom master of the town's original kingdom. If the original kingdom was an Admin Kingdom, then the Favor is paid to the kingdom officer that accepted the offer.

Capital Swap

When the core.yml option core.kingdoms.capital_swap_enable is true, the kingdom master can move the capital to another town in the kingdom. When the town becomes the new capital, it keeps all of its land, upgrades, residents, and other attributes. The only thing that changes is its name. The old capital also stays the same except it gets the name of the other town. There are several options to control how swapping capitals works:

  • core.kingdoms.capital_swap_war - Allows capitals to be swapped while a kingdom is at war.
  • core.kingdoms.capital_swap_warmup - The time in seconds to wait before swapping a capital after the command has been entered. If this is zero, then the swap happens instantly. During a warmup, if either capital or town have a monument critical block broken by attacking enemy players, then the swap is cancelled.
  • core.favor.kingdoms.cost_capital_swap - The cost in favor to do a capital swap. The player that initiates the swap must pay this cost. If there is a warmup, and the swap is cancelled, the cost is not refunded.

Monument Template

When a kingdom is created, it must use an available monument template. The kingdom master can later change the template in the kingdom menu, shown below. Changing the template costs favor. The kingdom capital and all towns have a Monument structure that is copied from the template. Changing the template will update the Monument in the capital and all towns of the kingdom.

image

Diplomacy

There are 4 diplomatic relationships: peace, war, trade and alliance. A kingdom officer or master can change relationships with any other (non-peaceful) kingdom. The default relation between kingdoms is peace. For an Admin kingdom, admins can set the relationships with other kingdoms and not promote any officers if they wish to keep the kingdom always at war, for instance.

Here are the features of each relationship.

Relationship Allow Town Capture Allow PvP Use Town Trade Specializations Travel to Towns Defensive Pact Build in Towns
Peace No No* No No No No
War Yes Yes No No No Yes
Trade No No Yes No No No
Alliance No No Yes Yes Yes* Yes*
  • PvP during peace depends on core.yml option core.kingdoms.allow_peaceful_pvp
  • Allied defensive pact depends on core.yml option core.kingdoms.ally_defense_pact
  • Allied building in towns depends on both core.yml option core.kingdoms.ally_build, and each town's Allied Building option.

Kingdom officers and the master can change diplomacy relationships in the kingdom menu, with command /k kingdom, and click on the Golden Sword for Relationships. Then, choose the kingdom to change diplomacy. The kingdom's current status is displayed on the helmet on the left. The 4 relationship options are in the center:

  • War - TNT
  • Peace - Quartz Pillar
  • Trade - Emerald Block
  • Alliance - Diamond Block

image

War

When kingdoms are at war, their members can fight in PvP combat and can attack towns to capture them. The kingdom relationship may only change to peace. If core.yml option core.kingdoms.instant_war: true, any kingdom can instantly initiate war when at peace, else both kingdoms must agree to change relationships. Player names and town borders will be colored based on core.colors.enemy_primary and core.colors.enemy_secondary.

Peace

When kingdoms are at peace (default), kingdom members cannot attack or capture towns. They can optionally PvP (core.kingdoms.allow_peaceful_pvp). If core.yml option core.kingdoms.instant_peace: true, any kingdom can instantly initiate peace when at war, else both kingdoms must agree to change relationships. Player names and town borders will be colored based on core.colors.peaceful_primary and core.colors.peaceful_secondary.

Trade

When kingdoms are in trade, kingdom members get access to trade specialization discounts. Villagers with the same profession as a town's trade specialization will give members of the other kingdom a discount on all trades. Both kingdoms must always agree to change relationships to trade. Player names and town borders will be colored based on core.colors.trade_primary and core.colors.trade_secondary.

Alliance

When kingdoms are in an alliance, they get the benefits of trade plus the ability to travel to each other's towns. Lastly, they have a defensive pact which means that if another kingdom declares war on one ally, the other will also go to war. Player names and town borders will be colored based on core.colors.ally_primary and core.colors.ally_secondary.

Payments

Kingdoms can provide a means for passive income payments to its members in the form of kingdom payments. Konquest can deposit favor (currency) to player's accounts using any chosen economy plugin and Vault. The payment is periodic and the amount is configurable based on a player's towns and role within the kingdom. Payments are given every core.favor.kingdoms.pay_interval_seconds seconds, with a maximum payment amount of Favor limited to core.favor.kingdoms.pay_limit. To disable kingdom payments, set core.favor.kingdoms.pay_interval_seconds to 0.

Payments are based on:

  • Player's total land of their towns: core.favor.kingdoms.pay_per_chunk core.yml config option
  • Player's total population of their towns: core.favor.kingdoms.pay_per_resident core.yml config option

Payment Requirements

A player will only receive a kingdom payment if they meet any of these following requirements:

  • They must be the lord of at least 1 town, OR
  • They must be a kingdom officer, OR
  • They must be the kingdom master

Payment Equation

Every kingdom member receives a payment calculated below based on the towns which the player is the lord of, up to a maximum of core.favor.kingdoms.pay_limit, every core.favor.kingdoms.pay_interval_seconds seconds.

A = core.favor.kingdoms.pay_per_chunk
B = core.favor.kingdoms.pay_per_resident
X = Member's total town land
Y = Member's total town population
Payment = (A * X) + (B * Y)

Officer and Master Bonus Equation

If the player is a kingdom officer or kingdom master, they receive a bonus payment that's a percentage of the kingdom's total town land and populations, core.favor.kingdoms.bonus_officer_percent and core.favor.kingdoms.bonus_master_percent respectively.

A = core.favor.kingdoms.pay_per_chunk
B = core.favor.kingdoms.pay_per_resident
C = core.favor.kingdoms.bonus_master_percent or core.favor.kingdoms.bonus_officer_percent
X = Kingdom's total town land
Y = Kingdom's total town population
Bonus = ((A * X) + (B * Y)) * (C/100)

Examples

For example, if a kingdom member is the lord of 2 towns that both have 20 chunks of land total, with 5 residents total, then the guild payment would be 5.5 Favor as shown in the equation below.

A = core.favor.kingdoms.pay_per_chunk = 0.25
B = core.favor.kingdoms.pay_per_resident = 0.1
X = Member's total town land = 20
Y = Member's total town population = 5
Payment = (0.25 * 20) + (0.1 * 5) = 5.5

For another example, if a kingdom master is the lord of 4 towns with 60 chunks of land total, and 10 residents, while all kingdom towns have a total of 200 land with 50 residents, the base guild payment would be (0.25 x 60) + (0.1 x 10) = 16, with a bonus of ((0.25 x 200) + (0.1 x 50)) x 0.5 = 27.5, for a total payment of 43.5 Favor.

A = core.favor.kingdoms.pay_per_chunk = 0.25
B = core.favor.kingdoms.pay_per_resident = 0.1
X = Member's total town land = 60
Y = Member's total town population = 10
Payment = (0.25 * 60) + (0.1 * 10) = 16

C = core.favor.kingdoms.bonus_master_percent = 50
X = Kingdom's total town land = 200
Y = Kingdom's total town residents = 50
Bonus = ((0.25 * 200) + (0.1 * 50)) * (50/100) = 27.5

Properties

Kingdoms have properties that are set by admins using the /k admin flag command. Here's a summary of all properties.

Use the command /k admin flag kingdom (name) to list all current property flag settings.

PEACEFUL

Set the PEACEFUL property flag to true to make a kingdom peaceful, so that it cannot be attacked and its members cannot PvP or attack other kingdoms.

/k admin flag kingdom (name) PEACEFUL true

GOLEMS

Set the GOLEMS property flag to true to make Iron Golems near kingdom towns attack enemy players to defend the towns.

/k admin flag kingdom (name) GOLEMS true