This worked great. The formula works a treat, just as you said.
However when I ran a mock tournament with 80 players (20 teams of 4). I found that some points weren't added to the winners score.
In the section of the formula "Each player earns 1 point for every full level that they survive".
Example
In the mock tournament the winner knocked out the runner up in round 23. So 23 points are awarded to the runner up, but as the winner is technically not eliminated from the game, the points that the winner should get for every level, is not added to the winners score.
Is there any way that these points could be added to the winners score.
Cheers
edit, i also added a switch into the formula, so this is what the end formula looked like
1 + nb + (roundOut - 1) + ceil(n / 4) - floor((r - 1) / 4)+ switch(r, 1, 10, 2, 8, 3, 7, 4, 6, 5, 5, 6, 4, 7, 3, 8, 2)