Skip to content

Patch program to upscale The Sims 2's UI for HiDPI displays, with DBPF library and tools

License

Notifications You must be signed in to change notification settings

lah7/sims2-4k-ui-patch

Repository files navigation

4K UI Patcher for The Sims 2

Project Icon

A patch utility to upscale The Sims 2's user interface for HiDPI (2K/4K) displays.

About

Through the use of graphic rules, it's easy to play The Sims 2 at high resolutions, but the buttons, text and interface become super tiny. User interfaces from the 2000s have no concept of high density displays.

This project is a patch utility to upscale the UI resources from your copy of the game to look better on high density displays.

When this project started, there were no 4K modifications out there to fix the UI. I discovered the modularity of the game files enable us to double the UI geometry, graphics, font sizes in various package files.

Does it work?

Yes! This is supported for the retail disc and Ultimate Collection (Origin) releases. There are some imperfections and known issues, like the small pie menus when a lot of options are displayed.

If you spot anything wrong, please check out the issues and report any new bugs.

What about the Legacy Collection?

The Sims™ 2 Legacy Collection (2025 re-release) automatically scales the UI using pixel resolution scaling based on the current resolution. This can cause the UI to look slightly blurry. Under the hood, the UI data is still internally the same.

If you wish to use this mod for improved sharpness and clarity, you'll need to disable the UI scaling feature which was not present in the older releases. Unfortunately, I don't know a way. If you know, please let us know!

The UI scale factor is configurable in this file:

The Sims 2 Legacy Collection\EP9\TSData\Res\Config\Graphics Rules.sgr

There is a line determining the scale. However, 1 is still too large.

uintProp uiScaleFactor 1

In order to use this mod with the Legacy Collection, you need to find a way to force the game to render the UI layer at its original geometry (100%) at 2160p, which should look tiny on a 4K screen. This may not be possible with this game's newer rendering engine.

Patching will double the density and make the UI look huge. As a result, the Legacy Collection release is not supported by this project for the time being.

Unlike the Legacy Collection, setting the UI scale is not possible with this mod, except we have an experimental 150% scaling option (with visual artifacts)

Comparison

The mod makes the UI playable at a 3840x2160 resolution.

Comparing 2160p gameplay before and after patching

Since our patcher modifies the geometry and assets directly, this mod provides a native 4K UI experience, providing much crisper fonts and Sim detail. Up to now, playing in 1080p was the best way to play.

Here's how things compare pixel wise. Click the image to open in a new tab, and switch between them to take a closer look.

Legacy Collection Retail Discs + Patch
Gameplay Menu - Legacy Collection Gameplay Menu - Patched
Lot Info - Legacy Collection Lot Info - After
Dialog - Legacy Collection Dialog - After

To compare 1080p, here are the equivalent images from an unpatched retail game. Zoom these to 200%.

(1080p and the Legacy Collection at 2160p (4K) are identical in terms of UI sharpness. It's not you, the UI isn't as sharp with the 2025 re-release "4K support")

Compatibility

This program is compatible with all original copies of The Sims 2, expansions and stuff packs for PC, and the Life Stories series too.

The Sims™ 2: Super Collection (for Mac) haven't been tested. Do let us know if you have a copy and would like to help investigate!

The Sims™ 2 Legacy Collection is not recommended right now, see above.

Any downloads, mods or custom content that alters the user interface from your The Sims 2 save folder or game installation folder are not yet detected by this program. They will likely break the UI or crash the game. Either:

  • Remove these UI mods (e.g. Clean UI, Starship UI), for now.
  • Hack this code to include them (your mileage may vary)
  • Wait for a newer version which will improve support for UI mods.

Instructions

Your game files are always backed up, so you can revert without reinstalling the game, or to repatch later with a newer version of this program containing fixes and improvements.

By default, the patcher utilises as much CPU as possible to speed up the patching process. About 2 GB of RAM free is a recommended, but more may be needed if your CPU has many threads. You can change the slider if you wish to limit the CPU usage.

The program automatically checks this repository for an update.

For the absolute latest changes before a versioned release, download an artifact from the latest workflow run.

Windows

  1. Download the latest release for Windows from the Releases page.
  2. Extract the contents and run sims2-4k-ui-patcher.exe.
    • You'll need to run as administrator to modify the game files.
    • If you don't want to do that, change the permissions of the folder containing The Sims 2 and its expansions.

To run the program, you may need to install Microsoft Visual C++ Redistributable (x64).

Linux

For users who play The Sims 2 under the Wine+DXVK or Proton compatibility layer.

  1. Download the latest release for Linux from the Releases page.
  2. Extract the contents and run ./sims2-4k-ui-patcher.
    • You may need to mark it as executable first (usually by right clicking → Properties → Permissions tab).

Alternately, see DEVELOPMENT.md for running from the repository. This will provide a better desktop integration.

macOS

We don't have a pre-built binary for macOS, but you can run the Python script directly. See DEVELOPMENT.md for instructions.

This patch program will work fine if you play the game under a Wine compatibility layer. However, if you purchased the The Sims™ 2: Super Collection, we don't know whether files are exposed in a way that is compatible with this program. Please let us know!

Development

See DEVELOPMENT.md for instructions on hacking the code and running from the repository.

Game UI Tips

The game has its own UI debugger built-in. To activate, enable testing cheats globally by adding a line to your latest game's TSData/Res/Config/globalProps.xml file.

<AnyBoolean key="testingCheatsEnabled" type="0xcba908e1">true</AnyBoolean>'
  • CTRL+U opens the UI browser. Click the "?" button for more shortcuts and hints.
  • CTRL+SHIFT+U reloads the UI.

UI Inspector

While developing this project, we developed our own UI inspector program, S2UI Inspector, to aid with the research and analysis for UI scripts, its elements and attributes.

https://github.com/lah7/sims2-ui-inspector

License

GNU General Public License v3 (GPLv3)

Acknowledgements

If you wish to let the wider Sims community know, be sure to leave them a link to this repository!

Thank you to the following:

These wiki pages for documenting the UI, DBPF and compression format:

This implementation of the QFS compression algorithm, which we ported to Python:

And contributors who committed fixes!

About

Patch program to upscale The Sims 2's UI for HiDPI displays, with DBPF library and tools

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •  

Languages