Author Topic: NL Level Versioning: Game saves decimal, Editor saves hexadecimal  (Read 3147 times)

0 Members and 1 Guest are viewing this topic.

Offline Simon

  • Administrator
  • Posts: 3876
    • View Profile
    • Lix
From level Armani_Natural-born_R2V4.nxlv (Contest 27 entry, can't usefully link because I backrouted it and Icho will delete older versions of contest levels):

TITLE Natural-born
AUTHOR Armani
MUSIC dropthebeat
ID x55D5AD0151E8EF4E
VERSION x000000000000001C


From replay of that Natural-born v4:

USER Simon
TITLE Natural-born
AUTHOR Armani
GAME Contest_27
GROUP Contest_27
LEVEL 10
ID x55D5AD0151E8EF4E
VERSION 28


Compare the final quoted line of the level with the final quoted line of the replay: One is decimal, one is hex. To see that 0x1C = 28 isn't trivial, thus it's unnecessarily hard to see if the replay has really been played against that level version.

The ID is hex in both cases, that's fine. The version should also be identical in both cases, either both hex or both decimal, probably both decimal.

-- Simon
« Last Edit: April 07, 2023, 11:56:26 AM by Simon »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: NL Level Versioning: Game saves decimal, Editor saves hexadecimal
« Reply #1 on: July 19, 2023, 06:44:54 AM »
Commit e42106b for NL now uses hexidecimal in cleansed level files and replays. It can still load older files that use decimal for the version (it's always been able to load either kind - this actually extends to just about any numeric data in these files, you can use a hex value by preceeding it with an x).
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)