Coder Social home page Coder Social logo

bfevlibrary's Introduction

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

bfevlibrary's People

Contributors

archleaders avatar

Stargazers

 avatar  avatar  avatar

bfevlibrary's Issues

Converted bevfl not loading in TOTK

Some files after conversion does not load in TOTK

For example DmF_SY_FairyWorking.bfevfl

After converting to Json and back to bevfl with no edits the resulting file does not load when talking to a great fairy.
image
There seems to be some issue with this part of the files, left is the original, right is the converted file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.