Nonsensical values in *.sms files

Asked by Brian Jenkins

I'm in the process of trying to wrap my head around how Stratagus/Wargus works and came across an oddity. Provided with the source code there are the campaign and map files that take the form of *.sms & *.smp files that list every tile of the map by coordinate and by corresponding tile on the tileset. e.g.

...
SetTile(112, 11, 0, 0)
SetTile(112, 12, 0, 0)
SetTile(1889, 13, 0, 0)
SetTile(1824, 14, 0, 0)
SetTile(1953, 15, 0, 0)
SetTile(113, 16, 0, 0)
SetTile(113, 17, 0, 0)
...

But the defined tilemap (winter.lua) which corresponds to graphics/tilesets/winter/terrain/winter.png only has 378 tiles in it (with zero as the index of the first element).

Looking at the rest of (8)plains-of-snow.sms the following other numbers are greater than 378 but are supposedly referencing tiles.

1536, 1537, 1552, 1553, 1568, 1569, 1570, 1584, 1585, 1600, 1601, 1602, 1632, 1633, 1648, 1649, 1664, 1680, 1681, 1682, 1696, 1697, 1712, 1713, 1714, 1728, 1729, 1744, 1745, 1792, 1793, 1808, 1809, 1824, 1825, 1840, 1841, 1856, 1857, 1872, 1873, 1888, 1889, 1904, 1905, 1920, 1921, 1936, 1937, 1952, 1953, 1968, 1969, 1984, 1985, 2000, 2001

After greping the remainder of the source I could not find any other instance of these numbers outside of their specification in other map files.

What do these numbers correspond to?

Question information

Language:
English Edit question
Status:
Expired
For:
Wargus Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Brian Jenkins (brianjenkins94) said :
#1

Also if there are any other docs, resources, or diagrams that you might be able to direct me towards to further my understanding, that would be greatly appreciated. As of right now I'm rummaging through the source and following Load()s to different files but am failing to grasp the overall interconnectedness of the engine/mod.

Revision history for this message
Joris Dauphin (joris-dauphin) said :
#2

For tileset, there is a indirection (see Tileset definition)
where we define tiles with other numbers (with some logic for manage neighbor "collapsing").

Revision history for this message
Brian Jenkins (brianjenkins94) said :
#3

Do you think you could expand on that? I still don't understand.

Revision history for this message
Joris Dauphin (joris-dauphin) said :
#4
Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.