Skip to content

About

Python-only disc extractor and mod kit for Xenosaga Episode II (PS2, USA/JP): textures to PNG, rigged and animated models to glTF for Blender, KORG music rendered like the PS2, voices, movies, scene scripts, full-text translation incl. new alphabets, ISO patching, local web GUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

96 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xenosaga Episode II Python Extractor

Open up Xenosaga Episode II: Jenseits von Gut und Böse (PS2) on your computer. Look at the characters in Blender, listen to the music, read every line of the script, repaint a texture, or translate the whole game into your own language, even one written in an alphabet the game never had.

KOS-MOS and Shion walking: the kit's .glb files, animated with clip 1 of each character's motion file, rendered in Blender An Arabic line in the field message box, drawn by the game from a font the kit rebuilt A Hindi subtitle over the opening movie, drawn by the game
KOS-MOS and Shion, taken out of the game
with their own animation, shown in Blender
The game speaking Arabic, right to left
(PS2 emulator, a disc the kit made)
Hindi subtitles on the opening movie
(the same disc)

What is this?

A free toolkit that reads your own copy of the game and turns what is inside into ordinary files: pictures you can open in any image viewer, 3D models for Blender, music and voices you can play, movies, and the game's text as plain text you can edit. When you change something, the kit writes a new copy of the disc with your change in it. It checks every byte it wrote, and it never touches your original.

Bring your own discs. The kit contains no game data. You need the USA discs (SLUS-20892 and SLUS-21133); the Japanese discs and the Xenosaga Freaks demo can be read too. Every picture and sound on this page was made by the kit, or captured from the game running in PCSX2 (the PS2 emulator) from a disc the kit changed. Nothing is retouched.

An AI project, made for people. This kit was built with the help of AI, and its whole purpose is to make human work possible: your own translations, mods, art, videos and research. The goal is for more people to do more things with Xenosaga, and to carry it to every corner of the world in their own languages. It is not here to replace translators with machine translation. AI projects don't have to be anti-human; this one is for the people who love the game.

This kit has two siblings, built the same way: Episode I and Episode III. New here? The tour shows everything the kit does, with real examples.

Contents: Getting started · What you can do · Models · Animation · Changing textures · Translating the game · Another alphabet · Audio samples · Movies, fonts and menus · The window · Other discs · Good to know · All the guides · Fun facts

Getting started

The easy way: download the app. On the Releases page, download Xenosaga-II-Extractor-win64.zip (Windows) or Xenosaga-II-Extractor-macos.zip (Mac). Everything it needs is inside; there is nothing else to install.

  • Windows: right-click the zip, choose Extract All, open the folder and double-click Xenosaga-II-Extractor.exe. The first time, Windows may say "Windows protected your PC", because the app is not signed by a paid certificate. Click More info, then Run anyway.
  • Mac: the first time, right-click the app and choose Open.

The app opens as a page in your web browser. It finds your disc images by itself and shows one card for each job (more below). A good first run is the three Start here cards, in order: Unpack the discs, Check the unpacked files, Convert to files you can open. Then open the browse folder it made.

Just want to translate? Double-click translate.command (Mac), translate.bat (Windows) or translate.sh (Linux), and the translation editor opens on its own. More in Translating the game.

Running from the source code, or from a terminal

From a copy of this repository, double-click launch.command (Mac), launch.bat (Windows) or launch.sh (Linux), or run python gui.py. The first time, the launcher installs what it needs into a .venv/ folder. python build.py --editor builds the translation editor as an app of its own, and python build.py --all builds both apps.

From a terminal (Python 3.9 or newer):

python -m pip install -r requirements.txt     # once: numpy, fontTools, uharfbuzz
python cli.py dump    --iso "Disc 1.iso" --iso "Disc 2.iso" --out out/ --code
python cli.py browse  --out out/

dump unpacks both discs into out/dump/, with a list of every file in out/manifest.csv (9,043 on the two USA discs). browse turns that into out/browse/, the folder you actually open; --kinds picks only some parts (textures,models,xtx,fonts,text,scripts,audio,music,images,movies,small). python cli.py verify --out out/ re-checks a dump against its list. ffmpeg is used for movies and voices when it is found.

