nicholasmr / obblm

Automatically exported from code.google.com/p/obblm
26 stars 54 forks source link

Award SPP for each match a player took part in #52

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the tournament Im in, we award 0.5 SPP for each match a player was in.

Im thinking that it can be a setting on the tournament, wether or not this
rule is in play. Or maybe a general setting in settings.php.

Then in the match report, you note on each player if they were on the pitch
during the match, and the system automatically awards SPP when fit.

We use 0.5 SPP a game, with no rounding - but the SPP awarded should
probably be changable.

Original issue reported on code.google.com by syko...@gmail.com on 25 Mar 2009 at 5:19

GoogleCodeExporter commented 9 years ago
This is coding wise awfully complicated, and taking into consideration that the
"extra SPP" feature already allows you to do this manually from team pages, I 
will
let this one be on a very low priority - sorry.

Original comment by Nimda...@gmail.com on 26 Mar 2009 at 12:18

GoogleCodeExporter commented 9 years ago
No need to apologize, its your project, and you have to do the coding :)

I know that I can use OBBLM and still get the correct amount of SPP we use in 
our
system, it is just much extra work for the League Commish.

Original comment by syko...@gmail.com on 26 Mar 2009 at 7:42

GoogleCodeExporter commented 9 years ago
Do you keep track of how many games a player has participated in, Nicholas? 
(Total
games minus MNG matches.) If that stat is available it could be a way to solve 
it?
(round down (number of games / 2) in this case) Just an idea, havent looked 
into it
so I have no clue how hard it might be to accomplish. ;-)

/Daniel

Original comment by blodae@gmail.com on 26 Mar 2009 at 9:25

GoogleCodeExporter commented 9 years ago
It would not be a 100% solution for me and my league, but it sure would be 
easier to
maintain. We only reward players that 0.5SPP if they played on the field during 
the
game, and sitting in the reserve box does not count.

If there is an easy solution like Daniel suggests, then it would make it much 
easier.
Instead of manually giving extra SPP to almost all players, I can remove the 
SPP from
the few players that just sat in the reserve box.

Original comment by syko...@gmail.com on 26 Mar 2009 at 9:54

GoogleCodeExporter commented 9 years ago
For now you will have to use a combination of Player::getMatches() and
Player::getStats($match_id) in order to sort MNG matches from actually played 
matches
for each player. 

Making a little script you should be able to auto-update every player's extra 
SPP by
reading the current by $player->extra_spp and using Player::dspp($delta) in
combination with the above methods for filtering MNG matches.

Original comment by Nimda...@gmail.com on 26 Mar 2009 at 2:08