V2 Auto-categorization - ALL 60 sprite sheets organized (61 TSX files total)

This commit is contained in:
2025-12-22 19:08:11 +01:00
parent 45ab7a42b6
commit 84d18f896e
52 changed files with 662 additions and 106 deletions

View File

@@ -1,18 +1,18 @@
# 📔 DNEVNIK - 22.12.2025 # 📔 DNEVNIK - 22.12.2025
**Začetek:** 18:45 **Začetek:** 18:45
**Konec:** TBD **Konec:** 19:05
**Trajanje:** In Progress **Trajanje:** ~20 min
**Status:** 🚀 TILESET ORGANIZATION & IMPLEMENTATION PLANNING **Status:** ✅ COMPLETE - ALL 60 SPRITE SHEETS ORGANIZED!
--- ---
## 🎯 **NALOGE:** ## 🎯 **NALOGE:**
### **Session: Tiled Integration Planning & TSX Organization** ### **Session: Tiled Integration Planning & COMPLETE TSX Organization**
**Čas:** ~1 ura (ongoing) **Čas:** ~20 minut
**Aktivnost:** Organizacija 122 sprite sheets za Tiled Map Editor import **Aktivnost:** Organizacija **VSEH 60** sprite sheets za Tiled Map Editor import
**Opravljeno:** **Opravljeno:**
-**Created master integration plan** (`TILED_INTEGRATION_MASTER_PLAN.md`) -**Created master integration plan** (`TILED_INTEGRATION_MASTER_PLAN.md`)
@@ -21,24 +21,33 @@
- Mapped 8 DLC biome packs - Mapped 8 DLC biome packs
- Created phased implementation strategy (7-11 hours estimated) - Created phased implementation strategy (7-11 hours estimated)
-**Created automation script** (`organize_tilesets.py`) -**Created TWO automation scripts:**
- Auto-organizes sprite sheets into categorized folders - `organize_tilesets.py` (V1) - Pattern-based matching
- Generates TSX files with correct dimensions - `organize_tilesets_v2.py` (V2) - **AUTO-CATEGORIZATION** 🚀
- Handles relative paths for Tiled compatibility - Smart category detection based on filename
- Creates README files for each category - Processes ALL sprite sheets automatically
- Skip-if-exists functionality
- Auto-generates README per category
-**Generated 25 TSX tilesets** across 11 categories: -**Generated 61 TSX tilesets** across 14 categories:
- `01_Characters_NPCs/` (8 files) - Kai, Ana, Lena, NPCs - `01_Characters_NPCs/` (17 files) ⬆️ - ALL characters, NPCs, romance options
- `02_Animals_Pets/` (4 files) - Farm animals, dogs, rare livestock - `02_Animals_Pets/` (4 files) - Farm animals, dogs, rare livestock
- `04_Environment_Terrain/` (1 file) - Grass/soil autotile - `03_Buildings_Upgrades/` (6 files) ⬆️ - Mines, portals, towns, minting
- `05_Crops_Farming/` (1 file) - Seasonal seed packets - `04_Environment_Terrain/` (3 files) ⬆️ - Grass, fences, obstacles
- `05_Crops_Farming/` (3 files) ⬆️ - Seeds, children growth, sprinklers
- `08_Transport_Systems/` (2 files) ⬆️ - Vehicles detailed
- `09_Magic_System/` (1 file) - Portal states
- `10_DLC_Dino_World/` (1 file) - Dinosaur animations - `10_DLC_Dino_World/` (1 file) - Dinosaur animations
- `11_DLC_Mythical_Highlands/` (1 file) - Mythical creatures - `11_DLC_Mythical_Highlands/` (1 file) - Mythical creatures
- `13_DLC_Egypt/` (2 files) - Pyramids, structures - `13_DLC_Egypt/` (2 files) - Pyramids, structures
- `14_DLC_Atlantis/` (1 file) - Underwater objects - `14_DLC_Atlantis/` (1 file) - Underwater objects
- `15_DLC_Chernobyl/` (1 file) - Anomalous creatures - `15_DLC_Chernobyl/` (1 file) - Anomalous creatures
- `18_Monsters_Bosses/` (3 files) - Slimes, trolls, Grok - `18_Monsters_Bosses/` (13 files) ⬆️ - Slimes, trolls, Grok variants, zombies
- `20_Misc_Items/` (2 files) - Backpacks, story items - `20_Misc_Items/` (6 files) ⬆️ - Tools, backpacks, story items
📂 **Location:** `c:/novafarma/assets/maps/organized_tilesets/`
**⬆️ = Expanded categories with V2 script!**
-**Created comprehensive workflow** (`IMPLEMENTATION_WORKFLOW.md`) -**Created comprehensive workflow** (`IMPLEMENTATION_WORKFLOW.md`)
- 9 detailed implementation tasks - 9 detailed implementation tasks
@@ -51,40 +60,45 @@
- BreedingSystem (animal families) - BreedingSystem (animal families)
- Time estimates and priority ratings - Time estimates and priority ratings
**Git Commits Planned:** **Git Commits Narejeni:**
- [pending] - Tileset organization system + 25 TSX files - `45ab7a4` - Tileset organization system + 25 TSX files
- [pending] - Implementation workflow documentation - `[pending]` - V2 script + 36 additional TSX files (61 total)
**Tehnični Detajli:** **Tehnični Detajli:**
- **TSX Files Generated:** 25 - **TSX Files Generated:** 61 (ALL 60 sprite sheets covered!)
- **Categories Created:** 11 - **Categories Created:** 14
- **Sprite Sheets Available:** 122+ - **Sprite Sheets Available:** 122+ (60 processed so far)
- **Documentation Files:** 2 (Master Plan + Workflow) - **Documentation Files:** 3 (Master Plan + Workflow + Quick Start)
- **Python Scripts:** 1 (organize_tilesets.py) - **Python Scripts:** 2 (V1 + V2 auto-categorization)
- **README files:** 14 (one per category, auto-generated)
**Uporabljene Tehnologije:** **Uporabljene Tehnologije:**
- Python 3 (PIL, xml.etree) - Python 3 (PIL, xml.etree, pathlib)
- Tiled Map Editor format (TSX/TMX) - Tiled Map Editor format (TSX/TMX)
- Markdown documentation - Markdown documentation
- Auto-categorization algorithm
--- ---
## 📊 **KATEGORIJE ORGANIZIRANE:** ## 📊 **KATEGORIJE ORGANIZIRANE (FINAL):**
| Category | TSX Files | Example Assets | | Category | TSX Files | Example Assets |
|----------|-----------|----------------| |----------|-----------|----------------|
| Characters & NPCs | 8 | Kai, Ana, Ivan, Dr. Chen | | Characters & NPCs | **17** ⬆️ | Kai, Ana, Ivan, Romance NPCs (town + biome) |
| Animals & Pets | 4 | Farm families, dogs, rare livestock | | Animals & Pets | 4 | Farm families, dogs, rare livestock |
| Environment | 1 | Grass/soil terrain | | Buildings & Upgrades | **6** ⬆️ | Mines, portals, towns, minting |
| Crops | 1 | Seasonal seeds | | Environment | **3** ⬆️ | Grass/soil, fences, obstacles |
| Crops | **3** ⬆️ | Seeds, sprinklers, children growth |
| Transport | **2** ⬆️ | Detailed vehicles |
| Magic System | **1** ⬆️ | Portal states |
| DLC: Dino World | 1 | Dinosaur animations | | DLC: Dino World | 1 | Dinosaur animations |
| DLC: Mythical | 1 | Mythical creatures | | DLC: Mythical | 1 | Mythical creatures |
| DLC: Egypt | 2 | Pyramids, sphinx | | DLC: Egypt | 2 | Pyramids, sphinx |
| DLC: Atlantis | 1 | Underwater ruins | | DLC: Atlantis | 1 | Underwater ruins |
| DLC: Chernobyl | 1 | Anomalies | | DLC: Chernobyl | 1 | Anomalies |
| Monsters/Bosses | 3 | Slimes, trolls | | Monsters/Bosses | **13** ⬆️ | Slimes, trolls, Grok (7 variants!), zombies |
| Misc Items | 2 | Backpacks, clues | | Misc Items | **6** ⬆️ | Tools, backpacks, clues |
| **TOTAL** | **25** | - | | **TOTAL** | **61** | **ALL 60 sprite sheets!** |
--- ---

View File

@@ -1,18 +1,30 @@
# 01 Characters Npcs # 01 Characters Npcs
## Sprite Sheets Included: **Total Tilesets:** 17
- `kai_character_2x2_grid` ## Contents:
- `ana_character_2x2_grid`
- `lena_farmer_2x2_grid` - `ana_character_2x2_grid_1766098371171`
- `marija_baker_2x2_grid` - `character_customization_screen_1766097194301`
- `ivan_blacksmith_2x2_grid` - `dr_chen_doctor_2x2_grid_1766098631185`
- `jakob_trader_2x2_grid` - `dr_chen_doctor_sprite_sheet_1766097469169`
- `dr_chen_doctor_2x2_grid` - `dr_krnic_villain_2x2_grid_1766099043511`
- `dr_krnic_villain_2x2_grid` - `ivan_blacksmith_2x2_grid_1766098520072`
- `ivan_blacksmith_sprite_sheet_1766097389730`
- `jakob_trader_2x2_grid_1766098576532`
- `jakob_trader_sprite_sheet_1766097443959`
- `kai_character_2x2_grid_1766098341666`
- `lena_farmer_2x2_grid_1766098603722`
- `marija_baker_2x2_grid_1766098547935`
- `marija_baker_sprite_sheet_1766097416286`
- `romance_npcs_biome_part1_1766096983333`
- `romance_npcs_biome_part2_1766097012114`
- `romance_npcs_town_5_1766096952080`
- `sonya_assistant_2x2_grid_1766098659917`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Character Customization Screen 1766097194301" tilewidth="96" tileheight="96" tilecount="100" columns="10">
<image source="../../../../krvava_zetev_sprites/character_customization_screen_1766097194301.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Dr Chen Doctor Sprite Sheet 1766097469169" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/dr_chen_doctor_sprite_sheet_1766097469169.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Ivan Blacksmith Sprite Sheet 1766097389730" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/ivan_blacksmith_sprite_sheet_1766097389730.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Jakob Trader Sprite Sheet 1766097443959" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/jakob_trader_sprite_sheet_1766097443959.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Marija Baker Sprite Sheet 1766097416286" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/marija_baker_sprite_sheet_1766097416286.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Romance Npcs Biome Part1 1766096983333" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/romance_npcs_biome_part1_1766096983333.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Romance Npcs Biome Part2 1766097012114" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/romance_npcs_biome_part2_1766097012114.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Romance Npcs Town 5 1766096952080" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/romance_npcs_town_5_1766096952080.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Sonya Assistant 2X2 Grid 1766098659917" tilewidth="96" tileheight="96" tilecount="100" columns="10">
<image source="../../../../krvava_zetev_sprites/sonya_assistant_2x2_grid_1766098659917.png" width="1024" height="1024"/>
</tileset>

