FF7R2.DataObject.API 1.1.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package FF7R2.DataObject.API --version 1.1.2                
NuGet\Install-Package FF7R2.DataObject.API -Version 1.1.2                
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="FF7R2.DataObject.API" Version="1.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FF7R2.DataObject.API --version 1.1.2                
#r "nuget: FF7R2.DataObject.API, 1.1.2"                
#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 FF7R2.DataObject.API as a Cake Addin
#addin nuget:?package=FF7R2.DataObject.API&version=1.1.2

// Install FF7R2.DataObject.API as a Cake Tool
#tool nuget:?package=FF7R2.DataObject.API&version=1.1.2                

A C# parser for FF7 Rebirth's DataObject files.

Installation

NuGet Version<br> https://www.nuget.org/packages/FF7R2.DataObject.API<br> Eitehr install the NuGet package, or clone this and add the "DataObject API" project as a project reference to your own project.

Description

A note about arrays: The game re-uses a arrays and sub-objects wherever possible in the original files.<br> This doesn't. it can read it either way, but when it writes out the arrays'n'things, it write out a new array each time.

The effects of this haven't been fully tested, but from what I have tested, it seem to work without issue.

THIS ONLY WORKS ON THE ORIGINAL IOSTORE FILES!<br> It will not work on Zen extracted uasset/uexp files.

Save Modes

There's two save modes:

  • OG_MODIFIED_BYTES
    • This acts as a proxy to hex editing. Setting a value through DataAsByteProxy will directly change bytes at this given offset without writing the whole parsed file.
    • This works, at the cost of immutable array sizes.
  • WRITE_PARSED_DATA
    • This tries to write out the parsed file, and whilst not all files pass write tests, does actually work and is the only one to allow changing array sizes.
    • This mode lets you add/remove elements to arrays!

DON'T MIX AND MATCH SAVE TYPES! Don't use DataAsByteProxy and then write with WRITE_PARSED_DATA. Strange things might happen!<br> Most likely, though, you'll probably just wind up not saving some change you intend due to one mode ignoring some change from another.

The are only a few files failing write tests; namely ChapterReset & ResidentPack.<br> Fixing these is low priority.

Examples

An example maximizing materia slots (for OG_MODIFIED_BYTES):

var asset = IoStoreAsset.Load(@"path\to\in\Equipment.uasset");

foreach (var (key, value) in asset.innerAsset.frozenObject.DataTable) {
    value.propertyValues[EquipmentProperties.MateriaSlotDouble]!.As<ByteProperty>()!.DataAsByteProxy = 4;
    value.propertyValues[EquipmentProperties.MateriaSlotSingle]!.As<ByteProperty>()!.DataAsByteProxy = 0;
}

asset.Save(@"path\to\out\Equipment.uasset", IoStoreAsset.Mode.OG_MODIFIED_BYTES);

<br>

And another example used to make all spells cast instantly (for WRITE_PARSED_DATA):

var asset = IoStoreAsset.Load(@"in\path\BattleAbility.uasset");
foreach (var (_, value) in asset.innerAsset.frozenObject.DataTable) {
    foreach (var entry in value.propertyValues[BattleAbilityProperties.AnimationParameter_Array]!.As<ArrayPropertyValue>()!.Data!) {
        entry.As<FloatProperty>()!.Data = 0;
    }
}
asset.Save(@"out\path\BattleAbility.uasset", IoStoreAsset.Mode.WRITE_PARSED_DATA);

Row/Column (Property) Names

There are files with string constants named for each DataObject file.<br> e.g. EquipmentRows or EquipmentProperties for the file Equipment.uasset.

You can reference them anywhere and they are used in the examples.<br> Very few things are excluded from this and I think those wind up just being some UTF-16/JPN names, and rows that are None or ..

Product Compatible and additional computed target framework versions.
.NET 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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows 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
1.2.0 0 2/11/2025
1.1.4 14 2/10/2025
1.1.3 28 2/10/2025
1.1.2 43 2/7/2025
1.1.1 36 2/7/2025
1.1.0 18 2/7/2025
1.0.0 13 2/7/2025
0.1.1 14 2/6/2025
0.1.0 14 2/6/2025