NL Level Versioning: Game saves decimal, Editor saves hexadecimal

Started by Simon, March 27, 2023, 10:07:14 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Simon

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

namida

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 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)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)