localcc / gvas

GVAS file format parsing library for rust
MIT License
19 stars 2 forks source link

UE5 support // GVAS version 3 #26

Closed scottanderson closed 1 year ago

scottanderson commented 1 year ago

Known issues

scottanderson commented 1 year ago

In an experimental branch, I have been able to read a v3 (UE5) file from the Railroads Online beta after handling changes listed above. The experiment breaks compatibility with GVASv2 (UE4) save files because of a quick and dirty replacement of f32 with f64 in the existing FloatProperty and struct types. These types will need to be upgraded to support what UE5 calls large world coordinates. More information here: https://docs.unrealengine.com/5.0/en-US/large-world-coordinates-project-conversion-guidelines-in-unreal-engine-5/

localcc commented 1 year ago

This probably will be done by replacing the cursor with a GvasTrait + GvasReader, and the first trait will implement getters for asset specific data so it can be queried when reading, I'm open to other suggestions too.

scottanderson commented 1 year ago

I see two options for supporting LWC:

I am leaning toward the second option for having a simpler architecure and copying what UE5 actually does; but I could be convinced otherwise.

scottanderson commented 1 year ago

On closer inspection, it appears that I was mistaken about FloatProperty storing doubles. Only the struct sub-types are impacted by LWC.