Towny Advanced Portal


> War Hub \ Event War

Prerequisites:

  • Towny 0.100.1.22 or newer.

Current Status: A separate EventWar.jar available to people who Sponsor LlmDl.

Old EventWar: For the EventWar included in Towny versions older than 0.97.3.0 please review the legacy documentation.

Introduction/Game-play:
The new Event War is a hyper-configurable system supporting 7 basic war types:
  • Riot - One town fighting amongst itself. Players side with the city or the rioters via team selection.
  • Town vs Town - Two towns fight against each other.
  • Civil War - One nation fighting amongst itself. Towns side with the capital or the rebels via team selection.
  • Independence War - A war in which a conquered Town fights its own nation for freedom. The town which initiates the war will trigger a team-selection for the other non-capital towns. Towns which side with the rebels will also leave their nation if the rebels win. If the rebels lose all of the rebel towns become conquered.
  • Nation vs Nation - Two nations fight against each other.
  • Alliance vs Alliance - Two nations fight against each other, with both nations' allies able to join the fight.
  • World War - All nations with enemies will be thrown into war. Similar to the old EventWar.
Wars are begun by an admin using /ta war {wartype} ... or via town-purchased Declaration of War books.

Declarations of War are purchased via Tokens using /town redeem {wartype}.

Tokens are earned by every non-neutral town each Towny newday. If a town is part of a nation that nation must not be neutral either. Towns with an active war will also not receive war tokens.

EventWars can be configured to be just a simple game of PVP with no lasting consequences but hurt pride, or it can be configured to involve devastating griefing, and conquering of towns and nations. That's all up to the server.

You can see how your server is configured using the '/eventwar guide' command.

Hyper-Configurable:
Each war type has the following configurable settings:
  • Token Cost - How many tokens does a Declaration of War of this type cost.
  • Base Spoils - How much money is put up for grabs to be won.
  • Cooldown Time - How much time must pass since the towns' last war (of any type) before they can take part in a war of this type.
  • Max Time Duration - An optional maximum duration for a war, in case no other win-conditions are met.
  • Winning Score - An optional high score, that when reached will cause the war to end when reached.
  • Surrender Allowed - Is surrendering allowed?
  • Startup Delay - How much time before a war is begun, does the action start, for a war of this type.
  • TownBlock HP - Whether a war of this type uses the TownBlock HP system. [Not applicable to Riot wars.]
  • TownBlock Switch Towns - Whether a war of this type has TownBlocks that are dropped to 0HP switch to the conquering Towns. [Not applicable to Riot and Civil wars.]
  • TownBlock Single Use - When TownBlock-Switch-Towns is true, determines whether a war of this type has TownBlocks which resurrect after a configurable amount of time, so that they can be re-conquered.. [Not applicable to Riot and Civil wars.]
  • Resident Lives - How many lives does a resident get at the start of the war.
  • Mayor Lives - How many lives does a mayor get at the start of the war.
  • Mayor Death - If a mayor runs out of lives, does that remove their town from the war.
  • Town Conquering - Does a war result in the winning side conquering the losing side. The outcome is different for each war type:
    • Riot - If rioters win, their highest scorer will become the new mayor.
    • Town vs Town - The losing town will be merged into the winning town.
    • Civil War - If the rebels win, the highest scorer will become the new capital of the nation.
    • Independence War - Does not use Town Conquering.
    • Nation vs Nation - Towns which are knocked out of the war will join the conquering nation.
    • Alliance vs Alliance - Towns which are knocked out of the war will join the conquering nation.
    • World War - Towns which are knocked out of the war will join the conquering nation.
  • Occupational Control - Available to Town vs Town and Nation vs Nation wars. A system that allows winning towns/nations to edit their vanquished towns' (and nation capital's,) residents and mayor.
  • Build & Destroy Editable Materials - Decides whether a war will allow the build/destroy of the WarZone Block Protection's editable_materials list.
  • Switch Use - Decides if switches are enabled for the given war type.
  • Item Use - Decides if item_use is enabled for the given war type.
  • Points Per Kill - Decides how many points are given per kill.
  • Neutrality Allowed - Whether neutral towns/nations are able to bypass a war.
  • Minimum Online - A minimum number of people required to be online for the war type to begin.
  • Minimum Online Ignores Low Pop - Whether the min-online is disabled when dealing with a low-pop town or nation which has 100% of its resident online.
Fire, Explosions can also be forced on in war-stricken towns.

Explosions can be made to revert, allowing for explosive wall-smashing, jail-breaking action that repairs itself after 60 seconds.

Points townblocks won, towns removed, and nations removed are all configurable.

Lore:
Event War is heavy in lore. Books are generated and given to players when wars start, when they end, and on every hour. They act as a permanent record for your players to store in their town libraries and museums.

Start-of-War books detail who is involved in the war, the rules by which they are fought and the consequences of victory and failure. Your warconfig.yml's settings determine what goes into the books.

Hourly update books show players who is still in the fight and where the scores stand.

End-of-War books finalize the outcomes of the war, informing players who has survived, providing for a historical document for the ages.

Declaration of War Books:
Declaration of War books are how players start wars. These books are purchased for Tokens using the /town redeem command.

By default riots DoW books cost the least, with the costs increasing as the scopes of the wars increase as well.

This means that riots and town wars will happen more often than civil wars, nation wars and world wars.

A town must be a part of a nation to redeem their tokens for civil war, nation war and world wars books.

An option exists in the warconfig: are_declarations_of_war_usable_only_by_their_creators which limits DoWs to only be used by the town which purchased the book. When this is set to false, it is possible for towns to purchase DoW books and then give them to other towns. This means powerful nations can foment wars in other towns to destabilize them.

Declaration of War books are used to rename the war which will be created by them. While holding their DOW book, a player can run the /declare setwarname {namehere} command. Using an empty name will cause the war name to be removed, making the war choose an automatically-generated name.

Declaration of War books are used by holding the book and using the /declare war [wartype] [arg] command, this is documented in the books themselves.

TownBlock HP Sytem:
When a war type has the TownBlockHP system enabled all of the townblocks in each warring town are given an HP amount. By default normal townblocks have 60 and homeblocks have 120 hp.

HP is lowered when attackers are stood in the townblock, and the attackers outnumber any allies of the town being attacked.

Optionally, townblock HPs can be healed when the allies outnumber the attackers.

Townblocks must be attacked from the edge of town, inwards towards the town's homeblock.

When townblocks are attacked, fireworks appear in the air above.

    To help players discern what can be attacked Event War will make use of a BossBar. In the bossbar you will see 4 stats:
  • Attackable/Non-Attackable: Starting from the edge of town and working progressively inwards, plots that are Attackable can have their HP lowered.
  • TownBlock/HomeBlock: You will see if it is a normal townblock, or the town's vital homeblock.
  • HP remaining: The amount of HP remaining.
  • HP change: The amount that the HP has gone up or down by.
The boss bar is automatically shown when a player moves into a town with an active war, in which the TownBlockHP system is in use.

    Additionally, if you have installed DecentHolograms your players will see Holograms on each TownBlock, showing:
  • HP remaining: The amount of HP remaining.
  • A coloured wool block with three meanings:
    • Green wool: The townblock is attackable.
    • Yellow wool: The townblock is not attackable yet.
    • Red wool: The townblock has fallen and has no HP left.
There is a configurable minimum height that players must be in the world to be considered an attacker.

If a jail plot has its HP dropped to zero, all of the prisoners of war will be unjailed in a prison break, and the jail will no longer be usable for the duration of the war.

If the War allows it, TownBlocks can switch Towns when they are dropped to 0hp. See the /eventwar guide [wartype] to learn if this is enabled on your server for TownWar, NationWar, AllianceWar or WorldWar. It is not available for Riots or CivilWars.

If the War allows it and TownBlocks-can-switch-Towns is true, TownBlocks which have switched sides can be re-conquered after a configurable period of time. See the /eventwar guide [wartype] to learn if this is enabled on your server for TownWar, NationWar, AllianceWar or WorldWar. It is not available for Riots or CivilWars.

BattleSessions:
An optional system available in EventWar, BattleSessions are configurabled per-day-of-the-week, allowing for multiple start times after which fighting and scoring will count towards the server's wars.

