Skip to content

Create BattleSessionPenaltyPointsEvent#1001

Merged
LlmDl merged 1 commit intoTownyAdvanced:masterfrom
GoodrichDev:master
Jan 24, 2026
Merged

Create BattleSessionPenaltyPointsEvent#1001
LlmDl merged 1 commit intoTownyAdvanced:masterfrom
GoodrichDev:master

Conversation

@GoodrichDev
Copy link
Copy Markdown
Contributor

Description:

This event is designed to fire when a SiegeWarScoringUtil issues points for a players death (penalty points).

Right now through SiegeWarAPI, you have to recreate the SiegeWarScoringUtil just to determine how many points were awarded for a players death. This simply little event lightens the load on addon developers.


New Nodes/Commands/ConfigOptions:

New Event: BattleSessionPenaltyPointsEvent

  • Fires after calculating Penalty Points, provides a nice easy way for addons to track kills/deaths/points and etc.

Relevant Issue ticket:

None


  • 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.

This event is designed to fire when a SiegeWarScoringUtil issues points for a players death (penalty points).

Right now through SiegeWarAPI, you have to recreate the SiegeWarScoringUtil just to determine how many points were awarded for a players death. This simply little event lightens the load on addon developerss.
@LlmDl LlmDl added this to the 3.2.0 milestone Jan 12, 2026
@LlmDl
Copy link
Copy Markdown
Member

LlmDl commented Jan 12, 2026

I think this is good, some of the naming is a bit confusing at first, but BattleSessionPenaltyPointsEvent is probably preferable to something longer like BattleSessionPlayerDeathPenaltyPointsEvent.

One thing that might be worth adding is the location that the player died at, in case someone cares about that and wants the API for future use.

Edit: I'll give this a day in case Goosius wants to review this.

@GoodrichDev
Copy link
Copy Markdown
Contributor Author

I think this is good, some of the naming is a bit confusing at first, but BattleSessionPenaltyPointsEvent is probably preferable to something longer like BattleSessionPlayerDeathPenaltyPointsEvent.

That is the third name I came up with and decided not to go with death because penalties can also be awarded for logging out, which is kinda like death but they only die after they log back in.

One thing that might be worth adding is the location that the player died at, in case someone cares about that and wants the API for future use.

I didn't add this because I passed both player objects of the killer and victim which seem to have both possible locations of the event.

@LlmDl
Copy link
Copy Markdown
Member

LlmDl commented Jan 12, 2026 via email

@LlmDl LlmDl merged commit ab3b41d into TownyAdvanced:master Jan 24, 2026
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.

2 participants