Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.socpak files #25

Open
richardthombs opened this issue Sep 9, 2020 · 9 comments
Open

.socpak files #25

richardthombs opened this issue Sep 9, 2020 · 9 comments

Comments

@richardthombs
Copy link

Hi Peter,

Have you got any idea about how to extract information from .socpak files? I think for larger spaceships they split some of the interior into their own object containers. I'm guessing SOCPAK = Streaming Object Container PAK.

Specifically, I would love to be able to explore the contents of these Carrack related files because I think some of the loadout information is in there.

Data\ObjectContainers\Ships\ANVL\Carrack\front.socpak
Data\ObjectContainers\Ships\ANVL\Carrack\middle.socpak
Data\ObjectContainers\Ships\ANVL\Carrack\rear.socpak
@richardthombs
Copy link
Author

As a follow-up, if I use the GUI to open the .socpak, then it can show me the contents, but if I try and extract a file, it crashes.

Trying to extract by hand gives this:

unp4k.exe front.socpak *.xml
Exception while extracting cubemaps/bridge_lighting/probe_bridge_bottom_cm.dds: Object reference not set to an instance of an object.

... and the the same error for every file in the index.

@richardthombs
Copy link
Author

richardthombs commented Sep 9, 2020

OK, so the null reference exception is caused by ZipEntry.IsAesCrypted failing because this.ExtraData is null. So I worked around that by just returning false and I've been able to extract the socpak, which is awesome :)

The next challenge is that it creates several .soc files, some of which seem to be CryXmlB (because I can see that word when I look using a hex editor), but then main .soc, which is called front.soc does not seem to be CryXmlB.

Both files start with CrChF, if that means anything?

It looks like front.soc contains what I want, because when I do a strings | grep Bed_Single_Side_ANVL_Carrack_Captain, it shows up in there.

(The whole reason I am going down this track is that I'm trying to add the number of beds to the ship stats in scunpacked, but I couldn't find any beds at all for the Carrack)

@peter-dolkens
Copy link
Member

Just saw these - a few people have been sniffing around the socpaks lately, and I'm hoping to add more native support soon.

In general: the CrChF files are a CryEngine model format - similar to what is found in cgfconverter - but with some new, unknown node types.

Sounds like you've already discovered that the socpak itself is just a zip file, containing XML, CryXmlB, and Model files.

@peter-dolkens
Copy link
Member

In fact - Markemp/Cryengine-Converter@315640f

=D

@richardthombs
Copy link
Author

Thanks Peter, that makes a lot of sense. Stuff that can be switched out by the player or that affects ship performance is all listed via their itemport system, but static items like bunk beds, medical scanners and the like are positioned in 3d space within the ship by data in the soc file. Big ships get multiple object containers, small ships get just one.

richardthombs referenced this issue in Markemp/Cryengine-Converter Sep 14, 2020
@EtienneLamoureux
Copy link

EtienneLamoureux commented Oct 20, 2023

Will this see anymore development? Since 3.19.1 LIVE, all position information has been removed from Data\Libs\Subsumption\Platforms and seemingly moved to *.socpak files under Data/ObjectContainers/.

@Stryxus
Copy link

Stryxus commented Oct 20, 2023

Will this see anymore development? Since 3.19.1 LIVE, all position information has been removed from Data\Libs\Subsumption\Platforms and seemingly moved to *.socpak files under Data/ObjectContainers/.

Im currently working on the re-write so, I can take a look at this but it probably wont be out by the time the re-write is ready for production. #53

I personally hope to add interpreters for as many file types as possible after the re-write.

@Baconator650
Copy link

Look into StarFab. It is a UI that uses several programs, including, CGF-Converter as it's model converter. Most of the files are accessible.

@EtienneLamoureux
Copy link

Look into StarFab. It is a UI that uses several programs, including, CGF-Converter as it's model converter. Most of the files are accessible.

Thanks, I already had taken a look, but didn't want to rewrite all my parsers. Guess there's no choice though: the data structure changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants