FF2-Official
FF2-Official copied to clipboard
Rewrite queue points system
I'd like to entirely rewrite queue points for 2.0.0. Ideally, this rewrite should:
- [ ] Be contained in its own subplugin (
ff2_queue_points
) - [ ] Have a linear (legacy) mode that operates as it does currently
- [ ] Have a non-linear mode that should take into account the amount of damage the player does (see #36)
- [ ] Have a totally random mode
- [ ] Cvars and lots of configurability for the above modes
- [ ] The ability to write your own points system if you're not satisfied with the default options
Feedback would be nice.
Now that would be cool, a modular points system.
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.
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.
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.
I dont think player scores are useless they are very important
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.
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.
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]);
}
}
}
}
}