EC: high resolution monitor support / scaling (4k+)

ForeverFunForeverFun Posts: 919
edited August 2023 in General Discussions
From meet and greet transcript: (link), fragment below.

Vanecrox Seacreu: EC
Mesanna: we will look at it
[...]

Vanecrox Seacreu: Would it also be possible
Vanecrox Seacreu: to increase the UI scaling to a higher value
Mesanna: I am going to say no at this time
Vanecrox Seacreu: Ok thanks, even at max UI scale it looks small if you use higher resolution
Vanecrox Seacreu: Thanks


In particular, the UI doesn't allow setting SystemData.Settings.Interface.customUiScale greater than 1.0, by default.

At 4k, I find that 1.2 works much better than 1.0 scaling.


Do the following two steps:

1. issue at chat window:
/script SystemData.Settings.Interface.customUiScale = 1.2

2. Then hit CTRL-R to reload the interface.

Before you do the above, you may want to resize the game play area window (make it much smaller), as well as relocate any hotbars  into the game play window area.

I don't know who Vanecrox is, and I wasn't at the meet & greet.  Feel free to pass along.

There's probably a better way to integrate and persist this setting, but I haven't looked at that.

(Broadsword should update the setting menu to allow >1.0 to be entered).

Comments

  • HolumerHolumer Posts: 172
    Thank you for the help!
  • PawainPawain Posts: 10,200
    The question asker plays with that name on LS. I'll pass it along next time I see him in chat. Thanks
    Focus on what you can do, not what you can't.
  • TimStTimSt Posts: 1,874
    edited August 2023
    A fairly simple code changes to the settings window code increases the upper limit of the UI Scale to 1.5. While it does get written back to the character's config file as 1.5 the code that reads it back in the next time the character is started resets it back to 1.0.  That code is not mod-able.

    All of the following changes are in SettingsWindow.lua
    In the function SettingsWindow.UpdateSliderSettings change the line
    local uiScale =( SliderBarGetCurrentPosition( "UiScaleSliderBar" )/2 )+ 0.5
    to
    local uiScale =( SliderBarGetCurrentPosition( "UiScaleSliderBar" ) )+ 0.5

    In the function SettingsWindow.UpdateSettings change the line
    SliderBarSetCurrentPosition( "UiScaleSliderBar", ( ( SystemData.Settings.Interface.customUiScale - 0.5 )*2 ) )
    to
    SliderBarSetCurrentPosition( "UiScaleSliderBar", ( ( SystemData.Settings.Interface.customUiScale - 0.5 ) ) )

    In the function SettingsWindow.OnApplyButton change the line
    local uiScale =( SliderBarGetCurrentPosition( "UiScaleSliderBar" )/2 )+ 0.5
    to
    local uiScale =( SliderBarGetCurrentPosition( "UiScaleSliderBar" ) )+ 0.5
  • ForeverFunForeverFun Posts: 919

    Can you remove the clamp to max 1.0 in EC, which is being applied to the "custom_ui_scale" configuration element?  (in the player settings file).

    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <CharacterSettings>
    <Version Value="1.3" />
    <Interface custom_ui_scale="1.200000"


    You can create a two action macro for the work-around:

    1. Actions->Other->Command = script SystemData.Settings.Interface.customUiScale = 1.2
    2. Actions->Other->Command = script InterfaceCore.ReloadUI()

  • TimStTimSt Posts: 1,874
    I have figured out a work around to the EC's non-modable code resetting the scale back to 1.

    In the file Interface.lua
    Add the following code near the top
    Interface.customUiScale = 1

    Add the following code to the function Interface.LoadVariables

    Interface.customUiScale = Interface.LoadNumber("CustomUiScale", SystemData.Settings.Interface.customUiScale)

    Add the following code to the end of the function Interface.InterfaceInitialize

    	SystemData.Settings.Interface.customUiScale = Interface.customUiScale
    if ( UserSettingsChanged() ) then
    InterfaceCore.ReloadUI()
    return
    end
    To the file source\SettingsWindow.lua
    Add the following code to the function SettingsWindow.OnApplyButton which includes my previous change
    	local uiScale =( SliderBarGetCurrentPosition( "UiScaleSliderBar" ) )+ 0.5 --changed code
    SystemData.Settings.Interface.customUiScale = uiScale
    --start of added code
    Interface.customUiScale = uiScale
    Interface.SaveNumber("CustomUiScale", uiScale)
    --end of added code


  • DragoDrago Posts: 312
    I've said before... they need to address the aging clients.... Most people are not going to stop upgrading their hardware for the sake of UO.  

    I'm on x2  2K monitors right now but i'm not far away from making 4k jump.

  • Testing involving other observers --

    On a 32" 4k monitor, most are unable to read much of the text from 2 feet away, at default max 1.0 scaling.  

    At 1.2 scaling (fine for me), about 50% of people were unable to read the text.  I think something closer to 1.5 @ 4k may be closer to the intended "physical" dimensions.  (not sure what monitor size, resolution, and effective physical graphic size was targeted when the EC / client was released).

    For grins, I went as high at 10.0 scaling, at which point the chat window text was about half the screen size tall.  Very clear text, due to the scaling in Windows, though.

    Samsung is releasing a raft of 8K displays, and Apple has 5k and 6k displays already (that can be hooked up to PCs with an adapter).

    If broadsword needs screenshots, feel free to PM.
Sign In or Register to comment.