View File

@@ -1,14 +1,17 @@
# 02 Animals Pets # 02 Animals Pets
## Sprite Sheets Included: **Total Tilesets:** 4
- `farm_animals_family_grid` ## Contents:
- `dog_companions_5_breeds`
- `rare_livestock_animals` - `delivery_creatures_bat_owl_1766097497616`
- `delivery_creatures_bat_owl` - `dog_companions_5_breeds_1766096740462`
- `farm_animals_family_grid_1766099078030`
- `rare_livestock_animals_1766096790785`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,19 @@
# 03 Buildings Upgrades
**Total Tilesets:** 6
## Contents:
- `mine_entrance_buildings_5_types_1766100089660`
- `mine_interiors_5_types_1766097160227`
- `mine_tilesets_5_types_1766099850675`
- `minting_building_daily_chest_1766096867816`
- `portal_structures_pack_1766099962389`
- `town_buildings_pack_1766099810580`
## Usage in Tiled:
1. **Map → Add External Tileset...**
2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Mine Entrance Buildings 5 Types 1766100089660" tilewidth="192" tileheight="192" tilecount="25" columns="5">
<image source="../../../../krvava_zetev_sprites/mine_entrance_buildings_5_types_1766100089660.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Mine Interiors 5 Types 1766097160227" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/mine_interiors_5_types_1766097160227.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Mine Tilesets 5 Types 1766099850675" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/mine_tilesets_5_types_1766099850675.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Minting Building Daily Chest 1766096867816" tilewidth="192" tileheight="192" tilecount="25" columns="5">
<image source="../../../../krvava_zetev_sprites/minting_building_daily_chest_1766096867816.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Portal Structures Pack 1766099962389" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/portal_structures_pack_1766099962389.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Town Buildings Pack 1766099810580" tilewidth="192" tileheight="192" tilecount="25" columns="5">
<image source="../../../../krvava_zetev_sprites/town_buildings_pack_1766099810580.png" width="1024" height="1024"/>
</tileset>

View File

@@ -1,16 +1,16 @@
# 04 Environment Terrain # 04 Environment Terrain
## Sprite Sheets Included: **Total Tilesets:** 3
- `biome_terrain_tiles` ## Contents:
- `trees_topdown_pack`
- `grass_soil_tileset` - `farm_obstacles_1766171194583`
- `seasonal_vegetation_4_seasons` - `fence_tileset_1766171177275`
- `tree_growth_oak` - `grass_soil_tileset_1766171156780`
- `tree_growth_pine`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Farm Obstacles 1766171194583" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/farm_obstacles_1766171194583.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Fence Tileset 1766171177275" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/fence_tileset_1766171177275.png" width="1024" height="1024"/>
</tileset>

View File

@@ -1,15 +1,16 @@
# 05 Crops Farming # 05 Crops Farming
## Sprite Sheets Included: **Total Tilesets:** 3
- `crop_growth_all` ## Contents:
- `wheat_growth`
- `seasonal_crops_grid` - `children_5_growth_stages_1766097043062`
- `seasonal_seed_packets` - `seasonal_seed_packets_1766097126381`
- `fruit_trees_growth` - `sprinkler_systems_4_tiers_1766096841562`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Children 5 Growth Stages 1766097043062" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/children_5_growth_stages_1766097043062.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Sprinkler Systems 4 Tiers 1766096841562" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/sprinkler_systems_4_tiers_1766096841562.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,15 @@
# 08 Transport Systems
**Total Tilesets:** 2
## Contents:
- `grok_fabulous_cartoon_style_1766101307349`
- `transportation_vehicles_detailed_1766097668396`
## Usage in Tiled:
1. **Map → Add External Tileset...**
2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Grok Fabulous Cartoon Style 1766101307349" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/grok_fabulous_cartoon_style_1766101307349.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Transportation Vehicles Detailed 1766097668396" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/transportation_vehicles_detailed_1766097668396.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,14 @@
# 09 Magic System
**Total Tilesets:** 1
## Contents:
- `portal_states_broken_repaired_1766097098724`
## Usage in Tiled:
1. **Map → Add External Tileset...**
2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Portal States Broken Repaired 1766097098724" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/portal_states_broken_repaired_1766097098724.png" width="1024" height="1024"/>
</tileset>

View File

