Generate Core Keeper-ready tiles from compact source tilesets. This editor tool can expand 17-tile blob sets, such as ground and wall tiles, into the larger runtime layouts Core Keeper expects, then output either a generated texture or a populated ModTileset layer.
It also supports non-blob layer templates and an arrange-only mode for placing selected source tiles into the Core Keeper layout without generating new variants.
Install the package through Unity Package Manager:
- Open
Window > Package Manager. - Click
+. - Select
Install package from git URL.... - Enter:
https://github.com/germanoeich/CoreKeeperTilesetGenerator.git
The package includes example generator assets and source PNGs under Examples.
Sample source textures:
Reference tileset atlases:
In Unity, create a new asset from:
Assets > Create > Core Keeper > Tileset Layer Generator
Create one generator asset for each Core Keeper layer you want to generate.
In the generator inspector:
- Set
Target Tilesetto an existingModTilesetif you want to update it. - Leave
Target Tilesetempty to create a newModTileset. - When creating a new tileset, set
New Tileset ID. - Optionally set
Output Folder. If empty, the generated assets are created beside the generator asset.
- Pick a
Layer Template. - Assign a readable
Source Texture. - Set
Tile Sizeto the size of one source tile in pixels. - Optionally assign
Source Emissive Textureto generate a matching emissive layer.
The source texture and optional emissive texture must have Read/Write enabled in Unity import settings.
Use the tile picker controls in the inspector to assign source tile positions for the tile groups required by the selected template.
For normal blob generation, fill the compact 17-tile selections and make sure Fill Tile has exactly one selected tile.
Enable Arrange Only when you want to copy the selected source tiles into the Core Keeper runtime layout directly, without adaptive reconstruction.
Click Generate Layer to create or update the target ModTileset layer.
Click Export Texture if you only want to export the generated texture without applying it to a ModTileset.
Create one Core Keeper/Tileset Layer Generator asset per output layer and point all of them at the same ModTileset.
You can regenerate every generator asset in the project from:
Tools > Core Keeper > Tilesets > Generate All Layer Generators
Leave Layer Bank Mode on Use Template Bank unless the layer behavior itself needs a custom PugMapTileset bank.
The layer templates used by this package are generated from dumped Core Keeper PugMapTileset assets.
The source data starts as serialized Unity YAML from tileset_*.asset files. In this package, those dumps are stored as .txt files under:
Editor/Templates/Dumps/
They are kept as .txt so Unity treats them as data files, not importable asset definitions.
The generation script is included at:
~Tools/generate_runtime_blueprints.py
The parse process is:
- Dump the vanilla
tileset_*.assetfiles as text/YAML. - Parse each
layersblock from the dumped tileset. - Keep adaptive layers using
AdaptativeFillorAdaptativeExtrude. - Choose the runtime lookup table:
- use
generatedTextureAdaptativeSpriteLookupTablewhengenerateFullAdaptiveTextureis enabled - otherwise use
adaptativeSpriteLookupTable
- use
- Apply the layer's available direction bits to each 8-bit neighbor mask.
- Resolve each mask to the atlas cell or cells used by Core Keeper at runtime.
- Write JSON and text summaries to the output folder.
By default, the script reads:
Editor/Templates/Dumps/
and writes to:
~Tools/generated/
Run it from the package root:
python3 ~Tools/generate_runtime_blueprints.py \
--layer-name-enum /path/to/decompiled/PugMap.Common/PugTilemap/LayerName.cs \
--tile-type-enum /path/to/decompiled/Pug.Base/PugTilemap/TileType.csAdd --generate-images to also write diagnostic blueprint PNG atlases.
The enum paths are required when regenerating package templates. Without them, the script falls back to numeric names like LayerName_8, which are useful for inspection but are not valid template names for the Unity editor.
Each generated JSON file describes one layer template: the source tileset, layer name, target tile, lookup kind, runtime grid size, and mask_to_cells mapping. After reviewing the generated output, copy the generated .json files into Editor/Templates/Blueprints/. The editor reads those JSON files at load time, then uses the matching dump file to recover the remaining layer settings needed to build a compatible QuadGenerator.
The source code and tool scripts in this package are licensed under the Mozilla Public License 2.0.
The MPL-2.0 is a file-level copyleft license. If you distribute modified versions of this tool's source files, those modified files stay under the MPL-2.0.
Using the tool does not place your source art, generated textures, generated ModTileset assets, or other project assets under the MPL-2.0. Those assets remain governed by the rights and licenses that apply to your inputs and project.
