dariowouters / ts-map

ATS/ETS2 map renderer
MIT License
85 stars 28 forks source link

Where I need to go to find the location of useful informations in binary files (prefabs/roads)? #2

Closed edoaxyz closed 6 years ago

edoaxyz commented 6 years ago

Every information that is used by this tool is extracted from lots of binary files (.base for roads, .ppd for prefabs...) and for analyzing them the program uses some addresses (like 0x20 or something similar) which say the location on file of some variables. This means that you need to know the structure of these files (for finding the right variable), so how did you get the structure of them? Is there any wiki or documentation about that?

dariowouters commented 6 years ago

I just added the documentation I have. The .ppd file structure was posted online by mwl4, I just made it compatible for the new version (0x16) introduced in v1.30, documentation of what changed is here.

For the .base files it was basically trial and error. I went into the game editor and I created a new map with only a road, saved the map and then i just changed a value in the editor and checked what changed in the .base file.

I did this for all the items until I could read the whole file.

I used 010 editor to read the hex files.