Skip to content

Work in progress patch program to upscale The Sims 2's UI for 2K/4K displays

License

Notifications You must be signed in to change notification settings

lah7/sims2-4k-ui-patch

Repository files navigation

Project Logo

4K UI Patcher for The Sims 2

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.

There were no 4K modifications out there to fix the UI. However, I discovered the modularity of the game files allows us to double the UI geometry and graphics, such as fonts and various .package files.

This project is a patcher program to automatically upscale UI resources from your copy of the game.

Does it work?

Yes, but there's few visual UI glitches that may degrade the gameplay experience!

If you've like to get involved, check out the issues or report any glitches. Some things are still misaligned or could be improved. Still a work in progress!

Compatibility

This program is compatible with all copies of The Sims 2, expansions and stuff packs for PC, and likely the Life Stories series too. The Sims™ 2 Legacy Collection and The Sims™ 2: Super Collection haven't been tested.

Any downloads or custom content that alters the user interface from your The Sims 2 save folder or game installation folder are not yet patched by this program. It is recommended to disable/uninstall these mods until this is integrated, but you can hack the code to include them[1]

It seems that The Sims™ 2 Legacy Collection (2025 re-release) is scaling the UI using pixel resolution scaling, but under the hood, it's still at its original scaling. Since our patcher modifies the geometry and assets, ours is native 4K UI, providing much crisper fonts and Sim detail.

Instructions

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

While patching, you should have at least 2 GB of RAM free. It may take a while to complete, depending on the performance of your CPU.

The program automatically checks this repository for an update, to ensure you have the latest version.

Windows

  1. Download the latest windows-x64 asset 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 your EA GAMES directory, usually at C:\Program Files (x86)\EA GAMES.
  3. Click "Patch"!

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/Proton compatibility layer. It works well with DXVK!

  1. Download the latest linux-x64 asset 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).
  3. Find your "EA GAMES" directory, e.g. a wine prefix at ~/.wine/drive_c/Program Files (x86)/EA GAMES.
  4. Click "Patch"!

macOS

We don't have a pre-built binary for macOS, but you can run the Python script directly. See Development 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

This project is written in Python. To start hacking, clone this repository and set up a virtual environment to install requirements.txt.

Python 3.10 is the minimum supported version.

For Windows, install Python 3.12, and run:

python -m venv venv
venv\Scripts\activate
pip install --upgrade pip
pip install -r requirements.txt
python sims2_4k_ui_patcher.py

For Linux, your distribution likely already has Python 3 installed:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python3 sims2_4k_ui_patcher.py

Alternatively, you could use your system's interpreter by installing packages that provides the dependencies (names vary by distro):

python-requests python-pillow python-pyqt6

For macOS, install Python 3.12, and run:

python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
python3 sims2_4k_ui_patcher.py

Tests

Unit tests check everything is in working order.

You'll need to copy a file from The Sims 2 University into the tests/files folder:

724723ddc5b020a55bdefc60a7cf1304    The Sims 2 University/TSData/Res/UI/ui.package

File not included. With this file present, you can locally run the tests:

python -m unittest discover ./tests/

This checks the modules and compression procedures are working correctly.

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!