ezquake-source icon indicating copy to clipboard operation
ezquake-source copied to clipboard

REQ: new macro that outputs dates as yyyy.mm.dd

Open libTorrentUser opened this issue 2 years ago • 1 comments

Is your feature request related to a problem? Please describe. I'm always frustrated when I want to record a demo and it overwrites an existing one.

One way to avoid that is to append a timestamp to the demo file name, which is already supported, using something like bind F12 "record $date-$mapname". The problem is that $date outputs the date as "day.month.year" which, although thankfully saner than "month.day.year" some countries insist on using, messes up the sorting by file name.

Describe the solution you'd like Crate a macro named $dateiso which outputs an ISO 8601 like timestamp (yyyy.mm.ddTH.M.S). I can then use that to automatically name demos without having to worry about overwriting an existing file.

Describe alternatives you've considered Ideally, I would like to have something like the automatic match demo recording feature that could be enabled when playing single player/coop levels. Maybe something that could be triggered by a map change. If this is already possible, I wasn't able to figure out how to do it.

Impact on server or mods None. But it would be great if servers auto-recorded MVDs when playing coop.

Patches I've attached a patch that creates the $dateiso macro I was talking about. The patch will work for the latest release, but will needed a few changes to work with the latest commits in the master branch

dateiso.patch.txt .

libTorrentUser avatar May 14 '22 21:05 libTorrentUser

By the way, I just found out about triggers. And f_newmap seems to be extremely handy to auto-record demos whenever a map changes.

Just adding alias f_newmap "record $dateiso-$mapname" to the config is enough to make ezQuake record demos automatically during a coop campaign.

libTorrentUser avatar May 17 '22 17:05 libTorrentUser

@libTorrentUser,

As you might have noticed, there is a PR that takes care of this feature request. I've merged the PR today, so if you have a chance to test/verify the feature with one of the latest snapshots from https://builds.quakeworld.nu/ezquake/snapshots/, it would be awesome!

tcsabina avatar May 07 '23 20:05 tcsabina

Probably closed with #771

tcsabina avatar Sep 13 '23 18:09 tcsabina