Skip to content

Added 16x16 region file support#1167

Closed
MarvelcoCode wants to merge 3 commits intosmartcmd:mainfrom
MarvelcoCode:main
Closed

Added 16x16 region file support#1167
MarvelcoCode wants to merge 3 commits intosmartcmd:mainfrom
MarvelcoCode:main

Conversation

@MarvelcoCode
Copy link
Contributor

Description

Region files now use 16×16 chunk regions for new worlds while preserving 32×32 for existing saves.

Changes

Previous Behavior

All worlds used 32×32 chunk region files, which broke saved DLC's

Root Cause

No distinction was made between new and existing worlds when choosing the region file format.

New Behavior

New worlds use 16×16 region files, Old worlds automatically fall back to 32×32 if those files are already present. (this also alows us to use newer tut worlds like tu19 tu20 etc and porting worlds from newer versions)

Fix Implementation

In _getRegionFile, before constructing the 16×16 file path, we check if a 32×32 region file already exists and use it instead.

I tested new worlds, old worlds and DLC's creation, saving and reloading

@MarvelcoCode MarvelcoCode marked this pull request as draft March 12, 2026 02:00
@MarvelcoCode
Copy link
Contributor Author

dont merge i discovered a bug

@MarvelcoCode
Copy link
Contributor Author

i will open another pr that is better

@MarvelcoCode
Copy link
Contributor Author

#1169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant