This repository contains raw data dumps, scripts and processed JSON files related to GTA V's radio stations.
- Root Directory: Contains all Python scripts for parsing, hash reversing, and XML processing.
info_merged.jsonincludes all data from/processedmerged into a single file. /raw: Holds raw XML data parsed from audio metadata files (dat151.rel, dat54.rel, dat4.rel) and AWC files (in/raw/tracks) using CodeWalker. Nametables and global text tables are also extracted with CodeWalker, but some missing nametables are sourced from Monkys-Audio-Research (game.dat151.nametable, sounds.dat54.nametable)/processed: Final JSON output for each DLC, ready for use
Each JSON file in /processed follows this structure:
FlagsValue- Hex string containing unprocessed flagsFlags- List of enabled flag namesGenreAmbientRadioVolRadioName– Alternative to indexTrackLists– Collection of tracklists tied to this stationSpeech- (optional) Dictionary of DJSpeech Context, indexed first by category and then context
DlcPath- (merged JSON only) Absolute path to the DLC's audio folderFlagsValue– Hex string that usually doesn't contain any meaningful flagsCategory– Usage context (e.g., music, id, mono_solo, ad)Tracks– Array of tracks included
Variations- Number of available variationsContainerPath- Absolute path to the speech container
IdDlcPath- (optional) Absolute DLC audio path, if the track is from a different folderTrackList- (optional) Indicates which tracklist this audio is duplicated fromPath– Path relative to the DLC folderDuration– Length of the track (in ms)Intro- (optional) Describes exclusive intro speechesMarkers- Dictionary of:- Track Markers
- Beat Markers
- DJ Markers
- Rockout Markers
Variations- Number of exclusive intro variationsContainerPath- Relative path to the intro container within the DLC
Offset– Timestamp of the marker (in ms)Id- Internal ID for track title/artist lookup from text tableTitle– Track title (for talkshows might beArtistinstead)Artist– Track artist
Offset– Timestamp of the beat (in ms)Value– Beat type
Offset- Timestamp of the marker (in ms)Value- String that describes if an intro or outro is starting or ending ("{intro/outro}_{start/end}")
Offset- Timestamp of the marker (in ms)Value- String"start"or"end"
Requirements:
- Python
>= 3.10 - lxml:
Install with pip:pip install lxml
Usage:
-
main.py- The main entry point. This script processes radio data from the/rawdirectory.
At the bottom ofmain.py, you'll find this line:export_dlc_radio_info(all_stations, dlc)
- First argument: the set of stations to process (defaults to all)
- Second argument: the DLC name to process:
DLC Tag Files Processed "" (empty) game.dat151.rel.xml;sounds.dat54.rel.xml;speech.dat4.rel.xml"dlchei4" dlchei4_game.dat151.rel.xml;dlchei4_sounds.dat54.rel.xml;dlchei4_speech.dat4.rel.xml -
xml_utils.py- Utilities for handling XML- TypeIndex - Caches lookups for XML elements to speed up parsing
- to_dict - Recursively converts an XML element to Python dictionary
- marker_dict_awc() / marker_dict_xml() - Converts marker containers into readable dictionaries
-
hash_utils.py- Utilities for hash operations- HashMap - Loads
.nametableand.gxt2files into a hash lookup table - gxt2_binary - Parses
.gxt2binary files (global text table) and turns them into hash maps - joaat() - Hashes strings using JOAAT (case-insensitive)
- format_hash() / parse_hash_string() - Converts hashes to/from string representations (
1048674328 <=> "hash_3E818018")
- HashMap - Loads
- GTA V Radio implementation repository - HintSystem/GTA-V-Radio