Skip to content

About

Python-only disc extractor and mod kit for Xenosaga Episode I (PS2, USA, SLUS-20469): textures to PNG, models to glTF for Blender, voice and music to WAV, movies to MP4, JDK 1.1 Java cutscene scripts, translation tools, bootable ISO repacking, local web GUI.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

47 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xenosaga Episode I Python Extractor

Open up Xenosaga Episode I: Der Wille zur Macht (PS2) on your computer. Look at the characters in Blender and watch them move, listen to the soundtrack, read every line of the script, recolour KOS-MOS's hair, 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, each playing clip 1 of the character's field motion pack, rendered in Blender Arabic: the cold-open line, joined and right-to-left, drawn by the game in PCSX2 Hindi: a subtitle the kit burned into the first movie, on a black bar over the English
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 a movie
(burned in by the kit, PS2 emulator)

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, and everything you did not touch stays exactly as it was on the original.

Bring your own disc. The kit contains no game data. It is made for the USA disc (SLUS-20469), and it also reads the Japanese Reloaded disc. 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 II and Episode III. New here? docs/BROWSING.md shows what comes out and which folders to open first.

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

Getting started

The easy way: download the app. From the Releases page, download the bundle for your system and double-click it. Everything it needs is inside; there is nothing else to install.

Windows Xenosaga-I-Extractor-windows/Xenosaga-I-Extractor.exe
Mac Xenosaga-I-Extractor.app (the first time, right-click it and choose Open, because the app is not notarized by Apple)

The app opens as a page in your web browser. It finds your disc image by itself and shows one card for each job, with a live log (more below). A good first run: Extract assets, then Convert for browsing, then open the browse folder it made.

Just want to translate? Since v1.3.0 the download also holds Xenosaga I Translation Editor (Xenosaga-I-Translation-Editor.exe on Windows, a second app on the Mac, kept in the same folder). Double-click it and the translation editor opens straight away. More in Translating the game.

Running from the source code, or from a terminal

From a copy of this repository (Python 3.9 or newer), double-click launch.bat (Windows), launch.command (Mac) or launch.sh (Linux), or run python gui.py. The first time, the launcher installs the three packages in requirements.txt. To translate only, translate.bat / translate.command / translate.sh (or python gui.py --editor) open the translation editor by itself.

From a terminal:

python cli.py extract --iso "Xenosaga Episode I (USA).iso" --out out/ --code
python cli.py classes --iso "Xenosaga Episode I (USA).iso" --out out/
python cli.py browse  --out out/

extract unpacks the disc into out/dump/. classes takes out the cutscene scripts. browse turns it all into out/browse/, the folder you actually open: PNGs, models, WAVs, MP4s and text.

python cli.py self-test runs every check the kit has; with --iso GAME.iso it also proves, without writing anything, that the kit rebuilds your disc's own bytes. python build.py (needs pip install pyinstaller) builds the app yourself and then runs the app's own checks.

What you can do

What you get Read more
Look at the textures every picture painted onto the characters, enemies, mechs, maps and menus, as PNG, plus about 1,400 more from inside effect, scene and menu files; the card game's 117 card faces and the casino's concept sketches too BROWSING
Open the models in Blender every character, enemy, weapon, mech, prop and all 248 maps as 3D files with their textures, and a posable skeleton built from the game's own skeleton files BLENDER, MODELS
Watch them move the game's animations attached to the models: all 4,147 clips on the disc read, with hair, skirts and coats moved by a copy of the game's own simulation MOTION
Recolour KOS-MOS's hair one click; the kit finds all twelve places the texture is stored MODDING
Repaint a texture paint over any PNG and give it back; every copy of the picture on the disc is updated 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, Georgian, Amharic… drawn into the game's own fonts, including the battle screen's; all four seen in the running game SCRIPTS
Subtitle the movies write subtitles in any language and any script, and burn them into the cutscene movies SUBTITLES
Read the script in order 10,561 lines and 1,173 choices, scene by scene, with speakers, story flags and the sound file each spoken line plays DIALOGUE
Read the cutscene scripts the cutscenes are little Java programs; the kit takes them out so you can read them JAVA
Hear the soundtrack the music rendered from the notes and instruments on the disc, as WAV and FLAC, with MIDI and SoundFont files to remix MUSIC
Voices, sounds and movies every voice line and cutscene mix, about 1,500 battle shouts and attack sounds, and the 58 cutscene movies hidden on the disc's second layer, as MP4 BROWSING
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. MOMO chaos Ziggy
KOS-MOS
kosmos
Shion
shion
Jr.
jr
MOMO
momo
chaos
chaos
Ziggy
ziggy

Notable NPCs

These are captioned with the disc's own file names (char\npc\<name>.lex), spelling included.

albelt andrew marglis allen matehws
albelt andrew marglis allen matehws
hammer tonny gaignun helmer
hammer tonny gaignun helmer

Faces up close

The eyes, mouths and eyelashes of every character come out complete.

Face close-ups of KOS-MOS, Shion, Jr., MOMO, chaos, Ziggy, Albedo and Cherenkov rendered by Blender from the kit's files, eyelashes included

Environments

MC_KUK02: a café with a red tiled roof and a wooden deck, a white dome, a monorail ring behind
MC_KUK02
MC_DYU04: a ship's bridge, dark metal floor with a round platform, a curved green screen
MC_DYU04
MC_KUK07: a block of stone buildings with shop fronts, a water tank on the roof, a parked car
MC_KUK07
MC_MIL01: a street between tall grey buildings, blue and white paving, a small station
MC_MIL01
MC_UMN02: a white room with a blue U.M.N. floor emblem and a dish antenna on a mast
MC_UMN02
MC_SYU01: a tall pale green room with consoles, pillars and a bed
MC_SYU01

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. All 248 maps convert; the kit carries no place names, so they are captioned with their file names.

Try it: in the app, Convert for browsing writes every model, and One model with its motion (.glb) writes just one.

python cli.py browse --out out/ --kinds models                                    # every model and map
python cli.py model  --dump out/dump --path 'char\pc\kosmos.lex' --out kosmos.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. Then select the skeleton, go to Pose Mode, grab a bone and turn it. A step-by-step guide, bones and motion included.

KOS-MOS as exported, then posed in Blender through the armature the kit builds from the game's skeleton files

Animation

KOS-MOS playing clip 0 of motion/kosmos_cf.fpk, a standing loop, while the camera circles her once

The game's animations come out too. Each one becomes an action in Blender, attached to the character's skeleton, so you can press play. All 4,147 animations on the disc can be read, and browse attaches them: KOS-MOS alone comes out with 37.

The game moves hair and cloth with its own simulation while it plays, and so does the kit, using a copy of the game's own code. KOS-MOS's hair hangs behind her, and Jr.'s coat swings clear of his legs. There is no wind yet.

On the right, the camera circles KOS-MOS while she stands. Below, KOS-MOS and Jr. run. The game does not name its animations, so "walk", "run" and "stand" are just what they look like. Nobody has compared them side by side with the running game yet.


KOS-MOS running: kosmos.glb playing clip 3 of motion/kosmos_cf.fpk, rendered in Blender Jr. running, his long coat swinging out behind his legs: jr.glb playing clip 3 of motion/jr_cf.fpk, rendered in Blender
KOS-MOS running Jr. running: the coat moves the way
the game's simulation moves it
python cli.py model  --dump out/dump --path 'char\pc\kosmos.lex' --out kosmos.glb \
       --motion 'motion\kosmos_cf.fpk#1,3'
python cli.py motion --dump out/dump --sweep      # read every animation on the disc

How the animations were decoded, straight from the game's own code: docs/MOTION.md.

Changing textures

The disc is friendly to changes. The kit writes them back in place, so everything you did not touch stays byte for byte the same as the original.

Recolour KOS-MOS's hair with one click (Recolor KOS-MOS's hair in the app). Her hair is stored in twelve places on the disc, and the kit finds every one. This was played in the emulator:

KOS-MOS model close-up, recolored hair Battle screen, recolored KOS-MOS landing a HI-CRITICAL

Repaint any texture. Edit the PNGs the kit gave you in any paint program, then give the folder back (Textures: write edited PNGs back in the app). Each pixel takes the nearest colour the game allows in that part of the picture, identical copies of the picture in other files are updated too, and every picture is checked again before anything is written. This has been checked by reading the new disc back, not yet in the game.

python cli.py texture-import --iso GAME.iso --tree out/browse/textures_png --out MODDED.iso
python cli.py patch --iso GAME.iso --out MODDED.iso --set 'chain0:char\pc\kosmos.xtx=my_kosmos.xtx'   # replace any file

How it all works, in enough detail to build on: docs/MODDING.md.

Translating the game

