Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Enclave Text and Font Tools

Small Python tools for preparing CJK text support for Enclave.

Tool Purpose
build_font_full.py Builds a larger Clairvaux.xfc font texture.
dlg_to_stringtable.py Moves dialogue text into StringTable_Eng.txt.

Note

Generated files are written to workspace/output. Original files in workspace/src are not modified.

Contents

Requirements

  • Python 3.9 or newer
  • Pillow

Install Pillow once:

python -m pip install Pillow

Run all commands from the folder containing the scripts.

Folder setup

Copy the original game files into workspace/src:

Show the expected folder structure
workspace/
|- charset.txt
|- Font.ttf
`- src/
   |- Dialogues/*.xrg
   |- fonts/Clairvaux.xfc
   `- registry/StringTable_Eng.txt

charset.txt contains the characters to add to the font. The font script reads workspace/Font.ttf; keep this filename unless you edit the script.

Important

Back up the original game files before installing generated files.

1. Build the font

Run:

python .\build_font_full.py

The script:

  1. Reads the original Clairvaux.xfc.
  2. Adds characters from workspace/charset.txt using workspace/Font.ttf.
  3. Generates a 2048x2048 font texture and mipmaps.
  4. Writes the result to workspace/output/Fonts/Clairvaux.xfc.

It also creates a preview image:

workspace/output/_preview/Clairvaux_2048.png

Check the preview before using the generated font in the game.

2. Convert dialogue text

Run:

python .\dlg_to_stringtable.py

The script scans all UTF-16LE dialogue files matching:

workspace/src/Dialogues/*.xrg

For each non-empty *TEXT "..." line, it creates a string key using the section-sign-plus-L prefix. Example:

\u00A7LDLG_DLG_VATAR_000

The dialogue line is changed to use that key, and the original text is added to:

workspace/output/registry/StringTable_Eng.txt

Converted dialogue files are written to:

workspace/output/Dialogues/

Tip

Lines that already contain a key with the same prefix are skipped, so the converter can be run again safely.

Installing the output

After checking the generated files, copy them into the matching SBZ1 folders:

Generated file Game location
output/Fonts/Clairvaux.xfc SBZ1/Fonts/Clairvaux.xfc
output/Dialogues/*.xrg SBZ1/Dialogues/
output/registry/StringTable_Eng.txt SBZ1/registry/StringTable_Eng.txt

Warning

Do not delete the original files. Restore the backup if the game does not start or text is displayed incorrectly.

Troubleshooting

Common problems
Problem Solution
Missing Clairvaux.xfc Place it in workspace/src/fonts/.
Missing charset.txt Place it directly in workspace/.
Missing Font.ttf Place it directly in workspace/.
No dialogue files found Place .xrg files in workspace/src/Dialogues/.
StringTable encoding error Save the file as UTF-16LE with a BOM.

About

Steam Enclave(253980) Tools

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages