How to tell which levels are for which skill level?

Started by chubs, January 18, 2019, 10:06:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chubs

Hi, i'm following the details at camanis.net to create a lemmings data parser as an exercise to learn a new programming language.

I'm having mostly success, but am currently stuck on this: When parsing the levels, how can i tell which levels are for which skill level? And after that, which order do they come in? I can't figure either of those things out.

This is the document i'm following: https://www.camanis.net/lemmings/files/docs/lemmings_lvl_file_format.txt

Thanks so much

ccexplore

The ranking (ie. what you called "skill level", ie. "Fun", "Tricky" etc.) and ordering are not stored in the level file itself.  Basically there are some hard-coded values in the game EXE itself that maps level numbers (which translates to the ranking and ordering) to the levelXXX.DAT file and level section within the DAT file.  This is how the game works out what file and section to load a given level from.

The document you are following is complete.  Anything not described in that document implies it is not stored in the level file itself but elsewhere.

chubs

Ok thanks so much for clearing that up! Seems a bit hacky, but hey its only an old game. Have a great week :)

namida

With that being said, while the positions of repeat levels is hardcoded into the EXE, their stats / titles / etc are not - those can be found in (assuming the DOS version) oddtable.dat. If I remember correctly, oddtable's format isn't documented anywhere, but it's also very easy to figure out if you know the LVL format already. The order of levels in oddtable.dat correspond to their order in the levelXXX.dat files, including placeholders for non-repeated levels; and the file is not compressed.
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)