Author Topic: How to tell which levels are for which skill level?  (Read 292 times)

0 Members and 1 Guest are viewing this topic.

Offline chubs

  • Posts: 2
    • View Profile
How to tell which levels are for which skill level?
« on: January 18, 2019, 10:06:48 am »
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

Offline ccexplore

  • Administrator
  • Posts: 4851
    • View Profile
Re: How to tell which levels are for which skill level?
« Reply #1 on: January 19, 2019, 12:18:01 am »
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.

Offline chubs

  • Posts: 2
    • View Profile
Re: How to tell which levels are for which skill level?
« Reply #2 on: January 20, 2019, 09:43:16 am »
Ok thanks so much for clearing that up! Seems a bit hacky, but hey its only an old game. Have a great week :)

Offline namida

  • Administrator
  • Posts: 8568
    • View Profile
    • NeoLemmix Website
Re: How to tell which levels are for which skill level?
« Reply #3 on: January 22, 2019, 09:49:20 am »
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 released level packs:
Lemmings Plus Series | Doomsday Lemmings