🗺️ Base Farm Tiled setup - 5 tilesets ready for map design
This commit is contained in:
@@ -6,8 +6,11 @@
|
|||||||
<property name="spawnX" value="16"/>
|
<property name="spawnX" value="16"/>
|
||||||
<property name="spawnY" value="20"/>
|
<property name="spawnY" value="20"/>
|
||||||
</properties>
|
</properties>
|
||||||
<tileset firstgid="1" source="base_tilesets/ground_base.tsx"/>
|
<tileset firstgid="1" source="farm_tilesets/farm_grass.tsx"/>
|
||||||
<tileset firstgid="51" source="base_tilesets/objects_common.tsx"/>
|
<tileset firstgid="257" source="farm_tilesets/farm_soil.tsx"/>
|
||||||
|
<tileset firstgid="262" source="farm_tilesets/farm_buildings.tsx"/>
|
||||||
|
<tileset firstgid="272" source="farm_tilesets/farm_trees.tsx"/>
|
||||||
|
<tileset firstgid="287" source="farm_tilesets/farm_fences.tsx"/>
|
||||||
<layer id="1" name="Ground" width="32" height="32">
|
<layer id="1" name="Ground" width="32" height="32">
|
||||||
<data encoding="csv">
|
<data encoding="csv">
|
||||||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
|||||||
34
assets/maps/farm_tilesets/farm_buildings.tsx
Normal file
34
assets/maps/farm_tilesets/farm_buildings.tsx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.10" tiledversion="1.11.2" name="farm_buildings" tilewidth="128" tileheight="128" tilecount="10" columns="0">
|
||||||
|
<grid orientation="orthogonal" width="1" height="1"/>
|
||||||
|
<tile id="0">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/tiled_sprites_house_furniture_kitchen_1766072472152_obj06.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="1">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/house_furniture_bedroom_1766072449664_obj22.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="2">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/house_upgrade_evolution_1766072774644_obj06.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="3">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/house_upgrade_evolution_1766072774644_obj12.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="4">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/narezano_in_majhno_tiled_sprites_house_bathroom_furniture_1766072754842_obdelan_obj08.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="5">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/narezano_in_majhno_tiled_sprites_house_bathroom_furniture_1766072754842_obdelan_obj09.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="6">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/house_upgrade_evolution_1766072774644_obj13.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="7">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/house_upgrade_evolution_1766072774644_obj07.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="8">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/house_furniture_bedroom_1766072449664_obj23.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="9">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/buildings/houses/house_furniture_kitchen_1766072472152_obj14_obj01.png"/>
|
||||||
|
</tile>
|
||||||
|
</tileset>
|
||||||
14
assets/maps/farm_tilesets/farm_fences.tsx
Normal file
14
assets/maps/farm_tilesets/farm_fences.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.10" tiledversion="1.11.2" name="farm_fences" tilewidth="64" tileheight="64" tilecount="10" columns="0">
|
||||||
|
<grid orientation="orthogonal" width="1" height="1"/>
|
||||||
|
<tile id="0"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/fence_tileset_1766171177275_obj01_obj05.png"/></tile>
|
||||||
|
<tile id="1"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/fence_tileset_1766171177275_obj01_obj11.png"/></tile>
|
||||||
|
<tile id="2"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/krvava_zetev_sprites_fence_tileset_1766171177275_obj07.png"/></tile>
|
||||||
|
<tile id="3"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/krvava_zetev_sprites_fence_tileset_1766171177275_obj13.png"/></tile>
|
||||||
|
<tile id="4"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/fence_tileset_1766171177275_obj16.png"/></tile>
|
||||||
|
<tile id="5"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/fence_tileset_1766171177275_obj02.png"/></tile>
|
||||||
|
<tile id="6"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/fence_tileset_1766171177275_obj03.png"/></tile>
|
||||||
|
<tile id="7"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/fence_tileset_1766171177275_obj17.png"/></tile>
|
||||||
|
<tile id="8"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/krvava_zetev_sprites_fence_tileset_1766171177275_obj12.png"/></tile>
|
||||||
|
<tile id="9"><image width="32" height="32" source="../../../mrtva_dolina/terrain/ground/krvava_zetev_sprites_fence_tileset_1766171177275_obj06.png"/></tile>
|
||||||
|
</tileset>
|
||||||
4
assets/maps/farm_tilesets/farm_grass.tsx
Normal file
4
assets/maps/farm_tilesets/farm_grass.tsx
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.10" tiledversion="1.11.2" name="farm_grass" tilewidth="32" tileheight="32" tilecount="256" columns="16">
|
||||||
|
<image source="../../../mrtva_dolina/terrain/ground/grass_soil_tileset_1766171156780_obj09.png" width="512" height="512"/>
|
||||||
|
</tileset>
|
||||||
19
assets/maps/farm_tilesets/farm_soil.tsx
Normal file
19
assets/maps/farm_tilesets/farm_soil.tsx
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.10" tiledversion="1.11.2" name="farm_soil" tilewidth="128" tileheight="128" tilecount="5" columns="0">
|
||||||
|
<grid orientation="orthogonal" width="1" height="1"/>
|
||||||
|
<tile id="0">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/terrain/ground/grass_soil_tileset_1766171156780_obj09.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="1">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/terrain/ground/grass_soil_tileset_1766171156780_obj08.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="2">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/terrain/ground/grass_soil_tileset_1766171156780_obj11.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="3">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/terrain/ground/grass_soil_tileset_1766171156780_obj05.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="4">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/terrain/ground/grass_soil_tileset_1766171156780_obj04.png"/>
|
||||||
|
</tile>
|
||||||
|
</tileset>
|
||||||
49
assets/maps/farm_tilesets/farm_trees.tsx
Normal file
49
assets/maps/farm_tilesets/farm_trees.tsx
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.10" tiledversion="1.11.2" name="farm_trees" tilewidth="128" tileheight="128" tilecount="15" columns="0">
|
||||||
|
<grid orientation="orthogonal" width="1" height="1"/>
|
||||||
|
<tile id="0">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/dead_trees_environment_1766073156776_obj04.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="1">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/trees_topdown_pack_1766184490476_obj06.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="2">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/trees_topdown_pack_1766184490476_obj12.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="3">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/topdown_objects_trees_topdown_pack_1766184490476_obj08.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="4">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/giant_sequoia_birch_trees_1766070788774_obj06.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="5">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/giant_sequoia_birch_trees_1766070788774_obj07.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="6">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/topdown_objects_trees_topdown_pack_1766184490476_obj09.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="7">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/trees_topdown_pack_1766184490476_obj13.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="8">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/trees_topdown_pack_1766184490476_obj07.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="9">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/dead_trees_environment_1766073156776_obj05.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="10">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/dead_trees_environment_1766073156776_obj07.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="11">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/trees_topdown_pack_1766184490476_obj11.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="12">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/trees_topdown_pack_1766184490476_obj05.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="13">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/giant_sequoia_birch_trees_1766070788774_obj05.png"/>
|
||||||
|
</tile>
|
||||||
|
<tile id="14">
|
||||||
|
<image width="64" height="64" source="../../../mrtva_dolina/vegetation/trees/giant_sequoia_birch_trees_1766070788774_obj04.png"/>
|
||||||
|
</tile>
|
||||||
|
</tileset>
|
||||||
85
tools/generate_farm_tilesets.py
Normal file
85
tools/generate_farm_tilesets.py
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Generate TSX tilesets for Base Farm from mrtva_dolina collection
|
||||||
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
BASE_DIR = Path("/Users/davidkotnik/Desktop/novafarma")
|
||||||
|
MRTVA_DOLINA = BASE_DIR / "mrtva_dolina"
|
||||||
|
OUTPUT_DIR = BASE_DIR / "assets" / "maps" / "farm_tilesets"
|
||||||
|
|
||||||
|
# Create output directory
|
||||||
|
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
def create_ground_tileset():
|
||||||
|
"""Create grass/ground tileset"""
|
||||||
|
# Find grass tiles
|
||||||
|
ground_dir = MRTVA_DOLINA / "terrain" / "ground"
|
||||||
|
grass_files = [f for f in ground_dir.glob("*grass*.png")]
|
||||||
|
|
||||||
|
if not grass_files:
|
||||||
|
print("⚠️ No grass files found, using first available")
|
||||||
|
grass_files = list(ground_dir.glob("*.png"))[:1]
|
||||||
|
|
||||||
|
if grass_files:
|
||||||
|
grass_file = grass_files[0]
|
||||||
|
|
||||||
|
# Create TSX for grass
|
||||||
|
tsx_content = f"""<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.10" tiledversion="1.11.2" name="farm_grass" tilewidth="32" tileheight="32" tilecount="256" columns="16">
|
||||||
|
<image source="../../../mrtva_dolina/terrain/ground/{grass_file.name}" width="512" height="512"/>
|
||||||
|
</tileset>
|
||||||
|
"""
|
||||||
|
|
||||||
|
tsx_path = OUTPUT_DIR / "farm_grass.tsx"
|
||||||
|
with open(tsx_path, 'w') as f:
|
||||||
|
f.write(tsx_content)
|
||||||
|
|
||||||
|
print(f"✓ Created farm_grass.tsx")
|
||||||
|
return str(tsx_path)
|
||||||
|
|
||||||
|
return None
|
||||||
|
|
||||||
|
def create_collection_tileset(category, subcategory, name, pattern="*.png", max_tiles=20):
|
||||||
|
"""Create collection-based tileset"""
|
||||||
|
|
||||||
|
source_dir = MRTVA_DOLINA / category / subcategory
|
||||||
|
files = list(source_dir.glob(pattern))[:max_tiles]
|
||||||
|
|
||||||
|
if not files:
|
||||||
|
print(f"⚠️ No files found for {name}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
tsx_content = f"""<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<tileset version="1.10" tiledversion="1.11.2" name="{name}" tilewidth="128" tileheight="128" tilecount="{len(files)}" columns="0">
|
||||||
|
<grid orientation="orthogonal" width="1" height="1"/>
|
||||||
|
"""
|
||||||
|
|
||||||
|
for idx, file in enumerate(files):
|
||||||
|
rel_path = f"../../../mrtva_dolina/{category}/{subcategory}/{file.name}"
|
||||||
|
tsx_content += f""" <tile id="{idx}">
|
||||||
|
<image width="64" height="64" source="{rel_path}"/>
|
||||||
|
</tile>
|
||||||
|
"""
|
||||||
|
|
||||||
|
tsx_content += "</tileset>\n"
|
||||||
|
|
||||||
|
tsx_path = OUTPUT_DIR / f"{name}.tsx"
|
||||||
|
with open(tsx_path, 'w') as f:
|
||||||
|
f.write(tsx_content)
|
||||||
|
|
||||||
|
print(f"✓ Created {name}.tsx ({len(files)} tiles)")
|
||||||
|
return str(tsx_path)
|
||||||
|
|
||||||
|
# Generate tilesets
|
||||||
|
print("🎨 Generating Base Farm Tilesets...\n")
|
||||||
|
|
||||||
|
create_ground_tileset()
|
||||||
|
create_collection_tileset("buildings", "houses", "farm_buildings", "*house*.png", 10)
|
||||||
|
create_collection_tileset("vegetation", "trees", "farm_trees", "*.png", 15)
|
||||||
|
create_collection_tileset("buildings", "structures", "farm_fences", "*fence*.png", 10)
|
||||||
|
create_collection_tileset("terrain", "ground", "farm_soil", "*soil*.png", 5)
|
||||||
|
|
||||||
|
print("\n✅ Done! Tilesets created in assets/maps/farm_tilesets/")
|
||||||
Reference in New Issue
Block a user