Skip to content

Instantly share code, notes, and snippets.

@ryandagg
ryandagg / parser-json.rb
Last active June 13, 2025 23:41
decode Diablo II's CubeMain.bin, write to JSON
# modified from https://gist.github.com/jankowskib/f886f087d9cb1f578284
# works for at least...
# % ruby --version
# ruby 2.7.7p221 (2022-11-24 revision 168ec2b1e5) [arm64-darwin24]
# usage:
# ruby parser-json.rb ./cubemain.bin somewhere/else/cubemain.json
# ^ assumes you named this file "parser-json.rb", otherwise change the command to match