SMBX Input Overlay + Speedrun Timer (Deprecated)

Share and discuss custom LunaLua code and content packs for SMBX2.

Moderator: Userbase Moderators

LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

SMBX Input Overlay + Speedrun Timer (Deprecated)

Postby LooKiCH » Sun Jan 09, 2022 1:19 pm

Use the remade lib. It's optimized (including for 2 players mode)
archive: show

Input Overlay & Speedrun Timer

credits: show
Scripted by Lukinsky (LooKiCH)
Input Overlay GFX by Wohlstand (for TheXTech)
Speedrun Timer from episode MaGLX3 and some edited
screenshots: show
Image
Image
Image

Download speedrun timer v2.1
Download input overlay v2

input overlay icons

how to use: show

Code: Select all

require("speedruntimer") -- Load timer
require("inputoverlay") -- Load input overlay
Copy and paste the code:
• in luna.lua and map.lua (if for specific episode/level)
• or in scripts\base\game\lunabase.lua (at the end of the file) (if for all episodes and levels)
Save lua files to "scripts" if you will use for all episodes/levels
For input overlay icons to work, move the folder with icons next to the script file (inputoverlay.lua)
changelog: show
v1.1:
• If you checkpointed, the Level Timer will start from the time you last checkpointed
• Added Input Overlay for the second player
• Updated Speedrun Timer's offset
• Added a folder whose contents you can move to the "scripts" folder so that the script is applied in all episodes
• Works even if hud is hidden
v1.2:
• If my quickrespawn.lua script is using, then if resets powerups to the state it was at the start of the level, then the counter is reset to the time value that was at the start of the level (added option, code below)

Code: Select all

speedruntimer.resetTimerToStart = true
• You may screenshot without Speedrun Tmer overlay, press SPACE + F12
v1.3:
• Saving timers works even if it is a deprecated checkpoint
v2:
• Fully reworked script
• Increased timer speed. I noticed in my videos that the game timer goes a little slower than usual. This is because I entered 65 frames as one whole second, and in fact one second is approximately 64.1025, there is even a variable function Misc.GetEngineTPS(), which displays almost the exact number of frames per second
• Updated timer format:
Image
• Removed unnecessary functions
• After level restart level timer continues
Image
• After level completing level timer resets to zero
• Optimized for 2 players:
Image
• You may hide the timer and input overlay by pressing F5 key
• Added exception episodes in which the timer and input overlay will not work, since they already have a built-in timer and input overlay
v2.1:
• Best time was updating even if the level timer is greater than best time. I have just fixed this
• Added hotkey of erasing timer data
• No more code execution errors
v2.2:
• Fixed some bugs
Last edited by LooKiCH on Tue Feb 06, 2024 3:29 pm, edited 35 times in total.

LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Re: SMBX Input Overlay + Speedrun Timer

Postby LooKiCH » Tue May 10, 2022 4:10 pm

I had updated version 1.1 of Input Overlay and Speedrun Timer:
• If you checkpointed, the Level Timer will start from the time you last checkpointed
screenshot: show
Image
• Added Input Overlay for the second player
screenshot: show
Image
• Updated Speedrun Timer's offset
• Added a folder whose contents you can move to the "scripts" folder so that the script is applied in all episodes
• Works even if hud is hidden
screenshot: show
Image
* Episode Gardens of Purity by Waddle

LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Re: SMBX Input Overlay + Speedrun Timer

Postby LooKiCH » Wed Jun 01, 2022 5:27 pm

I had updated version 1.2 of Input Overlay and Speedrun Timer:
• If my quickrespawn.lua script is using, then if resets powerups to the state it was at the start of the level, then the counter is reset to the time value that was at the start of the level (added option, code below (in luna.lua or lunabase.lua))

Code: Select all

speedruntimer.resetTimerToStart = true
• You may screenshot without Speedrun Tmer overlay, press SPACE + F12

Ibaka
Blooper
Blooper
Posts: 158
Joined: Wed Apr 20, 2022 8:27 am
Flair: Nothing
Pronouns: he/him

Re: SMBX Input Overlay + Speedrun Timer

Postby Ibaka » Mon Jun 06, 2022 12:03 pm

Hell Yeah! This is amazing for tracking how much time you spend!

LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Update: SMBX Input Overlay + Speedrun Timer v1.3

Postby LooKiCH » Wed Jun 22, 2022 4:10 pm

• Saving timers works even if it is a deprecated checkpoint
Download v1.3

LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Update: SMBX Input Overlay + Speedrun Timer v2

Postby LooKiCH » Sat Sep 17, 2022 5:08 pm

• Fully reworked script
• Increased timer speed. I noticed in my videos that the game timer goes a little slower than usual. This is because I entered 65 frames as one whole second, and in fact one second is approximately 64.1025, there is even a variable function Misc.GetEngineTPS(), which displays almost the exact number of frames per second
• Updated timer format:
Image
• Removed unnecessary functions
• After level restart level timer continues
Image
• After level completing level timer resets to zero
• Optimized for 2 players:
Image
• You may hide the timer and input overlay by pressing F5 key
• Added exception episodes in which the timer and input overlay will not work, since they already have a built-in timer and input overlay

Download speedrun timer v2
Download input overlay v2

input overlay icons


LooKiCH
Blooper
Blooper
Posts: 159
Joined: Tue Jun 13, 2017 11:28 am
Pronouns: he/him
Contact:

Update: Speedrun Timer v2.1

Postby LooKiCH » Sat Oct 08, 2022 12:40 pm

• Best time was updating even if the level timer is greater than best time. I have just fixed this
• Added hotkey of erasing timer data
• No more code execution errors

DOWNLOAD v2.1



Return to “LunaLua”

Who is online

Users browsing this forum: No registered users and 5 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari