MantisBT - Zandronum
View Issue Details
0000704Zandronum[All Projects] Suggestionpublic2012-03-11 02:542018-09-30 19:54
TIHan 
Torr Samaho 
normaltrivialN/A
closedfixed 
 
1.0 
0000704: Damage Factor Notification
These are very minor changes that will allow clients to know what the damage factor is on the server. The important part of this, they will know if the damage factor is different when an invasion or survival game is on countdown.

'https://bitbucket.org/TIHan/tst/changesets/tip/branch(%22damagefactor_notify%22) [^]'

Changes:

Changing sv_coop_damagefactor requires a map restart.
Clients will know what the damagefactor is on the server.
Added text in survival modes to indicate the value of the damagefactor if it's not 1.
No tags attached.
related to 0000089closed TIHan custom 'sv_coop_damagefactor' value of server not reflected on the client 
Issue History
2012-03-11 02:54TIHanNew Issue
2012-03-11 19:17Torr SamahoNote Added: 0002791
2012-03-11 19:31TIHanNote Added: 0002793
2012-03-11 19:38TIHanNote Edited: 0002793bug_revision_view_page.php?bugnote_id=2793#r1444
2012-03-11 19:44TIHanNote Edited: 0002793bug_revision_view_page.php?bugnote_id=2793#r1445
2012-03-11 20:22Torr SamahoNote Added: 0002795
2012-03-11 20:37TIHanNote Added: 0002796
2012-03-11 21:20Torr SamahoNote Added: 0002797
2012-03-11 21:40TIHanNote Added: 0002799
2012-03-11 21:41TIHanNote Edited: 0002799bug_revision_view_page.php?bugnote_id=2799#r1447
2012-03-11 21:54TIHanNote Edited: 0002799bug_revision_view_page.php?bugnote_id=2799#r1448
2012-03-11 21:55TIHanNote Edited: 0002799bug_revision_view_page.php?bugnote_id=2799#r1449
2012-03-11 22:04Torr SamahoNote Added: 0002800
2012-03-11 22:19TIHanNote Added: 0002801
2012-03-11 22:20TIHanNote Edited: 0002801bug_revision_view_page.php?bugnote_id=2801#r1451
2012-03-11 23:03Torr SamahoNote Added: 0002802
2012-03-12 07:51TIHanNote Added: 0002804
2012-03-12 22:06TIHanNote Added: 0002810
2012-03-17 18:57Torr SamahoNote Added: 0002819
2012-03-17 19:59TIHanNote Added: 0002820
2012-03-17 21:43Torr SamahoNote Added: 0002824
2012-03-17 21:45TIHanNote Added: 0002825
2012-03-18 21:01Torr SamahoNote Added: 0002826
2012-03-18 21:01Torr SamahoStatusnew => feedback
2012-03-18 21:40TIHanNote Added: 0002829
2012-03-18 21:40TIHanStatusfeedback => new
2012-03-18 22:09Torr SamahoNote Added: 0002830
2012-03-18 22:41TIHanNote Added: 0002832
2012-03-19 06:43TIHanNote Added: 0002842
2012-03-19 06:46TIHanNote Deleted: 0002842
2012-03-19 06:55TIHanNote Added: 0002843
2012-03-19 11:43Torr SamahoNote Added: 0002844
2012-03-19 12:03TIHanNote Added: 0002845
2012-03-20 00:49Torr SamahoNote Added: 0002847
2012-03-20 00:49Torr SamahoStatusnew => resolved
2012-03-20 00:49Torr SamahoFixed in Version => 1.0
2012-03-20 00:49Torr SamahoResolutionopen => fixed
2012-03-20 00:49Torr SamahoAssigned To => Torr Samaho
2012-03-27 18:38TIHanRelationship addedrelated to 0000089
2018-09-30 19:54Blzut3Statusresolved => closed

Notes
(0002791)
Torr Samaho   
2012-03-11 19:17   
Judging from a quick glance it looks like you are missing some server side stuff in the definition of sv_coop_damagefactor, e.g. the SERVERCOMMANDS_SetGameModeLimits call, to properly sync the sv_coop_damagefactor value between clients and server.
(0002793)
TIHan   
2012-03-11 19:31   
(edited on: 2012-03-11 19:44)
We don't need it in the definition as the map has to restart in order to actually change it. sv_coop_damagefactor is now a CVAR_LATCH. When clients connect, SetGameModeLimits gets fired to send the client the correct information.

Edit: Unless would you prefer it not to be a CVAR_LATCH, then we have to add in SetGameModeLimits as part of the definition.

(0002795)
Torr Samaho   
2012-03-11 20:22   
Oh, I see, you are right. I didn't take into account that you added CVAR_LATCH. Why do you prefer to make sv_coop_damagefactor latched?
(0002796)
TIHan   
2012-03-11 20:37   
> Why do you prefer to make sv_coop_damagefactor latched?
I don't want the client knowing that the damagefactor could be changed at any time while he is playing the game. With it latched, it is enforced by ST, that the map has to be restarted. This is the same reason why sv_cheats needs map restart.

Off topic here: In the future, I want to be able to call vote on damagefactor and maxlives. But, I would only want those settings to actually be set right before a countdown or new match starts, but not on a map restart. In that case, we may need a new CVAR flag to handle that, such as CVAR_COUNTDOWN or CVAR_MATCH. Btw, this is not necessary for 98e.
(0002797)
Torr Samaho   
2012-03-11 21:20   
> This is the same reason why sv_cheats needs map restart.

AFAIK the main reason to make a CVAR latched is because dynamic changes to it would be difficult/ambiguous to handle technically. Take sv_cheat for example: What should happen to players with active cheats when sv_cheat is turned to 0? Or sv_maxlives: This value is only used when a player spawns initially. Dynamic changes to it don't have any inherent effect. Dynamic changes to sv_coop_damagefactor on the other hand can be treated easily.

In other words, unless there is a technical reason, why do you want to restrict the possibilities of a server admin / local player to configure the game to his liking?

> CVAR_COUNTDOWN or CVAR_MATCH

That's an interesting idea. We should keep this in mind, would definitely make sense for sv_maxlives.
(0002799)
TIHan   
2012-03-11 21:40   
(edited on: 2012-03-11 21:55)
> AFAIK the main reason to make a CVAR latched is because dynamic changes to it would be difficult/ambiguous to handle technically.

Hmm, I wasn't aware of that.

> why do you want to restrict the possibilities of a server admin / local player to configure the game to his liking?

Well, I don't like restricting the server admin from having to dynamically change his settings on the fly, but I also do not want the client to always know while he is playing, real game changers like "damagefactor" could be changed at anytime while he is playing - affecting his play through.

But, your reasoning gives me a better reason not to make damagefactor be latched. I guess if you could just make it not be latched and add in the SetGameModeLimits, I think it should be fine. But let's be aware that I do want to add restrictions similar of how the idea of CVAR_COUNTDOWN/CVAR_MATCH work in the future.

Not latched:'https://bitbucket.org/TIHan/tst/changeset/8965f6ebf321 [^]'

(0002800)
Torr Samaho   
2012-03-11 22:04   
> I also do not want the client to always know while he is playing, real game changers like "damagefactor" could be changed at anytime while he is playing - affecting his play through.

Well, the server admin can alter lots of things dynamically that considerably change the game, just look at all the dmflags for example.

> But let's be aware that I do want to add restrictions similar of how the idea of CVAR_COUNTDOWN/CVAR_MATCH work in the future.

As I said, for something like sv_maxlives, where there are no technical problems to change the value during a map reset, this kind of flag makes perfect sense. If you intend to impose additional restrictions on the server admins though (changing a CVAR from CVAR_LATCH to CVAR_COUNTDOWN lessens restrictions), you will need some very good arguments to convince the server admins why it's necessary to restrict the control they have over their own server.
(0002801)
TIHan   
2012-03-11 22:19   
(edited on: 2012-03-11 22:20)
> Well, the server admin can alter lots of things dynamically that considerably change the game, just look at all the dmflags for example.

Very true.

I guess we need to really have a full on discussion about additional restrictions on certain CVARs that could alter the game state in a way we may not want. Such as the server admin changing the max lives instantly from 3 to 1 while a client is playing.

