openstranded-s2mod-tool
Convert original Stranded II mods to the .s2mod Content Pack format.
Usage
# Install
# Convert a mod directory to .s2mod archive
# Convert to directory instead of zip
# Skip model/texture conversion (text-only)
Pipeline
- Walk — scan input directory, classify files by extension
- Parse .inf — generic
key=valueparser →.ron+ embedded scripts →.lua - Scan references — find
dialogue/msgbox/addscriptetc. across all scripts - Transpile .s2s — s2s → Lua (with reference-based classification)
- Convert .b3d →
.glb(3D models) - Convert .bmp →
.png(magenta → transparent colour key) - Convert .bmpf →
.fnt+.png(bitmap fonts) - Update paths —
.b3d→.glb,.bmp→.pngreferences in.ronfiles - Generate manifest.toml —
[registry]section with domain→.ronmappings - Pack —
.s2mod(zip) or directory
Library
Use as a Rust library:
[]
= { = "0.2", = false }
use convert_bmp_to_png;
use ;
use parse_inf_file;
License
GPL-3.0-or-later