Repository navigation
Conversation
Every map tile (four zoom levels, 586 tiles each, BC1) is decoded with a border from its neighbours, cleaned with Real-ESRGAN (realesr-animevideov3, 2x; the player supplies realesrgan-ncnn-vulkan), scaled back and compressed to BC1 again, as a Mods tab mod. --scale 2 stores the two closest zoom levels at twice the size (the closest level is Real-ESRGAN's image, the medium one is reduced from it). That only shows more detail with the map drawn at the window's resolution (Revivedx#1137). Savage Wind grows the bigger tiles' ResourceSizeTable entries itself. tools/test_maphd.py checks it on synthetic tiles (make test-maphd). The FAQ mentions it under "Can I use mods?".
Zarigis
marked this pull request as ready for review
November 26, 2026 02:07
Owner
|
Thanks @Zarigis! A sharper map made from the player's own files is a nice idea, and the tests are thorough. Like #1136, mod making goes in SWMM+ (https://github.com/Revivedx/SWMMPlus) rather than in Savage Wind. Could you bring it there as a PR? #1137 (the map drawn at the window's resolution) is going into our next batch, so the |
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/maphd.py, which makes a sharper world map from the player's own game files. Every map tile is cleaned with Real-ESRGAN, and the result is a Mods tab mod.--scale 1(the default) cleans the map's blocky compression and soft edges, and keeps each tile at its own size.--scale 2also stores the two closest zoom levels at twice the size, for windows above 1080p. That needs #1137 to show anything. Without it, the map is drawn at 1080 lines whatever the window, and the bigger tiles are just shrunk back.What this changes
New tool, test, Makefile target (
make test-maphd), and a paragraph in the FAQ under "Can I use mods?". No runtime changes.What the tool does
The map has four zoom levels, each 586 tiles (
UI/MapTex/MainField/MapTex{,1,2,3}_*.sbmaptex), BC1 textures in BFRES/BNTX. For each tile, the tool:realesr-animevideov3, 2×), once per level, over the level's folder. Each level is cleaned on its own: the coarser levels are drawn separately with fewer contour lines, not reduced copies.With
--scale 2, the closest level (3000 → 6000 pixels a tile) is Real-ESRGAN's image itself. The medium level (840 → 1680) is reduced from the closest level's image, so it shows the detailed drawing rather than the game's simpler one at that zoom. A bigger tile grows its BNTX, and the BFRES around it: the embedded-file entry, the relocation table's section over the BNTX, and the file size. The two coarsest levels are as with--scale 1.Requirements: the player supplies
realesrgan-ncnn-vulkan(the "ncnn Vulkan" download from Real-ESRGAN's releases page) with itsmodels/folder. The tool needs numpy and Pillow. The in-between images go to a work folder, about 20 GB, so a stopped run carries on where it was.No ResourceSizeTable and no extra memory needed: the tiles are loose files, so Savage Wind grows their entries itself (#898). With only the
--scale 2tiles as a mod and the game's own memory, it grew all 1,172 entries, and the map opened and zoomed at both bigger levels.The output is made from the player's game files, so the tool's help and the FAQ say not to share it. Nothing is downloaded, and nothing outside the mod and work folders is written.
How it was tested
Windows 11, RTX 4080 SUPER, NVIDIA 617.42, 3840×2160, game 1.9.0, on
testat 2a51d02.--scale 2, most of it the closest level. Both were played in game.make test-maphd: 22 checks on synthetic tiles. It covers Yaz0, the block-linear swizzle, BC1, reading and growing a tile, the neighbour borders, both scales, the medium level built from the closest, and the fallback when the closest image is missing.More detail and caveats
--scale 2tiles show their extra detail.--scale 2medium level shows every contour line and thinner roads, where the game's own is simplified. Lanczos was kept for reducing it: a box filter with a slight blur was tried, and didn't look better once the map was drawn at 4K.Checklist
testand opened againsttest