-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insufficient documentation #108
Comments
Crate docs are available at https://docs.rs/gvas/latest/gvas/, but they might be incomplete. |
Can you create a documentation page on how to convert gvas into my own structs? Its very hard to work with the GvasFile directly and I do not understand how accessing data works. I want to make a save editor. Could you explain how to modify the data inside rust? |
Not sure what you mean by convert into your own structs, but if you wanna access and edit data you can look for examples in the |
The pub struct GvasFile {
pub deserialized_game_version: DeserializedGameVersion,
pub header: GvasHeader,
pub properties: IndexMap<String, Property>,
} |
@scottanderson The problem im facing is I dont understand how to navigate the I sent my gvasfile above for reference. |
Understanding how to navigate the properties map can be challenging due to its variability across different games. Each game may store data differently; some use simple arrays while others employ custom structs. This library accommodates these variations with a flexible structure. The structure of each property is a
The result is an object that looks like: Property::StrProperty(
StrProperty {
value: Some(String::from("Hello, world!"))
}
) Some properties are themselves also enums, especially the container types (array, map, etc.). This is primarily done to make the serde serialized output flatter, more readable and concise. If you prefer to work in JSON, you can use serde to convert a GvasFile to another format. There's also a cli wrapper for this that you may be interested in, which doesn't require you to write any code at all. See gvas2json. |
Why are there no docs on how to use this crate?
Property
?ArrayProperty
?The text was updated successfully, but these errors were encountered: