-
Notifications
You must be signed in to change notification settings - Fork 53
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
BG3: Add support for serializing and deserializing modsettings.lsx
Load Order file
#2149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is mostly fine.
I haven't played BG3, I cannot verify the accuracy of the resulting files; so I'll leave it to a second set of eyes.
It's a bit unusual seeing XML being parsed by hand; the structure present, at least within
the Verify file seems to be representable statically with classes; and a single call to Serialize
/ Deserialize
like you'd do with JSON. I'll assume you either didn't know, think of it, or something else of the kind.
If you want to be really fancy about it though, you could use a That would spare you having to label every |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've marked this as 'you can merge it'; but please give it a while so another set of eyes can give their opinion too.
C# has some XML formatters for objects as well, probably a few dozen of them, that way we don't need to do the band serialization. That'd require some investigation into what library to use though, so I'm fine with looping back around later to change it. |
Yeah I avoided that for now since they changed the format of |
Part of Epic - Game Support - Baldurs Gate 3 #1262
Add support for serializing a sorted array of
ModuleShortName
into modsettings.lsx formatAdded serialization test
Add support for deserializing a modsettings.lsx string to sorted array of
ModuleShortName
structs.Added deserialization test