Overhauling of scoring systems used in custom game modes

Make suggestions for improving one of the best games on the net!
Post Reply
User avatar
Zehra
Private First Class
Private First Class
Posts: 921
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Overhauling of scoring systems used in custom game modes

Post by Zehra »

(By custom, I mean as in, any game mode which uses a plug-in.)

What should be noted, is this is mainly to address what seems to be a flaw in the scoring systems used, as the scoring systems don't seem to reflect the mode being played and unfairly punish players for not achieving game play objectives.

Ideally players are awarded for accomplishing game play objectives.


But we see exactly the opposite happen for instance the following mode(s):

--

In HoldTheFlag, the scoring consists of merely messages sent to players and of team kills, deaths and self kills. Not to mention the subpar audio for "capturing" of flags.

--

In King of the Hill, better known as KotH or KoTH, players attempt to reach a section of the map and remain in it.

The team play aspect of KotH could be better if it did not cause players to lose score by kills attributed to the server. The reason being, who would want to remain in a game mode where the overall score of the players are reduced overall. For instance, if you have for instance red and green used as teams and both teams win 3 times each, both teams would have their player score reduced by 3 points overall. (Which unfairly records this in stats sites as players doing more poorly than they actually are.)

--

In KeepAway, losing teams will lose players points rather quickly. This reflects badly, as even in general CTF or FFA or even any default mode, the scores is not built up having the server repeatly killing players and reducing their scores.

The intention of "resetting" players is assumed, without punishing them by reducing their score.

--

rabbitTimer is designed to prevent rabbits from simply camping their way out or hiding. A much simpler means would be to select new rabbits with faster timing. Or to simply "reset" that specific player to prevent issues.

--

rabidRabbit simply punishes hunters and overall players will lose points, regardless of how skilled or unskilled they are.

--

As can be seen, the scoring systems used do not factor in kills attributed to the server. This is not ideal by any means and the suggested solution for this is to have players "reset" without impacting their score.

For HoldTheFlag mode, something similar to PointsHTF or PointsCTF is recommended.

In terms of KeepAway and KotH, with team play, the team scores should reflect the wins and losses made by the teams. This way players can play as a proper team and their team score is a proper reflection of the game mode. (Since FFA is commonly used, the modes reflect FFA, despite not using the same scoring system.) This would additionally allow them to be used in league style games or leaderboards more easily.

It is believed that changes like these would enhance the game play of these game modes, as the scoring would reflect actual game play accomplishments and not punish players unfairly.

--

Note: Above suggested changes/modifications will be released at a later point in time.

---

Thoughts?

-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
Zehra
Private First Class
Private First Class
Posts: 921
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: Overhauling of scoring systems used in custom game modes

Post by Zehra »

Rabbit hunt/chase modifications:

For rabbitTimer:
Find this section of code:

Code: Select all

// kill the wabbit!
bz_killPlayer(currentRabbit, false, BZ_SERVER);
And change it to the following:

Code: Select all

// kill the wabbit!
bz_killPlayer(currentRabbit, false, BZ_SERVER);
bz_incrementPlayerLosses(currentRabbit, -1);
This change prevents the rabbit from losing score upon being killed by the timer.

--

For rabidRabbit:
Find this section of code:

Code: Select all

void killAllHunters(std::string messagepass)
{
    bz_APIIntList *playerList = bz_newIntList();
    bz_getPlayerIndexList(playerList);


    for (unsigned int i = 0; i < playerList->size(); i++)
    {

        bz_BasePlayerRecord *player = bz_getPlayerByIndex(playerList->operator[](i));

        if (player)
        {
            if (player->team != eRabbitTeam)
            {
                bz_killPlayer(player->playerID, true, BZ_SERVER);
                bz_sendTextMessage(BZ_SERVER, player->playerID, messagepass.c_str());
            }
            bz_freePlayerRecord(player);
        }
    }

    bz_deleteIntList(playerList);

    return;
}
Change it to the following:

Code: Select all

void killAllHunters(std::string messagepass)
{
    bz_APIIntList *playerList = bz_newIntList();
    bz_getPlayerIndexList(playerList);


    for (unsigned int i = 0; i < playerList->size(); i++)
    {

        bz_BasePlayerRecord *player = bz_getPlayerByIndex(playerList->operator[](i));

        if (player)
        {
            if (player->team != eRabbitTeam)
            {
                bz_sendTextMessage(BZ_SERVER, player->playerID, messagepass.c_str());
                
                if (player->spawned)
                {
                    bz_killPlayer(player->playerID, true, BZ_SERVER);
                    bz_incrementPlayerLosses(player->playerID, -1);
                }
            }
            bz_freePlayerRecord(player);
        }
    }

    bz_deleteIntList(playerList);

    return;
}
The last change is within the following:
Change this bit of code:

