How to Fix Resolution Issue in Hard West

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

Version

At the time of writing, 2024-01-04, the game version I am working with is as follows:

  • Ingame label: v1.5
  • Build ID: 2221372 (23 October 2017)
  • Depot ID: 307671 (Hard West Windows 64-bit)
  • Manifest ID: 4355398337640179647 (22 June 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 me — the game only offers one resolution well above my native.

They should’ve put “FullHD (1920×1080) monitor only” in 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?
Well, sucks to be you. See, 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, on the other hand. 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, however, 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…

The solution

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

While…

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…

if (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 fact…

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

This Xdelta version 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 back — run the integrity check in Steam’s game properties.

This guide about Hard West was written by Gness Erquint. You can visit the original publication from this link. If you have any concerns about this guide, please don't hesitate to reach us here.

About the author