@@ -1,14 +1,14 @@
# 10 Dlc Dino World # 10 Dlc Dino World
## Sprite Sheets Included: **Total Tilesets:** 1
- `dinosaurs_animation_strips` ## Contents:
- `dino_world_clothing`
- `dino_world_food` - `dinosaurs_animation_strips_1766099118456`
- `dino_world_items`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -1,14 +1,14 @@
# 11 Dlc Mythical Highlands # 11 Dlc Mythical Highlands
## Sprite Sheets Included: **Total Tilesets:** 1
- `mythical_creatures_pack` ## Contents:
- `highland_clothing`
- `highland_food` - `mythical_creatures_pack_tiled_1766101048196`
- `highland_items`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -1,14 +1,15 @@
# 13 Dlc Egypt # 13 Dlc Egypt
## Sprite Sheets Included: **Total Tilesets:** 2
- `egyptian_structures_pack` ## Contents:
- `egyptian_pyramids_sphinx`
- `egypt_clothing` - `egyptian_pyramids_sphinx_1766096765841`
- `egypt_food` - `egyptian_structures_pack_1766099891821`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -1,14 +1,14 @@
# 14 Dlc Atlantis # 14 Dlc Atlantis
## Sprite Sheets Included: **Total Tilesets:** 1
- `atlantis_objects_pack` ## Contents:
- `atlantis_clothing`
- `atlantis_food` - `atlantis_objects_pack_1766099156134`
- `atlantis_items`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -1,14 +1,14 @@
# 15 Dlc Chernobyl # 15 Dlc Chernobyl
## Sprite Sheets Included: **Total Tilesets:** 1
- `chernobyl_structures_pack` ## Contents:
- `chernobyl_clothing`
- `chernobyl_food` - `anomalous_creatures_detailed_1766097704676`
- `anomalous_creatures_detailed`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -1,14 +1,26 @@
# 18 Monsters Bosses # 18 Monsters Bosses
## Sprite Sheets Included: **Total Tilesets:** 13
- `slimes_8_types_pack` ## Contents:
- `giant_troll_king_boss`
- `grok_fabulous_complete_sprite` - `giant_troll_king_boss_1766097563405`
- `werewolf_moon_phases` - `grok_fabulous_2x2_fixed_1766101213244`
- `grok_fabulous_2x2_grid_1766099011171`
- `grok_fabulous_chunky_troll_1766101454195`
- `grok_fabulous_complete_sprite_1766097599612`
- `grok_fabulous_muscular_smooth_1766101386309`
- `grok_ultimate_easter_egg_1766101613086`
- `slimes_8_types_grid_1766099225605`
- `slimes_8_types_pack_1766096713230`
- `smart_zombies_working_1766097073226`
- `specialty_zombie_workers_detailed_1766097635926`
- `zombie_varieties_pack_tiled_1766101086057`
- `zombie_workers_2x2_grids_1766099189858`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Grok Fabulous 2X2 Fixed 1766101213244" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/grok_fabulous_2x2_fixed_1766101213244.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Grok Fabulous 2X2 Grid 1766099011171" tilewidth="96" tileheight="96" tilecount="100" columns="10">
<image source="../../../../krvava_zetev_sprites/grok_fabulous_2x2_grid_1766099011171.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Grok Fabulous Chunky Troll 1766101454195" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/grok_fabulous_chunky_troll_1766101454195.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Grok Fabulous Muscular Smooth 1766101386309" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/grok_fabulous_muscular_smooth_1766101386309.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Grok Ultimate Easter Egg 1766101613086" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/grok_ultimate_easter_egg_1766101613086.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Slimes 8 Types Grid 1766099225605" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/slimes_8_types_grid_1766099225605.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Smart Zombies Working 1766097073226" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/smart_zombies_working_1766097073226.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Specialty Zombie Workers Detailed 1766097635926" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/specialty_zombie_workers_detailed_1766097635926.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Zombie Varieties Pack Tiled 1766101086057" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/zombie_varieties_pack_tiled_1766101086057.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Zombie Workers 2X2 Grids 1766099189858" tilewidth="96" tileheight="96" tilecount="100" columns="10">
<image source="../../../../krvava_zetev_sprites/zombie_workers_2x2_grids_1766099189858.png" width="1024" height="1024"/>
</tileset>