The translation editor is the easy way, for any language. It shows every line on the disc in one page, sorted by type. You type your translation next to the English; it fills in accents for you, 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 lacks are drawn from a font on your computer.
  • Length guides, previews, automatic backups and one Build button.
  • Arabic and N'Ko are drawn with their letters joined, the way they are written; this was seen in the emulator.

The translation editor: places in the game, the English lines, and a translation with its preview in the game's font

The editor: places in the game on the left, the English and your translation in the middle, and on the right a warning that the French line is too wide, with a Wrap to fit button and a preview in the game's font.

Language setup for Polish: 16 extra letters drawn from a font on the computer, a list of fonts that have every letter, and a test sentence in the game's font

Starting a project: pick your language, choose the font the missing letters come from, and see a test sentence in the game's font.

These sample lines were drawn by the editor's Language setup in the game's own font, with the letters it never had added from a font on the computer (editor previews, not pictures from the running game):

Twelve sample lines drawn in the game's font: Chinese, Cherokee, Arabic, Inuktitut syllabics, N'Ko, Tifinagh, Amharic, Georgian, Khmer, Vai, Armenian and Thai

Start here: docs/TRANSLATING.md, a step-by-step guide for beginners. Every detail of the editor is in docs/TRANSLATION-EDITOR.md, and docs/FRENCH-TRANSLATION-GUIDE.md walks through a French translation by hand.

Prefer plain text files? The kit can also write everything as UTF-8 files you can edit in anything, and put them back:

  • Menus, text boxes and mails: text-export / text-import (all 914 text files; every one is checked to fit before anything is written).
  • Cutscene and field dialogue: evt-export / evt-import, any length. The opening tutorial has been played through in French.
  • Menu and battle words inside the game's program: ovl-export / ovl-import.
  • What is covered: text-coverage lists every place the disc keeps text and the tool that writes each one back (MODDING).

Translating into another alphabet

The USA game only knows Latin letters. To show another script, the kit draws the letters your translation needs into the game's own fonts, then writes your text using them. It handles the hard parts for you: letters that change shape when joined, right-to-left lines and line wrapping. The battle screen's separate font gets new letters too. These are pictures of the game drawing them in the emulator, from a disc the kit rebuilt:

Hindi: KOS-MOS confirming the battle program, drawn by the game from a rebuilt font Georgian (Mkhedruli): KOS-MOS's command bars in the battle screen's own font
Hindi in a dialogue box Georgian on the battle screen
Amharic: a U.M.N. mail Hindi: a subtitle the kit burned into the first movie, on a black bar over the English
Amharic in a mail Hindi movie subtitles

Joined letters. Arabic and N'Ko letters are meant to touch. The game drew a small gap on each side of every letter; the kit now closes it. Before on the left, after on the right:

Arabic before and after: letters that join now touch, in a cutscene subtitle, the field window, the load screen and a prompt; N'Ko in the same places

The whole procedure: docs/SCRIPTS.md. Several of the formats behind it were first worked out by poketony for the Korean translation XS1KOR.

Audio samples

Press play. These all came out of the kit, from the USA disc. The disc stores its music as notes and instruments, not as recordings, and the kit plays them the way the game does (a recreation by the kit, not a recording of the console). These are the five different pieces the disc holds, as 25-second excerpts; the titles are the ones written inside each music file. The picture behind each song is a map from the game, not necessarily where the song plays.

Battle1 · BATTLE1

bgm_battle1.mp4

LastBattle · BATTLE3

bgm_lastbattle.mp4

Escape! · ENV_KUK03B

bgm_escape.mp4

U.M.N.Mode · ENV_UMN

bgm_umn_mode.mp4

Jingle2 · JINGLE1

bgm_jingle2.mp4

A voice line and battle shouts: a line from the streamed cutscene audio (sound/vda/s191008.vds), then Jr., KOS-MOS, MOMO and Ziggy's attack and boost shouts (yamamoto/snd/sed)

voices_and_shouts.mp4

The same clips are in docs/samples/ as MP3 files, and docs/gallery/make_audio_videos.py makes these videos from them. The full set (every song, all 103 voice streams, every battle sound) comes out of your own disc. How the music was brought back to the right tempo, and the composer's name hiding in the files: docs/MUSIC.md.

Movies, fonts and menus

A frame from movie 1001_1: Shion at a console, with the burned-in subtitle Hmm... Menu pictures: the MAIL, DATABASE, EVS and PLUGIN icons, the casino exchange window, the battle commands and a casino portrait
A frame of the first Woglinde movie (1001_1) Menu pictures: the U.M.N. icons, the casino exchange window, the battle commands, a casino portrait
font0 glyph sheet 0: symbols, Latin, kana, Greek, Cyrillic and kanji The title screen
One page of the game's main font The title screen, one of the full-screen pictures
KOS-MOS's texture page from char/pc/kosmos.xtx, enlarged KOS-MOS hair and face textures, blue before and pink after
KOS-MOS's textures, enlarged The hair recolour preview: before and after

The window

The kit's window: a card per job, the Extract assets card open, the environment panel on the right

The app is a page in your browser that only your own computer can see. Each job has a card, numbered in the order you would usually use them: browse the disc, extract it, convert it, render the soundtrack, then the cards that change the game (recolour, text, dialogue, new alphabets, subtitles, textures). Show command prints the command line a card will run, for anyone who wants to learn the terminal way. The Translation editor button at the top opens the editor. (The disc in this picture is an empty stand-in.)

Other discs

python cli.py region --iso GAME.iso says which version a disc image is, and what the kit has been checked with on it.

  • USA disc (SLUS-20469): everything on this page.
  • Japanese Reloaded disc (SLPS_290.05): lists, extracts and exports its text, fonts and dialogue, and it is where the translation editor reads the Japanese original from.
  • The kit's writing tools were proven on the USA disc. No disc written from another version has been played, and the 2002 Japanese original has not been tried at all. If something breaks, please open an issue with the exact error.

Good to know

How the disc is put together, in three sentences. All the game data sits in a few big files, read end to end as "chains" with a table of contents at the front. The second layer of the DVD is not in the file system at all: it holds 58 cutscene movies the game plays by position, and the kit finds them by scanning. About 2,100 files are compressed with Monolith's own scheme, and the kit's compressor rebuilds them exactly, which is what makes clean changes possible. (The full story: docs/FORMATS.md.)

Treats for the curious. The game's programs still carry their function names, the cutscenes are compiled Java 1.1, and the disc shipped eight developers' personal working folders, test maps and all (docs/FINDS.md, docs/HISTORY.md).

Still open: comparing the animations and the maps with the running game, wind in the hair and cloth, and the last map textures (one map's textures are stored somewhere not yet found, and two maps have 4-bit textures). The full history: docs/UPDATES.md.

Docs

Read this When you want to
BROWSING.md know what the kit writes and where to look first
BLENDER.md, MODELS.md bring the models into Blender; learn how the models and skeletons work
MOTION.md learn how the animations work, and what was checked
MODDING.md change the game: recolours, textures, any file, text coverage
TRANSLATING.md translate the game into your language, step by step, no programming
TRANSLATION-EDITOR.md look up every detail of the translation editor
FRENCH-TRANSLATION-GUIDE.md translate by hand with text files, step by step
SCRIPTS.md translate into a script the game never had
SUBTITLES.md add subtitles to the cutscene movies
DIALOGUE.md read the game's dialogue scene by scene
JAVA.md read the cutscene scripts
MUSIC.md play and remix the soundtrack, and read how it was brought back
FINDS.md, HISTORY.md enjoy the leftovers and the history the disc records
MANUAL-PIPELINE.md see how you would make KOS-MOS's hair pink with no kit at all, using a hex editor
ARABIC-TRANSLATION-SPEC.md read the original right-to-left design notes
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, and when

Credits

The decompression, the texture layout and the model format were first learned from Lakuwu's xenotool and written again here, with credit where each piece is used in docs/FORMATS.md. The font files' layout, the rules for resized cutscene scripts, the mail files' pointer table and the idea of moving grown files rather than rebuilding the disc were first worked out by poketony for XS1KOR, the Korean translation of the Japanese release, and written again here for the USA disc; how the game addresses its font, orders its letter slots and spaces its letters was read from the game's program for this kit. The compressor, the table of contents, the hidden-layer movie finder, the Java script finder, the audio and music decoders, the menu-colour and model-texture work, and the whole writing layer were worked out for this kit.

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

Sibling kits: Episode II · Episode III

About

Python-only disc extractor and mod kit for Xenosaga Episode I (PS2, USA, SLUS-20469): textures to PNG, models to glTF for Blender, voice and music to WAV, movies to MP4, JDK 1.1 Java cutscene scripts, translation tools, bootable ISO repacking, local web GUI.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages