Author Topic: Replay Filename Patterns  (Read 5475 times)

0 Members and 1 Guest are viewing this topic.

Offline namida

  • Administrator
  • Posts: 12426
    • View Profile
    • NeoLemmix Website
Replay Filename Patterns
« on: February 18, 2021, 05:40:30 PM »
In V12.11, the options for filenaming for replays are presented as a dropdown with a few options. However, you've probably noticed you can also type into this dropdown - but it just ends up with replays being saved with literally the name that you type, eg if you were to type "Position + Timestamp" you would literally get a replay file called "Position + Timestamp.nxrp".

The way to make use of this is by using the correct placeholders - tags that you can write in, and they get replaced with details of the replay / level / etc.

The following placeholders are supported. The curly brackets are part of the actual tag, and these are case-sensitive.

{TITLE} - Inserts the level's title.
{PACK} - Inserts the name of the base group that the level is part of. For example, "Lemmings Redux", "Lemmings Plus I", etc.
{GROUP} - Inserts the group (eg. "Gentle", "Quirky", etc) that the level is part of.
{GROUPPOS} - Inserts the level's position in the group. If this is single-digit, a leading zero will be added.
{TIMESTAMP} - Inserts the timestamp at the time the replay is saved (not necesserially the time it was originally created, if eg. you're loading and re-saving a replay).
{VERSION} - Inserts the version number of the level that was used to create (or last used to modify) the replay.
{USERNAME} - Inserts the username of the replay's creator (not necesserially your username, if eg. you're just loading and re-saving someone else's replay).

There are some cases in which the GROUP and especially GROUPPOS tag are not useful, namely when dealing with single or unordered levels. You can specify two patterns - one for levels in an ordered group, and one for other levels - by entering both patterns, seperated by the | character. The pattern for levels in ordered groups should come first, with the one for unordered groups / single levels (including testplay mode) coming second.

If you want to open a file selector dialog box, but you want to set the default name, you can do this by entering the name you want as a pattern (as explained above), then adding a * at the beginning of it.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline WillLem

  • Posts: 3569
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: Replay Filename Patterns
« Reply #1 on: March 22, 2021, 07:40:50 AM »
It's also useful to add spaces or underscores between the placeholder tags, but not essential.


Entering this text into the Replay Options dropdown:


Results in the following replay file:


Note that the ".nxrp" won't actually appear as part of the filename, but will have the effect of assigning that extension to the file.

Here's what the Replay Options dialog should look like:

« Last Edit: April 23, 2021, 10:40:00 AM by WillLem »