Skip to main content

FourFury

FourFury is a Python library for reading, inspecting, extracting, and editing Grand Theft Auto IV data files. It provides typed APIs for the game's archives, world placements, collision resources, drawables, textures, navigation graphs, animation dictionaries, and related metadata.

[!IMPORTANT] FourFury is under active development. Read support is broader than write support, and some resource types intentionally permit only fixed-size edits.

Format support

Format Read Write Notes
RPF2 Yes Yes Search, extraction, creation, and unencrypted output
RPF3 Yes No Audio archives; hash-only names remain hexadecimal
IMG3 Yes Yes Search, extraction, creation, and resource padding handling
IDE Yes Yes Lossless definitions with typed archetypes, MLO topology, and model-bound 2DFX lights
IPL Yes Yes Lossless sectioned text with typed GTA IV OCCL boxes
gta.dat Yes Yes Lossless level manifests, typed directives, device paths, and multi-path entries
images.txt Yes Yes Ordered archive lists with explicit placement-sidecar modes
water.dat Yes Yes Lossless water triangles and quads, runtime flags, geometry queries, and neutral mesh export
WPL Yes Yes Placements, MLO and IDE-light resolution, explicit LOD hierarchies, world portals, and instance flags
GTXD Yes Yes Texture-parent chains and cycle detection
NOD Yes Yes Navigation nodes, links, costs, and topology validation
WNV Yes Limited Navigation meshes, portals, edges, cover points, and quadtrees
WBN Yes Limited Collision bounds and fixed-size edits
WBD Yes Limited Collision dictionaries and fixed-size edits
TUNE Yes Lossless text Fragment physics source configuration
WAD Yes No Animation dictionaries, tracks, chunks, and decoded channels
WDD Yes No Hash-addressed drawable dictionaries and neutral model projection
WDR Yes No Drawables plus neutral model projection
WFT Yes No Fragment drawables, physics hierarchy, embedded lights, collision bounds, neutral projection, and IDE light binding
WTD Yes No Texture dictionaries and DDS export

See DOCUMENTATION.md for examples, field behavior, writer constraints, and current limitations.

Installation

FourFury requires Python 3.11 or newer. Install the latest release from PyPI:

python -m pip install fourfury

For an editable installation:

git clone https://github.com/Hancapo/fourfury.git
cd fourfury
python -m pip install -e .

Quick start

Open an archive and read one of its entries:

from pathlib import Path

from fourfury import RpfArchive

game = Path(r"D:\Program Files (x86)\Steam\steamapps\common\Grand Theft Auto IV\GTAIV")

with RpfArchive.from_path(game / "pc/data/game.rpf") as archive:
    entry = archive.find_entry("data/taskparams.txt")
    if entry is not None:
        print(entry.read().decode("utf-8"))

Index an entire installation when assets may live in different archives:

from fourfury import GameFileCache, GameFileType

with GameFileCache(game) as cache:
    cache.scan()
    asset = cache.require_asset("bm_nylamp1", kind=GameFileType.WFT)
    fragment = cache.load(asset)

Episode installations can be scanned as effective base-game overlays:

from fourfury import GameEpisode

with GameFileCache.for_episode(game, GameEpisode.THE_LOST_AND_DAMNED) as cache:
    cache.scan()
    city = cache.map_structure
    print(city.summary())
    print(city.delta.changed_paths)

Documentation

The complete documentation covers every supported format, resource APIs, neutral WDR models, editing constraints, and known limitations.

Release notes live in CHANGELOG.md.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fourfury-0.7.1.tar.gz (241.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fourfury-0.7.1-cp311-abi3-win_amd64.whl (223.7 kB view details)

Uploaded CPython 3.11+Windows x86-64

File details

Details for the file fourfury-0.7.1.tar.gz.

File metadata

  • Download URL: fourfury-0.7.1.tar.gz
  • Upload date:
  • Size: 241.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for fourfury-0.7.1.tar.gz
Algorithm Hash digest
SHA256 e2aa27c76d02212747f692d8a49adbda5173bf0d21b5afeced97eb8b90b64c3c
MD5 3f7046875e721094a8b788d8b1d6abe9
BLAKE2b-256 36bf15d9cef23385ebb2842bd69e1fd9ecaa7b8071d84937fa129be1f1d36726

See more details on using hashes here.

File details

Details for the file fourfury-0.7.1-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: fourfury-0.7.1-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 223.7 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for fourfury-0.7.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4c28bdf8b0083a6ee5c8f6e4669902a29775045ef6634c5758f8f48e2d3bb6b0
MD5 97aa5835679954ff223a59bebf2c38a3
BLAKE2b-256 d73a05020c2b007769c836ff365fc7947073865f70e7ef505753b2e15b5ca87d

See more details on using hashes here.

Release history Release notifications | RSS feed

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.0

2 files

0.10.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.0

2 files

0.7.2

2 files

This release

0.7.1 This release

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

1 file

0.1.0

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page