![Towny Classic](https://media.forgecdn.net/avatars/thumbnails/536/234/256/256/637857984024712774.jpeg)
EventWar - AllianceWar not including allys correctly
Firav opened this issue ยท 5 comments
What steps will reproduce the problem?
- Have three towns/nations. Have two allied.
- Start war against non allied town.
- Attempt to fight the allied member and not be able to hit them.
What is the expected output?
Auto-add nation enemies. All included parties be able to damage each other.
Towny version
Towny 0.100.3.8
EventWar 0.0.138
Server version
This server is running Paper version 1.21.1-47-master@e2da65c (2024-08-25T19:03:31Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
Please use Pastebin.com to link the following files
Please advise if any needed.
Can I see your warconfig? I'd like to know if your alliance war is configured to auto-add allies or if you had to invite the ally into the war.
Absolutely. Here is the warconfig at the time of testing:
https://pastebin.com/7yYtfuY9
While we were testing the above, I also made sure to look for this as well. All nations had no enemies before the conflict. Once the war was started, each of the corresponding nations had the correct enemies added to their nations.
Upon further testing of this issue, we've determined that once the alliancewar has been started, it'll add all of the included parties and mark them as enemies correctly. However, only the capitals of the nations directly involved in the conflict are able to damage each other. We've also discovered that if any of the online allies involved with the conflict log off and log back into the server, they are now able to damage the opposing sidem which is strange.
OK, so I think what happened was that the allied town or towns had a reason that their town could not join the war.
EW tried to add them, and their nation was allowed to war correctly, but when it came to adding the town itself into the war the players in that town were not assigned the warUUID metadata. However, the system that adds the allied nation did eventually cause the residents of the whole allied nation to get added as potential-residents-in-the-war. This would explain why when they relogged, EW correctly placed them into the war.
I will have to take a look at this deeper, but if you'd like to confirm there was a reason the allied nation's town could not war these are the reasons they would be denied:
- already having an active war.
- being a new town with war immunity.
- on a cooldown from having a war recently.
- the town has no homeblock.
- the town's homeblock is in a world where war is not allowed.
- the town's nation is neutral and neutral nations are protected from alliance wars. (This last one is unlikely or the nation wouldn't have been added.)
I will be changing the allied-nation adding code to be more fined-grained and care about the individual towns because the residents of those towns should not be allowed to become potential-warring-residents before the beginning of the war is completed.
Thanks for taking the time and looking into this so quickly!
All of the above listed conditions you've listed were not a factor that I could visibly determine. All towns that were entered into the conflict via the admin command were placed as participants within the generated war. No warning message was displayed that would indicate that those towns were not placed in the war, as it normally would with a large red message.