Author Topic: Something silently truncates graphic style names [BUG]  (Read 1285 times)

0 Members and 1 Guest are viewing this topic.

Offline Nepster

  • Posts: 1829
    • View Profile
Something silently truncates graphic style names [BUG]
« on: April 12, 2017, 09:27:42 PM »
In the graphics tool, it is possible to create graphic styles with more than 16 characters without any warning, e.g. "Old_Lemmix_VGASpec.dat".
The level editor absolutely accepts such long graphic style names, so pieces of this style can be added to a level.
Now I want to create a level pack using this style: The Flexi Toolkit accepts both the level and the style, and produces the SYSTEM.dat and the final .nxp level pack again without any warning or error.
Next I start the level pack and want to play the level in the player. And surprise, surprise: NeoLemmix cannot load the level and produces the error message "Cannot find the style 'old_lemmix_vgasp'". :lem-mindblown:

So here are my questions:
1) What of graphics tool, editor, flexi toolkit and player actually does the truncation of the graphic style names?
2) Why doesn't it produce any kind of warning? Why doesn't the graphics tool produce any warning, if such long names apparently don't work?
3) Why does it even truncate the style name? What operation does actually require at most 16 characters as the style name?
4) Apart from truncating, something converts the style name to lower-case. Is this of any importance? Do the style names as saved by the graphics tool already have to be in lower-case?

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Something silently truncates graphic style names [BUG]
« Reply #1 on: April 12, 2017, 11:43:58 PM »
1. The truncation occurs in the editor, when saving a LVL file. LVL files do not support graphic set (or music) names longer than 16 characters, extension excluded (as the LVL file doesn't contain extensions for these filenames). Since (hopefully) it won't be too long before NXLV is in use rather than LVL, I haven't bothered to fix this.

2. Yeah, it should. GSTool when saving a graphic set, Editor when saving a level using it. Warnings in Flexi could also be added, though this is probably overkill as you'd encounter the warning twice already by that point.

3. See #1.

4. The server of the NeoLemmix website is case-sensitive, so while it doesn't nessecerially need to be lowercase, the case does need to be consistent here. A similar situation would occur if / when a native Linux build of NeoLemmix happens. If we ignore the style download feature, and only think about the current Windows version, then no, the case is not important (although official tools always generate LVL files with lowercase names in them, if one were to manually hex edit this file to change the case, the LVL file would still work).
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)