Support » Plugin: SportsPress - Sports Club & League Manager » “per-game” Player Statistics are wrong for bench players (Basketball)

  • Hi there,

    For some reason per-game player statistics (e.g. PPG – Points Per Game) calculations are incorrect for bench players. I have clean installation with only

    – Rookie theme
    – SportsPress 2.6.20
    – SportsPress for Basketball 0.9.1

    How to reproduce the bug:

    1. Navigate to Games > Your Game
    2. Select any player and set Bench status for him.
    3. Navigate to Player > Your Player and check Statistics table. As an example, PPG will be calculated based on started games only (see screenshot https://take.ms/Hrnze ). In our case the player has 41 points and played in 2 games (1 started, 1 bench), but PPG is 41 and calculated based on only started games.

    I’ve checked SportsPress > Configure and got the following (see screenshot https://take.ms/hgqX6 )

    PPG = PTS / eventsplayed

    see screenshot https://take.ms/UJn45

    So, I believe that something wrong with Played/eventsplayed variables which calculates only started games, not bench.

    Hope it can be easily fixed.

    Thanks in advance!
    Ramzesimus

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Roch

    (@rochesterj)

    Hi Ramzesimus,

    It’s great to see you again.

    Is this stat working correctly:
    http://prntscr.com/opgzra

    In general, are the counters working for you?

    Thanks!

    Hi @rochesterj ,

    Thanks for getting back to me!

    Yes, G – eventsattended works correctly for me. The problem is in eventsplayed which doesn’t include games that were played from the bench.

    eventsattended – when a player was on the game, but not played.
    eventsplayed – when a player was on the game and played, no matter as a starter or as a bench player.

    Could you please specify what counters do you mean?

    Best Regards!<br>
    Ramzesimus

    • This reply was modified 1 year, 3 months ago by ramzesimus.

    @rochesterj any news on this issue?

    Plugin Author ThemeBoy

    (@themeboy)

    @brianmiyaji to follow up on this.

    • This reply was modified 1 year, 1 month ago by ThemeBoy.
    Plugin Author Brian

    (@brianmiyaji)

    @ramzesimus Thanks for spotting this! You’re right – the default equation for PPG does not include benched games which we will need to fix. For reference, there are 4 different variables for counting events:

    • eventsattended – All games that the player has attended, including starting lineup and bench
    • eventsstarted – Games where the player was on the starting team (not bench)
    • eventssubbed – Events where the player was not on the starting team but substituted for another player during the game.
    • eventsplayed – Events where the player was either on the starting team or substituted for another player during the game. This does not increment if the player was benched for the whole game.

    The default equation for PPG is currently pts / eventsplayed but should be changed to pts / eventsattended to reflect all games including those that had the player on the bench.

    To do this manually, you can go into SportsPress > Configure and edit the PPG variable, then remove eventsplayed and replace it with eventsattended. We’ll make these changes to the next update as well, so that new installs will have the correct equation.

    Based on the above definitions of eventsplayed and eventsattended, should the other statistics (RPG, APG, SPG, BPG) also be adjusted?

    Thanks!

    @brianmiyaji Thanks for getting back to me!

    Yes, changing the equation for PPG fixes the issue. Please note that RPG, APG, SPG, BPG etc should be adjusted as well.

    Basically, if you’re using Basketball version there is no difference between eventsstarted and eventsplayed since you can’t substitute player for someone else (see screenshot https://take.ms/T0VfP )
    However, it works fine if you’re using Football (Soccer) version where there is an option to substitute players using dropdown option (see screenshot https://take.ms/DWX6f )

    Best Regards!
    Ramzesimus

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘“per-game” Player Statistics are wrong for bench players (Basketball)’ is closed to new replies.