Company of Heroes 3 was announced on July 13th, 2021. A public pre-alpha build of the game was made available via https://companyofheroes.com/for 3 weeks. The public pre-alpha is distributed via Steam.
SGA format, which is the archive format used by Relic games for game assets. Dawn of War 1 used version 2 SGA files, Company of Heroes used version 4 and Dawn of War II uses version 5 (for completeness, I think Impossible Creatures used version 1, some unreleased project or The Outfit used version 3, and Company of Heroes Online used version 4.1). 1
|Company of Heroes 3, Age of Empires IV|
|Dawn of War III|
|Company of Heroes 2|
|Dawn of War II|
|Company of Heroes Online 1|
|Company of Heroes|
|some unreleased project or The Outfit1|
|Dawn of War I 1|
|Impossible Creatures 1|
Official Company of Heroes 2 modding tools
7. The Archive Viewer is a .NET application. This makes decompiling the application into source code that can be recompiled, with possible modifications, relatively easy. Sometimes the decompilation process is not perfect but usually it's good enough to at least view the decompiled source code.
One of these .NET decompilation tools is https://github.com/dnSpy/dnSpy .
Archive Viewer parses the contents of SGA archives via
RelicCore.dll. This library is also a .NET binary.
Luckily Company of Heroes 3 Pre-alpha files contain a similar .NET library:
\steamapps\common\Company of Heroes 3 - Pre-Alpha Preview\dev\mstest\TestProjects\Essence.Rpc.FunctionalTests.Anvil\Essence.Core.dll. The namespaces have been changed but the API for reading SGA archives seems to have remained unchanged when compared to Company of Heroes 2's
This should make it possible to modify the Archive Viewer to use use
Essence.Core.dll instead of
Modifying Archive Viewer
Archive Viewer was first exported to a Visual Studio project using DnSpy.
The decompilation process wasn't perfect which lead to having to manually fix tens of
xaml related issues.
Once the decompiled Archive Viewer successfully recompiled and worked, the reference to
RelicCore.dll was replaced with
After changing the referenced library all changed namespace references were made to various source files to work with
The final result was a successfully compiling and starting version of Archive Viewer.
- Releases: https://github.com/Janne252/coh3-archive-viewer/releases
- Each release contains
CoH3.ArchiveViewer.zipwhich is a .NET
- Each release contains
- Source code: https://github.com/Janne252/coh3-archive-viewer
Tips and tricks
You can assign
CoH3.ArchiveViewer.exe to be default application for
.sga files by doing the following:
- Right-click any
.sgafile and select
Choose another app
- Check the
Always use this app to open .sga files
More appsand browse down the list until the option
Look for another app on this PCbecomes visible, and click it
- Browse to where you've extracted
CoH3.ArchiveViewer.exeand select it
- Done! You can now double-click any
.sgafile to quickly open it in
- https://www.corsix.org/content/sga4to5 ↩
- If you know, post a comment below!↩