Skip to content

Instantly share code, notes, and snippets.

View SomeKitten's full-sized avatar
🙃
Boop!

Catherine Zacks SomeKitten

🙃
Boop!
View GitHub Profile
@SomeKitten
SomeKitten / fmap_dump.py
Created May 19, 2023 02:12
Extract files from FMapDat.dat found in Mario & Luigi: Dream Team. EXTREMELY FINECKY/HACKY AND UNFINISHED!!!
import os
# EDIT THESE TWO PATHS AS NEEDED
fmap_path = "./FMapDat.dat"
extract_dir = "./extract"
# EDIT THESE TWO PATHS AS NEEDED
os.makedirs(extract_dir, exist_ok=True)
fmap_file = open(fmap_path, "rb")
@SomeKitten
SomeKitten / DreamTeamExtract.py
Last active May 19, 2023 02:10
Extract files from archives found in Mario & Luigi: Dream Team. Likely SUPER finecky!!!
import os
# <MAKE SURE THIS SCRIPT ISNT EXTRACTING TOO MANY FILES, IT DOESNT CHECK TO SEE IF THE DATA IT IS READING IS VALID OR NOT>
# EDIT THESE THREE PATHS AS NEEDED
code_bin_path = "./code.bin"
archive_path = "./BMap/BMap.dat"
extract_dir = "./BMap/extract"
# EDIT THESE THREE PATHS AS NEEDED
@SomeKitten
SomeKitten / bg4_extract.py
Last active February 18, 2026 22:15
Scripts to extract/pack files from/to a BG4 archive. BG4 archives are used in some of the Mario & Luigi games. Make sure to modify the paths at the top of each script as necessary! Files need to be decompressed/recompressed using Backwards LZ77. I found Kuriimu2 to work well for Backwards LZ77.
import struct
import json
import os
# MODIFY THESE
archive_file = "./BAI.dat"
out_dir = "./BAI_CONTENTS/"
entries_json = "./entries.json"
# MODIFY THESE