sof2er / rotoblin

Automatically exported from code.google.com/p/rotoblin
0 stars 0 forks source link

Healthbonus calculation depending on incap count. #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Health Bonus calculated depending on whether you go down once, twice or not at 
all.

Basically having 4 people in the saferoom black and white all 4 on 30 temp 
health should result in a lower healthbonus than 4 people with all on 30 temp 
that are either temp but haven't gone down or went down only once.

The way this should work is that the first 30 TEMP health at any time of a 
survivor gives overall less health bonus for that survivor depending on his/her 
incap count.

Here's a small example with random values:

Solid Health: 2 Solid Health = 1 HB
Temp Health 0 Incap: 4 Temp Health = 1 HB
Temp Health 1 Incap: 8 Temp Health = 1 HB
Temp Health 2 Incap: 12 Temp Health = 1 HB

30 Temp Health 0 Incap = 7.5 HB
30 Temp Health 1 Incap = 3.75 HB
30 Temp Health 2 Incap = 2.5 HB

Any extra temp health above 30 from pills OR having pills should be counted as 
4 Temp Health -> 1 HB.

A survivor with 100 solid health is worth 50 HB to the team
A survivor with 49 solid health and 39 temp health is worth 34.25 HB to the team
A survivor with 89 temp health, black and white is worth 7.416 HB to the team
A survivor with 60 temp health, incapped once is worth 7.5 HB to the team

Original issue reported on code.google.com by sof...@gmail.com on 8 Jan 2011 at 5:34

GoogleCodeExporter commented 9 years ago
Just to add, all values I believe are floored (not entirely sure and needs some 
researching)

Original comment by sof...@gmail.com on 8 Jan 2011 at 5:38

GoogleCodeExporter commented 9 years ago
Should be doable.  http://wiki.alliedmods.net/Left_4_Dead_Events
Event: player_incapacitated -- all we'd need to do is track the incap count per 
player and reset it on round_start.  Only down-side is that it'll probably mess 
up the scoring that's displayed on the client GUI.

Original comment by MJSimp...@gmail.com on 9 Jan 2011 at 1:28

GoogleCodeExporter commented 9 years ago
I think the netprop "m_currentReviveCount" holds the incap count, so tracking 
it shouldn't be necessary.

Original comment by s.senti...@gmail.com on 18 Feb 2011 at 3:59

GoogleCodeExporter commented 9 years ago
Healthbonus.org is in agreement with this situation.

Original comment by russell...@gmail.com on 21 Feb 2011 at 4:20

GoogleCodeExporter commented 9 years ago

Original comment by ajpar...@gmail.com on 11 Apr 2011 at 5:00

GoogleCodeExporter commented 9 years ago
http://www.cybergamer.com.au/forums/thread/237360/Sentients-custom-scoring-for-l
4doodles1/

Aus health bonus project by sentient. 

Original comment by blakelue...@gmail.com on 25 May 2011 at 3:58

Attachments:

GoogleCodeExporter commented 9 years ago
While it is interesting, it is not completely how we had planned the scoring 
system, the idea is good but the survival 0 multiplier perhaps not much so. I 
do agree with sentinents point regarding barely making and not making, the 
simple solution is to put all maps on a 1.0 multiplier. 

Moreover there are flaws, assuming all teams wipe in a game it simply turns 
into a distance-based game where people just rush for maximum distance if they 
know they are about to wipe soon anyhow thus accumilating some extra points 
which in this particular case will be quite alot considering the maximum you 
would be able to get is 300 with 200 HB (assuming 1.5 map multiplier).

Rotoblin is on a halt kind-of for now, we'll update if anything happens.

Original comment by sof...@gmail.com on 26 May 2011 at 10:02

GoogleCodeExporter commented 9 years ago
Actually it should be 450 points for 100% with 200 HB and 1.5 multiplier as I 
forgot the distance bonus (100).

Original comment by sof...@gmail.com on 26 May 2011 at 10:05

GoogleCodeExporter commented 9 years ago
Hey, I'm sentient, I posted earlier in here too

I agree there should be a 1.0 map multi for all maps, since that can be changed 
via editing a text file (e.g. missions/hospital.txt) for now I've left that up 
to the hosts to decide.

In the thread #6 linked I briefly went over my idea for changing the distance 
bonus to be based on distance covered instead of map completion (e.g. 1 meter = 
1 point).
I think it has a more direct link with map difficulty (longer maps = harder) 
instead of having a multiplier.
This should be easy to implement as it would just be a matter of averaging each 
survivors flow distance.

