dngulin / blender-skyfallen-import

Addon for Blender that imports TheEngine's (Skyfallen Entertainment) geometry.
2 stars 1 forks source link

warlock support #1

Open RugnirViking opened 1 year ago

RugnirViking commented 1 year ago

Hi there, is there any chance to work on warlock 2 support? The bma models are version 4.13, I tried skipping the version check but it can't find the MeshMaterials header

dngulin commented 1 year ago

Hi! Glad to see someone interested in that project :)

It was developed as my survey of reverse-engineering techniques. And right now I do not have enough time and motivation to continue developing. However, I can give you some advice to implement support of a newer version of BMA.

A file is composed of a sequence of binary structures. And every structure is prefixed with a hash of its name. Fortunately, a hash function is already known (calc_label) and structure names are stored in a game code as strings. Therefore you can calculate hashes of all the strings from the constants section and then figure out what structure you have to parse.

When you know the name of a structure you can find usages of that constant in code and figure out how it is composed.

Also I reverse engineered not a game itself, but a library from some modding application (I don't remember which one). You can inspect game libraries and executable files for constants like Skeleton2 or MeshFragmentsSkinned and start search from that point.