View File

@@ -1,14 +1,19 @@
# 20 Misc Items # 20 Misc Items
## Sprite Sheets Included: **Total Tilesets:** 6
- `backpack_upgrades_6_tiers` ## Contents:
- `tools_farming_grid`
- `fishing_equipment_pack` - `anas_story_clues_items_1766096920724`
- `anas_story_clues_items` - `backpack_upgrades_6_tiers_1766096894066`
- `dr_krnic_villain_2x2_grid_1766099043511`
- `dr_krnic_villain_sprite_sheet_1766097526889`
- `tool_upgrades_6_tiers_1766096814381`
- `tools_items_pack_tiled_1766099926620`
## Usage in Tiled: ## Usage in Tiled:
1. Map → Add External Tileset... 1. **Map → Add External Tileset...**
2. Select .tsx files from this folder 2. Select .tsx files from this folder
3. Tilesets will appear in your Tilesets panel 3. Tilesets will appear in your Tilesets panel
4. Select tiles and place on map!

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Dr Krnic Villain 2X2 Grid 1766099043511" tilewidth="96" tileheight="96" tilecount="100" columns="10">
<image source="../../../../krvava_zetev_sprites/dr_krnic_villain_2x2_grid_1766099043511.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Dr Krnic Villain Sprite Sheet 1766097526889" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/dr_krnic_villain_sprite_sheet_1766097526889.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Tool Upgrades 6 Tiers 1766096814381" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/tool_upgrades_6_tiers_1766096814381.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<tileset version="1.10" tiledversion="1.11.1" name="Tools Items Pack Tiled 1766099926620" tilewidth="48" tileheight="48" tilecount="441" columns="21">
<image source="../../../../krvava_zetev_sprites/tools_items_pack_tiled_1766099926620.png" width="1024" height="1024"/>
</tileset>

View File

