givePoint and Retroreflector plugins

Expand and mod your server.
Post Reply
GEP
Private First Class
Private First Class
Posts: 17
Joined: Sun Jan 12, 2020 7:17 pm

givePoint and Retroreflector plugins

Post by GEP »

Announcing givePoint and Retroreflector plugins.

givePoint as seen on Decks - by GEP and Bertman, is a simple plugin that allows players to give their hard-earned points away to their greatest adversary or their poor teammate.

Retroreflector flag as seen on Apocalyse and other maps. If a player holding Laser kills a player holding Retroreflector they both die.

More details can be found in their READMEs.
User avatar
Zehra
Private First Class
Private First Class
Posts: 915
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: givePoint and Retroreflector plugins

Post by Zehra »

Some small suggestions:

With GivePoints, it seems you are only using the basePlayerRecord for getting "team" type in the "toPlayer".
You can use bz_getPlayerTeam instead and check if it isn't eNoTeam.
This will clean up your code and a bit and you won't have to worry about managing memory.
Also, you can exit the conditions earlier, so "if (fromPlayer == toPlayer)" is set earlier.
This cleans up another check down the line.

With RetroReflector, bz_eFlagGrabbedEvent and plugin_utils.h may be omitted, as they aren't used within the plug-in.
Also, I'd recommend adding a check that it is an actual player.
Just to make sure a player is not getting killed by a "world weapon"/"server side" laser shot.

Other than that, both plug-ins are nice ideas and well written.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Re: givePoint and Retroreflector plugins

Post by macsforme »

I hate to open a likely can of worms, but what on earth is the point of allowing players to assign their points to others via a slash command? Say what you will about our scoring/points system and its shortcomings, but how is it helped by allowing scores to be manipulated in such a fashion? I might even argue that if the effect of this plugin (intended or not) is to allow players to manipulate scores for the sake of statistics sites, then servers running this plugin should not be allowed on the server list. Aside from that, I hardly see how this ability to allocate points is helpful to anyone, especially not to the recipients who may then be deprived of their incentive to raise themselves up through improving their skill (and yes, I grant that our scoring system features negative scores too prominently and is discouraging to newcomers, but that is another discussion)....
User avatar
Zehra
Private First Class
Private First Class
Posts: 915
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: givePoint and Retroreflector plugins

Post by Zehra »

The issue stated is with the ability to assign others points.
So, what if players on purpose will geno bait or die to award others points?
(This leads to almost the same outcome, but with a longer time investment.)
So, what about statistics sites?
(The ones running are non-official or not from the project, unlike of years back when there was an official stats site.)
So, what about other point adjusting plug-ins?
(CtfOverseer, triplePoints, uselessRampage, bountyHunter, as it could be considered within a very similar category.)
If statistics sites are then the problem, why not prohibit them?
(Much easier to block a single website then.)
This leads to this interesting possible scenario:
In where the project possibly takes action, due to sub-optimal third party project(s) facing issues indirectly caused by plug-ins.
As plug-ins are created with the API, is now then the API at fault? (That's where it would eventually lead to.)
===
As for the score system being sub optimal, it is and there has been many suggestions or ideas to improve it.
(When a solid design and concept is suggested, it will likely be considered, and possibly for implementation.)
As for recipients who may be deprived of the incentive:
Are players more discouraged by having deeply negative scores and choose not to play?
Or is it where perhaps giving a score boost may encourage a player to continue playing?
(Both non-optimal concepts or solutions.)
As for the idea of improving skill, better modes and maps will lead to where players may improve their skill.
For those new to the game entirely, I suppose a tutorial system/single player mode would be helpful.
If people wish to see some system to help enhance player skill, it can be done, simply a solid concept needs to be created and implemented.
(But this would be for another thread, another topic.)

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
macsforme
General
General
Posts: 2069
Joined: Wed Mar 01, 2006 5:43 am

Re: givePoint and Retroreflector plugins

Post by macsforme »

Wow... rarely have I seen a post that so confuses an issue with irrelevant comparisons and unhelpful points...

A plugin that gives a player more points on command is not similar to a plugin that gives bonus points for getting kills or performing other game objectives.

Players who geno bait or intentionally allow themselves to be killed are already being kicked or banned, so your comparison actually reinforces my point.

It is not the fault of a useful tool (the bzfs API) that it sometimes gets abused.

It is not the fault of statistics sites that some servers do not behave as expected or as convention dictates in how they assign players points. We will not be banning stats sites as you suggested.

Players can already rejoin the game to reset their score if it really bothers them. Giving another player points that you have earned will make them feel like a charity case and will only reinforce how their skills are poor. In no sense do I see any positive outcome from this ability.
GEP
Private First Class
Private First Class
Posts: 17
Joined: Sun Jan 12, 2020 7:17 pm

Re: givePoint and Retroreflector plugins

Post by GEP »

What is the point of it... Heh, there isn't much point to it.
The idea behind it was; if a player wants to leave and they are the only one that has points they could pass them off to the next best so the remaining players can try to earn them back without sending others deeper into the negatives, or if a high scoring player gives enough to the lowest player that they are no longer in the negatives, the low scorer could have the thought "Oh yay, they've made it so I'm not so far below them lets try hard to not lose so many points."
Although I suppose it is more realistic to assume that most players would take it as a charity case and not be motivated..

The manipulation of bzflag statistic sites was something I had not considered.

Perhaps there are enough issues with this plugin that no one should use it, but I enjoyed making it, and thought it would be worthwhile to share it here to see what others thought of it.
User avatar
Zehra
Private First Class
Private First Class
Posts: 915
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: givePoint and Retroreflector plugins

Post by Zehra »

With the issue now clarified precisely, it is now possible to specifically addressed what was found.

The issue now properly defined, should be roughly equivalent to the following:
Points should not be awarded or granted to players without completing game play objectives.

This is a much clearer and less vague or ambiguous, as previously it was wide open to interpretation.
(Since the exact issue is not with points being equivalent to a single kill or the accuracy of stats sites.)
Hence multiple possibilities explored, leading to a more precise definition which could be properly calculated.

Unlike what is suggested, players do not gain points on command.
They are able to grant other players their own points, which were earned by their own efforts.
(The is issue, since it allows granting players points which were not gained from accomplishing game play objectives.)

While statistics sites are claimed to be the "victim", it actually is the players who are the victim.
(Due to stats sites not properly factoring in game modes, modes like Rabbit Chase, Hold The Flag, Racing Maps, Keep Away, and King of the Hill tend to "decrease" player stats overall, no matter how good a player is at said mode(s).)
Either the modes should be adjusted to properly calculate scores so sites may not incorrectly calculate the stats of players.
Or they should be fine with the inaccuracies they may have to deal with, as it would level itself out from both "false" increases and decreases.
(If players play all modes.)

This is the fault of the stats sites, which also bring a huge incentive for players to camp and try to rack up major scores.
How often do we see results of players making game play unenjoyable for others, simple for the sake of stats sites or their scores?

In addition, there is no explicitly defined "convention" for how players should award points.
(Stats sites reflect the so called points as equivalent to "kills"/"deaths".)
This does not reflect reality or the game modes in most senses.(Unless default settings are used and default modes are used.)
(Not including HTF, KeepAway, KingOfTheHill and possibly quite a few others. As kills and deaths should reflect player deaths vs other players.[Kills against server are impossible, unless server side bots.])

Therefore stats sites are inaccurate, and they should work to resolve inaccuracies on their own, if possible.
If not, then a method to allow accurate stats tracking should be made.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
tainn
Private First Class
Private First Class
Posts: 278
Joined: Sun Nov 18, 2018 7:25 pm
Location: phantom_zone;

Re: givePoint and Retroreflector plugins

Post by tainn »

Zehra wrote: Fri Sep 18, 2020 2:15 amDue to stats sites not properly factoring in game modes, modes like Rabbit Chase, Hold The Flag, Racing Maps, Keep Away, and King of the Hill tend to "decrease" player stats overall, no matter how good a player is at said mode(s).
Really now? Then how come I tend to always maximize my score exactly on such maps—maps where I play either as rogue or a rabbit.

And don't try to argue with an idea of average from this point on, as your post clearly claims "no matter how good a player is at said mode(s)", which is just plain wrong. You seriously ought to stop presenting your ideas as facts. This game has a few really dominating players on flagged maps, and such "solo" game modes just jack their score up faster, meaning that they will end their sessions with higher scores on those maps, assuming their sessions are similar in duration.
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: givePoint and Retroreflector plugins

Post by JeffM »

A more fun way to do sort of what is being described is a "bounty hunter" mode.

Everyone starts with a bounty (score) of 1 when they join.
When you kill someone, that person's score is added to yours, and their score is set back to 1 when they respawn. A killer effectively "claims" the bounty when someone dies.
The longer you are alive and active, the higher your score/bounty is, but it makes you a better target since you are worth more points on a kill. Kill the leader and you are suddenly the most valuable target.
The game tracks the highest bounty achieved by anyone to a leaderboard.

You can even hook into the handicap system and give higher bounties a performance boost/reduction

This makes it easy/fun for people to come and go, and doesn't actually matter if someone drops out and rejoins. It's just a constant churn toward the highest leaderboard score.

Since it would be effectively a new game mode, you would want the stats sites to track it differently or not at all.
ImageJeffM
User avatar
tainn
Private First Class
Private First Class
Posts: 278
Joined: Sun Nov 18, 2018 7:25 pm
Location: phantom_zone;

Re: givePoint and Retroreflector plugins

Post by tainn »

I—hands down—really like that idea, JeffM. Though it might need some tweaking.

The issue is with the leaderboard that you mention, and the way the scores would be distributed. Every spawn on the map would yield +1 sum total of player points. Now imagine one player having a large streak, reaching the leaderboard hiscore, and then dying. The player that would kill them would now have previous hiscore + 1 points, getting them to the top. Repeat the process. Every single kill would result in a new top scorer.

Such a leaderboard would merely display the pool size of that server session's spawn accumulation. So, if the players that got some points stockpiled wouldn't leave the game when they hold them, but rather when they die, then all those points would remain in the transferable pool, making the leaderboard a representation of the amount of spawns that happened on the server before every single player left, as well as who got the last kill.

I'd prefer something that doesn't kill the aspect of a zero-sum game.

I've had an idea of a "Binary Bounty Hunter" game mode, and I'll likely write a whole thread dedicated to it soon.
User avatar
lep
Private First Class
Private First Class
Posts: 248
Joined: Tue Jun 17, 2008 12:03 am
Location: San Diego, CA
Contact:

Re: givePoint and Retroreflector plugins

Post by lep »

Zehra wrote: Fri Sep 18, 2020 2:15 am
This is a much clearer and less vague or ambiguous, as previously it was wide open to interpretation.
"This is much more A and less B and C, as it was previously very B and C and now it's much more A"
This is how I read this response, as it seems very robotic and lacking meaning or real thought, similar to most of the rest of your contribution to this thread.
JeffM wrote: Fri Sep 18, 2020 2:33 pm A more fun way to do sort of what is being described is a "bounty hunter" mode.
This actually sounds like a really cool idea, JeffM!
User avatar
JeffM
Staff Sergeant
Staff Sergeant
Posts: 5196
Joined: Fri Dec 13, 2002 4:11 am

Re: givePoint and Retroreflector plugins

Post by JeffM »

tainn wrote: Fri Sep 18, 2020 6:09 pm I—hands down—really like that idea, JeffM. Though it might need some tweaking.
Yes it of course would need to be tweaked, tested and optimized, but also don't forget that not every kill of the top scorer, people will kill the non tops too. You can also get sums greater than the top by killing many smaller bounties. If your top scorer has 100 pts, and you kill a girl with 75 and a guy with 40, you are now the top at 116, with the current leader not having to die.

Also when people leave the bounty they had is lost, so there are ways for points to leave the system. there are many ways to limit runaways, make a cap bounty and if you hold that for 2 min then you are the "winner" and everyone resets, divide the bounty add by the number of kills you have so that it gets harder to move up the more you kill, and many other options/variations.

It would all need to be playtested of course, it was mostly a general idea that I have seen in other games
ImageJeffM
User avatar
Zehra
Private First Class
Private First Class
Posts: 915
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: givePoint and Retroreflector plugins

Post by Zehra »

tainn wrote: Fri Sep 18, 2020 4:59 am Really now? Then how come I tend to always maximize my score exactly on such maps—maps where I play either as rogue or a rabbit.

And don't try to argue with an idea of average from this point on, as your post clearly claims "no matter how good a player is at said mode(s)", which is just plain wrong. You seriously ought to stop presenting your ideas as facts. This game has a few really dominating players on flagged maps, and such "solo" game modes just jack their score up faster, meaning that they will end their sessions with higher scores on those maps, assuming their sessions are similar in duration.
(My words could have certainly been better written.)
If we have mostly equal skill teams.
Red and Green, with 5 players each team. One highly skilled player is in each team, two mid level players, one okay player and one noob.
The highly skilled players will gain points, mid level players will do "okay", the okay player will retain a roughly level score.
Regardless of which argument is used to counter, the following outcomes do occur.(As of the time of this writing and before.)

In KeepAway or King of The Hill, set as team mode, all players in general will lose points as the game goes back and forth.
(This is not due to the players, but from the mode itself.)

The definition for overall will be defined as "Generally; with everything considered."
What is done by your words is raise a specific objection, regarding a specific scenario, while the words are used in a general context.

So with regards to this, players will lose scores overall, regardless of which team or mode they play.
Some exceptions exist to the rule though, but those are rare.
Since the scores are "reduced" overall by an extent, the stats would reflect the reduced stats.
(In reference to the modes I specified previously.)

Also, people are free to question all thoughts and comments and by no means I place them as facts.
JeffM wrote: Fri Sep 18, 2020 2:33 pm A more fun way to do sort of what is being described is a "bounty hunter" mode.

Everyone starts with a bounty (score) of 1 when they join.
When you kill someone, that person's score is added to yours, and their score is set back to 1 when they respawn. A killer effectively "claims" the bounty when someone dies.
The longer you are alive and active, the higher your score/bounty is, but it makes you a better target since you are worth more points on a kill. Kill the leader and you are suddenly the most valuable target.
The game tracks the highest bounty achieved by anyone to a leaderboard.

You can even hook into the handicap system and give higher bounties a performance boost/reduction

This makes it easy/fun for people to come and go, and doesn't actually matter if someone drops out and rejoins. It's just a constant churn toward the highest leaderboard score.

Since it would be effectively a new game mode, you would want the stats sites to track it differently or not at all.
I like this idea, it almost seems like a form of KeepAway, but with some changes, specifically with flag trigger being changed to spawn trigger and applying to all players overall to an extent.
Other modifications certainly needed, but KeepAway would seem like a decent starting point for this idea.
tainn wrote: Fri Sep 18, 2020 6:09 pm I'd prefer something that doesn't kill the aspect of a zero-sum game.
Zero-sum games are broken the moment any form of score adjusting is done.
(In the strictest sense, self-kills would be prevented and death physics prohibited to achieve zero-sum games.)
lep wrote: Fri Sep 18, 2020 8:53 pm "This is much more A and less B and C, as it was previously very B and C and now it's much more A"
This is how I read this response, as it seems very robotic and lacking meaning or real thought, similar to most of the rest of your contribution to this thread.
I suppose that perhaps people may wish for a more casual form of tone to be used with forum posts.
But then again, the forums were never meant for casual chit-chat.

What would be a way for you to find meaning more easily within a post?
(Concrete examples, detailed usage, less formal tone, detailed events and sequences..etc)

===

For the thread itself, it seems it would be wise for it to be split into a new topic.
This way it would not be cluttered by "unrelated" posts.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
tainn
Private First Class
Private First Class
Posts: 278
Joined: Sun Nov 18, 2018 7:25 pm
Location: phantom_zone;

Re: givePoint and Retroreflector plugins

Post by tainn »

JeffM wrote: Fri Sep 18, 2020 10:44 pmYou can also get sums greater than the top by killing many smaller bounties. If your top scorer has 100 pts, and you kill a girl with 75 and a guy with 40, you are now the top at 116, with the current leader not having to die.
In any map that allows all tanks to interact with each other and are therefore not isolated, this scenario would be very unlikely.

If the session is relatively short, then multiple comparable stacks may indeed happen. But not for long. Ultimately one single stack will swallow all other. It takes time to build two or more separate stacks, but then eventually one swallows the others, becoming huge and the others disappearing. With players being pushed back to 1 point after each death, smaller stacks might and probably would happen, but only one main stack would be present at a time at longer sessions.

Update edit: Just to make sure I was imagining this right, I made a quick Python simulation. Again, no players or groups of players are isolated. Run to see how only one stack is relevant as the session progresses. Also see how the value of the top score essentially becomes the number of all battles done on the map. This simulation sets the end score as 100.000, but 100 is already well-enough to see the dominating pattern, and 100 battles are achieved very fast.

Code: Select all

from random import sample

player_scores = {
    'foo': 1,
    'bar': 1,
    'baz': 1,
    'qux': 1,
    'quux': 1,
    'quuz': 1
}

players = [key for key in player_scores.keys()]
battles = 0

while max(player_scores.values()) < 10_000:
    pair = sample(players, 2)
    winner, loser = pair[0], pair[1]

    player_scores[winner] += player_scores[loser]
    player_scores[loser] = 1

    battles += 1

    print(f'{list(player_scores.values())}, battles: {battles}')
User avatar
Zehra
Private First Class
Private First Class
Posts: 915
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: givePoint and Retroreflector plugins

Post by Zehra »

Assuming the mode will be made, scores will probably start off quickly and the amount of the score increments would slowly decrease as [spawn] time goes along. (Decrease is in reference to the amount of the score increments.)
This would prevent scores from simply heading skywards.

It would be easy to calculate the highest player scores and adjust score increments accordingly.

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
User avatar
alfa1
Private First Class
Private First Class
Posts: 168
Joined: Tue Dec 04, 2012 10:21 pm

Re: givePoint and Retroreflector plugins

Post by alfa1 »

Not sure how a laser works in real life, but, if a laser weapon existed, and you were able to reflect it back (with a kind of "shield"), you should not die; only the shooter (tho, not sure if this could be made with custom flags/plug-ins). The "shield" could have a seteable counter about how may hits/reflections it could handle.

Another fun version could be to make the player holding the "shield" to act as a normal reflective object, and maybe varying its angle according to tank position. In this case, he should not lose his flag at all by hits/reflections.
User avatar
Zehra
Private First Class
Private First Class
Posts: 915
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: givePoint and Retroreflector plugins

Post by Zehra »

A rather simple modification which would enhance the plug-in quite a bit:

1. Find this section of code:

Code: Select all

bz_killPlayer(diedata->killerID, false, diedata->playerID, "RR");
2. Add the following right below it:

Code: Select all

bz_incrementPlayerLosses(diedata->playerID, -1);
3. So it should look like this:

Code: Select all

bz_killPlayer(diedata->killerID, false, diedata->playerID, "RR");
bz_incrementPlayerLosses(diedata->playerID, -1);
This "undoes" the death, so it simply is not mutual death and the flag holder of RetroReflector will gain a point.(Upon death by laser kill.)

Ideally, we could gain the shot position and with knowledge of the "game world", we could make RetroReflector "reflect" shots.
(This is not something available within the current protocol.)
[Shot position is in reference to where shot may travel/end and not used in reference to starting position, which is the only thing currently available.]

Another minor idea for enhancement:
Perhaps take into account game mode, so if not OFFA, if a player is dies from one of the same team, they do not die as well.
(Exception for rogue team would need to be taken into account as well.)

-Zehra
Those who are critical of me, I'll likely be the same of them. ~Zehra
The decisions we make are the ones we look forward too and the ones we regret. ~Zehra
There's a difference between knowing my name and knowing me, one shows respect to my name and the other is to who I am. ~Zehra

See where I've last been active at Strayers.
Visit BZList.net for a modern HTML5 server stats site.

Click here to view the 101 Leaderboard & Score Summaries Last updated 2021-01-12 (YYYY-MM-DD)
Latest 101 thread
GEP
Private First Class
Private First Class
Posts: 17
Joined: Sun Jan 12, 2020 7:17 pm

Re: givePoint and Retroreflector plugins

Post by GEP »

Added the requested changes to retroreflector
Post Reply