- Rust 76%
- Slint 22.4%
- Shell 1.6%
| .cargo | ||
| packaging | ||
| src | ||
| tests/data | ||
| ui | ||
| .gitignore | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| PKGBUILD | ||
| README.md | ||
uboat-settings-editor
A small native editor for U-Boat mod settings .xlsx files. Lists every
parameter from the file grouped by /Section, lets you toggle booleans as
checkboxes and edit other values as text, and writes the file back with
surgical edits — only the value cells you actually changed are rewritten;
everything else in the workbook (styles, column widths, the description
column, blank separator rows, section headers, shared strings you didn't
touch) is passed through untouched.
Built with Rust + Slint. Runs on Linux and Windows; the Linux build is primarily targeted at KDE Plasma but works on any desktop.
Build prerequisites
- Rust 1.85+ (2024 edition).
rustupis the easy way. - Optional: Qt 6 development package if you want the native Breeze look
on KDE. Install your distro's Qt 6 base + dev package, then build with
--features qt(see below). Without it you get Slint's bundledfluentstyle, which has zero system dependencies and looks reasonable everywhere.
Distro packages providing qmake6 and Qt 6 headers:
| Distro | Package |
|---|---|
| Arch / Manjaro | qt6-base |
| Debian / Kubuntu | qt6-base-dev |
| Fedora | qt6-qtbase-devel |
| openSUSE | qt6-base-devel |
The first build pulls a few hundred MB of crates from crates.io and takes several minutes on a clean cache. Incremental rebuilds are fast.
Building
# Default — fluent style, no system deps:
cargo build --release
# Native KDE Breeze look — requires qt6-base + qmake6:
cargo build --release --features qt
# Other Slint styles (override style without changing features):
SLINT_STYLE=cosmic cargo build --release
SLINT_STYLE=material cargo build --release
The binary lands at target/release/uboat-settings-editor. Stripped, it's a
single file in the low tens of MB depending on which style is compiled in.
Cross-compiling for Windows
The default fluent style cross-compiles cleanly from Linux. There's a
preconfigured linker setting in .cargo/config.toml so it's a one-liner:
rustup target add x86_64-pc-windows-gnu
sudo pacman -S mingw-w64-gcc # or: apt install mingw-w64
cargo build --release --target x86_64-pc-windows-gnu
The .exe lands at
target/x86_64-pc-windows-gnu/release/uboat-settings-editor.exe. It
depends only on standard Windows libraries (no Qt). Do not add
--features qt when targeting Windows — that would require a Windows Qt 6
SDK and complicate things considerably.
Installing on Arch Linux
A ready-to-use PKGBUILD is included that tracks the main branch of the
upstream git repo and builds with --features qt:
# From inside a clone of the repo:
makepkg -si
This installs:
/usr/bin/uboat-settings-editor/usr/share/applications/uboat-settings-editor.desktop— KDE menu entry/usr/share/doc/uboat-settings-editor-git/README.md
To uninstall: sudo pacman -R uboat-settings-editor-git.
To pin to a specific commit or tag instead of tracking main, edit the
source line and pkgver() function — comments in the PKGBUILD explain.
Running
uboat-settings-editor
Then Open…, pick a mod's .xlsx, edit, Save. The window title
shows a • while there are unsaved changes; closing the window with
unsaved changes prompts for confirmation. Reload discards unsaved
changes and re-reads from disk.
Backups
Before any save, the current on-disk version is copied to
.backups/<filename>.<YYYYMMDD-HHMMSS>.xlsx next to the file. The 10 most
recent backups per file are kept; older ones are pruned automatically.
Tests
cargo test
The test suite round-trips real BDUCR and UBE settings files through
load → edit → save → re-load and asserts both that changes persisted and
that unchanged cells (units, descriptions, blank separator rows, other
parameters) survived untouched.
What the tool guarantees about the saved file
- The set of
<c>cells whose values you changed is the only set rewritten. All other cells are byte-identical to the source. - For booleans, the literal strings
"True"and"False"are preserved (these are stored as shared strings in the workbook, exactly the way the game's mod loader expects them). - For numeric cells whose new value is still numeric, the cell stays numeric. If you type non-numeric text into a former numeric field, the cell is rewritten as a shared string — the file remains valid XLSX, and you can read it back; whether the mod tolerates the new type is on you.
- Section headers (
/Debug,/Features, …) and the description column are never edited by the tool. - Shared strings are only appended to (never reordered or removed), so existing index references remain valid.
Limitations
- First worksheet only (
xl/worksheets/sheet1.xml). Both observed mod files put everything there; multi-sheet workbooks aren't supported. - The UI shows the description column from column C, read-only. There's no way to edit it from this tool — by design.
- No undo beyond Reload (which discards all in-session changes) and the on-disk backup history.
Project layout
.
├── .cargo/config.toml # Cross-compile linker config
├── Cargo.toml # crate manifest, with [features] qt
├── Cargo.lock # pinned dependency versions
├── PKGBUILD # Arch package definition
├── build.rs # compiles ui/app.slint at build time
├── packaging/
│ └── uboat-settings-editor.desktop
├── ui/
│ └── app.slint # Slint UI definition
├── src/
│ ├── main.rs # entry point, UI <-> document glue
│ ├── model.rs # Document / Section / Parameter types
│ └── xlsx.rs # surgical xlsx load + save, with tests
└── tests/data/ # real mod files used by the test suite
License
MIT. See LICENSE.