Skip to content

GNCPs and SNCPs will always save incorrectly due to fixed header name #39

Description

@NextinMono

In this snippet of code:

void CreatePackageFile(IChunk chunk)
{
using Stream stream = Package.GetStream(Package.Add(), true, true);
using BinaryObjectWriter infoWriter = new(stream, StreamOwnership.Retain, Endianness);
InfoChunk info = new()
{
Signature = BinaryHelper.MakeSignature<uint>(Endianness == Endianness.Little ? "NXIF" : "NYIF"),
};
info.Chunks.Add(chunk);
infoWriter.WriteObject(info);
}

The writer always assumes that the header of the chunk should be "NXIF" and "NYIF". However, GNCP and SNCP files use different names ("NGIF" and "NSIF") which means that GNCP and SNCP files will load and save, but will cause issues in-game.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions