50DKP / FF2-Official

Freak Fortress 2 is a one versus all mod for Team Fortress 2. It is the successor to the Vs. Saxton Hale plugin.
https://forums.alliedmods.net/forumdisplay.php?f=154
GNU General Public License v3.0
53 stars 27 forks source link

Rewrite queue points system #45

Open 50Wliu opened 10 years ago

50Wliu commented 10 years ago

I'd like to entirely rewrite queue points for 2.0.0. Ideally, this rewrite should:

Feedback would be nice.

WildCard65 commented 10 years ago

Now that would be cool, a modular points system.

Selena-Gomez commented 10 years ago

A suggestion to discourage super useless non-damage dealing scouts: Have only the variably set top percent damage dealers receive points for a round, or at least bottom percent receive them at a reduced rate.

50Wliu commented 10 years ago

Sure.

Though, I'm also thinking that you could set it to something like this: Every player receives -5 queue points every round, but then they also receive [points]x3 queue points. Which would mean you would need at least 2 actual in-game TF2 points every round to gain queue points instead of losing them.

wasder commented 9 years ago

It would be cool if you could display queue points in the scoreboard instead of player score. Because player score is pretty useless in the mode and so you can use it's points in this way. It would allow to get rid of additional panel and command and make it more native.

ghost commented 9 years ago

I dont think player scores are useless they are very important

wasder commented 9 years ago

After being a boss you will always have much kills and high score, while being in a team you practically dont kill anybody, so you have hardly have any points in your score.

50Wliu commented 9 years ago

Honestly, it is kind of useless. Though it does help separate those who actually try to kill the boss from those darn scouts who just run away.

shadow93 commented 9 years ago

Here's what i've been using for my copy of FF2:

stock CalcQueuePoints()
{
    new damage;
    botqueuepoints+=5;
    new add_points[MAXPLAYERS+1];
    new add_points2[MAXPLAYERS+1];
    for(new client=1; client<=MaxClients; client++)
    {
        if(IsValidClient(client))
        {
            damage=Damage[client];
            new Handle:event=CreateEvent("player_escort_score", true);
            SetEventInt(event, "player", client);

            new points, bonus;
            while(damage-600>0)
            {
                damage-=600;
                points++;
            }
            switch(TF2_GetPlayerClass(client))
            {
                case TFClass_Heavy, TFClass_Spy:
                {
                    while(damage-1000>0)
                    {
                        damage-=1000;
                        bonus++;
                    }
                }
                case TFClass_Scout, TFClass_DemoMan, TFClass_Engineer, TFClass_Sniper:
                {
                    while(damage-500>0)
                    {
                        damage-=500;
                        bonus++;
                    }
                }
                default:
                {
                    while(damage-300>0)
                    {
                        damage-=300;
                        bonus++;
                    }
                }
            }
            SetEventInt(event, "points", points);
            FireEvent(event);

            if(IsBoss(client))
            {
                if(IsFakeClient(client))
                {
                    botqueuepoints=0;
                }
                else
                {
                    add_points[client]=-GetClientQueuePoints(client);
                    add_points2[client]=add_points[client];
                }
            }
            else if(!IsFakeClient(client) && (GetClientTeam(client)>_:TFTeam_Spectator || SpecForceBoss) && damage>0)
            {
                add_points[client]=1+points+bonus;
                add_points2[client]=1+points+bonus;
            }
        }
    }

    new Action:action=Plugin_Continue;
    Call_StartForward(OnAddQueuePoints);
    Call_PushArrayEx(add_points2, MAXPLAYERS+1, SM_PARAM_COPYBACK);
    Call_Finish(action);
    switch(action)
    {
        case Plugin_Stop, Plugin_Handled:
        {
            return;
        }
        case Plugin_Changed:
        {
            for(new client=1; client<=MaxClients; client++)
            {
                if(IsValidClient(client))
                {
                    if(add_points2[client]>0)
                    {
                        CPrintToChat(client, "{olive}[FF2]{default} %t", "add_points", add_points2[client]);
                    }
                    SetClientQueuePoints(client, GetClientQueuePoints(client)+add_points2[client]);
                }
            }
        }
        default:
        {
            for(new client=1; client<=MaxClients; client++)
            {
                if(IsValidClient(client))
                {
                    if(add_points[client]>0)
                    {
                        CPrintToChat(client, "{olive}[FF2]{default} %t", "add_points", add_points[client]);
                    }
                    SetClientQueuePoints(client, GetClientQueuePoints(client)+add_points[client]);
                }
            }
        }
    }
}