Towns - Rumsfield/konquest GitHub Wiki

Updated for version 1.9.0

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

  1. Overview
  2. Town Features
  3. Settling Towns
  4. Residency
  5. Management
  6. Capturing Towns
  7. Properties

Overview

A Town is an area of claimed land with a Monument in the game world. Players create new towns for their kingdom with the command /k settle (name). Kingdoms start with a special town, called the Capital, that has extra immunity conditions. When the capital is captured, the kingdom is removed. When a town is captured, it changes ownership to the attacking player's kingdom, which then has access to all chests and containers within town land.

Here is a summary of town features:

  • Claim 16x16 block chunks of land in the game world.
  • Protection from monsters and container access by other players.
  • Captured by other kingdoms when critical blocks are broken in the Monument.
  • Travel (teleport) to any town in your kingdom.
  • Manage which players can join your towns as residents, and where they can build.
  • Each town has options to control different behavior, like allowing players to use redstone or making iron golems attack enemies.
  • Each town has upgrades to add buffs like extra health or blocking all TNT damage.
  • Add armor to a town to cancel a limited number of block breaks.
  • Add shields to a town to cancel all block breaks for a limited amount of time.
  • Set a trade specialization to make some villager professions give discounted trades.

Town Features

The main purpose of towns is to claim chunks of land in the world, which protect access to chests and containers, among other things. Players claim more land for the nearest town with the command /k claim. If core.towns.allow_unclaim: true, the town lord can unclaim chunks of land from a town with command /k unclaim. If core.towns.allow_claim_residents_only: true, only town residents can claim land for their towns.

The Monument

Every kingdom uses a monument template, which is a structure that gets copied into every new town to become the Town Monument. The chunk that contains the Monument has special features:

  • Friendly kingdom members cannot break or place any blocks.
  • Chests will produce random loot for the town lord and knights, periodically set by core.monuments.loot_refresh.
  • Contains the travel point for the town, where players will teleport to by using the /k travel command.
  • Enemy players at war with the kingdom can break blocks, but cannot place any blocks.
  • When all of the critical blocks (default obsidian, core.monuments.critical_block) have been destroyed, the town is captured for the enemy kingdom, and the attacking player becomes the new town lord.
  • When an enemy breaks blocks in the Monument and then stops attacking, the monument will automatically re-generate after some time set by core.monuments.damage_regen.

Monument loot chests are included in the monument template by admins. When the town lord or knights open a loot chest within the monument, random loot is added based on this configurable table. The loot chest is a game mechanic that's intended to incentivize players to settle multiple towns and claim more land for their kingdom. It can also make the survival gameplay aspect easier if the loot frequently provides materials that are slow to obtain normally, putting greater emphasis on attacking enemy towns.

Travel

Any kingdom member, or player in an allied kingdom, can travel to a town with the /k travel command. This teleports the player to the travel point within the town monument. There is a setting for travel warmup time, where the player must hold still before travel or else it gets cancelled, set by core.travel.cancel_on_move and core.travel.warmup. There is also an option to cancel the travel warmup when a player takes any damage, set by core.travel.cancel_on_damage. Any kingdom member may travel to a town, but they still need to be added as a resident to build in it if the town is closed. During an attack, players that travel to a town when critical blocks are being destroyed can receive a reward in Favor, set by core.favor.rewards.defend_raid. The important aspect of travel is that any kingdom member can come to any town to help defend it from attackers.

There is a travel cooldown timer for every town, with a time specified by core.towns.travel_cooldown. When a player travels to a town, they cannot travel there again until the cooldown is over. This applies on a per-town basis, so while a cooldown for one town is active, the player can still travel to another town. This feature is intended to prevent players who die while defending a town from attack from respawning and traveling back too quickly.

Open vs Closed

There is a town option to make a town either open or closed. By default, new towns are closed, which means that players must be invited to join by the town lord or knights. Alternatively, when a town is open, any kingdom member may join the town as a resident. Towns offer different protections when open and closed.

Option Who can build Who can open chests Who can kill/use animals Who can trade with villagers
Open All kingdom members All kingdom members All kingdom members All kingdom, trade, allied members
Closed Only residents Only residents Only residents All kingdom, trade, allied members

Town Protections

