locations.dat #2
Replies: 3 comments 2 replies
-
Beta Was this translation helpful? Give feedback.
-
Hi!
Not really, the bytes at the end as well as the header is still a mystery to me. I stopped looking after grabbing the tile data, yet there could still be sth there worth extracting.
Yes! That's where the pixels starts, this is what I have so far:
PeopleSprites2, PeopleSprites3, and PeopleSprites4 (and also VehicleAndStreetFurnitureSprites) are slightly different so the offsets vary. Now the job should be to try to figure out how the rest of the data works, which I suspect makes everything fit together... |
Beta Was this translation helpful? Give feedback.
-
Hi @THGSCST I'm still working on it but I managed to find the complete structure of the PeopleSprites*.dat Now i have to figure out how to put together the sprites. I didn't have enough time to think about it yet, but I'm pretty close. Just wanted to let you know in case you're also working on it and want to share the progress. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Just wanted to share my findings about the
locations.dat
I've been using ImHex a great tool for this task.
Structure
So this is the structure, written in the ImHex pattern language.
Tile
So basically we have Tiles composed of frames (the 32x32 bitmaps already extracted from
locations.tyl
).The frame spatial positioning inside a tile is a bit tricky and it is better explained by a picture:
https://imgur.com/a/RnQkkdi
The width of this tile is actually 6 and the height is 5 yet the tile has only 27 frames defined.
This is because every even column (0,2,4...) does not have 5 frames but 4 (
height-1
) and an offset of 16px at the top. This explains the frame size count:header.horizontal_frames*header.vertical_frames - header.horizontal_frames/2
Tile groups
The Tiles are groupped with some kind of byte indicating sth. I've called this group_id but I don't know the real meaning.
Sample Code
Since I'm not very fluent in C#, and I was just playing around, I have a JS script that extract all the tiles and save them to pngs.
Please let me know if you want me to share it somewhere.
I will now move to the other dat files and see if we can obtain more usable data so to extract or modify the people sprites for example.
Beta Was this translation helpful? Give feedback.
All reactions