What permissions do you give others to modify and/or maintain your submission?
Modify: YES - Maintain: YES - I give permission for my entire submission to be modified by others or used in their own work. I give permission for my entire submission to be maintained by others as well.
It's like it never left
Default appearance
Mode: 'small', Lap time: 'show_below'
Splitscreen mode: 'hybrid', Lap time: 'list_vs'
It's on the scoreboard too!

Restores in-game race timer and adds new features to it with the aim of being highly customizable

Github repo (contributions welcome)

This add-on stores settings client-side, so they'll persist on any server you join, meaning even if you don't plan on using it, you can just turn it off

You can mix and match most of these, try it out!

NameDefaultDescription
hudtimeronToggles the entirety of the add-on
Accepts: on / off
hudtimer_modedefaultAppearance of the timer

Possible values
default
default
small
small
smaller
smaller
minimal
minimal
off
(Display other dingalings, but not the timer)​
hudtimer_formatdefaultHow time is formatted

Possible values
default
default
minutes
minutes
seconds_ms
seconds_ms
seconds
seconds
tics
(for those who set their speedometer to fracunits)
tics
hudtimer_laptimeshow_belowHow to show your lap time

Possible values
vanilla
(flash your lap time on top of the timer briefly)​
show_below
(flash your lap time beside the timer)
'show_below' with mode set to 'small'
list_last
(list your previous lap times beside the timer)
'list_last' with mode set to 'default'
list_vs
(list how your lap time compares to other players)
'list_vs' with mode set to 'smaller'
off

If set to show_below, list_last or list_vs, it'll show you your best lap time on race finish
Best lap time with 'show_below'
hudtimer_laptime_list3If hudtimer_laptime is set to list_last or list_vs, controls the maximum size of the list
Accepts: from 1 to 10
hudtimer_splitscreenper_playerAppearance of the timer in splitscreen

Possible values
vanilla
vanilla (2p)
vanilla (4p)
per_player
per_player (2p) with lap time set to 'list_last'
per_player (4p) with lap time set to 'list_last'
hybrid
hybrid (2p) with lap time set to 'list_vs'
hybrid (4p) with lap time set to 'list_vs'
off
hudtimer_inpositiononShows a countdown for how long POSITION!! lasts
Accepts: on / off
hudtimer_offsetx
hudtimer_offsety
19
12
Position of the timer on screen, top-right anchored
Accepts: any positive number
hudtimer_opacity10How opaque the timer is
Accepts: from 10 to 1
hudtimer_presetdefaultYou can save multiple copies of the settings and swap them as you see fit (for example: different gametypes)
Gets auto-loaded on start up!
Accepts: any text (will be the name of the preset)
hudtimer_preset_save
hudtimer_preset_load
(command)Manually save/load a preset specified in hudtimer_preset
(you can also pass a preset name to these as a parameter)
hudtimer_preset_autosaveoffAutomatically save detected changes to your specified hudtimer_preset
Accepts: on / off
hudtimer_debug(command)If you're looking to do mod compatibility, extensions or bug testing, this will try to be useful
Prints the instructions on how to use it in the console

Settings are saved in YourGameFolderHere\luafiles\client as hudtimer.cfg and hudtimer_PresetNameHere.cfg for any presets respectively

(If by chance you're modifying the K_STTIMW image, check out bgcolor inside hudtimer.cfg and set it to a valid palette color)


hudtimer.addcondition(mode, name, func)
You can control whether the timer is allowed to appear (blacklist/whitelist basically) and what areas of the screen to not overlap (move to closest side or make transparent)
If you're making HUD add-ons or custom gametypes, this is for you

Documentantion is available in the io_mods.lua file inside the add-on
Example code:
if not hudtimer then return end

hudtimer.addcondition("allow", "dynamite derby free play", function(t)
    return bdd and gametype == GT_BDD and (bdd.numplayers <= 1 or mapheaderinfo[gamemap].typeoflevel == 0)
end)

hudtimer.addcondition("modify", "teams hud", function(t)
    return (teamplay and t.splitscreen == 1 and not t.player.exiting) and {t.screenw-150, 0, t.screenw, 40}
end)
If anyone has the know-how to solve these, i'll be glad if you reach out!
  • Overlaps every vanilla HUD element
    (Especially status messages and POSITION!! display. You can somewhat mitigate this by configuring the timer differently)
  • Sets your showviewpointtext console variable to 1
    (To aid in 3p+ splitscreen, i couldn't think of better ways)
  • Timer sliding in/out sometimes doesn't match the rest of the HUD on unstable framerates
  • Shows lap times even while you're in free camera
  • Doesn't disappear during the "HERE COMES A NEW CHALLENGER!" screen
  • Miscellaneous weirdness when configuring offsets
    (It's math alright)


Credits:
Author
Halatnikov
Downloads
525
Views
2,108
Extension type
pk3
File size
22.5 KB
MD5 Hash
6ede9a93b2fa1192645333786eca4823
First release
Last update

Share this resource

Back
Top