MAK-Relic-Tool / Issue-Tracker

Central Bug Tracker / Issues Board for the MAK Relic Tool
0 stars 0 forks source link

SGA V7.0 / Company of Heroes 2 Support #48

Closed Siapran closed 2 days ago

Siapran commented 1 month ago

having a hard time finding decent tools for this, I'd be happy to implement it if there's a specification available.

ModernMAK commented 1 month ago

If you have python experience, you can take a look at my old V7 repo, which I've just made public. Repository V7 Folder (Commit 0298b1e)

With the death of the Xentax forums I don't know of another place that would have specifications for these formats. I also can't recall if I tested the V7 format or not.

Feel free to continue asking questions in this thread here. (No promises that I respond in a timely manner)

I've marked this with a wontfix as I've barely had time to continue my work on SGA V2. Maybe someday though.

Edit: Getting Started

Half of the serialization logic is in the Serialization File for V7, which contains information on how to serialize custom types, usually the Archive Header, Archive Metadata (which I think i later learned is extra Table Of Contents information), and the File Metadata, which often changes between versions.

At the very bottom of the Serialization File are the Struct definitions, which are the layouts of different sections of the archive. V7 Serialization File (Commit 0298b1e)

This Struct class is not actually the python Struct class, (that doesn't natively support filestreams) but it follows the same string parsing conventions, which can be found here: https://docs.python.org/3/library/struct.html

The other half of the reading/writing code should be here in the ABC Serialization code: ABC Serializatoin (Commit 0298b1e)