Inside of claimed town land, a few things are protected against any players that are not residents.

  • Cannot open containers like chests, furnaces, etc.
  • Cannot interact or damage animal mobs, unless the animal is tamed and owned by the player.
  • Monster mobs do not spawn (see MOBS property flag).
  • Restricts which players can break and place blocks based on Diplomacy:
    • When the town is open, all kingdom members are allowed.
    • When the town is closed, only kingdom members that are residents are allowed.
    • Players in enemy kingdoms (war) are allowed.
    • Players in allied kingdoms (alliance) are allowed in towns with option Allied Building set to true.
    • Players in other kingdoms (trade, peace) are not allowed.
  • Liquids (water, lava, etc.) do not flow from outside of town land to the inside.
  • Cannot throw splash potions unless the player is a town kingdom member, or in an enemy kingdom.
  • Completely protected when either all kingdom members are offline, or the town has Town Watch upgrade and enough town residents are offline:
    • No block breaking or placing.
    • No animal mob damage.
    • Cannot use pistons inside of town land (core.kingdoms.protect_pistons_use).
  • Cannot ignite TNT, or cause TNT to explode, inside of town claimed land (core.enable_advanced_tnt_protection).

Settling Towns

Once a player is a member of a kingdom, they can create new towns with the /k settle (name) command. When the option core.towns.settle_officer_only is true, only the kingdom master and officers can settle new towns. Players can settle more than one town, but the cost increases for each town they settle (core.favor.towns.cost_settle_increment). The cost increase can either be based on the number of towns the player is the lord in, or the number of total towns in the kingdoms (core.favor.towns.settle_increment_kingdom).

There are constraints on the location for new towns, like ground flatness and distance from other towns. Towns must always be settled on the highest blocks of the chunk, and never underground or in caves. Towns cannot be created over water or lava, or in the Nether.

There is a configuration option, core.kingdoms.max_town_limit, to limit the number of towns that players can settle for their kingdom. This does not affect capturing towns from enemy kingdoms. When this option is 0, there is no limit. Another option, core.kingdoms.max_town_limit_per_world, controls whether the limit only applies to towns in the same world, or across all worlds (global). For example, if the global max town limit is 10, then players can only settle new towns while there are less than 10 towns in their kingdom, including the capital. Players could still capture enemy towns so that the total number of towns is greater than 10, but they will still not be able to settle new ones.

For more details on how to settle towns and the constraints for creating new towns, see the Concepts page.

Residency

If a player wants to build in a town, they need to join it as a resident. When a player settles a new town, they automatically become the lord of that town. There are 3 levels of residency in towns:

  1. Resident - Joins the town through the Town Menu
  2. Knight - Promoted by the town lord
  3. Lord - Created the town, transferred from previous lord, or took over an abandoned town
Player Loot Chests Invites & Requests Kick Town Plots Add Shields & Armor Promote & Demote Knights Transfer Lord Upgrades Options Specialization
Resident No No No No No No No No No No
Knight Yes Yes Yes Yes Yes No No No No No
Lord Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes

Joining a Town

Players use the Town Menu to join and list towns in their kingdom, using command /k town. This is similar to the Kingdom Menu's first row that is only used for the following:

  1. Join a town or capital (saddle)
  2. Leave a town to stop being a resident (arrow)
  3. Show towns with pending requests to join (glass bottle)
  4. Respond to invitations to join other towns (book)
  5. View a list of all towns in your kingdom (paper)

This Town Menu is only used for the actions above. There is a separate town management menu for individual towns.

image

Clicking on the saddle brings you to the Join page, where you can choose from available towns to join. Clicking on open towns will join instantly. Clicking on closed towns will send a request to join to the town knights/lord.

image

Residency Restrictions

Players cannot join a town as a resident if it has reached the maximum number of residents, set by core.town.max_resident_limit (set to 0 to disable). This resident limit applies to all towns and capitals in the server. When the option is set to 0 in core.yml, there is no limit for how many players can join a town.

Abandoned Towns

When a town has no lord, either because they left or got pruned while offline, it is considered abandoned. Players can use the command /k town lord (name) to take over as the new town lord. There are some restrictions on which players can do this:

  • When the town has knights, only the knights may take over as lord.
  • When the town has no knights but has residents, only the residents may take over as lord.
  • When the town has no residents, any kingdom member may take over as lord.

Management

Towns have the following management features:

Feature Knight Access Lord Access Command Town Management Menu Icon
Invite players to join and become residents Yes Yes /k town manage (town) resident invite (player) None
Kick residents from the town Yes Yes /k town manage (town) resident kick (player) None
Rename the town No Yes /k town manage (town) rename (name) None
Respond to requests by other players to join Yes Yes /k town manage (town) requests [(player)] accept|deny Glass Bottle
Manage Town Plots Yes Yes /k town manage (town) plots Grass Block
Add shields Yes Yes /k town manage (town) shield [(name)] Shield
Add armor Yes Yes /k town manage (town) armor [(name)] Diamond Chestplate
Promote and demote town knights No Yes /k town manage (town) resident promote|demote (player) Diamond/Leather Horse Armor
Transfer lord to another resident/knight No Yes /k town manage (town) resident lord (player) Elytra
Destroy the town and remove its land claims No Yes /k town manage (town) destroy TNT
Add upgrades No Yes /k town manage (town) upgrade [(name)] Golden Apple
Manage options No Yes /k town manage (town) option (name) [true|false] Paper
Change specialization No Yes /k town manage (town) specialize [(name)] Emerald

Only the town lord and knights can use the Town Management Menu, by specifying a town name in the command /k town manage (name) or /k town manage (name) menu. When the player is a knight, only the first row are visible (knight management icons). When the player is the town lord, both rows are visible (knight and master management icons).

image

Destroying a Town

When the core.yml option core.towns.allow_destroy_lord is true, any town lord can choose to destroy and remove their towns, except for the kingdom capital. 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. Note that the kingdom capital cannot be destroyed in this way.

Town Plots

Grass Block Icon, Knights & Lord

The claimed land of a town can be divided up into plots where only specific residents are allowed to build and open chests. If core.plots.ignore_knights: true, then knights can always build and use chests in any town plot. The town lord always ignores plot protections. For more details, see the Town Plots page.

Shields & Armor

Shield and Diamond Chestplate Icons, Knights & Lord

Players can pay for added protection in towns using Favor. Shields protect from all attacks for a limited time. Armor protects from block breaks for a limited number of blocks. Both shields and armor are purchased through the Town Management Menu. For more details, see the Shields & Armor page.

Upgrades

Golden Apple Icon, Lord

Town upgrades improve various things about a town, like the amount of items dropped from animals to the quality of enchanting recipes. If the setting core.towns.capture_upgrades: true, then towns keep upgrades when they are captured by other kingdoms, else the upgrades are removed. Upgrades require an initial cost in favor, and also a continued population to stay active. If a town no longer has enough population to meet an upgrade's requirement, the upgrade will down-grade to the previous level, or become disabled if there is no lower level. For more details, see the Upgrades page.

Town Options

Paper Icon, Lord

Every town has a set of options that each town lord can modify. Each option is either true or false, and clicking on the option icon changes it to the opposite value.

Option Description Default Value Menu Icon
Allied Building Allied players can build False Brick Stairs
Open All kingdom members can build and use chests False Dark Oak Door
Plot Residents can only build and use chests in plots False Diamond Shovel
Friendly Redstone Kingdom members can use redstone switches and doors True Lever
Enemy Redstone Enemies can use redstone switches and doors False Redstone Dust
Iron Golem Offense Iron Golems will attack all enemies who enter False Iron Sword

image

Trade Specialization

Emerald Icon, Lord

Every town can choose one villager profession to specialize, for example librarian. Any villager with the same profession inside of town land will receive a discount on all trades. The discount is configured as a percentage of the original item amounts, core.towns.discount_percent. Enable this feature by setting core.towns.discount_enable: true. Allow for discounts to stack on top of other discounts, like curing zombie villagers, by setting core.towns.discount_stack: true.

Note that the specializations "NONE" and "NITWIT" will not do anything, and give no discounts to any villager trades.

image

For example, for a default value core.towns.discount_percent = 50 and specialization of librarian, if the first trade was originally 24 paper for 1 emerald, the discounted trade would be 24 x (50/100) = 12 paper for 1 emerald. The librarian must be located within town land that has the librarian specialization.

Capturing Towns

When players attack an enemy town, they can break blocks within claimed land, but cannot access chests or kill farm animals. In order to capture the town for their kingdom, they must go to the Monument and destroy all (default 12) critical (default obsidian) blocks. The player that destroys the last critical block captures the town for their kingdom, and becomes the town's new lord. For more details on town attacks, raiding and protections, see the Concepts page.

Properties

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

Use the commands /k admin flag town (name) and /k admin flag capital (name) to list all current property flag settings. The flags are:

  • CAPTURE
  • CLAIM
  • UNCLAIM
  • UPGRADE
  • PLOTS
  • TRAVEL
  • PVP
  • PVE
  • BUILD
  • USE
  • CHEST
  • MOBS
  • PORTALS