Shojy.FF7.Elena
0.5.0-pre
See the version list below for details.
dotnet add package Shojy.FF7.Elena --version 0.5.0-pre
NuGet\Install-Package Shojy.FF7.Elena -Version 0.5.0-pre
<PackageReference Include="Shojy.FF7.Elena" Version="0.5.0-pre" />
paket add Shojy.FF7.Elena --version 0.5.0-pre
#r "nuget: Shojy.FF7.Elena, 0.5.0-pre"
// Install Shojy.FF7.Elena as a Cake Addin #addin nuget:?package=Shojy.FF7.Elena&version=0.5.0-pre&prerelease // Install Shojy.FF7.Elena as a Cake Tool #tool nuget:?package=Shojy.FF7.Elena&version=0.5.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 | Versions 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. |
-
.NETStandard 2.0
- System.Drawing.Common (>= 6.0.0)
-
.NETStandard 2.1
- System.Drawing.Common (>= 6.0.0)
-
net6.0
- System.Drawing.Common (>= 6.0.0)
-
net8.0
- System.Drawing.Common (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.