Alchemy API
The editor is built on a custom C# library, the Alchemy namespace, that you can use directly to script archive edits. It needs the .NET SDK 9.0 and the source code of the project.
Example
Section titled “Example”Open a level archive, move every entity of the crates file up by 100 units, and save:
// Open archiveIgArchive archive = IgArchive.Open(archiveDir + "L101_NSanityBeach.pak");
// Find archive fileIgArchiveFile file = archive.FindFile("L101_NSanityBeach_Crates.igz", FileSearchType.NameWithExtension)!;
// Convert to igz fileIgzFile igz = file.ToIgzFile();
// List objects of type CEntityList<CEntity> entities = igz.FindObjects<CEntity>();
// Move all entities upentities.ForEach(entity => entity._parentSpacePosition._z += 100.0f);
// Save igz file in archivefile.SetData(igz.Save());
// Save updated archive to diskarchive.Save();Project structure
Section titled “Project structure”Directorysrc/
DirectoryAlchemy/ Alchemy-related classes
DirectoryIgArchive/
.pakfiles- …
DirectoryIgzFile/
.igzfiles- …
DirectoryigObject/ Alchemy objects
- …
DirectoryHavok/ Havok-related classes
DirectoryHavokFile/
.hkxfiles- …
DirectoryhkObject/ Havok objects
- …
DirectoryEditor/ the editor application
- …
DirectoryUtils/ common utilities
- …
- Program.cs entry point
The source code is on GitHub. Questions about the internals are welcome in the #nst-level-editor or #alchemy channels of the Alchemy Reverse Engineering discord server.