While the BattleSession is inactive, scoring points will not occur, townblocks cannot have their HP damaged, and PVP kills will not count against the warring residents' available lives.

Players can see when the the current BattleSession will end or when the next BattleSession will begin by using `/eventwar battlesession`.

Players can turn on/off the BattleSession bossbar using the `/eventwar battlesession bossbar` command.

Occupational Control:
This is a system available to TownWar and NationWar. It is available only when enabled in the war type's config section, and town conquering is disabled.

It is meant to act as a half-way point between no-conquering and conquering.

When a town loses a TownWar, their town becomes Occupationally Controlled.

When a nation loses a NationWar, their nation becomes Occupationally Controlled.

While Occupational Control is in effect the leaders of the victorious town or nation has a number of (optional) available actions:

  • Altering residents - A town (or nation capital) can have residents added and removed.
  • Changing mayors - A town (or nation capital) can have the mayor (or nation leader) changed.
Occupational Control lasts for a configurable amount of time.

While conquering would destroy a vanquished town by merging the town into the winning town, (and destroy a nation when the last town is changed over to the winning nation,) Occupational Control leaves the losing town and nation intact, although under signficant control.


Surrendering:
When a war type allows surrendering, players are able to decide if they can give up.

For Riot, CivilWar, IndependenceWar, and WorldWar types, the player uses /surrender.

Riots allow for anyone to surrender. CivilWar only allows a mayor to surrender their town. WorldWar only allows a king to surrender their nation.

If Riot wars have town conquering enabled, and the Mayor is the one surrendering, their Town will be taken over by the Rebel with the highest score.

If CivilWar has town conquering enabled, and the King is the one surrendering, the rebel Town with the highest score will become the new Capital.

If a Nation Leader surrenders a IndependenceWar, all of the rebelling towns will be freed from their nation.

For TownWar, NationWar and AllianceWar, it is more complicated. The town or nation that wishes to give in must create an offer.

This offer can be for a WhitePeace (nothing,) Money, Towns or Money & Towns combined. See '/surrender ?' for correct command syntax.

The offer is then sent to the mayor or king on the opposite side for their approval. If accepted the war is over and any money or towns is exchanged.

In TownWars, the surrendering Town can only offer itself in surrender, to be merged into the victorious Town.

In NationWars, the surrendering Nation can offer itself or any of its Towns in surrender, to be conquered by the victorious Nation.

In AllianceWars, the surrendering Nation can offer itself or any of its Towns in surrender, to be conquered by the opposing primary Nation. If the surrendering nation is one of the two primary nations in an AllianceWar, the war will end following the acceptance of the surrender offer.

Jails and Prisoners of War:
EventWar makes generous use of the Towny Jail plots, players killed in enemy territory will be transferred to the town's primary jail (falling back to other jails if the primary jail has lost its HP,) to live as a POW (prisoner-of-war.)

In riot wars, players are unjailed if they can leave the jail plot. In other war types they must exit the town's land.

Jailbreaks occur when a jail's HP is dropped to zero and all prisoners are freed.

While jailed, players are unable to score kills, lose their lives or damage townblock HP's.

End conditions:
Wars can be ended by the following conditions:
  • A Riot will be ended if:
    • All of the surviving rioters are in Jail.
    • All of the players on either side run out of lives
    • The mayor is killed and mayordeath is enabled for riots.
    • The mayor surrenders, or either side's remaining players surrender.
  • A town can be knocked out of a war in the following ways:
    • A town has its homeblock fall to 0hp (when the TownBlockHP system is enabled.)
    • A mayor runs out of lives and the mayordeath option is enabled for the wartype.
    • A towns' residents collectively lose all their lives.
    • A town cannot pay the death costs because their town bank has no money (when using_economy is true.)
    • A town makes a surrender offer which is accepted.
  • A nation can be knocked out of a war in the following ways:
    • A nation's king runs out of lives and mayordeath is enabled for the wartype.
    • A nation's capital city is knocked out of the war.
    • A nation's towns are all removed from the war.
    • A nation makes a surrender offer which is accepted.
  • A alliance war will end if:
    • All the nations on either side are removed from the war.
    • One of the primary nations makes a surrender offer which is accepted.
  • A civil war or independence war will end if:
    • The capital city is removed from the war.
    • All the towns on either side are removed from the war.
    • The king surrenders, or either side's remaining towns surrender.
  • A world war will end if:
    • There is only one Nation left, or all of the remaining Nations consider each other Allies.
  • Each war type has an optional, configurable max-duration, to keep wars from going on indefinitely.
  • Alternatively, each war type can end if there is a winning score configured:
    • When a town (or resident in Riots,) hits the winning score, the war will end and they will be declared the winner.
  • Alternatively, each war type can end if there is a maximum duration configured:
    • When the war's maximum duration is reached, the town (or resident in Riots,) with the highest score will be declared the winner.

Commands:
  • /eventwar
    • /eventwar guide: Opens a book for the player, explaining how EventWar works, based on your server's config settings.
    • /eventwar guide riot: Opens a book for the player, explaining riots.
    • /eventwar guide townwar: Opens a book for the player, explaining town vs town wars.
    • /eventwar guide civilwar: Opens a book for the player, explaining civil wars.
    • /eventwar guide independencewar: Opens a book for the player, explaining independence wars.
    • /eventwar guide nationwar: Opens a book for the player, explaining nation wars.
    • /eventwar guide alliancewar: Opens a book for the player, explaining alliance wars.
    • /eventwar guide worldwar: Opens a book for the player, explaining world wars.
    • /eventwar guide conquering: Opens a book for the player, explaining how conquering works.
    • /eventwar guide occupationalcontrol: Opens a book for the player, explaining how occupational control work.
    • /eventwar guide townblocks: Opens a book for the player, explaining how the TownBlock HP system works.
    • /eventwar guide money: Opens a book for the player, explaining how money affects wars.
    • /eventwar guide winning: Opens a book for the player, explaining how to win wars.
    • /eventwar guide battlesession: Opens a book for the player, explaining how battle sessions work.
    • /eventwar guide points: Opens a book for the player, explaining how points are scored.
    • /eventwar guide jails: Opens a book for the player, explaining how jails and PoWs work.
    • /eventwar battlesession: Shows players information about the current or next-scheduled battle session.
    • /eventwar battlesession bossbar: Allows the player to turn on or off the battle session boss bar.
  • /towny war
    • /towny war hud: Opens a scoreboard for the player, which details their points, top scores and recent scores.
    • /towny war participants {page #}: A list of towns and their nation who are in each on-going war. The list highlights enemies, allies and capital towns. While war is in effect, each competing town has a health points property attached to it.
    • /towny war stats: Shows stats on the player's current war.
    • /towny war scores: Shows the scores of the player's current war.
    • /towny war types: Shows the settings of various war types (mainly for debugging now.)
  • /town
    • /town redeem {wartype}: Used to purchase a Declaration of War of the given war type.
    • /town occupation Shows players who occupies their town, and for how long, or the /town occupation help.
    • /town occupation list Shows a list of towns your town occupies.
    • /town occupation {townname} info Shows information about one town which you occupy.
    • /town occupation {townname} setmayor {playername} Sets the occupied town's mayor.
    • /town occupation {townname} resident add {playername} Adds a resident to the occupied town.
    • /town occupation {townname} resident remove {playername} Removes a resident from the occupied town.
  • /nation
    • /nation alliancewar request {allyname}: The primary nations battling in an Alliance War can use this command to request their allies join the war (when they are not already automatically added.)
    • /nation occupation Shows players who occupies their nation, and for how long, or the /nation occupation help.
    • /nation occupation list Shows a list of towns your town occupies.
    • /nation occupation {nationname} info Shows information about one nation which you occupy.
    • /nation occupation {nationname} setking {playername} Sets the occupied nation capital's mayor.
    • /nation occupation {nationname} resident add {playername} Adds a resident to the occupied nation capital.
    • /nation occupation {nationname} resident remove {playername} Removes a resident from the occupied nation capital.
  • /declare
    • /declare rebel: Used to side with the rioters/rebels in Riot, Civil and Independence Wars.
    • /declare government: Used to side with the city/capital in Riot, Civil and Independence Wars.
    • /declare war {wartype} {args}: Used while holding a Declaration of War book of the given war type, to start a war.
    • /declare setwarname {name}: Used while holding a Declaration of War book, to customize the name of the war which will be created. An empty name will unset the custom name.
  • /surrender
    • /surrender: Used to surrender in Riots, Civil Wars, Independence Wars, and World Wars.
    • /surrender money {amount}: Used in Town, Nation and Alliance Wars to surrender for money.
    • /surrender towns {town1 town2 town3}: Used in Town, Nation and Alliance Wars to surrender for towns.
    • /surrender money {amount} towns {town1 town2 town3}: Used in Town, Nation and Alliance Wars to surrender for money and towns.
  • /townyadmin war
    • /ta war riot [town]: Used to start a riot in the given town.
    • /ta war townwar [town] [town]: Used to start a townwar between the given towns.
    • /ta war civilwar [nation]: Used to start a civilwar in the given nation.
    • /ta war independencewar [town]: Used to start a independencewar in the given town's nation. The given town will be the rebel leader.
    • /ta war nationwar [nation] [nation]: Used to start a nationwar between the given nations.
    • /ta war alliancewar [nation] [nation]: Used to start a alliancewar between the given nations, and their allies.
    • /ta war worldwar: Used to start a worldwar.
    • /ta war endwar [warname]: Used to end a war.
    • /ta war tokens [townname] [add|remove|set] #: admin command to manipulate a town's token count.
    • /ta war list: Lists all the active.
    • /ta war purge: Completely removes EventWar metadata from the Towny database and cleans out all EventWar war data.
    • /ta war settownoccupied {town1} {town2} Sets town1 occupied by town2.
    • /ta war settownoccupied {occupiedtown} false Removes occupation status from town.
    • /ta war setnationoccupied {nation1} {nation2} Sets nation1 occupied by nation2.
    • /ta war setnationoccupied {occupiednation} false Removes occupation status from nation.
  • /townyadmin reload
    • /ta reload eventwar: Used to reload eventwar's config, languages and database.

Permissions:
For the most part EventWar has no permissions you need to configure, but some things require towny.admin or op.

One node you must give to mayors (and other town ranks that are similar to mayors):
  • towny.command.town.redeem - Used to redeem wartokens for Declaration of War books.
There is one node locking away the use of /townyadmin war's sub-commands:

  • eventwar.admin
    • default: op
    • child nodes:
      • towny.command.townyadmin.war.worldwar
      • towny.command.townyadmin.war.riot
      • towny.command.townyadmin.war.townwar
      • towny.command.townyadmin.war.civilwar
      • towny.command.townyadmin.war.independencewar
      • towny.command.townyadmin.war.nationwar
      • towny.command.townyadmin.war.alliancewar
      • towny.command.townyadmin.war.list
      • towny.command.townyadmin.war.purge
      • towny.command.townyadmin.war.endwar
      • towny.command.townyadmin.war.tokens
      • towny.command.townyadmin.war.givelife
      • towny.command.townyadmin.war.settownoccupied
      • towny.command.townyadmin.war.setnationoccupied

PlaceholderAPI Placeholders:
  • %eventwar_town_war_tokens% - Displays the number of tokens a player's town has.
  • %eventwar_riot_token_cost% - Displays how many tokens a riot costs.
  • %eventwar_townwar_token_cost% - Displays how many tokens a townwar costs.
  • %eventwar_civilwar_token_cost% - Displays how many tokens a civilwar costs.
  • %eventwar_independencewar_token_cost% - Displays how many tokens a independencewar costs.
  • %eventwar_nationwar_token_cost% - Displays how many tokens a nationwar costs.
  • %eventwar_alliancewar_token_cost% - Displays how many tokens a alliancewar costs.
  • %eventwar_worldwar_token_cost% - Displays how many tokens a worldwar costs.
  • %eventwar_player_townblock_hp% - Displays the HP of a townblock where the player is stood.

Discord Embeds:
When enabled in the warconfig.yml and supplied with your valid URL, EventWar will broadcast the following events to your Discord channel:
  • War Declarations
  • War Starts
  • War Surrenders
  • War Ends
  • BattleSession Starts
  • BattleSession Ends






Website powered by Skeleton