Giter Club home page Giter Club logo

siegewar's Introduction

SiegeWar

SiegeWar adds a war system to Towny.

Features

  • โš”๏ธ Sieges: Wars are conducted by means of sieges. A siege occurs when a nation attacks a town.
  • ๐ŸŒ Inclusive: The whole server is involved, with no opt-outs. So a nation can conquer the world!.
  • ๐Ÿค– Automatic: Sieges are started by players and automatically managed by the plugin. Daily staff management of sieges is not required.
  • ๐Ÿšถ Slow Paced: Each siege consists of 7 hours fighting time, spread over the course of a weekend.
  • ๐Ÿ™๏ธ Non-Destructive: Towns cannot be damaged or stolen from during sieges. Towns can get extra protection by activating the Peaceful option, which makes them immune to sieges, but vulnerable to instant-capture.

Videos

Links

Credits:

  • SiegeWar was initially developed by Goosius1, starting in the summer of 2019.
  • Originally SiegeWar was a fork of Towny, being built directly into Towny.
  • SiegeWar was later transformed by LlmDl & Warriorrr into the plugin which exists today. This work took about 2 months, and involved adding many many API events to Towny, and changing the entire SiegeWar database to use Towny metadata. The plugin was released in January 2021.
  • Following the release of the plugin, many new features and improvements were added, with key contributions from Goosius1, LlmDl, and Warriorrr. Multiple other developers have contributed also, notably Ceeedric.
  • Special thanks to the servers CCNET, DatBlock, and EarthPol, who pioneered the use of the system, and have provided much valuable information, feedback, and bug reports.
  • Goosius1 was the maintainer of this repo for the TownyAdvanced org, until his retirement from Minecraft plugin development in October 2021.
  • SiegeWar is now maintained by the TownyAdvanced org.

siegewar's People

Contributors

ceeedric avatar ewof avatar galacticwarrior9 avatar goosius1 avatar haxx0r-4559 avatar illumeleet avatar kovalski4 avatar lexiccn avatar llmdl avatar ludwighornslied avatar painochoco avatar rohanveit1 avatar tlm9201 avatar warriorrrr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

siegewar's Issues

Suggestion: Siegewar - Add mid-siege explosions config

DESCRIPTION

  • Some servers have access to plugins which allow explosions + rollbacks. In particular, cannons and tanks.
  • Some have requested that that these things be more usable in sieges, by enabling explosions during sieges.
  • As long as the servers make players aware that this tactic is secondary to the system (like any sort of town infiltration), then it could be fun.

EXPECTED

  • Add the config (Default to false)
  • Read the config just like the pvp one is read, with a change for besieged towns.
  • Ensure neutral towns are not affected

Suggestion: Display information such as siege points on dynmap for Siege War

So, currently in siege war, an ongoing siege is shown on dynmap with a little fire thing in the siege chunk and it displays who is attacking when you hover it. My suggestion is, make it display more information such as siege points and how much time until the siege ends. That will make it possible to check how the siege is going by just looking at the dynmap.

Suggestion:

Is your feature request related to a problem? Please describe.
no

Describe the solution you'd like
Well you could add a system where we could make our own points like, siegewar.nation.points.ourown. and then add our own points.
Many servers like to add special ranks so it will be fun and useful

Describe alternatives you've considered
or just let us edit the default points,
leadership
points
and siege.*

Suggestion: Prevent players from using native Dynmap features to hide during BC sessions

Is your feature request related to a problem? Please describe.

  • There are multiple native dynmap features (some enabled by default), which allow players to disappear from the Map during banner control sessions (e.g. hide under a block, sneak, invis potions, /dynmap hide)
  • This has a negative impact on Battles, because armies instinctively tend to use these tactics, it means that entire armies disappear from the dynmap at exactly the times when being visible would encourage the enemy to show up for an exciting PVP battle.
  • This issue particularly applies if the enemy if offline and occasionally scanning the dynmap for enemy activity, but it also applies when they are online, where but for 2 global notifications which they could miss, they might not notice the enemy activity.

Describe the solution you'd like

  • Find a way that players always show up on the dynmap regardless of which native dynmap features they are using.

Describe alternatives you've considered

  • I have considered restricting banner control to when the players are map-visible, however this would not work with the very popular native dynmap 'hide if underground' feature, because it would allow the exploit of the enemy placing blocks above soldiers to break their BC.
  • I have already added an installation guideline to actually turn off these features, and replace them all with map-sneaking, but this is not ideal, as some features are lost.
  • I have already changed the siege icon of sieges where people have BC and/or BC sessions, to a crossed swords icon (0.1.1). This is good, as it shows activity, and has an additional benefit of easily showing when the zone is contested but empty. However even with this, seeing more players icons beside the new crossed-swords icon would still be good.

Additional context

  • I have tried assertVisibility(true) for the hiding players - didn't work
  • I have tried assertInvisibility(false) for the hiding players - didn't work
  • I have tried setVisibility(true) for the hiding players - didn't work
  • I have tried create a new PlayerSet for players in BC sessions (by default there are zero player sets accessibly by getPlayerSets(), even when players are visibke)- didn't work

Suggestion: Add ability for generals to add/remove nation military ranks

Is your feature request related to a problem? Please describe.

  • Currently, only kings/assistants can add/remove nation military ranks
  • Thus, soldier recruitment has to wait for the king to come online, and if a soldier is behaving with poor discipline and dying a lot, affecting a siege badly, again the king has to come online to remove their rank.

