Resource icon

[Open Assets] Splits 2021-03-28

Tracks times for multi-course speedruns—similar to LiveSplit or other speedrunning timers, but with no extra programs required.

attachment.php


Try splits in console to start a run, and let the script handle the rest.

  • Individual records for all game speeds
  • Saves your best times for every track, in every category
  • Supports sneakerless and 1-lap runs
  • Set up custom runs, with any courses in any order you like

COMMANDS:
splits - Shows the list of available runs.
splits [# of run] - Starts a new run. If you manually change map, the run will end.

CVARS:
splits_mini - When On, all courses will be 1 lap. Saves under separate splits.
splits_sneakerless - When On, removes item boxes and prevents you from otherwise gaining items. Saves under separate splits.
splits_profile - When On, appends some extra text to your split filenames. Useful if you want to run the same category with different mods or characters and keep the splits separate.
autoaccel - Input assist feature intended for comfort. When On, this keeps the accelerator down during all standard driving; you'll still need to press Accel for start boosts and Drop Dashes, but shouldn't need it for anything else. Same as the HOSTMOD version.

INTEROP:
Splits makes some things available as globals, for mods that might want to alter their behavior or otherwise work with the data available.
SPLITS - Version number.
Splits_Runs() - Returns table of available run types.
Splits_Runtype() - Returns 0 if not in a run, or an index to the run table if in a run.
Splits_Save() - Returns the save table currently in use.
Splits_Reset() - Restarts the run.
Hopefully the script is self-documenting to an extent.

CONFIG:
Loads "luafiles/runs.txt". This file follows the following rules:
- Lines prefixed by ~ will be executed as commands, verbatim, when the mod is loaded.
- All other lines will be interpreted as custom run categories, in the following order:
1: Run name (displayed in menu)
2: Run split filename (used when writing savefiles)
3: File to add when this run is parsed. (Can be blank.)
4: List of two-character map codes, separated by spaces.

Example:
Code:
~autoaccel On
~color Slate
Mupak
mupak
krl_mupak_v12-1.pk3
M0 M1 M2 M3 M4 M5 M6 M7 M8 M9 MA MB
Meme Rectangle x10
memerectangle

41 41 41 41 41 41 41 41 41 41

If this works in multiplayer, it's on accident. If you report bugs that happen in multiplayer, I will laugh at you.

Uses Varren's "customsave_io.lua" to save best times.

Supporters / Co-Authors:
  • splits.png
    splits.png
    346.8 KB · Views: 346
Author
Tyron
Downloads
535
Views
2,137
Extension type
pk3
File size
7 KB
MD5 Hash
4a3722b95891fc95e6f45b1247799217
First release
Last update

More resources from Tyron

Share this resource

Back
Top