(0002802)
Torr Samaho   
2012-03-11 23:03   
> I guess we need to really have a full on discussion about additional restrictions on certain CVARs that could alter the game state in a way we may not want. Such as the server admin changing the max lives instantly from 3 to 1 while a client is playing.

So I assume your intention is to protect honest clients from unpleasant surprises possibly coming from the server admin? Certainly a noble goal, but unfortunately any additional client protection inevitably comes at the expense of the server admin's freedom. Thus this is a controversial issue that would need to be discussed extensively in public.

I personally think it's no problem to allow the server admin to change everything technically possible to his liking. If the players don't like what an admin is doing, they will just use another server. In the end the server admin will always be able to ruin the playing experience of anyone (you simply can't forbid an admin to kick people at will for instance), so the players always have to trust the admin to a certain degree. Nevertheless, feel free to start a discussion about this on the forum (or wherever you like). Possibly the community doesn't share my opinion on this.
(0002804)
TIHan   
2012-03-12 07:51   
> I personally think it's no problem to allow the server admin to change everything technically possible to his liking.

Be careful about what you say here. :) It's fine to let admins do whatever they want, but Skulltag needs to have some standards and consistency between servers. I'm not saying lets add restrictions on all game altering CVARs - any restrictions should be carefully and well thought out. Example: Adding a restriction for the admin toggling wall running while a game is in progress is pointless. However, adding a restriction for say monsters respawning while a game is in progress, could be debatable.
(0002810)
TIHan   
2012-03-12 22:06   
Seems a few people are speaking about this in the thread.'http://www.skulltag.com/forum/viewtopic.php?f=3&t=31142 [^]'

I made the wrong argument to provide some sort of consistency in gameplay between servers. Maybe some type of default game settings for popular game types, AOW, CTF/DUEL/DM,etc., GVH, Megaman would be better. Easier for admins to setup.
(0002819)
Torr Samaho   
2012-03-17 18:57   
FYI, I think you forgot to adapt the SERVER_CheckClientBuffer call in SERVERCOMMANDS_SetGameModeLimits to the addition of sv_coop_damagefactor. The design of SERVERCOMMANDS_* is absolutely awful though (I really wonder who originally designed it like this...) and I finally took the plunge to redesign this (see the latest changesets).
(0002820)
TIHan   
2012-03-17 19:59   
Heh, this wouldn't be the first time I forgot CheckClientBuffer. Your redesign is awesome. I changed SetGameModeLimits to use it.'https://bitbucket.org/TIHan/tst/changeset/0868f6849ede [^]'
(0002824)
Torr Samaho   
2012-03-17 21:43   
I ported your patch with some small modifications: sv_coop_damagefactor is declared as EXTERN_CVAR in cooperative.h instead of declaring it in cl_main.cpp and sv_commands.cpp. I didn't remove CVAR_ARCHIVE from the declaration of sv_coop_damagefactor since it was not apparent whether you removed it intentionally (your commit message only mentions removing CVAR_LATCH). And I didn't include the scoreboard.cpp changes. Since the value can be changed on the fly it doesn't make much sense any more to display it during the countdown.
(0002825)
TIHan   
2012-03-17 21:45   
Very cool. Thanks!
(0002826)
Torr Samaho   
2012-03-18 21:01   
You're welcome :). Can I consider this issue to be resolved then or do you want to discuss a way how to display this value to the clients?
(0002829)
TIHan   
2012-03-18 21:40   
I guess we could discuss how to display this value. What is your suggestion? I say put it in the scoreboard.
(0002830)
Torr Samaho   
2012-03-18 22:09   
Scoreboard could work, possibly below the "monsters remaining line".
(0002832)
TIHan   
2012-03-18 22:41   
I'm fine with that. :)
(0002843)
TIHan   
2012-03-19 06:55   
'https://bitbucket.org/TIHan/tst/changeset/6c84e9b1d831 [^]'
This work?
(0002844)
Torr Samaho   
2012-03-19 11:43   
Looks pretty good, I think it should only be displayed though if sv_coop_damagefactor is not 1.
(0002845)
TIHan   
2012-03-19 12:03   
'https://bitbucket.org/TIHan/tst/changeset/e0b1d9ab2e56 [^]'
That should take care of it.
(0002847)
Torr Samaho   
2012-03-20 00:49   
Added :)