mhif 0.6.0

Download Roblox assets referenced by Roblox files
Documentation

mhif

mhif downloads Roblox assets referenced by .rbxm, .rbxmx, .rbxl, and .rbxlx files.

Usage

npm install --global @unrealworks/mhif # you can also build from source if you want...

mhif my-roblox-file.rbxmx

mhif my-roblox-file.rbxmx --out-dir extracted --verbose

mhif my-roblox-file.rbxmx --jobs 8

mhif my-roblox-file.rbxmx --roblosecurity .roblosecurity

mhif my-folder-with-a-lot-of-roblox-files

Flags

  • --out-dir DIR - Output directory for downloaded assets. Will output to DIR/<asset_id>/asset.<ext>. Defaults to mhif/ in the current working directory.
  • --jobs N - Maximum number of asset downloads to run concurrently. Defaults to 4.
  • --roblosecurity FILE - Use the Roblox security cookie in FILE for authenticated asset downloads. If not provided, mhif will attempt to discover a cookie from the Roblox client or browser. The explicit cookie file may contain either the raw cookie value or a .ROBLOSECURITY=... assignment; keep it private.
  • --verbose - Print discovered, downloaded, cached, and failed asset details.

Authentication

Asset delivery is attempted anonymously first. If Roblox returns 401 or 403, mhif retries with a cookie discovered through rbx_cookies.

Note that mhif will reuse work, so you do not need a cookie after you are done downloading your assets.

Library

We expose separate options for extraction caching and downloads:

use mhif::{
	download_assets, extract_asset_ids_with_options, DownloadOptions, ExtractionOptions,
};

let extraction_options = ExtractionOptions::new().with_cache_directory("mhif");
let extraction = extract_asset_ids_with_options("place.rbxlx", &extraction_options)?;

let download_options = DownloadOptions::new("mhif").with_jobs(8);
let report = download_assets(&extraction.asset_ids, &download_options)?;
println!("downloaded {} assets", report.downloaded);