Skip to content

Nintendo Binary Cafe Event Flow Libray | Based on evfl by Léo Lam

License

Notifications You must be signed in to change notification settings

NCF-Library/BfevLibrary

Repository files navigation

Bfev Library

Nintendo Binary cafe Event Flow Libray | Based on evfl by Léo Lam

BfevLibrary has been tested to parse, serialize (json), deserialize (json), and write every BFEV file found in Breath of the Wild byte-perfectly.

Usage

Reading a Bfev File

// Read from a File Path
BfevFile bfev = BfevFile.FromBinary("path/to/file.bfevfl");
// Read from a byte[]
// Do not use with File.ReadAllBytes(), use
// a Stream instead.
SarcFile sarc = SarcFile.FromBinary("D:/Botw/Update/content/Events/100enemy.sbeventpack");
BfevFile bfev = BfevFile.FromBinary(sarc["EventFlow/100enemy.bfevfl"]);
// Read from a Stream
using FileStream fs = File.OpenRead("path/to/file.bfevfl");
BfevFile bfev = new(fs);
// Read from JSON
string json = File.ReadAllText("path/to/file.bfevfl.json");
BfevFile bfev = BfevFile.FromJson(json);

Writing a Bfev File

// Write to a File Path
bfev.ToBinary("path/to/file_out.bfevfl");
// Write to a byte[]
byte[] data = bfev.ToBinary();
// Write to a Stream
using FileStream fs = File.Create("path/to/file_out.bfevfl");
bfev.ToBinary(fs);
// Write to Json
string json = bfev.ToJson(format: true);

Install

NuGet NuGet

NuGet

Install-Package BfevLibrary

Build From Source

git clone https://github.com/NCF-Library/BfevLibrary.git
dotnet build BfevLibrary

Credits

  • Arch Leaders: C# Re-Implementation & JSON SerDe
  • Léo Lam: Original Python Implementation & General Help

About

Nintendo Binary Cafe Event Flow Libray | Based on evfl by Léo Lam

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published