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

Checkboxes are not interactable or displayed correctly [Linux] [Pathfinder Wrath of the Righteous] #91

Closed
sazaland opened this issue Jan 27, 2022 · 11 comments

Comments

@sazaland
Copy link

As in the screenshots, checkboxes don't render correctly and cannot be interacted with. Other elements like buttons and text fields all appear to work fine, and the text renders correctly with formatting and all.

I'm honestly not 100% sure if this is UMM or how the mods are interfacing with UMM, but since it's affecting every mod I've tried(and the mods in question, ToyBox and TabletopTweaks are two of the most popular and well-traveled for Wrath) I'm not sure how I'd narrow this down further. I'm also not sure what logs are relevant for this, can provide if needed. When I check the Log tab in UMM it seems like the relevant portions are too far back in the scrollback, and I'm not sure where that file would be.

Screenshots below:

Screenshot_20220126_222043
Screenshot_20220126_225031

@newman55
Copy link
Owner

newman55 commented Jan 28, 2022

It depends entirely on the game. Not sure if I can fix it. Do any checkboxes work, in the settings menu for example?

@sazaland
Copy link
Author

I didn't see any checkboxes in the Settings menu, I did see radio buttons that seem to work.

Since radio buttons also seem broken in the mod menus this may come down to the mods after all. I think most mods which have menus for Wrath are using common UI code, so the issue may be there.

@UrsaSolar
Copy link

I've run into this issue too, and I've seen a couple others talk about it just recently. I'm certain this issue didn't exist when I previously used UMM on Wrath of the Righteous closer to launch, so I'm not sure what's changed, but I've also reinstalled to a different distro (Arch -> Fedora) since then so it may be a local change.

My gut instinct is that since glyphs aren't displaying that it's probably a font issue, so I'm taking the nuclear approach and running protontricks 1184370 allfonts but man it's slow and I don't even know how many more are left, so I may not even be able to follow up with results until tomorrow. If it does turn out to be that, it would be better to nail down what font specifically is needed to avoid this long process. If it's not that, I'll start testing older versions of UMM, Proton and WotR in my spare time and see if I can find anything more useful.

@UrsaSolar
Copy link

UrsaSolar commented Jan 29, 2022

Followup, my gut instinct was right that it's a font rendering issue, but even allfonts didn't fix it. I also realized I was mistaken after some testing and memory refreshing; old versions of ToyBox didn't have working checkboxes, they instead bolded selected options so I guess I just didn't notice or didn't care at the time that the glyphs didn't render.

My searching did however lead me to this github issue on the ToyBox repo which has a script that does fix the issue. The downside is that this means mods will need to be manually patched by users for now. Also, it doesn't work on TabletopTweaks after editing it to target TabletopTweaks.dll and I'm too much of a mook to figure out why, but it did work on ToyBox.

So in short, this is not strictly a bug with UMM so far as I can tell, it seems to be a bug with Wine being unable to render the unicode glyphs for checkmarks and crosses, but if a universal fix was found it would be much better for users than having to patch every mod.

EDIT: I should also add, testing demonstrates that the options are interactable. Clicking them does in fact change their state. It's just impossible to tell what's enabled and what's not without ingame testing. This is purely a visual bug, though one that has significant implications on actually using the mod.

@sazaland
Copy link
Author

sazaland commented Jan 30, 2022

@AimlesslyWalking

I messed with this a little more for TabletopTweaks. The game gets stuck during loading if you target TabletopTweaks.dll, ModKit.dll is the one that needs to have the script run against it, that seems to be where he has the UMM UI code.
I have both mods usable now with that change.

Still not 100% sure what the permanent fix for them would be besides implementing this patched utf encoding by default.

This can probably be closed on the UMM side, it's the mods it seems.

@newman55
Copy link
Owner

What fix are you talking about?

@sazaland
Copy link
Author

What fix are you talking about?

In the issue linked for the ToyBox git in AimlesslyWalking's comment, there is short code for a python script that will go through the ToyBox.dll from that mod and change the encoding for checkmark, plus, cross, and minus 'emoji'(?) characters to utf-16-le. This appears to permit them to display in a useful way on Linux, and basically restores all functionality.

The actual code being used to display UMM config UIs by Wrath of the Righteous(and I think Kingmaker) mods was all written by one person at one time and shared with the community, I believe ModKit.dll is the original form but some mods put it somewhere in their own DLL instead, code is the same though.

For another mod I was able to resolve the issue by just targeting ModKit.dll instead of ToyBox.dll in the original python snippet from that ToyBox issue.

I think the permanent fix is in ModKit.dll that is being used by the community, not UMM, which is why I was thinking this could be closed. Though if UMM could do something to enforce the utf-16-le encoding in general that might also make things safer going forward for anyone that uses Unity mods, not sure.

@newman55
Copy link
Owner

newman55 commented Jan 31, 2022

Your solution seems to be a crutch. This problem is observed only in Arch linux, as far as I understand. Perhaps a solution can be found there. Try experimenting with OS encodings. You can start here first.

@sazaland
Copy link
Author

I'll have a look at that, but for what it's worth I'm on Slackware-current, not Arch. I checked quickly to see if I could find people reported not seeing the problem on Ubuntu or Fedora or some such, but didn't see any mentions of any other distro in any context. At the moment I have no reason to believe it isn't universal to Linux for Wrath, since we're running through either Proton or Wine. I also do not experience this with UMM and similar mods/same UI code on Kingmaker, where Kingmaker is Linux native.

It implies to me it's more in Wine/Proton since it works natively, and since installing the allfonts package in Winetricks does nothing for the issue, I suspect there's something else going on in the wine/proton prefixes if we're really digging to the bottom of it.

@newman55
Copy link
Owner

Anyway, I don't see how I can fix this. Maybe the mod creator directly use characters in UTF-16 ?

@sazaland
Copy link
Author

Yeah, that's the original idea, I was just punting a random thought since you didn't close the issue outright. I'll call it closed for now, it's not on the UMM side fundamentally.

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

No branches or pull requests

3 participants