Automated Linux setup for SimCity 4 Deluxe Edition using Wine, Ansible, and shell scripting
- Shell 82.6%
- Makefile 9.4%
- Jinja 8%
Wine 11.13 uses wow64 mode; WINEARCH=win32 prevents prefix init and game startup. Removed from: - playbooks/templates/launcher-multi.sh.j2 - scripts/launch.sh - playbooks/install.yml environment block xrandr detection also needed || true to avoid silent failure under set -euo pipefail when no display is available. |
||
|---|---|---|
| inventory | ||
| mods | ||
| playbooks | ||
| scripts | ||
| .gitignore | ||
| AGENTS.md | ||
| ansible.cfg | ||
| Makefile | ||
| README.md | ||
SimCity 4 Deluxe — Linux Install & Modding
Automated installation of SimCity 4 Deluxe Edition on Debian 13+ and Arch Linux using Ansible, Wine, and a curated mod collection.
Supports single-user (game in ~/.wine-sc4/) and multi-user shared
(game in /opt/sc4/, auto-initialized per-user prefixes).
Quick Start
Single-user (Debian)
sudo make deps # Install Wine + 32-bit support
make prefix # Create Wine prefix + registry tweaks
make game # Download + extract game from S3
make mods # Install all mods
make launch # Play!
Multi-user (Arch Linux)
make deps-shared HOST=archbox
make prefix-shared HOST=archbox
make game-shared HOST=archbox
make launcher-shared HOST=archbox
Any user on the machine runs sc4-launcher — their Wine prefix is auto-created
on first launch from a shared template.
Requirements
- Debian 13+ or Arch Linux (x86_64)
- NVIDIA GPU with proprietary driver (recommended)
- Network access to Garage S3 mirror (
http://10.32.70.16:3900) - 4 GB free disk space
Project Structure
├── ansible.cfg
├── inventory/hosts.ini # Local + archbox (10.32.55.31)
├── dist/ # Game tarball (for S3 upload / local cache)
├── mods/ # Committed mod files (~16MB)
├── playbooks/
│ ├── install.yml # Ansible: system + game + mods
│ ├── vars/{Debian,Archlinux}.yml
│ └── templates/
├── scripts/
│ ├── fetch-game.sh # Download game tarball from S3
│ ├── package-game.sh # Build game tarball from working install
│ ├── fetch-mods.sh # Mod downloader
│ └── launch.sh # Game launcher
├── Makefile
├── AGENTS.md # Full developer docs
└── README.md
OS-Specific Package Management
| Debian | Arch Linux |
|---|---|
sudo make deps |
make deps-shared HOST=archbox |
wine, wine32, wine64 |
wine (monolithic) |
dpkg --add-architecture i386 |
Multilib in pacman.conf |
locale-gen sv_SE.UTF-8 |
/etc/locale.gen + locale-gen |
Game Archive Pipeline
The game is distributed as a pre-installed tarball from Garage S3. Build it once on a machine with the game installed, then deploy anywhere:
make package # dist/sc4-deluxe-installed.tar.gz
make upload # → s3://la-commerce-storage/sc4-game/
Mods
| Mod | Source | Type |
|---|---|---|
| SC4Fix | GitHub | Bug fixes, crash prevention |
| SC4CPUOptions | GitHub | Single-core, priority tweaks |
| SC4AutoSave | GitHub | Auto-save every 10 min |
| SC4DBPFLoading | GitHub | 90% faster startup |
| SC4GraphicsOptions | GitHub | DirectX, custom resolution |
| SC4FullScreen32Bit | GitHub | 32-bit color fullscreen |
| SC4DisableNetworkConstructionSounds | GitHub | Removes jackhammer loop |
| Gizmo Day-Night Mod v2.0 | SC4Evermore | Dark realistic nights |
| Gizmo Ground Fog | SC4Evermore | Atmospheric ground fog |
| Gizmo Weather | SC4Evermore | Rain/cloud effects |
| Gizmo Effect Props | SC4Evermore | 50+ LE effects |
| Fantozzi Audio Essentials | SC4Evermore | Custom query sounds |
| NAM 49 | SC4Evermore | Transportation overhaul |
| Sudden Valley Terrain | SC4Evermore | HD ground textures |
| Gobias HD Water | SC4Evermore | HD water colors |
| CycledoGG Trees | SC4Evermore | Tree controllers |
| SPAM | Simtropolis | Agricultural overhaul |
Language
Swedish locale (sv_SE.UTF-8) is generated on the system. The launcher sets
LANG=sv_SE.UTF-8 for Wine locale reporting.
Mod Targets
make mod-sc4fix # Individual mod
make mod-fog
./scripts/fetch-mods.sh essential # DLL fixes only
./scripts/fetch-mods.sh polish # Audio/visual
./scripts/fetch-mods.sh all # Everything
./scripts/fetch-mods.sh essential --repo # Download to repo for committing
S3 Mirror (Garage)
| Service | Bucket | Endpoint |
|---|---|---|
| Game archive | la-commerce-storage/sc4-game/ |
http://10.32.70.16:3900 |
| Mod cache | la-commerce-storage/sc4-mods/ |
http://10.32.70.16:3900 |
See AGENTS.md for full architecture, workflows, and known issues.