MantisBT - Zandronum
View Issue Details
0003951Zandronum[All Projects] Suggestionpublic2021-12-19 23:362024-01-02 02:52
Trillster 
Kaminsky 
normalfeatureN/A
resolvedfixed 
MicrosoftWindows 11
3.1 
3.23.2 
0003951: ACS function to change a team's score (frags, points, and wins)
LMS currently has SetPlayerScore which can allow you to manipulate a player's wins in LMS, and we have PLAYERSEARNPOINTS and Team_GivePoints, which is enough to handle most other team modes which use points naturally, however,

TLMS does not properly support PLAYERSEARNPOINTS, failing to give points upon a round ending and not properly ending the match if points are given manually and the point limit is met, meaning Team_GivePoints is largely useless.

Teams in TLMS will properly gain wins on round win and I've never had issue with winlimit, however we don't have a function that allows manipulating of a team's win score, such as a potential Team_GiveWins.
No tags attached.
? MapActivatorScoreGive.pk3 (901) 2021-12-19 23:53
https://zandronum.com/tracker/file_download.php?file_id=2690&type=bug
Issue History
2021-12-19 23:36TrillsterNew Issue
2021-12-19 23:53TrillsterFile Added: MapActivatorScoreGive.pk3
2021-12-19 23:54TrillsterNote Added: 0021934
2021-12-20 00:00TrillsterNote Edited: 0021934bug_revision_view_page.php?bugnote_id=21934#r13473
2022-04-24 21:32KaminskyNote Added: 0022197
2022-04-24 21:32KaminskyAssigned To => Kaminsky
2022-04-24 21:32KaminskyStatusnew => assigned
2022-04-24 21:32KaminskyProduct Version3.1-beta => 3.1
2022-04-24 21:32KaminskyTarget Version => 3.2
2022-04-24 21:32KaminskySummaryCreate Team_GiveWins or merge (T)LMS to use Points instead of Wins => ACS function to change a team's score (frags, points, and wins)
2022-04-24 21:32KaminskyStatusassigned => needs testing
2024-01-01 00:39Ru5tK1ngNote Added: 0022944
2024-01-02 00:30KaminskyNote Added: 0022955
2024-01-02 02:51Ru5tK1ngNote Added: 0022956
2024-01-02 02:52Ru5tK1ngStatusneeds testing => resolved
2024-01-02 02:52Ru5tK1ngResolutionopen => fixed
2024-01-02 02:52Ru5tK1ngFixed in Version => 3.2

Notes
(0021934)
Trillster   
2021-12-19 23:54   
(edited on: 2021-12-20 00:00)
I've uploaded a file that showcases the issues with attempting to change TLMS into a point driven gamemode. The file has a GAMEMODE lump which removes PLAYERSEARNWINS and adds PLAYERSEARNPOINTS to TLMS and it implements an OPEN script that increments Team 0's points by 1 every second and a script, "PlayerActivatorScoreGive", that can be called via "pukename" in console.

Create a game of TLMS in Offline Skirmish with pointlimit 100.

Join the game alongside a bot, you'll notice that while Team 0's pointlimit is counting upwards, the scoreboard does not update to show how many points are remaining to get, instead just showing the cap of 100 still.

Additionally, if you call the "PlayerActivatorScoreGive" script once the game has started, it will interrupt the round declaring that Team 0 has won, but will then continue the match by starting another round.

(0022197)
Kaminsky   
2022-04-24 21:32   
3.2 now has "ChangeTeamScore" (int team, int type, int value, [bool announce]), which behaves similarly to "SetPlayerScore" and lets you change a team's frag, point, win, or death count. You'll also have the option to announce the score change.

The commit for this can be found here:'http://hg.osdn.net/view/zandronum/zandronum-stable/rev/428739fa5a92 [^]'
(0022944)
Ru5tK1ng   
2024-01-01 00:39   
Tested with 3.2a 231220-1743 and I was able to successfully change the score, wins, frags and deaths of teams in team gamemodes. Frags were tested in TDM, Points tested in TPossession and Wins tested in TLMS. Deaths were tracked with a script running GetTeamProperty. Announcer cues were working correctly with Points and Wins.

However, I'm unsure how to test the announcer with regards to Frags and Deaths. There is no key in ANCRINFO for either and EVENT scripts won't work because on the fly frag/death manipulation doesn't trigger them.
(0022955)
Kaminsky   
2024-01-02 00:30   
Thanks for testing it out! It sounds like everything is working fine as promised.

To answer your question on the announcer: for frags (only when players earn frags in the current game mode), either the "teams are tied" announcement should play if all teams now have the same number of frags, or "{team} leads" if the team is now taking the lead in frags. Also, if the team now has three or less frags left to win, the announcer should play "three/two/one frags left", once for each.

Changing a team's death count doesn't trigger any announcements, so this parameter shouldn't do anything when SCORE_DEATHS is used.
(0022956)
Ru5tK1ng   
2024-01-02 02:51   
Thanks for clearing that up. I was able to trigger those messages and suppress the announcer as well. Since deaths are a non-factor in terms of announcement, I believe this ticket is now complete.