Skip to content

Conversation

@Goosius1
Copy link
Collaborator

@Goosius1 Goosius1 commented Oct 1, 2025

Description:

Background
There are 2 reasons for this PR:

  1. Better system usability
  • The experience of some top servers which have used SiegeWar extensively (e.g. CCNET, EarthPol), has shown that protecting nations is essential for server sustainability. This is because Nation's are important community centers for the playerbase, with their own /NC /AC and often discord server.
  • Current SW code has only weak nation protections. For example, once a capital gets captured, that is the end of the nation in-game.
  1. Better SW branding
  • With ongoing additions and improvements to other war systems, it is important that SW maintain its own distinctive brand, even if that brand is more specialized to certain types of servers and players.
  • This PR does this by leaning into and enhancing one of SW's strong points, namely "town and nation protections."
  • So we swap out "in principle" support for complete conquering of the server, and swap in new nation protections.
  • With this quite fundamental change, the updated system and brand can be released as SW 3.0.0.

Summary

  • Nation Capitals cannot be captured.
  • Nation Capitals cannot go peaceful.
  • If a Nation Capital is sieged, its post-siege immunity is double the normal amount.
  • If a town is captured from a nation, the /nation and /alliance TownyChat channels of its residents, continue to direct to the HOME nation, not the occupying nation.
  • In this PR I also add a 2 line fix for the bug where "decisive win" sieges were not being loaded properly.

Predicted Benefits

  • "Peaceful" players should benefit, because peaceful nations can now survive. Note that for a peaceful nation to survive without fighting at all, it would generally be necessary to keep the townblock size of the capital low, to reduce plunder in the event of inevitable siege attacks. Then if an attack comes, an immediate surrender would often be done, to reduce the length of time under siege.
  • "Conqueror" players should benefit, because instead of guaranteeing rebellion by simply deleting defeated nations, those nations and their TownyChat channels are preserved, while also giving defeated players to escape occupation and live free in the capital town. All this should reduce the frequency of rebellions, thus making conquests more stable, at the cost of a small amount of territory becoming immune to conquest.

Deliberately NOT a Full Occupation System

  • This feature deliberately does not allow full nation occupation, like the one back in SW 1.4.0, partly due to a key difference between real geopolitics and virtual geopolitics, namely that a virtual-nation cannot defeat real-life players to anything close to the same extent that real-world-nation can defeat real-life-soldiers.
  • Thus a full occupation system would likely result in an unnaturally high frequency of virtual rebellions, and thus less stable conquests and geopolitics.
  • In contrast, the virtual occupation system described here gives defeated players an "escape route", where their nation and at least 1 town in it, remains unoccupied, thus damping down their expected motivation to constantly rebel against a conqueror.

New Nodes/Commands/ConfigOptions:

N/A


Relevant Issue ticket:

Closes #924


  • [ x ] I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the SiegeWar License for perpetuity.

@Goosius1 Goosius1 marked this pull request as draft October 1, 2025 10:52
Copy link
Member

@LlmDl LlmDl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found one issue I think, but there does seem to be a number of unneeded diffs throughout.

@Goosius1 Goosius1 force-pushed the nation_protection branch 2 times, most recently from cc32800 to 202441f Compare October 1, 2025 12:10
@Goosius1 Goosius1 marked this pull request as ready for review October 1, 2025 12:11
@Goosius1 Goosius1 requested a review from LlmDl October 1, 2025 12:12
@LlmDl
Copy link
Member

LlmDl commented Oct 1, 2025

I think another issue with the chat listener, while the sender being occupied and being handled is done, you're not doing the same for recipients who will be seeing the chat of their occupying nation, but only be able to speak to their home nation.

@Goosius1
Copy link
Collaborator Author

Goosius1 commented Oct 1, 2025

Fixed now I think:

  • When residents in occupied towns use NC or AC, the chat only goes to the home nation/allies.
  • When residents in non-occupied towns use NC or AC, the chat does not go to any occupied towns.

Copy link
Member

@LlmDl LlmDl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As an aside I see you're now using a different code style with { } on separate lines. This is not usually how we do things. Did your IDE or your habits change?

- Nation Capitals cannot be captured
- Nation Capitals cannot go peaceful
- If a Nation Capital is sieged, its post-siege immunity is doubled.
- If a town is captured from its home nation, the TownyChat NC and AC channels
  continue to relate to the home nation.

Bug Fix
- This commit also fixes a bug where the siege status was not being
  loaded correctly.
@Goosius1
Copy link
Collaborator Author

Goosius1 commented Oct 1, 2025

About the curly brackets, I don't recall when I changed that. By coincidence, I am currently messing with auto-code-formatters to standardize that sort of thing at my workplace!.

@Goosius1 Goosius1 requested a review from LlmDl October 1, 2025 19:25
Copy link
Member

@LlmDl LlmDl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good to go with the changes.

@Goosius1 Goosius1 merged commit b755031 into TownyAdvanced:master Oct 1, 2025
@Goosius1 Goosius1 deleted the nation_protection branch October 1, 2025 19:28
@LlmDl LlmDl changed the title Increase Nation Protections Increase Protection for Nation Capitals & Re-enforce bonds between Occupied Towns and their Original Nations Oct 1, 2025
@LlmDl LlmDl added this to the 3.0.0 milestone Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: Allow conquered towns to leave a nation after a period of time

2 participants