Page 1 of 1

Using TPR maps in TSK

PostPosted: 27 Mar 2009, 11:03
by kuba11100
Well, some time ago I tried to make mission for TSK that uses map with TPR textures (lava, ice). TSK loaded the map, but there were blue and red squares and similar artifacts instead of correct textures. Swapping files textX.dat solved the problem partially - textures appear on the map correctly, but minimap still displays wrong colours and its properties are wrong (for example units can't walk on the ice).
I haven't found the answer anywhere: Does anybody know where are the information about textures properties stored and have someone decoded it already?

PostPosted: 27 Mar 2009, 12:25
by harold
I don't know what pattern.dat does, maybe it has something to do with it? Or it could just be hardcoded in the exe..

PostPosted: 27 Mar 2009, 17:59
by kuba11100
YAY! After replacing pattern.dat and mapelem.dat with TPR ones everything is OK!
Thanks!

PostPosted: 27 Mar 2009, 22:40
by Lewin
Wow, that's cool! I thought mapelem.dat was used for the properties of map objects, (trees) not tiles. This might be useful in the remake, because from what you are saying it must store the properties of the tileset. Info like: can walk, can build, can make fields is currently hardcoded into the remake, but now we can possibly load it from that file.
Thanks!

PostPosted: 29 Mar 2009, 17:44
by harold
Nope it can still be pattern.dat (more likely actually, mapelem.dat doesn't seem to contain any places where tile info could be kept..)

PostPosted: 30 Mar 2009, 13:23
by kuba11100
pattern.dat changed minimap colours, mapelem.dat changed terrain properties

PostPosted: 30 Mar 2009, 19:13
by Krom
mapelem.dat contains trees and other object animation data, nothing more.

PostPosted: 03 Apr 2009, 18:17
by kuba11100
I can't believe what I've been doing while swapping files.
Krom's right, mapelem.dat doesn't make any change, pattern.dat sets the properties.
TPR and TSK mapelem.dat's md5sums are the same... :oops:
I'm so sorry about this.

PostPosted: 10 Apr 2009, 04:57
by Lewin
Krom and I have been unable to decode pattern.dat for the Remake. Any help would be greatly appreciated. We are guessing that it contains properties for each tile, whether you can walk, build, mine, etc. on them.
At the moment we have hardcodded those values but it would be far better to load them from the file.

Anybody have any information?
Lewin.

PostPosted: 10 Apr 2009, 18:24
by harold
Not really, the contents of that file are kindof strange. It starts off with dense data and then slowly becomes sparse and even "all zero" near the end. It's a weird one.
I have some reason to suspect it contains at least some "entries" or "blocks" of 70 bytes each but don't take this for granted..

PostPosted: 10 Apr 2009, 18:43
by Krom
In any case it has to much data to be solely Passability property of tiles. Those would fit into 2byte/tile - 512bytes.
I guess the file could also contain info for map editor - which tiles can coexist and in which combinations.