Describe the solution you'd like

  • It would be beneficial if generals could add/remove military ranks
  • Thus generals could get a new permission: towny.nation.siege.rank.* ........can add/remove ranks which have towny.nation.siege.points (but not ranks w/ towny.nation.siege.*)

Describe alternatives you've considered

  • I considered giving generals the overall nation rank permission ..... but this would effectively make them as powerful as assistants.....which is often not appropriate.

Additional context
N/A

Suggestion: Command blacklist during Siege

Is your feature request related to a problem? Please describe.
Certain commands, such as teleportation commands, being used during sieges can lead to unintended advantages for certain players.

Describe the solution you'd like
Can you add a blacklist of commands in the config.yml for when a siege is triggered? (Only for people who are at war)

Describe alternatives you've considered
Removing certain commands entirely from the server, but that creates a lot of inconveniences for players, especially teleportation commands.

I can't start a war

I have 1.300.000 money in my town but its says there is no money in your bank i use TNE and vault plugin for money and it doesn't work Can someone help me pls?

Screenshots
https://imgur.com/a/vpLpJbM

Versions (please complete the following information):

  • Towny: 0.96.7.0
  • SiegeWar: 0.2.0
  • Spigot/Paper: 1.16.5 Paper

Files
Startup log: https://drive.google.com/file/d/1KDnFeYBrR31pzDgCTqBcV7sbik0mj0l8/view?usp=sharing
SiegeWar config: https://drive.google.com/file/d/10bCmhvi69Cs7sldQgiK8OHptGoidtNDc/view?usp=sharing
Townyperms.yml: https://drive.google.com/file/d/1LJ8OkfalA0uqhjSAjxRSxZ24IrA4DBmo/view?usp=sharing

Bug: glowing

Describe the bug
Sometimes during a siege I lose my glowing early or don't get it at all, I've seen this happening to other people too. (Only noticed on CrusadeCraft)

To Reproduce
Steps to reproduce the behavior:

  1. Start a siege
  2. Take banner control
  3. Notice you don't have glowing but you're still qualifying for banner control

Expected behavior
Keep or get glowing for the whole time you're near the banner.

Durability degradation affects items with the "Unbreakable" NBT tag

Describe the bug
When degrade_inventory is enabled, dying will degrade the durability of items with the Unbreakable NBT tag, because the plugin currently does not check for its presence.

To Reproduce
Steps to reproduce the behavior:

  1. Enable degrade_inventory.
  2. Set percentage to a non-zero value.
  3. Die in a siege while having an item with the Unbreakable NBT tag in your inventory.
  4. Respawn - the item will have lost durability.

Expected behavior
Items with the Unbreakable NBT tag should not have their durability affected.

Screenshots
Screenshot

Versions (please complete the following information):

  • Towny: 0.96.7.1
  • SiegeWar: 0.1.0
  • Spigot/Paper: Purpur 1.16.5, Build 971

Files
SiegeWar config:

Relevant section:

    death_penalty:
      degrade_inventory:
 
        # This feature is recommended for use with keep_inventory_on_siege_death.
        # If this setting is true, battle will be more 'rpg-like', with a little more death cost.
        # If this setting is false, battles will be more 'arcade-like', with low death cost.
        enabled: 'true'
 
        # This values specifies the percentage equipment degradation that occurs to a soldiers equipment,
        # when they die in a siege zone.
        # A low value will keep battles fast paced.
        # A high value will slow down battles (as players take time to repair items),
        # and will also exclude some casual players from war (as they cannot afford to keep repairing/replacing/mending degraded items)
        percentage: '20.0'

Suggestion: Refactor Battle Sessions

Description

With Current code, there are a number of inter-related problems:

  • Battle sessions are not giving effective breaks.

    • During the current break time, battles are still ongoing, thus a player on a break is just forcefully removed from the action, rather than a genuine break where they could relax a lot more.
    • Because of this dynamic, the feature is not appealing to either players or admins, and as a result is often disabled by individual server admins.
    • This is a health & safety issue. If we want to look after player health, we must design these breaks in a better and more appealing way.
  • Players sometimes feel that they are not getting enough short-term rewards at sieges.

    • This is understandable
    • For a winning team, players have to fight for 3 days for any official reward, in terms of a victory or a material reward.
    • For a losing team they fight for 3 days for no official reward at all.
    • This often leads servers admins to disable the critical 'keep-env-with-degrade' feature, thus excluding many casual players from battle, and pointing the server towards a factions-like geopolitical outcome. (as described in the FAQ)
  • Players sometimes feel that opponents are trying to win by avoiding a fight & using timed points.

    • There should be room in sieges for subtle tactics like these (as with any domination-type game mode).
    • However, due to lack of regular wins/rewards, players/admins justifiably feel like such tactics are too boring to be allowed.
    • Such tactics can be partially mitigated by stealth tactics & the counterattack-booster
    • However, even this partial mitigation can be hampered by lack of subtle tactics generally, massive health pot stacking which can hinder ambush effectiveness, and by the standard server tab command which shows all online players.
    • Some servers counter this by introducing an extreme ratio of timed-points to death points e.g. 500:2
    • As with the previous point, this setting is disastrous for casual players. (as described in the FAQ)
  • Toxicity is an issue

    • Due to the significant 3 day investment by players, break-less fighting, lack of regular material gains, and after which the winner wins all and the loser loses all, toxicity can be fostered.

