Resource icon

[Open Assets] Splits 2021-03-28

This content may be freely modified and/or maintained by anyone.

Tyron

Krew, MS sysop, gay robot, horns
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:
 

Attachments

  • KL_Splits_v1.pk3
    6.6 KB · Views: 225
  • splits.png
    splits.png
    346.8 KB · Views: 3,247
  • KL_Splits_v2.pk3
    7 KB · Views: 168
  • KL_Splits_v3.pk3
    7 KB · Views: 216
Last edited by a moderator:
Splits v2 released. Changelog:
- Added interop functions for other mods. See "Configuration" in the OP.
- Added "40 Tracks" as a run category. This was the category run in GDQ, and omits the SMK ports / Community Cup, ending at Eggman's Nightclub; this might be more your speed if 2-hour runs don't do it for you.
 
The "Current Map Rotation" and "40 Tracks" runs save to the same file so they can mess each other's times

attachment.php


after doing a 40 Track run now my Full Map Rotation run is missing its final time
 

Attachments

  • 2021-02-05_17-14.png
    2021-02-05_17-14.png
    93.6 KB · Views: 1,106
Whoops. Thanks for the report, sorry about that—data loss sucks ass. I'll try to triple-check releases in the future for overlapping filename stuff.

v3 released to correct this.
 

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top