Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Maps a PS2 disc's files, unpacks CRI AFS and table-of-contents archives into editable folders, and repacks them with your edits.
32% 100%+68 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 7 of 22 without it.
3 of 3 safety checks passed
Not used yet
The Level Designer maps a game's data and gives you a way in. A PS2 disc is a folder of files: the ELF,
IRX modules, and data, usually a few huge archives that hold every level, model, texture and sound.
datascan.py tells you what each file is, finds the table of contents inside an archive, splits it
into files you can edit, and puts it back together so the game still reads it. Then the port loads
your edited archive straight from the extracted disc folder, with no ISO to rebuild.
Be honest with the user: every game's level format is its own. This tool gives the map and the knife (what the files are, how the archives split, which bytes changed). Working out what the bytes inside a level mean is per game: diff two levels, diff before and after an in-game change, and read the loader in Ghidra. Compressed or encrypted archives (high entropy everywhere, no table found) need the game's own decompressor found in its code first.
${CLAUDE_SKILL_DIR} below is this skill's folder (where this SKILL.md lives).
python3 "${CLAUDE_SKILL_DIR}/datascan.py" scan console/disc/ --sort size --embedded # map the disc
python3 "${CLAUDE_SKILL_DIR}/datascan.py" files console/runs/<newest>.log # files the port looked up
python3 "${CLAUDE_SKILL_DIR}/datascan.py" unpack console/disc/DATA/STAGE.AFS --out console/levels/STAGE
python3 "${CLAUDE_SKILL_DIR}/datascan.py" diff console/levels/STAGE/files/0003_ST01.DAT console/levels/STAGE/files/0004_ST02.DAT --as f32
python3 "${CLAUDE_SKILL_DIR}/datascan.py" strings console/disc/SLUS_203.12 --grep .afs
python3 "${CLAUDE_SKILL_DIR}/datascan.py" repack console/levels/STAGE --out console/levels/STAGE.AFS
Other flags: --json everywhere; scan --min-size N; unpack --format afs|toc --layout KIND --header N --force-toc; repack --layout auto|keep|pack --force; diff --gap N --max N; strings -n N --encoding ascii|sjis|utf16le|all --max N. Exit codes: 0 ok, 1 needs attention (no table found, an
entry outgrew its slot, a missing disc file; for diff, the inputs differ), 2 bad input.
| path | what |
|---|---|
| the extracted disc folder | read only: scan, unpack, strings, diff never change it |
a runtime log (console/runs/*.log) | files reads the [sceCdSearchFile:ok] and sceCdSearchFile failed: lines |
console/levels/<NAME>/files/ | the unpacked entries, numbered in archive order (0003_ST01.DAT) |
console/levels/<NAME>/index.json | format, table layout, alignment, offsets, slot sizes, hashes: everything repack needs |
console/levels/<NAME>/_header.bin, _extra_*.bin | the archive's header bytes and any bytes outside the entries, kept so a repack is exact |
--out of repack | the rebuilt archive (refuses to overwrite an existing file without --force) |
Next to this one in the catalogue, plus more from the same author.