Welcome to Open Carnage

A resource for gamers and technology enthusiasts, with unique means of rewarding content creation and support. Have a wander to see why we're worth the time!

Sign in to follow this  
Followers 0
JuliquE

Best Lap-Time Recorder

47 posts in this topic

Clanmate of mine had the idea for the best recorded lap-time on any given map to be displayed during a race.

 

Ideally, this would record the player to have scored the time, as well, and be resettable. Not to bog down the server with log-files, only a time which betters the one currently logged will be recorded, replacing the last.

 

To reduce server spam, it would be nice if the time is only displayed privately to anyone entering a vehicle and, if possible, only when there are three or fewer players in-game (read: self disables, with four or more in the server; could be an adjustable setting/variable).

 

No clue if it's doable, but thanks, in advance, for any help with this.

Edited by JuliquE

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

Members of Open Carnage never see off-site ads.

For if/whenever someone has a go at this, it would be nice for it to record two times: current in-game record, as well as the all-time record.

 

Cheers.


b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

I just wrote a script, it doesn't write best times to a file so reloading the server will reset them. Gametype and map detection is a mess because I wasn't able to correctly read them from memory but it seems to work. When a new lap record is set, it will be said to all players in the chat. I added a command to reset all best times and to view them on the console, both commands can be changed in configuration part. If there are any issues please let me know.

c93157b39c.jpg

 

 

Edit: it seems like resetting the values doesn't work, I'll fix that later.

best_lap.lua

Edited by aLTis
JuliquE likes this

08f9474ede.jpg

Share this post


Link to post
Share on other sites

Huge thanks for your efforts, aLTis.

 

Just left a game, having tried the script out, and it dawned on me, that some maps are raced in two different ways: with all navigational-points visible, from start (any order race), as well as more conventionally, with navs. appearing one after the other. Is there a way you can distinguish between the two?

 

Ideally, it would remain as is, and if it (the script) detects a map that's raced both conventionally and unconventionally (as taken from the server's map-cycle/game-type), it will label the times as "normal" and "any order", respectively. Alternatively, a simple asterisk next to the any-order times could suffice, even if maybe not the most clear.

 

It also appears to credit the last person to get the record time. Problem is, I believe the gunner technically punches the time last (drivers ironically never credited, unless driving alone). If you could make it so that it doesn't record times for anyone other than drivers, that would be perfect.

 

The other problem is people committing suicide or otherwise naturally benefiting from a lucky spawn, which makes their times unrealistic to strive for, and thus defeating the purpose. A fix that sees times only recorded if the person hadn't died in between their first and last navs. should sort it.

 

And, finally, it would really be ideal if the all-time record could be logged (and wiped, via command), so that it doesn't reset, on it's own, upon executing a server restart; not the end of the world, though, if it's really just too much work.

 

This has otherwise been a joy to see implemented and is greatly appreciated.

 

Thanks, again, and let me know if there's anything you need from me to assist in some way.

Edited by JuliquE

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

Also will be possible to include decimal seconds number? Just included tenth and hundredth should be enough.


KlGKKLH.png


System specs: Fatal1ty P67 Pro. with i7-2600k 4.5GHz, 16GB RAM, Windows 10 Pro 64-bit, Nvidia GTX 970 4GB SC

Share this post


Link to post
Share on other sites

There are 3 types actually: normal, any order and rally. Do I need to make separate records for all of them?

 

I will try to do all the features you mentioned except for checking if player has died during the lap.

 

Edit: nevermind, rally only counts time from one checkpoint to another and not laps.

Edited by aLTis

08f9474ede.jpg

Share this post


Link to post
Share on other sites

Sounds good; looking forward, then.

 

And, yes… I also came here to request the two decimal places Halo currently uses be implemented, distinguishing close times from one another (DeafBoy was racing with me earlier, and beat me to the punch).

Edited by JuliquE

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

Brilliant!

 

Just wondering what happens when there are more recorded times/maps than will fit the screen (i.e. especially on Halo Custom Edition map-cycles).

 

That's all I can think of, off hand, but I'll be sure to check back, whether to give a thumbs up or to shed light on anything in need of fixing.

 

Huge thanks, once again, aLTis.



As an idea, is it possible to have only normal times show up in the console, when using the "best_times" command during a normal map, and vice versa for any-order maps?


b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

b_350x20_C957F6A-000000-FFFFFF-750A0E.pn

Share this post


Link to post
Share on other sites

As an idea, is it possible to have only normal times show up in the console, when using the "best_times" command during a normal map, and vice versa for any-order maps?

Sure. Or have two separate commands, whichever you prefer.

JuliquE likes this

08f9474ede.jpg

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.