How to Fix Resolution Issue in Hard West

You have an unusual monitor and this game had you going blind. Come on inWe’ll try and figure something out.

버전

글을 쓰는 시점에서, 2024-01-04, the game version I am working with is as follows:

  • Ingame label: v1.5
  • Build ID: 2221372 (23 십월 2017)
  • Depot ID: 307671 (Hard West Windows 64-bit)
  • Manifest ID: 4355398337640179647 (22 6월 2017)

Further updates are unlikely.

The problem

People have complained on forums, begged the developers to allow adjusting the UI and especially font size.

The issue affects both people with gigantic monitors as well as people with tiny monitors like me.

The developers remain hellbent on not fixing the mess and suggest people lower the resolution, which isn’t even an option for methe game only offers one resolution well above my native.

They should’ve putFullHD (1920×1080) monitor onlyin the system requirements.

Allow me to demonstrate

The code

What we have

Long story short, after inspecting the code, it seems like the developers had three main targets:

  • Seems like the game was initially developed for 1600×900 as the internal layout target.
  • Seems like coming to release they decided to target 1920×1080 and upscale the UI to that.
  • Any resolutions under 1280×720 are hidden from the options menu dropdown.

Those numbers are hardcoded with inline literal constants all over the code.
Quite a horrendous mess.

And the config file, while plaintext, does not carry an option for display resolution, to add insult to injury. It’s all decided on the fly in runtime.

Have a different monitor theoretically perfectly capable of displaying this game?
잘, sucks to be you. 보다, there’s an intricate balance between:

  • Allowing users to perform basic configuration.
  • Safeguarding the numerous FullHD users from accidentally setting a sub-optimal resolution.

The choice is obvious, don’t you agree? How could they risk allowing the normie to ruin their experience of the game? Minorities don’t matter, 반면에. You don’t matter.

What I tried

Not gonna lie, I tried fixing the font scaling and it mostly worked with some minor overflow but otherwise very clearly readable text, yet that introduced a tough to hunt down bug where the text on some of the buttons would vanish entirely. I’ve canned that project for now.

What I did

The least I could do, 하지만, is enable all resolutions your video driver exposes to be chosen in settings. That’s what I did and that alleviated the issue just enough to let me bear with the game, even if still squinting a little.

I wish to share this small mercy with my tiny screen brethren.

What I didn’t

I could do a whole BepInEx Harmony injector IL runtime patch extravaganza, but it’s too much bother for a game without a real modding scene.

Maybe convert it later if needed

해결책

We’re going to patch the game.

If you’re still unfamiliar with how Unity works, the actual executable game code is contained in a .NET/Mono assembly at

SteamLibrary\steamapps\common\HardWest\HardWest_Data\Managed\Assembly-CSharp.dll

하는 동안…

SteamLibrary\steamapps\common\HardWest\HardWest.exe

is just a generic Unity launcher with the icon replaced.

Onto patching

You can use different approaches to retrace my steps.

Pick your poison.

In assembly

If you know your way around .NET assembly, you can use something like dnSpy[github.com] to edit the

만약에 (Screen.resolutions[i].width >= 1280)

condition out of

CFGOptionsPanel#Start

or just set the inline literal constant to 1 as the safest option.

Perhaps the most elegantly done by setting

IL_012E: ldc.i4.1

사실은…

In a hex editor

The minimal edit would involve writing only two bytes:

0x0457AE: 0x17
0x0457B0: 0x00

So if you’re able to hex-edit a file, this is your best and simplest patching method.

With a premade binary patch

이것 Xdelta 버전 3.0.11 patch file, once applied to the original game assembly will alter it to the state achieved with the hex edit described above.

Of course there’s more metadata in the file than the payload, sheesh

Back up your assembly by renaming it to something like

Back up your assembly by renaming it to something like

Assembly-CSharp.dll.BAK

Apply the patch with some variation of

xdelta3.exe -d -s Assembly-CSharp.dll.BAK Assembly-CSharp.dll.xdelta Assembly-CSharp.dll

Adjust the paths to something appropriate. The patch will refuse to apply to the wrong file.

If you’re not comfortable with a terminal, go find a GUI frontend to xdelta.

Perhaps something like Delta Patcher, except this one isn’t a frontend anymore, but a reimplementation in the latter versions. Should probably work as well.

If you somehow manage to lose your original assembly and want it backrun the integrity check in Steam’s game properties.

이 가이드는 Hard West 에 의해 작성되었습니다 Gness Erquint. 여기에서 원본 간행물을 방문할 수 있습니다. 링크. 이 가이드에 대해 우려 사항이 있는 경우, 주저하지 마시고 연락주세요 여기.

저자 소개