Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TerrainTile name length
#2
The filename (excluding the extension) cannot be longer than 9 characters (including letters and numbers).

The game saves the filename in a buffer of 14 chars, including four chars for the extension like ".TEM" and one char for the required null char to mark the end of the name. The game copies the first 14 chars of the filename into that buffer, without making sure there's actually a null char at the end. If the name is longer, it won't get terminated. This could lead to the adjacent fields (responsible for allowing burrowing and ore on the tile) to be taken as part of the filename erratically. If burrowing is disallowed, the corresponding bool has a value of 0, serving as accidental null char to end the string. Filenames longer than 9 chars will always have their end cut.

Ares disallows the usage of tile filenames longer than nine chars.
Reply


Messages In This Thread
TerrainTile name length - by Nikademis Von Hisson - 05.03.2011, 07:41:44
RE: TerrainTile name length - by AlexB - 08.03.2011, 12:12:25
RE: TerrainTile name length - by Blade - 10.03.2011, 10:41:18
RE: TerrainTile name length - by DCoder - 10.03.2011, 12:39:14



Users browsing this thread: 1 Guest(s)