ac7-ultrawide
ac7-ultrawide copied to clipboard
Miscalculation for hud_shift_amount at 3440x1440
At line 261, at least for 3440x1440 monitor resolution there is an issue with the calculation of the hud_shift_amount, the fix is as this: hud_shift_amount = (standardized_monitor_width - 1920) / 2.
Divide by 2 as the comment implies instead of 3840.
Can you step by step me on how to change this please?
The HUD was still displaying to the left so I quit trying.
What you can do is install any Python distributable and open the .py file inside ac7-ultrawide zip. Inside that file go the line I said above replace the line and save the file. That should be it.
I also had an issue with the hud being shift to the left. What worked for me was
At line 261: hud_shift_amount = (standardized_monitor_width - 3440) / 2.
I used notepad++ to edit and save
I'm 100% certain about the math working out right, but just to explain why I divide by 3840 there. To shift the HUD over from the left side of the screen, the shader we're modifying needs a value that is a ratio of the difference in actual monitor width to the expected monitor width. The game is expecting a 1920 x 1080 monitor.
But we're running a 3440 x 1440 monitor. We first need to scale our monitor down so that it's 1080 pixels vertical - this gives us a standardized_monitor_width
value of 2580. Now we're comparing a 2580x1080 monitor to a 1920x1080 monitor, so we can eliminate monitor height as a variable.
So we need the difference between the two widths, 2580 and 1920, which is 660. And we're dividing that by 1920 because the shader needs a ratio (or percentage, or proportion, etc) to move the HUD, not an absolute value. So we divide 660 by 1920, the expected monitor width.
BUT, if we left it at that, the HUD would be rendered all the way on the right side of the screen instead of all the way on the left. We want the HUD to be in the middle of the screen, so we divide 660 by 1920, and again by 2.
We can simplify our mathematical operations by combining the two divisors. Dividing 660 by 1920 by 2, is the same as dividing 660 by 3840. My comment # divide by 1920, then divide by 2.
is there to remind me of this combined operation.
I have the same issue in 3440x1440, and modifying the file with 1920)/2 and then 3440)/2 didn't recenter the hud, does that mean no one has a fix ?
I had the same problem, although my HUD was shifted to the right. It turned out that after applying the ultrawide patch, the game resolution reset to 1920x1080. Changing the resolution back to 3440x1440 recentered the HUD.