Code: Select all

if (zoneList[i].pointInZone(player->lastKnownState.pos) &&
                        player->spawned &&
                        player->team != eRabbitTeam &&
                        zoneList[i].zonekillhunter)
                {
                    bz_killPlayer(player->playerID, true, BZ_SERVER);
                    bz_sendTextMessage (BZ_SERVER, player->playerID, zoneList[i].playermessage.c_str());
                }
To the following:

Code: Select all

if (zoneList[i].pointInZone(player->lastKnownState.pos) &&
                        player->spawned &&
                        player->team != eRabbitTeam &&
                        zoneList[i].zonekillhunter)
                {
                    bz_killPlayer(player->playerID, true, BZ_SERVER);
                    bz_incrementPlayerLosses(player->playerID, -1);
                    bz_sendTextMessage (BZ_SERVER, player->playerID, zoneList[i].playermessage.c_str());
                }
These modifications prevent the hunters from losing score due to the repeated kills by the server. (Additionally the first change may improve server efficiency by a small bit, as it only attempts to kill hunters which are spawned and similarly only modifies the score then.)

--

This is the initial outline of planned scoring changes. (More to come.)


-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
Zehra
Private First Class
Private First Class
Posts: 921
Joined: Sun Oct 18, 2015 3:36 pm
Location: Within the BZFS API and Beyond it
Contact:

Re: Overhauling of scoring systems used in custom game modes

Post by Zehra »

KeepAway and King of the Hill (KoTH/KotH) modifications:
NOTE: These modifications solely address the issue of players losing score overall. (Modifications for team play will be made in a separate post.)

For KeepAway:
Find this section of code:

Code: Select all

void killTeams(bz_eTeamType safeteam, std::string keepawaycallsign)
{
    bz_APIIntList *playerList = bz_newIntList();
    bz_getPlayerIndexList ( playerList );

    for ( unsigned int i = 0; i < playerList->size(); i++ )
    {

        bz_BasePlayerRecord *player = bz_getPlayerByIndex(playerList->operator[](i));

        if (player)
        {

            if (player->team != safeteam)
            {
                bz_killPlayer(player->playerID, true, BZ_SERVER);
                if (keepaway.soundEnabled)
                    bz_sendPlayCustomLocalSound(player->playerID,"flag_lost");
            }
            else if (keepaway.soundEnabled)
                bz_sendPlayCustomLocalSound(player->playerID,"flag_won");
        }

        bz_freePlayerRecord(player);
    }
    bz_deleteIntList(playerList);

    bz_sendTextMessagef (BZ_SERVER, BZ_ALLUSERS, "%s (%s) Kept the Flag Away!", getTeamColor(safeteam),
                         keepawaycallsign.c_str());

    if (keepaway.flagResetEnabled)
        bz_resetFlags(true);

    return;
}
Change it to the following:

Code: Select all

void killTeams(bz_eTeamType safeteam, std::string keepawaycallsign)
{
    bz_APIIntList *playerList = bz_newIntList();
    bz_getPlayerIndexList ( playerList );

    for ( unsigned int i = 0; i < playerList->size(); i++ )
    {

        bz_BasePlayerRecord *player = bz_getPlayerByIndex(playerList->operator[](i));

        if (player)
        {

            if (player->team != safeteam)
            {
                if (keepaway.soundEnabled)
                    bz_sendPlayCustomLocalSound(player->playerID,"flag_lost");

                if (player->spawned)
                {
                    bz_killPlayer(player->playerID, true, BZ_SERVER);
                    bz_incrementPlayerLosses(player->playerID, -1);
                }
            }
            else if (keepaway.soundEnabled)
                bz_sendPlayCustomLocalSound(player->playerID,"flag_won");
        }

        bz_freePlayerRecord(player);
    }
    bz_deleteIntList(playerList);

    bz_sendTextMessagef (BZ_SERVER, BZ_ALLUSERS, "%s (%s) Kept the Flag Away!", getTeamColor(safeteam),
                         keepawaycallsign.c_str());

    if (keepaway.flagResetEnabled)
        bz_resetFlags(true);

    return;
}
This change prevents players from losing score to repeated server kills. (Full explanation: Adds a small check to see if players are spawned, before performing a kill action and modifying the player's score.)

For koth:
Find this section of code:

Code: Select all

void killTeams(bz_eTeamType safeteam, std::string kothcallsign)
{
    bz_APIIntList *playerList = bz_newIntList();
    bz_getPlayerIndexList ( playerList );

    for ( unsigned int i = 0; i < playerList->size(); i++ )
    {

        bz_BasePlayerRecord *player = bz_getPlayerByIndex(playerList->operator[](i));

        if (player)
        {

            if (player->team != safeteam)
            {
                bz_killPlayer(player->playerID, true, BZ_SERVER);
                if (koth.soundEnabled)
                    bz_sendPlayCustomLocalSound(player->playerID,"flag_lost");
            }
            else if (koth.soundEnabled)
                bz_sendPlayCustomLocalSound(player->playerID,"flag_won");
        }

        bz_freePlayerRecord(player);
    }
    bz_deleteIntList(playerList);

    bz_sendTextMessagef (BZ_SERVER, BZ_ALLUSERS, "%s (%s) IS KING OF THE HILL!", getTeamColor(safeteam),
                         kothcallsign.c_str());

    return;
}
Change it to look like this:

Code: Select all

void killTeams(bz_eTeamType safeteam, std::string kothcallsign)
{
    bz_APIIntList *playerList = bz_newIntList();
    bz_getPlayerIndexList ( playerList );

    for ( unsigned int i = 0; i < playerList->size(); i++ )
    {

        bz_BasePlayerRecord *player = bz_getPlayerByIndex(playerList->operator[](i));

        if (player)
        {

            if (player->team != safeteam)
            {
                if (koth.soundEnabled)
                    bz_sendPlayCustomLocalSound(player->playerID,"flag_lost");

                if (player->spawned)
                {
                    bz_killPlayer(player->playerID, true, BZ_SERVER);
                    bz_incrementPlayerLosses(player->playerID, -1);
                }
            }
            else if (koth.soundEnabled)
                bz_sendPlayCustomLocalSound(player->playerID,"flag_won");
        }

        bz_freePlayerRecord(player);
    }
    bz_deleteIntList(playerList);

    bz_sendTextMessagef (BZ_SERVER, BZ_ALLUSERS, "%s (%s) IS KING OF THE HILL!", getTeamColor(safeteam),
                         kothcallsign.c_str());

    return;
}
This change prevents players from losing score to repeated server kills. (Full explanation: Adds a small check to see if players are spawned, before performing a kill action and modifying the player's score.)

Next find this section of code:

Code: Select all

void KOTHPlayerPaused ( bz_EventData *eventData )
{
    if (eventData->eventType != bz_ePlayerPausedEvent || !koth.enabled)
        return;

    bz_PlayerPausedEventData_V1 *PauseData = (bz_PlayerPausedEventData_V1*)eventData;
    bz_BasePlayerRecord *player = bz_getPlayerByIndex(PauseData->playerID);

    if (player)
    {
        if (kothzone.pointInZone(player->lastKnownState.pos))
        {
            bz_killPlayer (PauseData->playerID, true, BZ_SERVER);
            bz_sendTextMessage (BZ_SERVER, PauseData->playerID, "Cannot pause while on the Hill.");
        }
    }
    bz_freePlayerRecord(player);

    return;
}
Change it to the following:

Code: Select all

void KOTHPlayerPaused ( bz_EventData *eventData )
{
    if (eventData->eventType != bz_ePlayerPausedEvent || !koth.enabled)
        return;

    bz_PlayerPausedEventData_V1 *PauseData = (bz_PlayerPausedEventData_V1*)eventData;
    bz_BasePlayerRecord *player = bz_getPlayerByIndex(PauseData->playerID);

    if (player)
    {
        if (kothzone.pointInZone(player->lastKnownState.pos))
        {
            bz_killPlayer (PauseData->playerID, true, BZ_SERVER);
            bz_incrementPlayerLosses(PauseData->playerID, -1);
            bz_sendTextMessage (BZ_SERVER, PauseData->playerID, "Cannot pause while on the Hill.");
        }
    }
    bz_freePlayerRecord(player);

    return;
}
Players who pause within the zone, won't lose points because of it, they will be merely reset.

---

Stay tuned for further enhancements of the current custom game modes.

-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
Post Reply