Map Database  •  FAQ  •  RSS  •  Register  •  Login

Using TPR maps in TSK

<<

kuba11100

Sword Fighter

Posts: 286

Joined: 16 Jul 2008, 22:00

Location: Poland

Post 27 Mar 2009, 11:03

Using TPR maps in TSK

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?
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 27 Mar 2009, 12:25

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..
<<

kuba11100

Sword Fighter

Posts: 286

Joined: 16 Jul 2008, 22:00

Location: Poland

Post 27 Mar 2009, 17:59

YAY! After replacing pattern.dat and mapelem.dat with TPR ones everything is OK!
Thanks!
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3821

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 27 Mar 2009, 22:40

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!
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 29 Mar 2009, 17:44

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..)
<<

kuba11100

Sword Fighter

Posts: 286

Joined: 16 Jul 2008, 22:00

Location: Poland

Post 30 Mar 2009, 13:23

pattern.dat changed minimap colours, mapelem.dat changed terrain properties
<<

Krom

User avatar

Knights Province Developer

Posts: 3250

Joined: 09 May 2006, 22:00

Location: Russia

KaM Skill Level: Fair

Post 30 Mar 2009, 19:13

mapelem.dat contains trees and other object animation data, nothing more.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

kuba11100

Sword Fighter

Posts: 286

Joined: 16 Jul 2008, 22:00

Location: Poland

Post 03 Apr 2009, 18:17

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.
<<

Lewin

User avatar

KaM Remake Developer

Posts: 3821

Joined: 16 Sep 2007, 22:00

Location: Australia

KaM Skill Level: Skilled

Post 10 Apr 2009, 04:57

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.
<<

harold

Knight

Posts: 562

Joined: 19 Nov 2007, 23:00

Post 10 Apr 2009, 18:24

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..
<<

Krom

User avatar

Knights Province Developer

Posts: 3250

Joined: 09 May 2006, 22:00

Location: Russia

KaM Skill Level: Fair

Post 10 Apr 2009, 18:43

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.
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de

Return to Map Design

Who is online

Users browsing this forum: Google [Bot] and 3 guests