Skip to content
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

[ResourceLib] Fully implement UICB support #31

Merged
merged 5 commits into from
Feb 18, 2024

Conversation

AnthonyFuller
Copy link
Contributor

@AnthonyFuller AnthonyFuller commented Feb 12, 2024

It's a bit dodgy in parts (the code) because I was only 90% sure how the serialize works. It's definitely not a thing you could easily 1:1 from game structures since it's read differently and it's modified when being installed. The game calls it an array of "control types", this type being SAttributeInfo, and it loops through them to find pins and properties then registers them in its own arrays.

The code, and by extension the JSON format, could be slimmed by removing the enum <-> string conversion, but that reduces the readability of the output. An argument could be made that RT doesn't do that for RRIDs, but that's a different case entirely as it preserves the game's runtime format.

EDIT: Pending new build...

@AnthonyFuller AnthonyFuller marked this pull request as draft February 12, 2024 06:39
Basically, normally it's written as a uint32_t and then 0xFFFFFFFF, the game's files have this as zero. Changing the type here fixes it, I think we're writing over the padding. I don't think anything should go wrong here...
@AnthonyFuller
Copy link
Contributor Author

It's still crashing sometimes. @OrfeasZ if you can take a look when you're available. I've probably messed something up somewhere. Hopefully what I've done can give you a better insight.

@AnthonyFuller AnthonyFuller marked this pull request as ready for review February 12, 2024 07:29
@OrfeasZ OrfeasZ merged commit ed32e0b into OrfeasZ:master Feb 18, 2024
4 checks passed
@AnthonyFuller AnthonyFuller deleted the uicb branch February 18, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants