It's a command-line tool that injects time-locking triggers into a map, meaning you get to decide when it is playable and when it expires. With a good map protector, it's a very neat thing to have. Some limitations: it does recycle its own triggers, but not the STR section (removes the string accordingly, but doesn't compress it back) so you shouldn't use it too many times without some repair tool. It's meant to be used on raw maps without protection (or in protector toolchain), otherwise it might mess some things. Will update if there are bugs or something, let me know.
Usage:
-i <input_file> Input map file
-o <output_file> Output map file (can be the same as output)
-f <unlock_begin> Relative specification of unlock begin (see below)
-t <unlock_end> Relative specification of unlock end (see below)
-m <message> Message to display when map is locked (see below)
-r Replace variables in all trigger actions
Date format:
<Years>:<Days>:<Hours>:<Minutes>:<Seconds>
Date Example:
"0:-1:0:0:0 Means yesterday at this time"
Message format:
This uses Scmdraft string format (See Scmdraft string editor)
Message can include variables %YYYY[F|T]%, %MM[F|T]%, %DD[F|T]%, %HH[F|T]%, %mm[F|T]%, %SS[F|T]% where F means From and T means To
Example:
qlock.exe -i my_cool_map.scx -o my_cool_map_locked.scx -f 0:0:-1:0:0:0 -t 0:0:1:0:0:0 -m "Yo I made this map time-locked. It will be unplayable on %MMT%.%DDT% at %HHT%:%mmT%."
Above example command will produce my_cool_map_locked.scx that will be only playable for a day (timezones might vary). When it's no longer playable, it will display a message telling people until when it was playable, give them 5 seconds to read it and then defeat for all players.
It's not recommended to use it in loop without repairing STR section (editing in editor or something).
Source code for python version
Source code for safe version
Attachments:
Post has been edited 13 time(s), last time on Jul 19 2019, 4:39 pm by T-warp.