Shojy.FF7.Elena 0.6.0-pre

This is a prerelease version of Shojy.FF7.Elena.
dotnet add package Shojy.FF7.Elena --version 0.6.0-pre                
NuGet\Install-Package Shojy.FF7.Elena -Version 0.6.0-pre                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Shojy.FF7.Elena" Version="0.6.0-pre" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Shojy.FF7.Elena --version 0.6.0-pre                
#r "nuget: Shojy.FF7.Elena, 0.6.0-pre"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Shojy.FF7.Elena as a Cake Addin
#addin nuget:?package=Shojy.FF7.Elena&version=0.6.0-pre&prerelease

// Install Shojy.FF7.Elena as a Cake Tool
#tool nuget:?package=Shojy.FF7.Elena&version=0.6.0-pre&prerelease                

Elena

Elena is a .net standard utility library for reading various FF7 files. Currently it can extract data from both Kernel files, list and extract files from LGP archives, and read and convert FF7's text file format to images.

Reading the Kernels

KERNEL.BIN contains full data for all aspects of the game. This include initialisation data, item, materia and equipment statistics, and various game texts.

kernel2.bin contains just game text in a different format - and the game uses this instead of the equivalent text within the game.

Reading KERNEL.BIN

// Initialise the reader with the kernel file
KernelReader reader = new KernelReader("KERNEL.BIN", KernelType.KernelBin);

// Example of getting weapon statistics
Weapon[] weapons = reader.WeaponData.Weapons;

Reading kernel2.bin

KernelReader reader = new KernelReader("kernel2.bin", KernelType.Kernel2Bin);

// Example of getting text used within battles
string[] texts = reader.BattleText.Strings;

Getting data as the game sees it.

When merging both kernels data, Elena will use the base stats from KERNEL.BIN and the strings from kernel2.bin. Text fields on items, equipment, etc, is updated to use the values found in kernel.bin.

// Initialise the reader with both kernels
KernelReader reader = new KernelReader("KERNEL.BIN", KernelType.KernelBin)
                            .MergeKernel2Data("kernel2.bin");

// Example of getting weapon statistics
Weapon[] weapons = reader.WeaponData.Weapons;

Reading LGP Files

// Initialise the reader with an LGP file
LgpReader lgp = new LgpReader(@"chocobo.lgp");

// Get a list of file names found in the LGP contents
string[] containedFiles = lgp.ListFiles();

// Extract a file to a stream
Stream outputStream = lgp.ExtractFile("bv.tex");

Reading texture and image files

// Pull a .tex file out. 
using (var dataStream = lgp.ExtractFile("bv.tex"))
{
    // This can be from a FileWriter, or memory stream, or any other destination.
    Stream outputStream; 

    // You can use a stream or byte[] buffer to convert from.
    TexConverter.ToPng(dataStream, outputStream);
    
    // OR if you want to process the bitmap before saving
               
    Bitmap bmp = TexConverter.ToBitmap(dataStream);

    // ...change the image here...

    bmp.Save($"choco-faces.png", ImageFormat.Png);           
}
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.0-pre 55 8/7/2024
0.5.0-pre 50 7/19/2024
0.4.0-pre 174 2/3/2023
0.3.0-pre 120 7/14/2022
0.2.0-dev 672 7/22/2019
0.1.1-dev 338 7/16/2019
0.1.0-pre 329 7/15/2019