python cli.py self-test runs every check the kit has. python cli.py tx-selftest --iso "Disc 1.iso" checks the translation editor against your disc (about five minutes), and python cli.py tx-cache shows or clears the editor's cache. What browse writes, folder by folder: docs/BROWSING.md.

What you can do

What you get Read more
Look at the textures every picture painted onto the game's models and maps, as PNG: 65,938 of them, named the way the artists named them (shion00_hair, kosmos00_face) BROWSING
Open the models in Blender all 944 models (characters, enemies, rooms) as 3D files, with their textures, and a posable skeleton for 562 of them BLENDER, MODELS
Watch them move the game's own animations attached to the models: all 4,340 clips on the disc read MOTION
Repaint a texture paint over any PNG, give it back, and get a disc copy with your picture in every place the game keeps it MODDING
Recolour a character a quick colour shift of named textures (KOS-MOS's hair, pink), with a before-and-after preview MODDING
Translate the game every line in one page, checked as you type, built into a playable disc with one button; 382 languages to choose from TRANSLATING
See a line in the game press ▶ In game on a line: PCSX2 starts on your patched disc at a checkpoint just before that scene (checkpoints are recorded while you play) TRANSLATION-EDITOR
Use a new alphabet Arabic, Hindi, Korean, Amharic… drawn into the game's own font; Arabic, Hindi and Amharic seen in the running game ALPHABETS
Edit the text by hand all the game's text as plain UTF-8 files and back: dialogue, menus, battle names, quests, subtitles, the save prompts MODDING
Read the script in order 8,318 lines of dialogue in play order, with speakers and choices; subtitles as .srt; a sound file for each spoken line DIALOGUE
Read the scene scripts the 465 little programs that run each scene, turned into readable text SCRIPTS
Hear the music the 31 field and menu songs as MIDI, with the game's own instruments as a SoundFont, and as a WAV played the way the PS2 plays it MUSIC
Sound effects and movies 3,733 sound effects as WAV; the cutscenes as MP4 BROWSING
Fonts, menus and the battle screen the game's letters, menu pictures and battle-screen pieces as PNG, and back MODDING, FORMATS
Replace any file swap any file on the disc for your own; a file that grows is moved to the end of the disc MODDING

Models

Every picture below is a model the kit wrote, opened in Blender and rendered, with the textures exactly as the game stores them. The figures stand in their resting pose here; the next section shows them moving.

Playable characters

KOS-MOS Shion Jr. Jin Chaos MOMO Ziggy
KOS-MOS
kosmos00
Shion
shion00
Jr.
jr00
Jin
jin00
Chaos
chaos00
MOMO
momo00
Ziggy
ziggy00

Notable NPCs

These are captioned with their file names; the kit does not carry character names for them.

albelt00 gaignun00 yuri00 febronia00 kirsch00
albelt00 gaignun00 yuri00 febronia00 kirsch00
helmer00 miyuki00 virgil00 pope00
helmer00 miyuki00 virgil00 pope00

Environments

E2_MIL12
E2_MIL12
E2_MOM11
E2_MOM11
E2_KUK06
E2_KUK06
E2_UZU01
E2_UZU01
E2_SUI06
E2_SUI06

The maps are seen from above at an angle, with the sky and the outside of the walls hidden so you can see into the rooms.

Try it: in the app, the Convert to files you can open card writes every model; Export one 3D model for Blender writes just one.

python cli.py browse --out out/ --kinds models          # all of them, with their animation
python cli.py model  --iso "Disc 1.iso" --path 'model\char\pc\kosmos00.pxy' --out kosmos00.glb   # just one

In Blender, choose File ▸ Import ▸ glTF 2.0, pick the .glb file, and switch the view to Material Preview to see the textures. docs/BLENDER.md walks you through it and lists the three things that surprise people the first time.

Animation

KOS-MOS and Shion playing clip 1 of their field motion files, rendered in Blender from the kit's .glb files

The game's animations come out too. Every body and face animation becomes an action in Blender, attached to the character's skeleton, so you can press play. All 4,340 animations on the disc can be read, and 142 models get theirs attached automatically.

On the right, KOS-MOS and Shion play the first clip of their field animation files, straight from the kit's files. The game does not name its animations, so "walk" is just what this one looks like.

Two things to know: hair, coats and skirts stay stiff, because the game moves them with a physics simulation the kit does not have yet; and nobody has compared the animations side by side with the running game yet.

python cli.py model --iso "Disc 1.iso" --path 'model\char\pc\shion00.pxy' --out shion00.glb \
       --motion 'motion\shion00.xap#0,1,2' --motion 'yamamoto\mot\shio00.xap#0,1' --face

How the animations were decoded and checked: docs/MOTION.md.


Changing textures

Paint over any picture the kit gave you, in any paint program, or inside a model in Blender, and hand the folder back. The kit finds what you changed and writes it into a new copy of the disc.

The game keeps the same picture in several places. KOS-MOS's hair, for example, is stored in four files, each with its colour list somewhere else. The kit changes every copy, and it keeps the colours other pictures share intact. Before the new disc gets its name, the kit reads back everything it wrote and checks that your pictures, and only your pictures, changed.

KOS-MOS from the retail disc and from the modded copy, front and back, rendered in Blender after re-extracting the copy

Close-up: the pink hair, the green arms and the yellow ring on her chest

The title menu sheet, retail and with the words tinted gold

Both pictures were taken back out of the changed disc, not from the edited files: KOS-MOS's hair turned pink in all four of her texture files, green arms and a yellow ring painted on in Blender, and the title menu's words tinted gold. This disc copy has not been played in the emulator yet; the older recolor command's gold title menu has.

cp -R out/browse edited/                                           # paint in the copy
python cli.py texture-import --iso "Disc 1.iso" --tree edited/ --dry-run
python cli.py texture-import --iso "Disc 1.iso" --tree edited/ --out modded.iso --preview prev/

The first command line only reports what would change; the second writes the new disc and a folder of previews. The rules (colour lists, see-through parts, models from Blender): docs/MODDING.md.

Translating the game

The translation editor is the easy way, for any language. It shows every line of the game in one page, sorted by where it appears and who says it. You type your translation next to the English; it checks each line as you type and shows how it will look in the game's own font. When you are done, press Build and you get a disc that plays in your language. No programming needed.

  • 382 languages to choose from, from French to Cherokee.
  • Letters the game's font lacks (French œ, Polish ł…) are added for you, at the size of the game's own letters. A whole new alphabet is drawn from a font on your computer.
  • Length guides, automatic backups, and a Check project button that looks over everything before you build.
  • Projects in Hindi, Chinese, Cherokee, Arabic and Korean were built with it and played in the emulator. Arabic and N'Ko are drawn with their letters joined, the way they are written.
Korean in the Episode I data prompt, with Yes and No Korean in the opening scene
Korean menus Korean in the opening scene
Arabic and N'Ko lines in the game, the letters joined Korean in the first field window
Arabic and N'Ko, joined Korean in a field window

The translation editor: places in the game, the English field dialogue, and a French line with its warning and preview in the game's font

The editor: places in the game on the left, the English and your translation in the middle, a preview in the game's font underneath.

Language setup for Polish: 16 letters the game font lacks are added from DejaVu Sans, which comes with the kit, with a test sentence drawn in the game's font

Starting a project: pick your language, and the editor says which letters it will add and shows a test sentence in the game's font.

Start here: docs/TRANSLATING.md, a step-by-step guide for beginners. Every detail of the editor is in docs/TRANSLATION-EDITOR.md.

To open it: the Translation editor button in the app, or translate.command / .bat / .sh. It will also be a download of its own (Xenosaga-II-Translation-Editor) from the next release on.

Two discs, one translation. Disc 1 and Disc 2 share almost all their text; only the movie subtitles differ. Translate Disc 1, export your work, and import it into a Disc 2 project.

Prefer plain text files? text-export writes every kind of text as UTF-8 files you can edit in anything, and text-import puts them back, refusing any line that would not fit or that the font cannot draw. text-coverage lists every place the game shows text and which tool writes each one (MODDING). The editor uses the same code underneath.

Translating into another alphabet

The USA game only knows Latin letters. To show another script, the kit draws the letters your translation needs into empty slots of the game's own font, then writes your text using those slots. It handles the hard parts for you: letters that change shape when joined (Arabic), right-to-left lines, and line wrapping. When a language needs more letters than the font has room for (Korean, Chinese), the build opens up extra rows of the font, up to 3,255 letters.

To prove it works, a test disc with Arabic, Hindi, Georgian and Amharic was built and played in the emulator. These are pictures of the game drawing them:

Arabic: a two-line message in the field box, right to left Hindi: a line of a real-time cutscene, centred
Arabic, two lines in the field message box Hindi, a line in a cutscene
Amharic: the save screen's title Amharic: the Saving message from the executable
Amharic, the save screen's title Amharic, the "Saving..." message

The 144 glyph cells lang-scan drew for the LANGTEST disc: Arabic, Devanagari, Georgian and Ethiopic

On the right are the 144 letters the kit drew into the font for that test disc. You can also preview a line without starting the game:

lang-preview output: an Arabic field line, a Hindi subtitle, the Amharic Saving message and a Georgian name


What did not work yet: the party names in the field menu stay blank in any new script, and the battle screen was not reached in the test. The whole story, step by step: docs/ALPHABETS.md. This works on the USA discs only.

Audio samples

Press play. These all came out of the kit, from Disc 1. The five songs are 25-second excerpts of the game's music played through its own instruments, the way the PS2's sound chip plays them (a recreation by the kit, not a recording of the console). The last clip has three spoken lines and two sound effects. The picture behind each song is a map from the game, not necessarily where the song plays.

001 Milchia · music/001_milchia

bgm_001_milchia.mp4

005 Morgenröte · music/005_morgenroete

bgm_005_morgenroete.mp4

009 Lost Jerusalem · music/009_lost_jerusalem

bgm_009_lost_jerusalem.mp4

103 Kukai · music/103_kukai

bgm_103_kukai.mp4

111 Moby-Dick · music/111_moby-dick

bgm_111_moby-dick.mp4

Voices and effects: "KOS-MOS…", "Thank you." (event S05_06_05), "Oh, be a man already!" (event S05_02_00), and sound effects CFS00004 and CFS00010

voices_and_effects.mp4

The same clips are in docs/samples/ as MP3 files. How close the music comes to the real console, and where it still differs: docs/MUSIC.md. The full sets (every song, every sound bank, every spoken cutscene line) come out of your own disc.

Movies, fonts and menus

A frame from the opening movie Two citizen portraits, a dialogue-box sheet and the title menu words
A frame of the opening movie Menu pictures: citizen portraits, window pieces, the title menu words
font0 glyph sheet 0 The Story So Far screen
One page of the game's main font "The Story So Far", one of the full-screen pictures
KOS-MOS hair, body, face, eye, arm and leg textures KOS-MOS hair and face textures, blue before and pink after
KOS-MOS's textures, enlarged A recolour preview: her hair, before and after

The window

The kit's window: a card per command, the dump card open, the environment panel on the right

The app is a page in your browser that only your own computer can see. It has one card per job, grouped by goal: Start here (unpack the discs, check them, turn them into files), then looking at one thing, changing pictures, changing text and fonts, translating into a new alphabet, and tools for developers. Each card says in plain words what it needs and what it makes, and afterwards shows where the result went, with a button that opens the folder. Cards that change the game are marked "new disc copy". The panel on the right lists the discs it found. Show command prints the command line a card will run, for anyone who wants to learn the terminal way. (The discs in this picture are empty stand-ins.)

Regions and the demo disc

The kit tells by itself which version a disc is (python cli.py region --iso DISC.iso says so out loud). Give it Disc 1 and Disc 2 of the same version; mixing versions gets a warning.

  • USA discs: everything on this page.
  • Japanese discs (SLPS_253.68 / .69): read like the USA discs, and their text can be edited in place. New alphabets do not work there yet.
  • Xenosaga Freaks (SLPS_253.53) carries a 2004 demo of Episode II. The kit finds it, unpacks it and shows its scripts, which still hold their Japanese text (docs/SCRIPTS.md).

The differences file by file are in docs/FORMATS.md.

Good to know

Safe by design. Every change goes into a new copy of the disc, never the original. A copy is either complete and checked, or not written at all.

What has been played in the emulator: subtitles and lines in new scripts, the translation editor's builds (Hindi, Chinese, Cherokee, Arabic, Korean), the gold title menu, and a file moved to the end of Disc 1.

Not yet played in the emulator: the KOS-MOS texture demo, the animations, most text edits besides subtitles, a dialogue file that grows, and the large-alphabet mode beyond the first field window (no battles, shops or Disc 2 yet).

Known gaps:

  • Translation: the name card on the main menu, the window titles and the NO DATA tile use a small second font with Latin letters only, so new scripts show blank there (the editor warns you). The battle screen is untested. Right-to-left menu lines stay on the left unless the game centres them.
  • Animation: hair and cloth stay stiff, and some animation files are not paired with a model automatically (MOTION).
  • Models: whether they come out mirrored, and the exact colours, have not been compared with the game (BLENDER).
  • Textures: ten menu sheets that use several colour lists still come out grey or garbled (FORMATS).
  • Text: movie subtitles can only grow by a few letters each. Words drawn into pictures and movies (like the staff roll) cannot be changed with text tools.
  • Music: a few effects of the sound driver (slides between notes, some volume sweeps, loop points) are not recreated yet (MUSIC).

The full list, with the details: docs/UPDATES.md and each guide's own "limits" section.

Docs

Read this When you want to
TOUR.md see everything the kit does, with real output
BROWSING.md know what the kit writes and where to look first
BLENDER.md bring the models into Blender
MODELS.md, MOTION.md learn how the models, skeletons and animations work, and how each part was checked
MODDING.md change the game: textures, text, the game's own messages, any file
TRANSLATING.md translate the game into your language, step by step, no programming
TRANSLATION-EDITOR.md look up every detail of the translation editor
ALPHABETS.md translate into a script the game never had
DIALOGUE.md get every line in play order, with subtitles and voice clips
SCRIPTS.md read the scene scripts
MUSIC.md play the music and see how close it comes to the console
FUN-FACTS.md read sixty-odd things the disc gives away: staff folders, a quest you cannot fail, an unused hard-disk installer
FINDS.md, HISTORY.md read about curiosities left on the disc, and the background
FORMATS.md see how every file is laid out, byte by byte (for tool writers)
CODEBASE.md find your way around the code (for programmers)
UPDATES.md see what changed, release by release

Credits and licence

MIT licence (LICENSE). This kit borrows from its two siblings, and each borrowed file names its source at the top. From the Episode I kit: the disc reader, the decompression (first learned from Lakuwu's xenotool), the letter-drawing and text-shaping code (glyphs.py, langpack.py) and the reader behind exetext.py. From the Episode III kit: the texture decoder txy.py (from its chrtex.py), the colour maths of recolor, and udf.py, which keeps a grown disc readable by every tool; its disc-descriptor handling is ported from Anzinono's xenosaga3-translation-kit (MIT). Text shaping uses HarfBuzz through uharfbuzz, fonts are read with fontTools, and the models were checked with the Khronos glTF validator and Blender.

Xenosaga Episode II was made by Monolith Soft and published by Namco. This project is not affiliated with either and contains no game data.

Sibling kits: Episode I · Episode III

About

Python-only disc extractor and mod kit for Xenosaga Episode II (PS2, USA/JP): textures to PNG, rigged and animated models to glTF for Blender, KORG music rendered like the PS2, voices, movies, scene scripts, full-text translation incl. new alphabets, ISO patching, local web GUI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages