# Xenosaga III Python Extractor
Open up **Xenosaga Episode III: Also sprach Zarathustra** (PS2) on your
computer. Look at the characters in Blender, listen to the soundtrack, read
every line of the script, recolour a character, or translate the whole game
into your own language, even one written in an alphabet the game never had.
 |
 |
 |
KOS-MOS and Shion, taken out of the game with their own animation, shown in Blender |
Hindi subtitles on the opening movie (PS2 emulator, a disc the kit made) |
The game speaking Arabic, letters joined, right to left (a disc the translation editor built) |
## What is this?
A free toolkit that reads your own copy of the game and turns what is inside
into ordinary files: 3D models for Blender, pictures in their real colours,
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 new copies of the discs
with your change in them. It checks every byte it wrote, and it never
touches your originals.
**Bring your own discs.** The kit contains no game data. It reads the USA
discs (SLUS_213.89 / SLUS_214.17), the Japanese discs (SLPS_256.40 /
256.41) and the May 2006 press prototype. Every picture and sound on this
page was made by the kit from the retail discs, 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](https://github.com/LinuxJessi/Xenosaga1PythonExtractor) and
[Episode II](https://github.com/LinuxJessi/Xenosaga2PythonExtractor).
> **Beta: feedback wanted.** Please tell us what breaks, on the
> [issues page](https://github.com/LinuxJessi/Xenosaga3PythonExtractor/issues).
> Reading is tested on all five disc images. Discs written by the kit have
> been played in the emulator in English, Arabic, Hindi, Amharic, Georgian,
> Japanese, French, Spanish, Chinese, Cherokee, Korean, Russian and N'Ko, plus
> a recoloured character. Not played yet: Disc 2 and the disc swap, the
> Japanese discs, the prototype, imported pictures and the battle-screen
> letters. [docs/UPDATES.md](docs/UPDATES.md) says exactly what was tested.
**Contents:** [Getting started](#getting-started) ·
[What you can do](#what-you-can-do) · [Models](#models) ·
[Animation](#animation) · [Changing textures](#changing-textures) ·
[Translating the game](#translating-the-game) ·
[Another alphabet](#translating-into-another-alphabet) ·
[Audio samples](#audio-samples) ·
[Movies, fonts and menus](#movies-fonts-and-menus) · [The window](#the-window) ·
[Other discs](#regions) · [Good to know](#good-to-know) ·
[All the guides](#docs)
## Getting started
**The easy way on Windows: download the app.** From the
[latest release](https://github.com/LinuxJessi/Xenosaga3PythonExtractor/releases/latest),
download `Xenosaga3-Extractor-X.Y.Z-win64.zip`. Everything it needs is
inside. Right-click it, choose *Extract All*, open the folder and
double-click `gui.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*
([why it warns](docs/INSTALL.md#why-windows-warns-the-first-time)).
**On a Mac or Linux**, install Python 3 and double-click `launch.command`
(Mac) or `launch.sh` (Linux); the first time you need to make it runnable
with `chmod +x`. [docs/INSTALL.md](docs/INSTALL.md) has the steps for every
system, including Python on Windows.
The app opens as a page in your web browser that only your own computer can
see. It finds your disc images by itself, tells the USA, Japanese and
prototype discs apart, and shows one card per command
(more [below](#the-window)). A good first run: **region** (which version
each disc is), then **dump**, then **browse**. 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](#translating-the-game).
From a terminal
With Python 3.9 or newer:
```sh
python -m pip install -r requirements.txt # once: numpy, Pillow, capstone, fonttools, uharfbuzz
python cli.py region --iso "Disc 1.iso"
python cli.py dump --iso "Disc 1.iso" --iso "Disc 2.iso" --out out/
python cli.py browse --dump out/dump --stage out/stage --out out/browse
```
`python cli.py --help` explains any command, and
`python cli.py self-test` runs every check the kit has. ffmpeg is used for
sound and movies. Every command, and the kit's older 7-Zip pipeline, are in
[docs/MANUAL-PIPELINE.md](docs/MANUAL-PIPELINE.md). What `browse` writes,
folder by folder: [docs/BROWSING.md](docs/BROWSING.md).
## What you can do
| | What you get | Read more |
|---|---|---|
| **Open the models in Blender** | every model on the disc (1,609 per disc: characters, weapons, E.S., rooms) as 3D files with their textures and a posable skeleton; `blend` even writes a ready-made Blender file | [BLENDER](docs/BLENDER.md), [MODELS](docs/MODELS.md) |
| **Watch them move** | the game's own animations attached to the models: all 5,039 clips per disc read | [MOTION](docs/MOTION.md) |
| **Look at the textures** | every picture painted on the models, maps, effects and menus, as PNG, in the colours the game draws them | [BROWSING](docs/BROWSING.md) |
| **Recolour a character** | change a character's colours in every copy on the disc, seen working in the emulator | [MODDING-CHARACTERS](docs/MODDING-CHARACTERS.md) |
| **Translate the game** | every line of both discs in one page, checked as you type, built into playable discs with one button; 382 languages to choose from | [TRANSLATING-GUIDE](docs/TRANSLATING-GUIDE.md), [LANGKIT](docs/LANGKIT.md) |
| **Use a new alphabet** | Arabic, Hindi, Chinese, Korean, Amharic, Georgian… drawn into the game's own font, and Japanese on the USA discs | [SCRIPTS](docs/SCRIPTS.md), [FONT](docs/FONT.md) |
| **Edit the text by hand** | scenes, menus, the encyclopedia, battle messages and subtitles as plain UTF-8 files, and back into both discs | [TRANSLATING](docs/TRANSLATING.md) |
| **Read the script in order** | every line the scenes show, in play order, with speakers, choices and a sound file for each spoken line | [DIALOGUE](docs/DIALOGUE.md) |
| **Hear the soundtrack** | the 120 music tracks (3.31 hours) as WAV, with their loop points; voices and sound effects too | [MUSIC](docs/MUSIC.md) |
| **Movies and pictures** | the cutscenes as MP4; 1,131 menu pictures and illustrations as PNG, and back | [BROWSING](docs/BROWSING.md) |
| **Replace any file** | swap any file on the disc for your own, in copies of one disc or both; a file that grows is moved to the end of the disc | [REPACK](docs/REPACK.md) |
| **The Japanese release** | read like the USA discs, and lined up with the English script side by side | [below](#regions) |
## Models
Every model on every disc converts. Characters come out with their
skeleton; maps keep their moving parts (ships, rubble, crystals). Each
picture below is one command and a Blender render, nothing touched up.
### Playable characters
|
|
|
|
|
|
|:-:|:-:|:-:|:-:|:-:|
| KOS-MOS | Shion | Jr. | MOMO | chaos |
|
|
|
|
|
|
| Ziggy | Jin | Allen | Canaan | Miyuki |
### Notable NPCs
These are captioned with the disc's own file names.
|
|
|
|
|
|
|:-:|:-:|:-:|:-:|:-:|
| `virhelm00` | `telos00` | `mary00` | `shelley00` | `marglis00` |
|
|
|
|
|
|
| `pelegri00` | `nephilim00` | `sergius00` | `yuriev00` | `albelt00` |
### E.S.
|
|
|
|
|:-:|:-:|:-:|
| `M3asher01` | `M3zebulun01` | `M3reuben01` |
### Environments
| | |
|---|---|
| 
`E3_CIT01` | 
`E3_SYU01` |
| 
`E3_KYM02` | 
`E3_ELS05` |
| 
`E3_KYO06` | 
`E3_HOS01` |
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 **models** card writes every model, **model**
writes one, and **blend** turns one into a Blender file that opens textured
and framed.
```sh
python cli.py browse --dump out/dump --stage out/stage --out out/browse --kinds models # all of them, with their animation
python cli.py model --iso "Disc 1.iso" --path 'mdl\chr\pc\C3kosmos00.chr' --out kosmos.glb
python cli.py blend --glb kosmos.glb --render kosmos.png
```
How to open them in Blender, and what to expect:
[docs/BLENDER.md](docs/BLENDER.md). How the models work:
[docs/MODELS.md](docs/MODELS.md).
## Animation
The game's animations come out too. Every body and face animation on every
disc becomes an action in Blender, attached to the character's skeleton, so
you can press play. A character's own animations are attached
automatically.
On the right, KOS-MOS plays battle animation 21: a leap, a crouching slash,
a lunge and the recovery. At the top of the page, KOS-MOS and Shion play a
field animation that looks like walking, and below, KOS-MOS turns once while
standing ready. The game does not name its animations, so "walk", "attack"
and "stance" are just what they look like.
Two things to know: hair and coats 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.
```sh
python cli.py model --iso "Disc 1.iso" --path 'mdl\chr\pc\C3kosmos00.chr' \
--out kosmos.glb --motion 'pac\bat\C3kosmos00.sme#0,21'
python cli.py motion --iso "Disc 1.iso" --sweep # read every animation on the disc
```
How the animations were decoded and checked: [docs/MOTION.md](docs/MOTION.md).
## Changing textures
Change a character's colours everywhere they appear. The game keeps many
copies of each character on the disc; `chr-iso-sweep` finds and recolours
all of them. On the right is Shion in the Vector S-Line hall, as the game
ships and after a warm recolour, both captured in the emulator from the same
save.
You can also do it by hand: `chr-decode` turns every texture of a model into
PNG, `chr-palettes` exports its colour list as a little swatch picture you
can repaint, and `chr-import-palettes` puts your colours back.
Below, KOS-MOS from the retail disc and from a copy recoloured blue, shown in
Blender after taking her back out of the copy. The blue filter changes her
blue armour trim as well as her hair, so look at the result before you
recolour a whole disc. Step by step:
[docs/MODDING-CHARACTERS.md](docs/MODDING-CHARACTERS.md).

### Textures in their real colours
Many of the game's menu pictures share one picture file and pick their
colours from the game's own drawing code. The kit reads that code, so icons,
portraits, gauges and the title menu come out the way the game draws them.

*Top: what earlier versions produced. Bottom: each icon, thumbnail and
portrait with its own colours.*

| | |
|---|---|
|  |  |
| *Field map textures* | *Effect textures* |
## Translating the game
**The translation editor** is the easy way, for any language. Open it, pick
your discs and a language, and type. It shows every line of both discs,
grouped the way you meet them in the game, checks each line as you type, and
shows how it will look in the game's own font. Press **Build** and you get
copies of Disc 1 and Disc 2 that play in your language. No programming
needed.
* 382 languages to choose from. French works with nothing to set up: the
three letters the font lacks (`œ Œ Ÿ`) are added at the size of the game's
own letters.
* Whole new alphabets (Arabic, Devanagari, Cherokee, Chinese, Korean…) are
drawn into the game's font from a font on your computer. For large
alphabets the build opens the font's kanji rows, which hold thousands of
letters. Arabic and the other joining scripts are drawn joined.
* Dialogue gets a width guide taken from the game's own window code, and
*Wrap to fit* breaks long lines for you.
* Its builds have been played in the emulator in French, Spanish, Korean,
Hindi, Chinese, Cherokee, Russian, Arabic and N'Ko.
 |
 |
| French menus, in the game |
A Spanish cutscene, in the game |
 |
| The editor: every line of both discs grouped the way you meet them, checked as you type, and previewed in the game's own font |
 |
 |
| Setting up a new alphabet |
Traditional Chinese, in the game |
 |
 |
| Korean, in the game |
N'Ko, joined and right to left |
**Start here:** [the beginner's guide, step by step](docs/TRANSLATING-GUIDE.md).
A tour with more pictures: [docs/LANGKIT.md](docs/LANGKIT.md). Every detail
of the editor: [docs/TRANSLATION-EDITOR.md](docs/TRANSLATION-EDITOR.md).
To open it: the **Translation editor** button in the app, or
`translate.command` / `.bat` / `.sh`. Translators can also download it on
its own, as `Xenosaga3-Translation-Editor--win64.zip`, from the
next release on (or build a Mac app with `python build.py --editor`).
**Prefer plain text files?** `text-export` writes every line the game shows
(scenes, menus, the database, battle messages, movie and event subtitles) as
UTF-8 files you can edit in anything, and `text-import` writes them into
copies of both discs, refusing anything the disc's font cannot show
([docs/TRANSLATING.md](docs/TRANSLATING.md)).
## 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, right-to-left lines (checked against
ICU, the standard library for this), and line wrapping. Several scripts can
share one disc. These are all pictures of the game drawing them in the
emulator:
| | |
|---|---|
|  |  |
| *Hindi in a scene's dialogue box* | *Arabic on the "story so far" screen* |
|  |  |
| *Amharic on the save screen* | *Georgian on the "story so far" screen* |
|  |  |
| *Japanese on the USA disc, with letters borrowed from the Japanese font* | *A Hindi place name over the opening* |
Hindi, Amharic and Georgian were put on one disc together (87 new letters)
and play together. The whole procedure: [docs/SCRIPTS.md](docs/SCRIPTS.md);
how the game's font works: [docs/FONT.md](docs/FONT.md).
## Audio samples
Press play. These came out of the kit, from the retail discs. Episode III's
music is recorded, not sequenced, so the songs are the game's own
recordings, as 25-second excerpts. The voice lines are cut from the movies'
own sound at the times in each movie's subtitle file, so music and effects
are mixed in. The picture behind each song is a map from the game, not
necessarily where the song plays.
**M01** · `snd/adx/M01.adx`
https://github.com/user-attachments/assets/e0cb862c-be8e-4197-b58d-556c79cddc70
**M11** · `snd/adx/M11.adx`
https://github.com/user-attachments/assets/79d35e7c-b7df-4461-a5c3-b30c14a78fcd
**M56** · `snd/adx/M56.adx`
https://github.com/user-attachments/assets/e86784f2-aecb-4700-bff2-f38411162d59
**M78** · `snd/adx/M78.adx`
https://github.com/user-attachments/assets/c9093566-eecf-4293-9667-473834b6ad73
**A01** · `snd/adx/A01.adx`
https://github.com/user-attachments/assets/1a15c5c9-aaee-4bbb-9562-ad57c32005dd
**Voices and effects**: "Do it anytime, KOS-MOS!" / "Acknowledged." (movie
`s030100`), "I am order!" / "Not you, KOS-MOS!" (`s031300`), "Fear drives
evolution." (`s083110`, Disc 2), "When Mary fulfills her duty, Zarathustra
shall speak!" (`s093500`, Disc 2), "I am not Mary. I am... KOS-MOS!"
(`s094820`, Disc 2), then a battle callout (`bat_voice/allen_bst1`), a
system jingle (`sys/system01`) and a field sound effect (`CIT.dap` cue 3)
https://github.com/user-attachments/assets/964f542b-da58-4943-b3df-2ce9f2379150
The same clips, and a few more (`B01`, an event voice, a battle sound
effect), are in [docs/samples/](docs/samples/) as MP3 files, and
[docs/gallery/make_audio_videos.py](docs/gallery/make_audio_videos.py) makes
these videos from them. The full sets (all 120 music tracks with their loop
points, 289 battle callouts, 607 sound banks, every movie's sound and every
spoken scene line) come out of your own disc. More in
[docs/MUSIC.md](docs/MUSIC.md).
## Movies, fonts and menus
| | |
|---|---|
|
|
|
| A frame of the opening movie | The Vector S-Line hall in the game itself, for comparison |
|
|
|
| Menu pictures: a background, item icons, the controller | Party portraits from the battle window |
|
|
|
| One page of the game's main font | Four of the 71 pictures behind the "story so far" screen |
|
|
|
| KOS-MOS's textures | Some of the 348 memory-card save pictures |
## The window

The app is a page in your browser that only your own computer can see. It
has one card per command, grouped into sections (Disc, Browse, Models, Text
& translation, Fonts & scripts, Modding, Diagnostics). The panel on the
right lists the discs it found, tells USA, Japanese and prototype discs
apart, and shows which helper programs are installed. *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.)
More: [docs/INSTALL.md](docs/INSTALL.md#what-you-see-when-it-opens).
## Regions
The kit tells by itself which version a disc is
(`python cli.py region --iso X.iso -v` says so out loud and checks it). Give
it Disc 1 and Disc 2 of the same version; the tools that write refuse a
mixed pair.
* **USA discs:** everything on this page.
* **Japanese discs** (SLPS_256.40 / 256.41): read and rebuilt exactly, with
their own text encoding and font rules. 140 scenes exist only in the
Japanese release, and `align-export` puts the Japanese and English script
side by side (as a table, JSON, or a two-language subtitle file). Writing
works on copies; not yet played in the emulator.
* **The May 2006 press prototype:** read like the USA discs; its program
differs from the final game's.
| | USA retail | May 2006 prototype | Japan retail |
|---|---|---|---|
| Boot program | SLUS_213.89 (Disc 1), SLUS_214.17 (Disc 2), same code | SLUS_213.89, different code (sha256 1c3d028a…) | SLPS_256.40 (Disc 1), SLPS_256.41 (Disc 2), same code |
| Language folder | `\us\` (`cf\us`, `mnu\us`, `mov\us`, `jpg\us` …) | `\us\` | `\jp\`; `jpg\`, `ef\map\`, `ef\esp\` and `mnu\pse\` files sit at the folder root (`resolve` handles both) |
| Text encoding | the program's list of two-byte pairs; lone `é`, `ö` … are Latin-1 | same as USA | EUC-JP: any byte from 0xA0 pairs with the next; no half-width kana, no Latin-1 |
| Proportional letters | 0x180 (Latin and symbols) | 0x180 | 0xC0 (kana are fixed width) |
| `Message.Dat` | 933 messages, u32 offsets, strings from 0x2800 | same layout | 871 messages, u16 offsets, strings from 0x800 |
| Subtitles | `mono` allowed | as USA | no `mono`; `mov\jp\bat` files kept within 1 KiB (the developers' own note) |
| Scenes | 715 `.sb` per disc | 886 text objects, as many as USA Disc 1 | 856 (140 of them JP-only, load status unknown) |
| Writing tested on copies | `text-import`, `lang import`, `patch` (in place and grown, pair and single); **played in PCSX2**: same-size, Arabic, `--unlock jp`, grown (Disc 1) | `patch` same size | `text-import`, `patch` (in place and grown); not played |
## Good to know
**Safe by design.** `patch` and the translation tools write into copies,
never the originals, and check every file afterwards. (A few older commands,
`repack-*` and `chr-iso-*`, change an image in place: give them a copy.)
**Still open:**
* Nothing written from Disc 2, the Japanese discs or the prototype has been
played yet, and no battle screen has been captured.
* How much room the game gives each text file when it loads it is not known,
so text that grows past its slot needs `--grow`.
* The animations are not yet compared with the running game, and hair and
coats stay stiff.
* One effect format (`.xep`) is not decoded, and about a fifth of the art on
the battle window sheets still gets its colours from a best guess rather
than the game's code.
The full history, with every detail and test: [docs/UPDATES.md](docs/UPDATES.md).
For the curious, [docs/disc-catalog.md](docs/disc-catalog.md) lists every
kind of file on both discs, what it is, and a few fun finds.
## Docs
| Read this | When you want to |
|---|---|
| [INSTALL.md](docs/INSTALL.md) | install the kit on Windows, macOS or Linux |
| [BROWSING.md](docs/BROWSING.md) | know what the kit writes and where to look first |
| [BLENDER.md](docs/BLENDER.md) | bring the models into Blender |
| [MODELS.md](docs/MODELS.md), [MOTION.md](docs/MOTION.md) | learn how the models, skeletons and animations work |
| [MODDING.md](docs/MODDING.md), [MODDING-CHARACTERS.md](docs/MODDING-CHARACTERS.md) | change the game: recolours, pictures, text, any file |
| [TRANSLATING-GUIDE.md](docs/TRANSLATING-GUIDE.md) | **translate the game into your language, step by step, no programming** |
| [LANGKIT.md](docs/LANGKIT.md) | see the translation editor at work, with pictures from the game |
| [TRANSLATION-EDITOR.md](docs/TRANSLATION-EDITOR.md) | look up every detail of the translation editor |
| [TRANSLATING.md](docs/TRANSLATING.md), [SCRIPTS.md](docs/SCRIPTS.md), [FONT.md](docs/FONT.md) | translate with text files; add a new alphabet; how the font works |
| [DIALOGUE.md](docs/DIALOGUE.md) | get every line in play order, with voice clips |
| [MUSIC.md](docs/MUSIC.md) | get the soundtrack with its loop points |
| [REPACK.md](docs/REPACK.md) | put any file back on the disc |
| [FINDS.md](docs/FINDS.md), [HISTORY.md](docs/HISTORY.md), [disc-catalog.md](docs/disc-catalog.md) | read about curiosities on the discs, and the background |
| [MANUAL-PIPELINE.md](docs/MANUAL-PIPELINE.md) | see every command, and use the older 7-Zip pipeline |
| [FORMATS.md](docs/FORMATS.md) | see how every file is laid out, byte by byte (for tool writers) |
| [CODEBASE.md](docs/CODEBASE.md) | find your way around the code (for programmers) |
| [UPDATES.md](docs/UPDATES.md) | see what changed, and when |
All documents, grouped: [docs/README.md](docs/README.md).
## Credits
By Jessi Ray Godsibb. Originally bootstrapped with ChatGPT; rebuilt around
the corrected disc model.
* **Anzinono**: [xenosaga3-translation-kit](https://github.com/Anzinono/xenosaga3-translation-kit)
(MIT), a German translation kit for the USA discs. `udf.py` ports its UDF
descriptor handling (CRC-CCITT, tag fix-up, partition/integrity/anchor
offsets) from `tools/x3rebuild.py`, so a disc that grows stays readable by
every tool. Its database notes (`docs/formats/datenbank.md`, DBF string
fields 3, 5 and 9-14) confirmed that the 14 mid-string values in
`DBC2.bin` / `njDataText.bin` are numbers. That kit's `xtx.py` is in turn
based on this kit's `xtx_decode.py`.
* **Lybac**: the original Xenosaga III unpack and repack tools, whose LBA
lists (`lba/`) this kit started from.
Xenosaga Episode III 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](https://github.com/LinuxJessi/Xenosaga1PythonExtractor) ·
[Episode II](https://github.com/LinuxJessi/Xenosaga2PythonExtractor)