I kind of see your reasoning for what you think is a flaw in the system, 
(survivors rushing to get points), but the scenario you're outlining already 
happens in stock scoring rotoblin anyway.
If both teams are wiping every map then of course their goal is going to be to 
cover more distance for points, it commonly happens when there's 1 left alive 
they will make a break for it.
So I think that's still a flaw with or without the scoring I've implemented.
I do however think it's more apparent because with no multipliers the games are 
always going to be low scoring.

The max score you should be able to get per map with 1.0 multi is 348, 100d + 
248hb.

The scoring is all done in a plugin FYI, so it's not set in stone in the 
left4downtown extension, it's easily modifiable.

Original comment by s.senti...@gmail.com on 27 May 2011 at 8:27

GoogleCodeExporter commented 9 years ago
In your plugin does pressing TAB correctly show the healthbonus as calculated 
by your plugin or is it done at round end?

Scoring is a delicate issue, we need to find the 'right' balance so even though 
teams lose a map they can still pull in. The normal scoring is flawed with 
multiplier as they don't reflect the difficulty of the map at all (i.e.: 4th 
maps being easier than most).

Perhaps an idea for your plugin, the scoring system could take into account 
killing a tank and almost making it to the saferoom but wiping thus rewarding 
some additional points for the tank kill. Teams that make it into the saferoom 
obviously do not get those points awarded, but rather get the normal scoring 
system. Some bonus should be provided for making the saferoom even assuming a 4 
x 0 HB situation (25 per person?). The way this would work is that when teams 
reach a certain distance (say 90 to 95%) then tank points would be added to 
reward the team in case they wipe but DID kill the tank, this also prevents 
people from just rushing to the safe room to get distance bonus when they know 
they're going to wipe. The reason I'm also stating 90 to 95% is that teams 
would just focus fire on the tank just to get the extra points, therefore they 
should make it close to the saferoom. If they make it close, they could have 
made it but wiped due to something but will get rewarded for making it that far 
keeping the scores closer.

Kind of a random idea, but who knows :p

Original comment by sof...@gmail.com on 27 May 2011 at 10:28

GoogleCodeExporter commented 9 years ago
Pressing tab shows the correct health bonus. 

Original comment by blakelue...@gmail.com on 27 May 2011 at 11:18

GoogleCodeExporter commented 9 years ago
Yeah, as #11 stated, plugin shows correct scores on tab.
It's all transparent, there's no chat text saying the scores, I've hooked the 
functions responsible for calculating the scores.

What I've basically done is add three forwards and two natives to the 
Left4Downtown extension, this is an excerpt I just wrote for left4downtown.inc:

/**
 * @brief   Called whenever CTerrorGameRules:RecomputeTeamScores(void) is invoked
 * @remarks This is called whenever the scores on the scoreboard or end of round need to be computed.
 *      Usually called by CTerrorPlayer:RecalculateVersusScore(void)
 *
 * @return  Pl_Handled to block round scores from being computed.
*/
forward Action:L4D_OnRecomputeTeamScore();

/**
 * @brief   Called whenever CGameRulesProxy:NotifyNetworkStateChanged(void) is invoked
 * @remarks This is called whenever a networked property on the GameRules object is modified.
 *
 * @return  Pl_Handled to block clients from being notified of a change.
*/
forward Action:L4D_OnGameRulesNetworkChanged();

/**
 * @brief   Called whenever CTerrorPlayer:RecalculateVersusScore(void) is invoked
 * @remarks Calculates an individual survivors health bonus from their current health and status.
 *
 * @return  Pl_Handled to block health bonus from being calculated.
*/
forward Action:L4D_OnRecalculateVersusScore(client);

/**
 * @brief       Get the clients health bonus.
 * @remarks     Survivors health bonuses are 0 until CTerrorPlayer:RecalculateVersusScore(void) calculates it.
 *
 * @param client    Index of the client whose health bonus is to be returned.
 * @return      Int value of the survivors health bonus.
*/
native L4D_GetSurvivorHealthBonus(client);

/**
 * @brief       Sets the clients health bonus.
 * @remarks     This doesn't modify the total health bonus until CTerrorGameRules:RecomputeTeamScores(void) is invoked,
            at which point the sum of each survivors health bonus is set and updated as the total health bonus.
 *
 * @param client    Index of the client whose health bonus is to be returned.
 * @param healthbonus   The integer value to be set as the survivors new health bonus
 * @param recompute When set to 1 CTerrorGameRules:RecomputeTeamScores(void) is called after the health bonus has been set
 * @param       1 always
*/
native L4D_SetSurvivorHealthBonus(client, healthbonus, recompute);

Original comment by s.senti...@gmail.com on 27 May 2011 at 12:49