Repository navigation
Conversation
A texture pack made for the 1.6.0 update (HDPacks.com's 4K pack) can't be loaded on 1.9.0 as it is: next to its textures it has 1.6.0 copies of whole packs, Pack/Bootup.pack and a 1.6.0 ResourceSizeTable, and the game crashes or never finishes loading. The tool makes a Mods tab mod of only the pack's textures, from the player's own files: loose files 1.9.0 also has, each 1.9.0 pack with only its texture files swapped (DLC packs under aoc/0010/), the fonts except External_00.bffnt, and the 1.9.0 ResourceSizeTable with the grown entries. Savage Wind's own growing doesn't reach the files inside packs: without the table the converted pack stays on the loading screen. tools/test_hdpack_convert.py checks it on a synthetic game and pack (make test-hdpack-convert). The FAQ points to it from "Can I use mods?".
Zarigis
marked this pull request as ready for review
November 26, 2026 01:57
3 tasks done
Owner
|
Thanks @Zarigis, this is careful work, and the converted pack loading at about the same fps is great to see. Mod conversion lives in SWMM+ (https://github.com/Revivedx/SWMMPlus), our mod manager, rather than in Savage Wind itself: it already converts mods and is where players prepare them, so the converter belongs there. Could you open it as a PR on SWMMPlus? When you do, please leave the pack site's name out of the docs and the tool's help. Savage Wind only links to the player's own files, never to sites that host texture packs. The memory side, #1135 ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
tools/hdpack_convert.py, which turns a texture pack made for the game's 1.6.0 update into a 1.9.0 mod for the Mods tab. It works from the player's own game files. HDPacks.com's 4K pack is the one tested.As distributed, the pack can't be used on 1.9.0. Besides its textures, it carries 1.6.0 copies of whole packs,
Pack/Bootup.packand a 1.6.0 ResourceSizeTable. Loaded as a mod, it crashes at boot, or never finishes loading once those are removed. The tool makes a mod of only the pack's textures, on top of the player's 1.9.0 files.The pack also needs more game memory than the game's own heap. That's #1135 (
game_memory_mb), and the two PRs are independent.What this changes
New tool, test, Makefile target (
make test-hdpack-convert), and a paragraph in the FAQ under "Can I use mods?". No runtime changes.What the tool does
Model/*.Tex*.sbfres,UI/StockItem/…,Terrain/…) that 1.9.0 or its DLC also has are hard-linked, or copied across drives or with--copy. Files 1.9.0 doesn't have are left out.Pack/*.pack: the player's 1.9.0 pack, with only its texture files (*.Tex*.sbfres) taken from the pack's copy. The archive's tables and each file's alignment stay as they are. DLC packs go underaoc/0010/.Pack/Bootup.packis left out: it holds 1.6.0 game data, and Savage Wind patches its own.Font/Font_US.sbfarc: the 1.9.0 archive with the pack's fonts, exceptExternal_00.bffnt, the button icons, which Savage Wind draws itself.--no-fontsleaves the fonts out.--no-terrainleaves out the 4K terrain:Terrain/andModel/Terrain.Tex*, which makePack/TitleBG.packgrow from 80 to 287 MB.The output holds parts of the player's game files (the packs), so the tool's help and the FAQ say not to share it. Nothing is downloaded, and nothing outside
<mod folder>/romfsis written.The code is self-contained: Yaz0 decompress and uncompressed store, a SARC reader and in-place replacer, and an RSTB reader and writer. Standard library only.
How it was tested
Windows 11, RTX 4080 SUPER, NVIDIA 617.42, 3840×2160, game 1.9.0 with both DLC, on
testat 2a51d02 with #1135'sgame_memory_mb = 6144.0xef8a699dbc)Bootup.pack0xa8)make test-hdpack-convertbuilds a small synthetic game and pack, with no game files involved. It checks 24 cases: the containers, the files the mod gets, which pack files are swapped, the DLC paths, the fonts, the size table entries,--no-terrain,--no-fonts,--copy, and that nothing outside the mod'sromfs/is written.More detail
SAVAGEWIND_ROMFS_OVERLAYon the mod'sromfs/folder, not the Mods tab. Both load through the same overlay layers.python3script, liketools/test_feedback_alias.py, so it can be added as a job intests.yml.Checklist
testand opened againsttest