Describe the solution you'd like

  • Summary
    • Refactor battle sessions significantly as a genuine partition of sieges into sections with breaks, and plunder for the winner of each session.
  • Details:
    • Only 1 battle session at a time on the server, affecting all players & sieges,
    • Battle sessions start automatically on the hour or half hour, helping maneuvre/combat scheduling.
    • When a b.session starts, a message goes out (global)
    • Battles sessions last 50 mins (default)
    • Within a battle session, there is a 'battle' at each siege, in which siege points can be gained/lost
    • Banner control sessions now take just 5 minutes
    • At the end of the session, the siege points reset to 0, and one side is declared the winner
    • If the defender wins, plunder is stolen from the war chest, and distributed among the town bank and any soldiers who got BC during the battle.
    • If the attacker wins, plunder is stolen from the town, and distributed among the nation bank and any soldiers who got BC during the battle.
    • When a b.session ends, a message goes out (global), saying who won
    • After a battle session ends, there is a 10 minute break (default), before the next one starts
    • At the end of a siege, the siege with the most battles won, wins the siege
    • Plunder option is removed from the end of a siege.

Describe alternatives you've considered
N/A

Additional context
N/A

Nation deletion during Siege = Plugin Disable.

Describe the bug
When a nation gets disbanded during a Siege (which shouldn't be possible?), the capital of the nation gets set to "null" and when the server restarts, it will disable the plugin.

To Reproduce
Steps to reproduce the behavior:

  1. Get in a Siege Battle
  2. Disband your nation during battle
  3. Restart the server
  4. Plugin gets disabled as it can not return nation king.

Expected behavior
Nations do not get disbanded during Siegewar or delete the nation fully.

Screenshots
MYSQL Selection: https://i.imgur.com/xOqELAA.png

Versions (please complete the following information):

  • Towny: 0.96.7.0 (0.96.7.1)
  • SiegeWar: SiegeWar0.1.0 (now on 0.1.1)
  • Spigot/Paper: git-Purpur-952

Files
Startup log: https://pastebin.com/raw/XLMEydi1
SiegeWar config: https://pastebin.com/JiRN46EE

Infinite Siege

Describe the bug
After a town is plundered the sw hud says the time is 18,000+ days and it doesn't remove from the nation sieges

To Reproduce
Steps to reproduce the behavior:

  1. Nation leader starts a siege on a nationless town
  2. Attacker wins
  3. Plunder
  4. Invaded town says its occupied etc, banner disappears etc, but /sw hud (invaded town) remains (in our case it said the days remaining was 18000+) and /n (invading nation) still has the invaded town on their siege attacks list.

Expected behavior
...Sw hud to disappear since no active siege is occurring and the siege attack for the town to be removed from the /n

Screenshots
2021-02-14_12 05 56 - Copy
2021-02-14_12 05 56

Versions (please complete the following information):

  • Towny: 0.96.7.0
  • SiegeWar: 0.1.0
  • Spigot/Paper: Airplane 1.0

Files
Startup log: latest (2).log
SiegeWar config: config (2).txt
Townyperms.yml: townyperms.txt

Siege War Bankrupt Town issue

What steps will reproduce the problem?

  1. Enable bankrupt towns in config, set debt cap to 1k
  2. Wait till taxes get paid
  3. do /t to see bank.
  4. You'll see -1000 in town bank.
  5. /t deposit 1000
  6. Still says bankrupt town and -1000 in town bank

What is the expected output?

  1. town stays bankrupt no matter how much money you put into it

What is your Towny version?

Towny-SeigeWar-0.96.5.8-SNAPSHOTe2ee58e.jar

What is your spigot/craftbukkit version?

1.16.4 Paper

Please use Pastebin.com to link the following files:

Skipping these files is not an option. It is the easiest way to diagnose an issue ticket properly. If you do skip this step then your ticket will most likely be deleted and you will be asked to resubmit.

  1. Your full server startup from the logs\latest.log :
    latest.log

  2. Your Towny config.yml (if using MySQL please remove password,) :
    config.txt

  3. Your townyperms.yml :
    townyperms.txt

  4. Your log's error :

(optional) If this is to do with permissions,
5. Your permissions file :

(optional) If this is to do with chat,
6. Your chatconfig.yml :
7. Your channels.yml :

Suggestion: War reason, troops deployed.

Please explain your feature request to the best of your abilities:
Pls make the person who declares a siege be able to declare an official reason. maybe it could displayed on the dynamap. example:
[code for declaring war] reason [your reason]

and also make a command for deploying troops example:

King D1231234D wants citizen Manny478 to be a warrior in siege. he runs a command like /deploy Manny478 and manny is an official warrior. manny can maybe go into a battle mode. maybe making health less and attack more if he is and attacker and vice versa if he is a defender (fighting for an attacking/defending nation) maybe this could also be displayed on stuff like dynamap and banners

Issue: Small groups of "unusual-time" players are carrying large banner control lists

Describe the issue

  • There have been some reports recently, that small groups (1 or more) or players, playing at unusual times, have been carrying large banner control lists for extended times by just being online and playing peacefully.
    • This is not good for these players if they are in "server-standard" timezones, because it means they are staying up all night.
    • This is not good for these players if they are in "non-server-standard" timezones, because their experience of war is likely pretty boring.
    • This is not good for other players in "server-standard" timezones, because it forces them to either stay up all night too, or watch while big siege-points are racked up overnight by the enemy.
    • This is not good for other players in "non-server-standard" timezones, because they will likely face intense pressure to fight or get banner control whenever they log on, even if they just want to build.

To Reproduce
Steps to reproduce the behavior:

  1. At some regular time (like 6pm), get banner control with many others from your team (e.g. 30).
  2. Drink lots of energy drinks
  3. Stay up all night building peacefully while keeping everyone on the banner control list

Expected behavior

  • I have come up with a simple way to address this problem:

    Add a new feature to block all banner control at server-specified times.

  • Ideally, when the block time arrives, send out a global message like "Banner control time is over for The day" etc..
  • After that, anyone who tries to get BC should get an appropriate new message telling them why they are not allowed to get it.
  • A config might look (something) like this :
block.banner.control.at.times.UCT=""   ........ the default
block.banner.control.at.times.UCT="23-8"   ........ block from 11pm gmt to 8am gmt
block.banner.control.at.times.UCT="2-6, "18-22", "   ........ block at multiple time periods (is this needed?)
  • I believe (but not 100% sure) that there is no need to block other siege activities such as starting sieges or getting kill points. These restrictions would make things more complex, so probably best avoid them if they have no major benefit.
  • Note that if a server gains many players in a new time area, then banner-control can certainly be unblocked for that time area, with sieges can be being 'handed-off' from soldiers in one time area to soldiers in the next.

Suggestion: Option to disable wilderness regen in siege zone

Players have dubbed this issue "tower PvP." Players have been building forts to benefit their playstyles. While I don't agree this is an issue in and of itself, the issue I see is that the forts are easier to build than they are to destroy (because of the regen). This creates an "unfun" situation for some players.

siege
siege2

If one side likes building forts, that's good on them, but the opposing side should be able to just as easily destroy the fort. If it were possible to disable wilderness regen in the siege zone, then we could have the dynamic of fort building and destroying. It does raise the issue of mass tnt grief, but we believe that's something we could easily handle with coreprotect.

Players have suggested banning towers or structures at all on the banner, but we'd rather not take away elements of the game which could remain and are a part of war.

SiegeWar ending sieges after a siege has been declared

Describe the bug
Whenever a player declares war on any town and sieges them, around ten seconds later it says that the defenders won even if none of the defending town's members are online.

To Reproduce
Steps to reproduce the behavior:

  1. Create an attacking town (or use one already made)
  2. Create a defending town (or use one already made)
  3. Siege the defending town
  4. The Towny chat message says "The defenders of {town} have successfully driven off all attacking armies. The siege has failed!"

Expected behavior
I expected the attacking town to siege normally and conquer the other town

Screenshots
Image

Versions (please complete the following information):

  • Towny: 0.96.6.0
  • SiegeWar: 0.2.0
  • Spigot/Paper: Paperspigot 1.16.3 #195

Files
Startup log: https://paste.shockbyte.com/raw/reqimaxicisuzeziyaje
SiegeWar config: https://pastebin.com/LEzwuHcP
Townyperms.yml: https://pastebin.com/TkELzSTn

Suggestion: Placeholders for Peaceful Towns

Is your feature request related to a problem? Please describe.
An issue mentioned in the Siegewar FAQ : An entire nation is peaceful and does not wish to fight, but rather wants to use the Towny-Nation feature as something like a 'social club' or 'trading company', and with complete immunity to military conquest. What can I do ?

Describe the solution you'd like
Placeholders such as isPeaceful=true (outputs boolean whether the town is peaceful or not, similar to %townyadvanced_has_town%) would be very helpful in compatibility with tab or condition-based plugins. For example, I might not display the nation name in tab if the town is peaceful (since it isn't technically involved in geopolitics) or add a special prefix in tab or chat for peaceful town members.

Describe alternatives you've considered

  1. Using the TownyCultures plugin. However, although the cultures plugin does keep an identity/commonality between groups that started out as peaceful, it doesn't fully alleviate the concerns of those peaceful towns that do not wish to participate in geopolitics entirely. (Some people don't feel comfortable that their town is "conquered" because they chose to be peaceful. Of course in my humble opinion, I would love to tell them to bear with the consequences of being peaceful in a geopolitical world, but I can't satisfy everyone... ๐Ÿ˜ข ). More importantly, the cultures plugin doesn't necessary stop other non-peaceful towns from choosing to claim that they are a peaceful culture (since any mayor can use the command to join that peaceful culture), so technically any town can be "seen to be part of the [peaceful] culture," so "there could be infiltrators" (to quote @LlmDl 's words).

  2. Separate sandbox and geopolitical worlds. But geopolitical world is more popular since more people play in it (yes, my personal issue, but just listing the things I've tried for the past few months).

Additional context
Placeholders would just be very helpful in general for applying the siegewar plugin to other non-towny plugins. It might seem very useless to the plugin developer himself, but for us server owners, we use placeholders extensively and they are a very useful tool without having to code another add-on.

Time left in /sw hud does not work once a siege is over

The time left for a siege becomes a large number once a siege is over, in the /sw hud [TownName] page

To Reproduce

  1. Siege a town
  2. Win or lose the siege
  3. Do /sw hud TownName
  4. This error appears next to "Time Left:"

Expected behavior
It should show 0 days or a message like "This siege is over" or it should not have "Time Left: " at all

Screenshots
image

[Never used github sorry if the format doesn't work]

Suggestion: Online Resident Requirement Before Beginning Siege.

I run a GeoPolitical Towny Server and I think the best and last needed feature this system needs is a required nation members online numeral before starting a siege.

For example; Lets say I can configure it so that a town cannot starting a siege another town until the town they are attempting to siege has maybe 3 nation members online so they can alert the rest of there offline nation and fully know/understand the siege has happened.

This will discourage and lightly stop afk towns from being sieged. This will keep a town from lets say starting a siege on a town at 12AM and not a single town/nation member logging on until 7 in the morning and have just had there town unknowingly sieged for about 7hours.

Too many town blocks nearby

Describe the bug
Doesn't affect anything, atleast I haven't seen it do anything yet.

To Reproduce
I have no clue. Suddenly my console just got spammed with this message:
29.01 01:53:53 [Server] WARN [SiegeWar] Error could not read msg_err_siege_war_too_many_town_blocks_nearby from english.yml
No commands were run before it came up.

Versions (please complete the following information):

  • Towny: 0.96.7.0
  • SiegeWar: 0.0.7
  • Spigot/Paper: 1.16.4

Files
Startup log:
latestlog.txt

SiegeWar config:
Siegewar config.txt

Townyperms.yml:

Suggestion: Sieging Towns

Is your feature request related to a problem? Please describe.
It is not related to an issue, but something my players have requested.
Being able to siege towns that are not in a nation.

Describe the solution you'd like
Being able to attack towns that are not in a nation
Describe alternatives you've considered
There are no alternatives.

Additional context
Just being able to siege towns that aren't in a nation.

Suggestion: Make TnT explosions regenerate in towns

Is your feature request related to a problem? Please describe.
The problem is players using TnT against a town will totally destroy the town, or be unable to do anything.

Describe the solution you'd like
The solution is to have blocks destroyed by TnT regenerate with a config-defined timer. This allows players to breach walls and try and kill members of the town inside, but still at a significant disadvantage as they cannot place/destroy blocks and the way they got into the town will soon patch itself up potentially leaving them stranded.

Additional context
This feature is already part of Towny, but applied only to the wilderness. It additionally applies to towns, but only during EventWar. Simply applying this already existing feature to SiegeWar would solve the problem.

Major error when siege is done

[16:42:15 WARN]: [SiegeWar] Plugin SiegeWar v0.2.1 generated an exception while executing task 111
java.util.ConcurrentModificationException: null
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1493) ~[?:?]
at java.util.HashMap$ValueIterator.next(HashMap.java:1521) ~[?:?]
at com.gmail.goosius.siegewar.tasks.DynmapTask.displaySieges(DynmapTask.java:84) ~[?:?]
at com.gmail.goosius.siegewar.tasks.DynmapTask.lambda$startDynmapTask$0(DynmapTask.java:70) ~[?:?]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftTask.run(CraftTask.java:100) ~[patched_1.16.5.jar:git-Purpur-980]
at org.bukkit.craftbukkit.v1_16_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:58) ~[patched_1.16.5.jar:git-Purpur-980]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[patched_1.16.5.jar:git-Purpur-980]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]

    I don't know the issue for this, it might have to do maybe with the new version?

Suggestion: In game Config info

Is your feature request related to a problem? Please describe.
So currently there no way to find out cost of sieging among other siege settings ingame

Describe the solution you'd like
add a command like the /towny prices to include siege relevant configs

Siegewar, Plunder no affect

Describe the bug
When a king plunders a town, he is supposed to receive money but he didn't recieve on plunder!

To Reproduce
Steps to reproduce the behavior:

  1. Win a siege
  2. plunder
  3. no affect
  4. player did not receive
    money and town didn't go into ruins even tho it had very less money.
    Expected behavior
    Supposed to give plunder earnings and ruin the town if has less money.
    Screenshots
    If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Towny: 0.96.6.0
  • SiegeWar: 0.06
  • Spigot/Paper: 1.16.4

Files
Startup log: https://pastebin.com/LEgVbpde
SiegeWar config: https://pastebin.com/e9X4pEQa
Townyperms.yml: https://pastebin.com/54zZHtpf

Suggestion: Siege War Towny | Nation toggle secession

create an option to enable/disable secession of a town from a nation? This way towns would have to "revolt" and it would basically start a siege on their own town to try and free themselves from nations that have it toggled off.
The command could be /n toggle secession. It would create a cool conquering/revolution dynamic without threat of disband or bankruptcy.

Requirements.
Nations can toggle this by command. Similar to making a nation public
If this is enabled if a town leaves a nation it will start a siege at their town that they must win to leave the nation
Towns will not need to pay the price per plot to "Revolt"

Bug: [NullPointer] executing ta town townname toggle peaceful

Describe the bug
Not really a bug, it seems at the end the command does run properly, but regardless it throws a null pointer stating that
it Could not pass event TownToggleNeutralEvent to SiegeWar v0.1.1

To Reproduce
Steps to reproduce the behavior:

  1. Type ta town TOWNNAME toggle peaceful
  2. Console msg: [SEVERE] Could not pass event TownToggleNeutralEvent to SiegeWar v0.1.1
  3. Console msg: java.lang.NullPointerException: null
  4. Console/Chat msg: [com.palmergames.bukkit.towny.Towny] [Town Msg] townname: Town neutrality/peacefullness is now Enabled.

Result: Town neutrality/peacefullness is now Enabled., so the command does work. Even in /t the town is shown as peaceful. Just bringing this up cause the null pointer popped up. Probably nothing serious since it does seem to work.

Expected behavior
Toggles town peacefulness without throwing nullpointer.

Screenshots
image

Versions (please complete the following information):

  • Towny: 0.96.7.1
  • SiegeWar: 0.1.1
  • Spigot/Paper: Paper version git-Paper-393 (MC: 1.16.4)

Files
Startup log: no errors
SiegeWar config: https://hatebin.com/adaqqejrnc
Townyperms.yml: https://hatebin.com/vrlqcvnthd

Suggestion: Max Banner Cap Config Option

Balancing the siege war score is incredibly difficult at the moment. On one side, people claim attrition strategies are overpowered because banner cap can get to absurd amounts. On the other side, increasing kill points too much will dissuade fights, as the fight can be decided too quickly. This is why a max banner cap config option is urgent.

I suggest to implement a configurable system which caps the speed at which the banner control multiplier increases (If the scoring is set to 25/tick and the cap is at 3, then the maximum one side can score is 75/tick). This means even if 40 people are on the banner, only 3 would be required to score the most points.

We've tried to balance it by making kills more important and decreasing banner control points. The desired outcome (game balance) is not occurring. It will always be lopsided one way or another because of this variable.

The situation on our server is one military force has recruited so well, that they win by attrition. They simply throw players on the objective. None of them are true dedicated pvpers, but they all came together to fight a smaller, but stronger, pvp force. Essentially, the smaller pvp force gets a lot more kills, so they get mad when they lose the siege. However, if we make the kill points lopsided, then fights will end too quickly. We want banner control to still be the primary objective, but it is quite literally impossible for a smaller force to catch up because of these 40x multipliers that can occur during a siege. Even if the smaller force were to wipe the enemy, they can't feasibly catch up via banner control. Making it capped allows them to.

Additionally, the way we are trying to balance is determining how many kills should one hour equal. We cannot determine this because we cannot account for the numbers on each side. One army could mean 1 hour = 10 kills, for another 60 kills. This capture system I'm suggesting is how other video games handle their "capture points," and I think implementing it here is crucial.

Duplicated Message for double-allies on siege death

Describe the bug
If a nation is allies with both a siege attacker and siege defender, they get 2 identical messages when a player dies

To Reproduce

  • Ally with both nations in a siege
  • Have one of the players die
  • Observe message

Expected behavior

  • Just one message

Versions (please complete the following information):

  • Towny: 0.97.0.0
  • SiegeWar: 0.0.7
  • Spigot/Paper: N/A

Files
Startup log: N/A
SiegeWar config: N/A
Townyperms.yml: N/A

Suggestion: Add Cannons Integration

Is your feature request related to a problem? Please describe.

  • Many servers use the popular Cannons plugin
  • However SiegeWar does not really integrate that well with the plugin at present. With the default configurations, cannons in the town can fire in complete safety onto the timed point zone, and the optional alternative configuration of town-explosions-ON + regeneration ON does not suit some servers.

Describe the solution you'd like

  1. Add a config options "CannonsPluginIntegrationEnabled". If enabled, the following things apply.

  2. Towns:

    • Allow each town a new metadata "siegeWarCannonsEnabledCounter:15"
    • Each short tick, this is counted down
    • Once 0, the metadata is removed and explosions are off in the town
  3. Command Listener:

    • While that metadata is there, ensure nobody can switch off explosions by command in the town
  4. Cannon Event Listener:

    • Listen:
      • During a Siege, Listen for each "CannonFireEvent" or "CannonUseEvent" (whichever works)
      • For any such cannon fire attempt, if ANY block of the cannon design is within a town, the following point applies.
      • Until the town mayor fires any town cannon, no town cannon can fire (whether player or redstone activated)
    • Once the mayor personally fires any town cannon:
      • The "siegeWarCannonsEnabledCounter" metadata is added to the town with value 15 (5 minutes)
      • Explosions protection is turn off in the town
      • All cannons in the town can be fired
      • This effect lasts until the counter ticks down and the metadata is removed
      • If the mayor fires another cannon, the duration is refreshed

Describe alternatives you've considered

  • I have considered hanging the cannon-enable/disable not on an explicit mayor action, but rather on them being online or inside the town. However with that mechanic, if the mayor was not prepared to fight (e.g. outnumbered), they could easily avoid destruction by simply staying away from their town or not playing on the server for a few days (maybe the nation might fight on without cannons). This situation would be of benefit to nobody - neither attacker, defenders, nor server community.
  • I have considered hanging the cannon-enable/disable not on the mayor at all, but on the characteristic of any "active resistance" by the defenders (e.g. coming out with swords and bows). This would satisfy the desire of the attacking side to crush any sort of resistance with massive firepower. However this requirement is not a critical one. Such an attacker is likely doing very well at the siege anyway. The requirement is only "nice to have", and in practice it is extremely difficult to hang to potential destruction of the town on a complex interlocking set of battlefield circumstances, rather than just the simple and reliable permission of one person (the mayor).
  • I have considered hanging the cannon enable/disabled on the normal towny explosions-enabled permission. However, unfortunately this can be turned on and off too quickly. Thus a mayor might quickly turn it off, launch a cannon shot from inside the town, then quickly turn it back on again before the attacker had time to respond.
  • A practically do-able alternative is to put a 5 minute cooldown on the toggle explosions command. This might work but is probably just less cool than the mayor personally firing the first shot to start the mayhem.

Additional context

  • This algorithm addresses the most critical part of cannons+sieges, namely, it allows the attackers to "fire back" at the defenders, who could otherwise fire out on the siegezone in completely safety.
  • The mayor restriction is important to preserve the balance of power between towns and nations
    • By personally firing a cannon, the mayor gives 'permission' for potential destruction of their town buildings,
    • Absent cannons, this permission for town destruction is ultimately ONLY possessed by the mayor, thus the suggested integration does not upset the balance of power (for instance by giving kings a new ability/threat to arrange a town destruction of a town in their nation which has displeased them).

Suggestion: Siege wars QoL

Please explain your feature request to the best of your abilities:

Hello,

I tried the siege war mode. It is pretty good, but i feel it lacks some global feedbacks.

1/ A scoreboard to display some basic informations about the current siege could be good.
You could display it if you are:
- near a banner
- if you are in a town that is sieged
if your nation have multiple town that are sieged, as a resident it would only display the town you are currently in.

2/ Maybe a dedicated command for the siege. I feel like its weird as an attack to type /t to have siege informations. Some town names can be complicated and some servers doesnt have auto completion.
If you are near a banner, the /siege command could display informations about the banner you are close to. If you are not close a banner, it could display a list of cities you are currently sieging. And in this case, you would have to type /siege to get informations about the siege only.

Suggestion: Percent-Based Price to Siege Increase for Capitals

While discussing siege war, people have asked if it's possible to make the capital of a nation "last to be attacked" so nations can't just go straight for the capital. An idea that came to me is to make a configurable percent price per plot increase to attack the capital.

For example:

if the price to siege were 12/plot
and the capital percent increase was 50%
it would cost 18/plot to siege that capital town

This would dissuade invading a capital first as well as give peaceful nations more of a barrier between them and invasion (for those who have toggle peaceful disabled)

McMMO Tree Feller breaks the siege flag

Describe the bug
McMMO plugin's Tree Feller Ability breaks the siege flag.

To Reproduce
Steps to reproduce the behavior:

  1. Place banner top of a tree
  2. Break the tree with the flag on top
  3. The flag will be broken

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Towny: 0.96.7.0
  • SiegeWar: 0.1.0
  • Spigot/Paper: custom

Files
Startup log:
SiegeWar config:
Townyperms.yml:

Suggestion: Prevent Battle Towns from getting too close to target towns

Is your feature request related to a problem? Please describe.

  • With the current code, attacking nations tend to build temporary battle towns to attack target enemy towns.
  • This is cool, however, often the attacker will try to build the battle town at the minimum distance from the target town (say 10 blocks), and then expand the battle town claims right over to the target town before starting the siege.
  • This allows the attacker to build a safe (and optionally pvp off) transit route from the battle town spawn to the siege banner, allowing them to quickly and bring in supplies and soldiers to the siege, significantly negating the defender's natural supply-line advantage.

Describe the solution you'd like

  • Add a new SiegeWar config option (default enabled), which would block any new town claims if they are within a certain configured distance (default 10) of any nearby nation town, where the claimer has no nation or if their nation is NOT-ALLIED to the nearby town.
  • This would ensure that (except in the unlikely case of ally betrayal), battle towns would be enforced to be distant from target towns, forcing the attacker to travel through some wilderness to get to the siege banner, and thus restoring the defender's natural supply-line advantage.

Describe alternatives you've considered

  • I believe some servers may use moderation to deal with this, and enforce that the battle towns be like 10 blocks away.
  • But I think we can save mods (especially ones new to the system) this bother with a little code.

Additional context
N/A

Suggestion: Add nation soldier payment options

Is your feature request related to a problem? Please describe.

  • Currently on many servers using SiegeWar, nation soldiers often go unpaid. They sometimes get almost nothing from sieges except experience.
  • Historically, ancient soldiers from disorganized nations got paid in loot, however SiegeWar currently gives all the loot to the nation bank.
  • Even in a nation got organized and wanted to pay its soldiers, currently there is no easy way for king's to do this, and they would have to dive into accounting to get it done properly.

Describe the solution you'd like

  • Add the following easy-to-use payment options for kings and generals to pay their soldiers:
    • Reorganize nation military ranks and permissions, indicating different pay grades:

      • private
        • towny.nation.siege.points
        • towny.nation.siege.pay.grade.100 //i.e. 100% of the normal share
      • sergeant
        • towny.nation.siege.points
        • towny.nation.siege.pay.grade.150
      • lieutenant
        • towny.nation.siege.points
        • towny.nation.siege.pay.grade.200
      • captain
        • towny.nation.siege.points
        • towny.nation.siege.pay.grade.250
      • major
        • towny.nation.siege.points
        • towny.nation.siege.pay.grade.300
      • colonel
        • towny.nation.siege.points
        • towny.nation.siege.pay.grade.400
      • brigadier
        • towny.nation.siege.points
        • towny.nation.siege.pay.grade.500
      • general
        • towny.nation.siege.*
        • towny.nation.siege.pay.grade.600
    • Add the following mechanic, which distributes plunder between nation AND soldiers.

      • The nation:soldiers proportion is configured by the server (default 25:75)
      • Soldiers can later collect their share using /sw collect
      • A configuration of 100:0 would effectively turn this off
    • Also add the following seperate command, which facilitates more organized nations and armies:

      • A king/assistant/treasurer can setup a regular nation salary for soldiers, as follows: /sw nation set base-soldier-salary <base amount>
      • The king then gets a message confirming the change and showing the total amount which will go out each day
      • Soldiers can later claim this along plunder, using /sw collect
      • Add a configuration enabled switch, default to true.

Describe alternatives you've considered

  • Some servers try to fix this situation by allowing soldiers to take all equipment from defeated enemy soldiers, which as the FAQ Page describes in detail, is not a sustainable configuration for a healthy server.

Additional context
N/A

Suggestion: disable explosion damage in the siege area

Is your feature request related to a problem? Please describe.
Currently there is an upcoming trend that people use to kill multiple people at once who are trying to take banner control. It's an easy and overpowered way to completely destroy your enemy. Basically what happens: people build a sky bridge at build limit and drop down tnt minecarts. This instantly kills people in full godset so you are basically helpless against this tactic. It is toxic and incorrect to be able to win a siege alone with just dropping down tnt on your enemies so they can't take banner control. I feel like this completely removes the aspect of war and pvp in Minecraft. Honestly if you want me to explain better just Dm me on discord FutureLemon#6923

Another issue I've found with this is that it's very destructive for the terrain and can make it impossible get banner control.

I've taken the liberty to make a clip of this tactic and to show you how obliterating it can be.

Describe the solution you'd like
An easy fix would just be to disable all explosion damage and make blocks immune against tnt.

Additional context
The video: https://youtu.be/LPfoziZGYTc

Towns being able to siege nation towns

Is your feature request related to a problem? Please describe.
Allow towns that are not in a nation to siege towns that are in a nation.
Allow towns that are both without nations to siege eachother.

Describe the solution you'd like
Towns being able to siege other towns regardless if they're in a nation or not.

Describe alternatives you've considered
None

Additional context
None

Allies and nation residents lose stuff in war

Describe the bug
Allies and nation residents lose stuff in war, despite the plugin being configured not to do so.

To Reproduce
Steps to reproduce the behavior:
I don't really know how to produce this error. All I know is that:
Some allies and town residents have nation and town military ranks
Yet they lose their stuff when they die in the siege zone. (Both offensive and defensive allies/residents)

Expected behavior
Normally they should keep their items.

Screenshots
If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

  • Towny: 0.96.7.4
  • SiegeWar: 0.3.0
  • Spigot/Paper: Paper, 1.16.2

Files
SiegeWar config: https://pastebin.com/fb9R1VbU
Townyperms.yml: https://pastebin.com/vx2KTzVs

Suggestion: Possibly allow additional teleports into the siege zone

Is your feature request related to a problem? Please describe.

  • Following on from comments by @Warriorrrr in PR #135 , it is apparent that the besieged-town-spawn-protection (if enabled) prevents nether portal use, and spectator teleports, and that some servers might possibly like to enable these.

Describe the solution you'd like

  • Should these types of teleports be hardcoded to be allowed?
  • Or perhaps should the current config be replaced with a more flexible one? e.g. perhaps a whitelist which would by default include enderpearls, chorus fruit, portals, and teleports, but could be configured to add/remove teleport types ? (and remember some types come in from 3rd party plugins)

Describe alternatives you've considered
N/A

Additional context
N/A

Suggestion: Prevent occupied town from surrendering

Is your feature request related to a problem? Please describe.

  • Currently an occupied town has an exploity mechanism available to them, which allows them to escaping occupation a little too easily, as follows:
    1. Wait until the town siege immunity expires
    2. Get a friendly nation to siege the town.
    3. Surrender immediately
    4. In 24 hours, the friendly nation captures the town, then kicks them, freeing them from all occupation statuses.
    5. Thus the previously occupied town has completely escaped occupation,
      but without giving the occupier any chance to respond, and without have started their revolt cooldown.

Describe the solution you'd like

  • If a town has the occupied(technically 'conquered) status, and it tries to surrender, then simply prevent it, and give an appropriate error message.
  • The occupied town is thus discouraged from a fake siege, and instead encouraged to use the standard revolt mechanism.

More Context

  • Note that even if the above solution is implemented, the exploit is still available for non-occupied towns. HOWEVER, using the exploit in that scenario is LESS LIKELY, because it involves both a very level of trust between a normal nation town and a completely different nation, and also foregoes the benefit of an "X has revolted" message, which would otherwise be helpful to the exploiters for propeganda purposes.

FEATURE Pay Debt With Items

Players can pay their debts with items. SiegeWar debts are really challenging. It would be much better if there was an option to pay debt with items.

Suggestion: Siegewar - Add popup message on pillage

DESCRIPTION
Currently there's a bug push in Siegewar to motivate defenders even more to come and fight.

This was suggested by Papa Spike:

  • Add a popup message to show pillage amount and possible siege point amount also,
    similar to MCMO popup messages:


Surrender Bug

Describe the bug
Surrender is causing bug.

To Reproduce
Steps to reproduce the behavior:

  1. Attack any town
  2. Wait surrender of attacked town
  3. problems...

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
https://cdn.discordapp.com/attachments/564483923166363648/806597397085552672/unknown.png
EVET means YES, its in siege and conquered same time

Versions (please complete the following information):

  • Towny: 0.96.7.0
  • SiegeWar: 0.1.0
  • Spigot/Paper: custom

Files
Startup log:
SiegeWar config:
Townyperms.yml:

Suggestion: Improve Safe Mode messaging with Action Bar messages

Is your feature request related to a problem? Please describe.

  • With current code, if SW goes into safe mode and players log on, their chat can get quickly filled with error messages (for every block place, destroy, and another every 20 seconds also).
  • This could get a bit spammy i.e. walls of spam.
  • Look into replacing these messages with action bar messages, which should be less spammy.

Describe the solution you'd like
As indicated

Describe alternatives you've considered
N/A

Additional context
N/A

Suggestion: Block siege death messages when siege-end is pending

Is your feature request related to a problem? Please describe.

  • When the end-of-siege is pending, all normal siege effects still apply, such as PVP in the town, no claiming, no recruiting, soldiers keep env on death etc. (the last is appropriate both for consistency and also to avoid a mid battle siege-end + inventory grab)
  • This is fine, however there is no need for the siege death messages to go out to allies

Describe the solution you'd like

  • When siege-end is pending, do not send siege death messages

Describe alternatives you've considered
N/A

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.