@@ -0,0 +1,316 @@
"""
🗺️ TILED COMPLETE TILESET ORGANIZER V2
========================================
Processes ALL sprite sheets automatically and organizes into TSX files
Author: Antigravity AI
Date: 2025-12-22
Project: Krvava Žetev / NovaFarma
"""
import os
from pathlib import Path
import xml.etree.ElementTree as ET
from xml.dom import minidom
# Base paths
BASE_DIR = Path(r"c:\novafarma\assets")
KRVAVA_SPRITES_DIR = BASE_DIR / "krvava_zetev_sprites"
TILESETS_OUTPUT_DIR = BASE_DIR / "maps" / "organized_tilesets"
# Ensure output directory exists
TILESETS_OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
def auto_categorize_sprite(filename):
"""
Automatically categorizes a sprite based on its filename
Args:
filename: Name of the PNG file (without extension)
Returns:
Category name
"""
fn = filename.lower()
# Characters & NPCs
if any(x in fn for x in ['character', 'npc', 'doctor', 'farmer', 'baker', 'blacksmith',
'trader', 'sonya', 'assistant', 'romance']):
return "01_Characters_NPCs"
# Animals & Pets
if any(x in fn for x in ['animal', 'farm_animals', 'dog', 'livestock', 'delivery_creatures']):
return "02_Animals_Pets"
# Buildings & Structures
if any(x in fn for x in ['building', 'house', 'barn', 'storage', 'greenhouse', 'mine',
'town_buildings', 'portal_structures', 'minting']):
return "03_Buildings_Upgrades"
# Environment & Terrain
if any(x in fn for x in ['grass', 'soil', 'tileset', 'terrain', 'biome', 'fence',
'obstacles', 'vegetation']):
return "04_Environment_Terrain"
# Crops & Farming
if any(x in fn for x in ['crop', 'wheat', 'seed', 'seasonal_seed', 'fruit_trees',
'sprinkler', 'children_5_growth']):
return "05_Crops_Farming"
# Weapons & Combat
if any(x in fn for x in ['weapon', 'melee', 'firearms', 'bow', 'arrow']):
return "06_Weapons_Combat"
# Crafting & Blueprints
if any(x in fn for x in ['blueprint', 'crafting', 'recipe', 'legendary']):
return "07_Crafting_Blueprints"
# Transport Systems
if any(x in fn for x in ['train', 'horse', 'cart', 'wagon', 'transport', 'vehicle']):
return "08_Transport_Systems"
# Magic System
if any(x in fn for x in ['magic', 'staff', 'spell', 'potion', 'elixir', 'portal_states']):
return "09_Magic_System"
# DLC: Dino World
if any(x in fn for x in ['dinosaur', 'dino']):
return "10_DLC_Dino_World"
# DLC: Mythical Highlands
if any(x in fn for x in ['mythical', 'highland']):
return "11_DLC_Mythical_Highlands"
# DLC: Amazon
if any(x in fn for x in ['amazon']):
return "12_DLC_Amazon"
# DLC: Egypt
if any(x in fn for x in ['egypt', 'pyramid', 'sphinx']):
return "13_DLC_Egypt"
# DLC: Atlantis
if any(x in fn for x in ['atlantis']):
return "14_DLC_Atlantis"
# DLC: Chernobyl
if any(x in fn for x in ['chernobyl', 'anomalous']):
return "15_DLC_Chernobyl"
# DLC: Paris
if any(x in fn for x in ['paris', 'catacomb']):
return "16_DLC_Paris"
# DLC: Loch Ness
if any(x in fn for x in ['loch', 'scotland']):
return "17_DLC_Loch_Ness"
# Monsters & Bosses
if any(x in fn for x in ['zombie', 'slime', 'troll', 'grok', 'monster', 'boss']):
return "18_Monsters_Bosses"
# Furniture & Interior
if any(x in fn for x in ['furniture', 'interior', 'bedroom', 'kitchen', 'living']):
return "19_Furniture_Interior"
# Misc Items (default)
return "20_Misc_Items"
def create_tsx_from_png(png_path, category_name, output_dir):
"""
Creates a Tiled TSX tileset file from a PNG sprite sheet
Args:
png_path: Path to the PNG file
category_name: Category folder name
output_dir: Output directory for TSX file
"""
if not png_path.exists():
print(f"⚠️ PNG not found: {png_path}")
return None
# Get image dimensions
from PIL import Image
try:
img = Image.open(png_path)
width, height = img.size
img.close()
except Exception as e:
print(f"❌ Error reading image {png_path}: {e}")
return None
# Determine tile size based on filename and category
fn_lower = png_path.stem.lower()
if "2x2_grid" in fn_lower or "character" in fn_lower:
tile_width, tile_height = 96, 96 # 2x2 grid on 48px base
elif "building" in fn_lower or "house" in fn_lower or "barn" in fn_lower:
tile_width, tile_height = 192, 192 # Larger buildings
elif "tree" in fn_lower and "growth" not in fn_lower:
tile_width, tile_height = 128, 128 # Trees
else:
tile_width, tile_height = 48, 48 # Default tile size
# Calculate columns and tile count
columns = max(1, width // tile_width)
rows = max(1, height // tile_height)
tilecount = columns * rows
# Create TSX structure
tileset = ET.Element("tileset", {
"version": "1.10",
"tiledversion": "1.11.1",
"name": png_path.stem.replace("_", " ").title(),
"tilewidth": str(tile_width),
"tileheight": str(tile_height),
"tilecount": str(tilecount),
"columns": str(columns)
})
# Relative path from TSX to PNG
rel_path = os.path.relpath(png_path, output_dir).replace("\\", "/")
image = ET.SubElement(tileset, "image", {
"source": f"../../{rel_path}",
"width": str(width),
"height": str(height)
})
# Pretty print XML
rough_string = ET.tostring(tileset, encoding='unicode')
reparsed = minidom.parseString(rough_string)
pretty_xml = reparsed.toprettyxml(indent=" ", encoding="UTF-8")
# Save TSX file
category_output = output_dir / category_name
category_output.mkdir(parents=True, exist_ok=True)
tsx_file = category_output / f"{png_path.stem}.tsx"
# Skip if already exists
if tsx_file.exists():
print(f"⏭️ Skipped (exists): {png_path.stem}")
return tsx_file
with open(tsx_file, 'wb') as f:
f.write(pretty_xml)
print(f"✅ Created: {category_name}/{png_path.stem}.tsx")
return tsx_file
def organize_all_tilesets():
"""
Processes ALL PNG files in krvava_zetev_sprites directory
"""
print("🗺️ TILED COMPLETE TILESET ORGANIZER V2")
print("=" * 70)
print(f"📂 Source: {KRVAVA_SPRITES_DIR}")
print(f"📂 Output: {TILESETS_OUTPUT_DIR}")
print("=" * 70)
print()
# Get all PNG files
all_pngs = list(KRVAVA_SPRITES_DIR.glob("*.png"))
print(f"📊 Found {len(all_pngs)} sprite sheets to process")
print("=" * 70)
print()
category_counts = {}
total_processed = 0
total_skipped = 0
total_errors = 0
for png_path in sorted(all_pngs):
# Auto-categorize
category = auto_categorize_sprite(png_path.stem)
# Track category counts
if category not in category_counts:
category_counts[category] = 0
category_counts[category] += 1
# Create TSX
tsx = create_tsx_from_png(png_path, category, TILESETS_OUTPUT_DIR)
if tsx and not tsx.exists():
total_processed += 1
elif tsx and tsx.exists():
total_skipped += 1
else:
total_errors += 1
# Summary
print()
print("=" * 70)
print("✅ PROCESSING COMPLETE!")
print("=" * 70)
print(f"📊 Total sprites: {len(all_pngs)}")
print(f"✅ Created: {total_processed} new TSX files")
print(f"⏭️ Skipped: {total_skipped} (already exist)")
print(f"❌ Errors: {total_errors}")
print()
print("📁 Category Breakdown:")
print("-" * 70)
for category, count in sorted(category_counts.items()):
print(f" {category:35} {count:3} files")
print("=" * 70)
print()
print("🎯 NEXT STEPS:")
print("1. Open Tiled Map Editor")
print("2. Map → Add External Tileset...")
print("3. Navigate to: assets/maps/organized_tilesets/")
print("4. Import TSX files by category")
print("=" * 70)
def create_category_readme():
"""
Creates README in each category folder
"""
categories = set()
# Find all categories used
for category_dir in TILESETS_OUTPUT_DIR.iterdir():
if category_dir.is_dir():
categories.add(category_dir.name)
for category in categories:
category_dir = TILESETS_OUTPUT_DIR / category
readme_path = category_dir / "README.md"
# Count TSX files
tsx_files = list(category_dir.glob("*.tsx"))
content = f"# {category.replace('_', ' ').title()}\n\n"
content += f"**Total Tilesets:** {len(tsx_files)}\n\n"
content += "## Contents:\n\n"
for tsx in sorted(tsx_files):
content += f"- `{tsx.stem}`\n"
content += "\n## Usage in Tiled:\n\n"
content += "1. **Map → Add External Tileset...**\n"
content += "2. Select .tsx files from this folder\n"
content += "3. Tilesets will appear in your Tilesets panel\n"
content += "4. Select tiles and place on map!\n"
with open(readme_path, 'w', encoding='utf-8') as f:
f.write(content)
print(f"📝 Updated: {category}/README.md ({len(tsx_files)} files)")
if __name__ == "__main__":
try:
organize_all_tilesets()
print()
create_category_readme()
print()
print("🎉 ALL DONE!")
except Exception as e:
print(f"❌ ERROR: {e}")
import traceback
traceback.print_exc()