zDialogueToExcel is a simple utility tool (written using ChatGPT in Python) for extracting, organizing, and formatting dialogue data from Gothic engine .d script files. It converts in-game conversations into structured, multi-sheet Excel spreadsheets, making them easy to review, annotate, and edit.
You can find the example of the program being used here, on my Google Drive.
- Supports multiple input directories (
Input_Gothic,Input_Gothic2,Input_NotR) - Automatically groups dialogue lines by character
- Handles multiple dialogue files for the same character
- Merges same-named
.dfiles across folders (e.g.DIA_Diego.dfrom Gothic2 and NotR)
- One
.xlsxfile per character, with each input folder as a separate sheet - Filename is based on the dialogue file name (e.g.
DIA_BDT_1081_Wache.d→BDT_1081_Wache.xlsx) - Custom mappings supported via
config.yaml(optional)
Each spreadsheet contains the following columns:
| Column | Description |
|---|---|
Output Name |
Tag string used in AI_Output |
What character says |
The spoken dialogue from the script |
Who says it |
The speaker in the line (e.g. self) |
Chapter |
(empty, for manual use) |
Condition |
(empty, for manual use) |
- Column widths match a manual reference layout
- Header row:
- Bold text
- Light gray background
- Cell formatting:
- Column A: bold
- Column B: italic
- Column C: rows highlighted in green if spoken by
self, blue if byheroorother
- All cells:
- Vertically centered
- Wrapped text
- Dotted borders for all inner cells
- Thick border around the outer edge of the table
- Frozen header row for easy navigation
- Python 3.7+
- pandas
- openpyxl
- pyyaml
Make sure you have the required libraries:
pip install pandas openpyxl pyyamlThen run the script:
python extract_dialogues_formatted.pyAll output .xlsx files will appear in the Output/ folder.
You can optionally create a config.yaml to manually map .d filenames to character names and/or for merging dialogue:
# config.yaml
DIA_Diego.d: Diego
DIA_BDT_1081_Wache.d: WacheUse Google Drive’s import option to convert .xlsx files into Google Sheets format for online collaboration.