SirWaddles / JohnWickParse

A parser for Fortnite uasset, uexp and pak files
MIT License
90 stars 28 forks source link

Property Error on what should be cooked json files. #23

Open cyberc0re opened 3 years ago

cyberc0re commented 3 years ago

Heyo, I know you guys develop this purely for Fortnite, but I'm trying to deserialize some tables. Some of the tables deserialize properly, but others are running into issues of Property Errors

john-wick-parse.exe serialize IconTable
Error: Property error occurred:
Property Tag: IconRarity (Int8Property) 1
Could not read property type: Int8Property at pos 159
john-wick-parse.exe serialize UserPlateBackgroundTable
Error: Property error occurred:
Property Tag: UserPlateBacgroundRarity (Int8Property) 1
Could not read property type: Int8Property at pos 144
john-wick-parse.exe serialize UnlockMusicTable
Error: Property error occurred:
Property Tag: AdaptStartTime (Int64Property) 8
Could not read property type: Int64Property at pos 107

I'll upload some example tables that aren't working, not sure if this is just unsupported data types or another issue. Would love if this was able to be supported, if not all good.

Examples: https://cyberc0re.s-ul.eu/F8dNlazm

Thanks <3

mon commented 3 years ago

This seemed easy, and luckily it was.

Checked out 5.0.2's commit and modified src\assets.rs. To enum FPropertyTagType added new properties to handle the types in these files:

    Int8Property(i8),
    Int16Property(i16),
    Int64Property(i64),

And new handlers for FPropertyTagType::new:

            "Int8Property" => FPropertyTagType::Int8Property(reader.read_i8()?),
            "Int16Property" => FPropertyTagType::Int16Property(reader.read_i16::<LittleEndian>()?),
            "Int64Property" => FPropertyTagType::Int64Property(reader.read_i64::<LittleEndian>()?),

Commits since then have diverged too much (needing the utoc file) so I have not opened a PR.