-
Notifications
You must be signed in to change notification settings - Fork 110
Add Style Ranks #1255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Style Ranks #1255
Conversation
…rrors when value being set to default 0
i added this to the bhop server (577k playertimes, 130k users) and performance is actually not bad. i still want to optimize further, but i was expecting it to take a noticeable amount of time for the migration and on each map change. |
honestly, it doesn't even appear to have performance issues whatsoever.. so it could ship as-is. i'd prefer to get input first though, to make sure there isn't a good way to make it more efficient, say, if there are 100+ styles. My servers only have slightly more than 20 at the moment. |
…rough to 100 entries in the menu
Style rank based chatrank support has been added, using {styleXrank} where X is the style ID in shavit-chat.cfg. It works the same as {rank}, being replaced with an int, allowing things like [#{style0rank} Normal] for "[#34 Normal]" in game. |
everything is working great, but i think the queries need some more work. the !top menus seem.. just a little bit inaccurate. i am wondering if adapting the normal rank queries didn't work perfectly. i had to rewrite one completely, and use a CAST() in it to get the points to sort as floats instead of lexicographically for some reason. |
What a pogchamp. |
…BY style instead of running a query for each style ID
need to test new queries, but i am trying to optimize queries using GROUP BY style instead of looping through and performing a query for each style. will fix code and test later today. |
ranks load nearly instantly again :3 even with all the additional features. honestly, some queries have not been optimized yet, but i'm not sure i can do it because i am unable to test things like postgre/sqlite.. or old versions of db engines. for mysql though, it loads amazingly and works super well. |
UpdatePointsForSinglePlayer, line 1343 is giving me a SQL error when someone sets a time, but the query runs fine in a SQL editor.. so i'm not sure what the problem is:
|
i got the query fixed, but think it will be for mysql only because i borrowed the JOIN from the lower query that is specified as being for mysql. i need help with these queries and testing on other db engines to find out if there are issues. as it sits, everything works great on mysql. |
This PR (finally) adds per-style rankings!
The new !top and !rank menus allow you to pick from an "overall" rank (how bhoptimer ranks work now) or each configured (and not disabled) style.
Functionality is working, with no found errors or bugs. It should be optimized further, but I wanted to open the PR as soon as it was stable to get some insight into how to best do that.
Next on the todo is to incorporate it into shavit-chat with something like {stylerank} variables to be used in chat tags.