Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Computation flow:
- userID sumbits a score -> recalculate clan rating with that user
- Input: userID, score_data, map_data
- 1) Get clanID
- 2) Calculate rating
- 3) Save rating to the db
- Formula:
- I. By calculation type:
- 1) Additive parameters = sum(avg) of individual parameters of the members
- 2) Non-additive parameters = non-additive aggregated parameters of the members
- II. By persistency type:
- 1) Persistent bonuses = bonus from tournaments and charts
- 2) Score data = inherits the persistency of the score
- III. By content type:
- 1) PP
- 2) Top places on maps
- 3) (Lifetime?)Charts
- 4) Peak rank
- 5) Medals(Achievements)
- 6) Tournaments
- 7) Playcount (any other profile stat)
- The result score should be balanced over the number of clan members (2-10)
- Testing clan rating:
- 1) A clan with max/min members
- 2) A clan with balanced/unbalanced player skill
- New tables:
- 1)clan_permanent_bonus:
- clanid,bonus
- 2)users_peak_rank:
- userid,rank
- 3)clan_medals:
- clanid, medalid
- SQL:
- //ADD peak rank recalculation
- clanID = executeScalar(select clanid from clan_users where userID = @userID)
- score_rating = executeScalar(select 1 rating from users_stats WHERE ID IN (select userid from clan_users where clanid = @clanID))
- bonus_rating = executeScalar(select bonus FROM clan_permanent_bonus WHERE clanid = @clanID)
- top_scores = execute(select max(pp) pp from scores WHERE userid IN (select userid from clan_users where clanid = @clanID) group by userid order by pp desc).mean()
- top_places_rating = execute(select max(difficulty_std) stars, max(pp) pp from scores JOIN beatmaps ON beatmaps.beatmap_md5 = scores.beatmap_md5 WHERE userid IN (select userid from clan_users WHERE clanid = @clanID) GROUP BY scores.beatmap_md5)
- peak_ranks = execute(select rank FROM users_peak_rank WHERE userid IN (select userid from clan_users where clanid = @clanID))
- peak_ranks_rating = ....
- final_rating = w1 * bonus_rating + w2 * top_places_rating + w3 * peak_ranks_rating + w4 * top_score_rating
- sql(UPDATE clans SET performance = 0 WHERE clad = @clanid)
- Medals: custom manual, automatic; non-points, points.
- Point medals:
- 1) tournament(clanwars) places = 1,2,3 places
- 2) CLAN charts places
- Non-points medals:
- any shit
- Medals are vulnurable to clan switch abuse.
Advertisement
Add Comment
Please, Sign In to add comment