Tools to extract assets from Myth: The Fallen Lords (TFL) and Myth II: Soulblighter (SB) tag files.
These are the currently included scripts, please file an issue if you have ideas for any more.
This is a replacement for UnTag among others.
List and export tag files from TFL or SB monolithic tag containers (e.g. artsound.gor or international large install).
Usage: python3 mono2tag.py <mono_file> [<type> <id> [<output_file>]]
mono_file: path to monolithic tag containertypeANDid: optional — must be provided together to export a specific tag. If omitted, just list all tags without exportoutput_file: optional — defaults to./tags/[game_ver]-[tagid]
This is a replacement for Soundblighter among others.
Exports AIFC (AIFF-C, compressed sound file format) from TFL or SB soun tag files. Note that sound tags can contain multiple permutations. Each permutation is exported as a separate file.
Usage: python3 tag2aifc.py <input_file> [<output_file>]
input_file: path to individual tag file extracted from monolithic tag container (withmono2tag.py)output_file: optional — defaults to./output/aifc/[game_ver]-[tagid][-n].aifcwhere-nis a permutation number prefix if there are more than 1
See docs/SoundTagNarrationFormat.txt and the source code for detailed notes on the binary format.
AIFF file format described here: https://www.mmsp.ece.mcgill.ca/Documents/AudioFormats/AIFF/AIFF.html
Exports 32-bit alpha PNG from TFL or SB .256 or d256 (aka collection) tag files. Note that collections can contain multiple image. Each image is exported as a separate file.
Usage: python3 tag2png.py <input_file> [<output_file>]
input_file: path to individual tag file extracted from monolithic tag container (withmono2tag.py)output_file: optional — defaults to./output/png/[game_ver]-[tagid][-n].pngwhere-nis a bitmap number prefix if there are more than 1
Script environment variables:
DEBUG_COLL=1prints lots of extra debug image parsing output
See docs/256TagCollectionFormat.txt and the source code for detailed notes on the binary format.
Extracts and lists glyph information from font tag files.
Usage: python3 tag2font.py <input_file>
input_file: path to individual tag file extracted from monolithic tag container (withmono2tag.py)
See docs/FontTagFormat.txt and the source code for detailed notes on the binary format.
Loads all the core tag archives and optionally a plugin from a SB game directory and lists all levels and tags
Usage: python3 loadtags.py <game_directory> [<plugin_names> ...]
game_directory: path to a Myth game directoryplugin_names: optional — if provided loads tags from named plugins
Prints the headers of a mesh tag, or tags
Usage: python3 mesh2info.py <game_directory> [<level> [<plugin_names> ...]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_names: optional — if provided can load meshes from named plugins
Prints all markers from a mesh tag
Usage: python3 mesh2markers.py <game_directory> [<level> [<plugin_names> ...]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_names: optional — if provided can load meshes from named plugins
Script environment variables:
DEBUG_MARKERS=1prints extra debug marker parsing output
Prints map scripting actions from a mesh tag
Usage: python3 mesh2actions.py <game_directory> [<level> [<plugin_names> ...]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_names: optional — if provided can load meshes from named plugins
Script environment variables:
DEBUG_ACTIONS=1prints extra debug action parsing output
Runs a map scripting actions terminal browser for a mesh tag. requires windows-curses on Windows
Usage: python3 action_browser.py <game_directory> [<level> [<plugin_name> ...]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_names: optional — if provided can load meshes from named plugins
Script environment variables:
DEBUG_ACTIONS=1prints extra debug action parsing outputDEBUG_MARKERS=1prints extra debug marker parsing output
Outputs pregame text data from a mesh tag
Usage: python3 mesh2text.py <game_directory> [<level> [<plugin_name> [<plugin_output>]]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_name: optional — if provided can load meshes from the named pluginplugin_output: optional - if provided specifies the output directory name to use instead of the plugin name
Script environment variables:
TIME=1prints extra debug timing output
Fixes mesh actions by removing any unused data stored at the end of the action buffer and fixing header offsets and sizes. Outputs to ./output/fixed_mesh_actions/meshes/[mesh_name]
Usage: python3 fixmeshactions.py <game_directory> [<level> [<plugin_names> ...]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can bemeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_names: optional — if provided can load meshes from named plugins
Script environment variables:
DEBUG_ACTIONS=1prints extra debug action parsing output
Fixes plugin entrypoints by looking up the description tag from the level mesh
Usage: python3 fixentrypoints.py <mono_file> [<output_path>]
mono_file: path to monolithic tag container (plugin file)output_file: optional — defaults to./output/fixed_entrypoints/<mono_file_name>
Load Myth TFL game tags and convert text and stli tags for a given mesh to Myth II format.
Also maps to the tag ids used by the ports of TFL to Myth II. Outputs to ./output/fixed_tfl_mesh_text/local
Usage: python3 tflmeshtext2sb.py <game_directory> [<level>]
game_directory: path to a Myth TFL game directorylevel: can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguous
Script environment variables:
TIME=1prints extra debug timing output
Prints the headers of a detail collection (d256) tag
Usage: python3 d256info.py <game_directory> [<tag_id> [<plugin_names> ...]]
game_directory: path to a Myth game directorytag_id: optional — if omitted lists the names and ids of d256 tags. can beallto iterateplugin_names: optional — if provided loads tags from named plugins
Lists collection mismatches for a given level/mesh
Usage: python3 collmismatch.py <game_directory> [<level> [<plugin_names> ...]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_names: optional — if provided loads tags from named plugins
Prints the headers of a mons tag, or tags
Usage: python3 mons2info.py <game_directory> [<mons_id> [<plugin_names> ...]]
game_directory: path to a Myth game directorymons_id: optional — if omitted lists the names and ids of all mons tagsplugin_names: optional — if provided loads tags from named plugins
This replaces some functionality of Chaos.
Recursively extracts all referenced tags from a mesh to a local tree. Outputs to ./output/mesh2tags/[mesh_name]
Usage: python3 mesh2tags.py <game_directory> [<level> [<plugin_names...>]]
game_directory: path to a Myth game directorylevel: optional — if omitted just lists all levels. can beallto iterate endpoints ormeshid=<mesh_id>if the level you want isn't numbered or ambiguousplugin_names: optional — if provided loads tags from named plugins
This replaces some functionality of Chaos.
Recursively extracts all referenced tags from a tag into a local tree structure Outputs to ./output/tag2local/[tag_type]/[tag_id]
Usage: python3 mesh2tags.py <game_directory> <tag_type> <tag_id> [<plugin_names...>]
game_directory: path to a Myth game directorytag_type: 4 character tag type, e.g.unit,arti, etctag_id: 4 character tag id, e.g.spid,24am, etcplugin_names: optional — if provided loads tags from named plugins
DEBUG=1prints extra debug output
The goal for this project is to provide tools that are designed to be self contained and run on all architectures for many years to come without dependencies or the need for a build step.
Written in python (a readable and widely used programming language) and open sourced under an MIT license to make it easy to learn from and adapt without restrictions.
There have been tools like this before but they historically become incompatible with modern hardware, and with no source code available, are effectively lost to time.
Initially developed with python 3.13.1 on macOS Sequoia 15.2. Please file an issue if it doesn't work on your platform.
These tools were initially developed without access to the Myth source code figuring things out in a Hex editor. Later development was informed by the source code for Chaos by TarousZars and further information from Project Magma and Oak developers.
- hexfiend_templates/ — Basic Binary Templates for HexFiend (macOS) that parse the top level TFL and SB tag header (doesn't show tag specific headers yet). Copy these to
~/Library/Application Support/com.ridiculousfish.HexFiend/Templates