I'm about to write myself a binary template for .crp, since some things don't seem to work in the editors as they should (e.g. editing existing map themes; changing the asset name of roads). Most of it works fine but there are two things (so far) that I can't figure out:
-- How is the length of mesh data defined? (UnityEngine.Mesh) .. most everything else -- images, strings, etc -- seems to have length data right before the actual data starts, but for meshes I don't see anything like that, and I can't find an index or terminator either.
-- BuildingInfo+Prop[] seems to have a list of entries which contain the prop name and then 22 bytes almost all of the time, but sometimes it's 23 bytes (screenshot). I assume this is positioning data? I don't really need to know what it is, but I need to figure out how to determine correctly where the next entry starts. Anyone have a clue on that?
Edit, another question:
-- Are the strings always null terminated? I'm a bit unsure since they all seem to have those length fields in front ..
E2: nvm, no they're not.
-- How is the length of mesh data defined? (UnityEngine.Mesh) .. most everything else -- images, strings, etc -- seems to have length data right before the actual data starts, but for meshes I don't see anything like that, and I can't find an index or terminator either.
-- BuildingInfo+Prop[] seems to have a list of entries which contain the prop name and then 22 bytes almost all of the time, but sometimes it's 23 bytes (screenshot). I assume this is positioning data? I don't really need to know what it is, but I need to figure out how to determine correctly where the next entry starts. Anyone have a clue on that?
Edit, another question:
-- Are the strings always null terminated? I'm a bit unsure since they all seem to have those length fields in front ..
E2: nvm, no they're not.
Last edited: