Time Attack Leaderboard

[Open Assets] Time Attack Leaderboard v1.3.0

1.3.0 Brings major fixes and features.

You may have noticed the game freeze for a split second when a player joins a server, particularly on popular servers. Well this addon is largely to be blamed for it. All records are stored in a netvar and has to be sent to the players when they join the server. I believe it's due to the size of this data being sent that's the cause of these lag spikes.
In this update records can be packed into a .lua file and be sent over the addon downloader instead, drastically reducing the savegame data being sent.

Another major feature of this update is it makes it possible to save records for different maps under the same mapid. This is done by calculating a checksum using the map's title, subtitle and zone.
This checksum is paired with the mapid to differentiate between maps of identical id's. While it's not possible to run different maps with the same id at the same time, this should make map pack swapping a lot less of a headache.

In order to pack records into a .lua file, an external tool must be used. You can find a python script at coldstore.py
- Load all records from luafiles/leaderboard.txt and truncate the file.​
- Load all records from luafiles/coldstore.txt and trunctate the file.​
- Compare and eliminate the slower records.​
- Write the records to luafiles/coldstore.txt​
- Pack the .lua file with the records. The .lua file will be written to the GAME_DIR.​
How to use:
- Python must be installed.​
- You must run this script before launching the server. Add it to your server launch script.​
- Usage: python coldstore.py "PATH/TO/GAME/DIR" "SERVERNAME_records.lua"
- Example: coldstore.py $HOME/.srb2kart Hint_of_Vanilla_records.lua
- Start the server with the *records.lua file. srb2kart -dedicated -file bonuschars.kart ... KL_Leaderboard_v1.3.0.lua Hint_of_Vanilla_records.lua


Upgrading from 1.2.x:
MAKE A BACKUP! (or five)​
I highly recommend upgrading to 1.2.21 before upgrading to 1.3.0. Some migration code for older 1.2.x versions have been removed.​
No previous records will be available immediately after upgrading. In order to migrate the old records you'll have to run the command lb_write_checksums once. It's not strictly necessary to do so, as it will happen automatically the next time records are saved.​


-- Troubleshooting

An updated version of MAPXY has changed id, title, subtitle, or zone! Its records are no longer available.
You can move records from one id+checksum to another. Use the commands lb_known_maps and lb_move_records.​


-- Changelog
- Removed old migration code.​
- Files are only read/written to/from on the server.​
- Records are now identified by mapid+checksum.​
- Records can be installed from external lua addons.​
- Misc fixes to the browser.​
- Fix player join after finish firing incorrect save event.​
- Added commands:​
- lb_move_records​
- lb_known_maps​
- lb_write_checksums​
- lb_download_live_records​


Special thanks to Fl_GUI and Lonsfor!
  • Cool!
Reactions: AnimeSonic
kart0010.png


- Add levelselect command
- Fixed some SPBA checks
- Disable retry command on battle maps
- Add records command
Prints the records of the current or supplied map​
- Fix encore ruby on unsupported screen resolutions
- Fix changelevel / retry
- Now works during intermission and voting​
- Checks for and enforces race mode​
- Allow for nuked maps. Use TOL_SP as a marker for removed race maps and TOL_COOP for removed battle maps​
- Improved output of findmap, and in turn improved search results
- The plugin is now disabled on battle maps
- Misc optimizations

Thanks to Lonsfor for some contributions.
- Fix for error spam in replays
- Add encore support and command.
- Add server cvar lb_spb_combined <YES | no> which enables combination of SPB modes (spb, expert, KARTBIG).
- Add enabled SPB modes in bottom left of hud.
- Stats (speed, weight) is now stored for all records.
- Re-enable allowteamchange when the plugin is disabled.
- Fix indentation for number rankings in scroll mode at even 10^ intervals.
- Fix a gamemode exploit
- AFK players will now be warned 10 seconds before being moved to spectator.
- Fix tied lap times now display 0:00:00
- Add HOSTMOD restat support
- Add scoreboard scrolling mechanic and command
- Add rival command
- Unknown skins now use the norank patch
  • Cool!
Reactions: Saturn Ross
- Fix changelevel for map ids ending with '0'.
- Fix HOSTMOD ragespec balance spam.
- Add a placeholder for unclaimed records.
- Add server cvar lb_save_count <Natural Number> default 20. Controls max records saved per level/mode.
- Improved indication for cutoff long names.
  • Cool!
Reactions: Saturn Ross
Back
Top