psykana / dos2deck

Divinity Original Sin 2 16:10 patch for Steam Deck
MIT License
19 stars 2 forks source link

Support for other aspect ratios besides 16:10? #2

Open greppim opened 1 year ago

greppim commented 1 year ago

Hey, so I'm curious if there are any plans for support for aspect ratios besides 16:10, such as 4:3 or 5:4.

psykana commented 1 year ago

My goal was to make this work on the Deck and I'm not motivated to push it further. I'll use this issue to post some relevant info for anyone who's willing to pick it up.

At some point, (IIRC, the DE update) Larian re-drew some gamepad UI elements (like inventory) from DOS1 looks to what we have now. These new bits of art are drawn in 16:9 aspect ratio, so they introduced letterboxing to always keep it aligned.

UI is written in ActionScript around RAD Iggy framework. That is proprietary tech and out of my area of expertise. Fortunately, since 16:10 is so close to 16:9, I didn't have to modify any of that code.

As for the rest, I see two ways: a) Actually modify .iggy files in game archives to implement scaling, and inject modified UI with Norbyte's script extender. I think it will require re-drawing some art, and that's why Larian didn't do it. b) Extend my code to find the closest 16:9 match for current resolution and supply that to the problematic UI pieces. This is a realistic solution but it won't be perfect. It would actually be trivial to add generic 16:10 support. c) bonus: try putting older UI back into the game and see what happens?

Anyone familiar with C and basic reverse engineering won't have much trouble figuring out how my patch works. I'll be happy to provide any assistance.