Skip to content

Instantly share code, notes, and snippets.

@cabalex
cabalex / zstd_repacker.py
Last active July 19, 2021 23:34
Astral Chain PKZ repacker made in Python. Requires the Zstandard Python library (obviously). For more modding stuff, visit https://cabalex.github.io/astral-extractor/
import zstandard
import os
import sys
import math
from struct import unpack, pack
print(
"--- ASTRAL EXTRACTOR PKZ REPACKER ---",
"\nMade by Cabalex - Companion program to the Astral Extractor",
@cabalex
cabalex / xml_unpacker.py
Last active February 20, 2023 04:59
Basic XML unpacker written in Python for usage with textures like FNF's
"""
Python script to extract images from XML/PNG pairs (I've used it for FNF)
Scans the "d" directory for any XML and PNG pairs, and if it finds them, creates a new folder in the "out" directory with the same name as the images
Note that it won't output images in the "d" directory if they have no corresponding XML file
Requires os, PIL, BeautifulSoup, lxml (html reader for BeautifulSoup) and re
"""
# Change this to the game's images folder (the one with the textures and XML files).
d = r"C:\Funkin-master\assets\week7\images"
@cabalex
cabalex / extract_ptd.py
Last active May 31, 2021 05:30 — forked from Xzonn/extract_ptd.py
Astral Chain PTD text
"""
--- NOTE ---
This python script is now irrelevant, as PTD extraction and repacking is built into my Astral Extractor with v0.10.0+.
This script only unpacks the values; Astral Extractor unpacks the keys and additional values as well. It also allows for complete
repacking, should you be interested in modding the game. Check it out!
https://cabalex.github.io/astral-extractor/
"""