SC4Mapper is a SimCity 4 region import/export tool. This repository is a modernization of the original SC4Mapper-2013 by Wouanagaine and JoeST, updated to run on current Python and wxPython with less build and install friction.
This modernization was carried out primarily using OpenAI Codex and Claude Code, supervised and verified by a human maintainer.
- Ported to Python 3 and wxPython 4.
- Replaced native extension modules with pure Python/NumPy:
qfs.pyreplaces the oldQFScompression extension.terrain.pyreplaces the oldtools3Dterrain rendering extension.
- Reorganized into a standard
src/sc4mapper/package layout. - Added a test suite covering QFS round-trips, city save fixtures, terrain rendering, and DBPF save round-trips.
- Replaced the old installer/batch packaging flow with a PyInstaller build.
Install uv, then:
uv sync
uv run sc4mapperThe editable settings file is config/SC4Mapper.ini. It contains the default
import/export/save folders and the terrain colour palette. Paths may use
{documents}, {home}, and {config} placeholders.
uv sync --group dev
uv run pytestuv sync --group build
uv run pyinstaller --clean --noconfirm SC4Mapper.specWindows — copy the config folder alongside the executable, then zip:
Copy-Item -Recurse -Force config dist/SC4Mapper/config
Compress-Archive -Path dist/SC4Mapper -DestinationPath SC4Mapper-windows.zipmacOS — copy config into the app bundle, then archive:
cp -R config dist/SC4Mapper.app/Contents/MacOS/config
ditto -c -k --sequesterRsrc --keepParent dist/SC4Mapper.app SC4Mapper-macos.zipLinux — copy config alongside the executable, then archive:
cp -R config dist/SC4Mapper/config
tar -czf SC4Mapper-linux.tar.gz -C dist SC4MapperPushing a tag matching vYYYY.Nsuffix (for example v2026.1a) triggers a
GitHub Actions release build. Windows is the required artifact. macOS and Linux
builds are experimental and attached when they succeed.
The app bundle is ad-hoc signed but does not carry an Apple Developer certificate. Remove the quarantine flag once after unzipping:
xattr -rd com.apple.quarantine SC4Mapper.appsrc/sc4mapper/— application sourcesrc/sc4mapper/assets/— bundled city templates and splash imageconfig/SC4Mapper.ini— user-editable defaults and terrain palettescripts/run_sc4mapper.py— PyInstaller entry pointtests/— regression tests
See license.txt.