scholo: revert image swap experiment, keep kg's native 6144x4096 maps

Tried replacing kg's 4 scholo floors with the upreza Dungeons stitched maps (which have room labels baked in: Reliquary, Chamber of Summoning, Butcher's Sanctum, etc.). But kg renders to 3:2 aspect (6144x4096) while upreza is 4:3 (4096x3072) and the WoW client's source content is positioned differently in each — linear rescale of kg's enemy coords lands bosses outside the rooms.

Better to keep kg's lower-quality but coord-aligned maps. dungeon_replacements / map_image_swaps mechanisms are still there for future cases where we DO have a coord-compatible replacement.

WoWMapUprezClassic doesn't help here — the README notes that vanilla never had in-game dungeon interior maps.
This commit is contained in:
2026-04-26 00:15:02 +02:00
parent 15b7fdeead
commit ad511d54e1
2 changed files with 28 additions and 0 deletions
+3
View File
@@ -4,6 +4,9 @@
"_dungeon_replacements_comment": "When the kg map is the wrong layout for Ascension (e.g. retail/Cata layout vs classic), replace the entire dungeon's map with one we author manually. Coords are in the new map's pixel space (0..width, 0..height). Bosses come from AtlasLoot's per-dungeon entries with cords.",
"dungeon_replacements": {},
"_map_image_swaps_comment": "Swap the rendered image for one or more floors WITHOUT changing the kg enemy/pack/patrol data. Coords stay in kg's pixel space; the swapped image is force-stretched to those dims by the browser. Use this when a different render of the SAME WoW texture is sharper but has a different aspect ratio.",
"map_image_swaps": {},
"overrides": [
{
"tile_key": "stratholme",
+25
View File
@@ -226,10 +226,12 @@ def main() -> int:
overrides = []
dungeon_replacements = {}
map_image_swaps = {}
if OVERRIDES_PATH.exists():
ov_doc = json.loads(OVERRIDES_PATH.read_text())
overrides = ov_doc.get("overrides", [])
dungeon_replacements = ov_doc.get("dungeon_replacements", {})
map_image_swaps = ov_doc.get("map_image_swaps", {})
# Load AtlasLoot map data on demand for dungeon replacements.
atlasloot_data = None
@@ -389,6 +391,29 @@ def main() -> int:
ex["kg_floor_id"] = new_floor
ex["ascension_override"] = True
# Map image swap: rescale every coord from kg's pixel space
# (image dimensions in floor_summary) into the new image space.
swap = map_image_swaps.get(d["tile_key"])
if swap:
new_w, new_h = swap["width"], swap["height"]
for m in entry["maps"]:
sx = new_w / m["width"]
sy = new_h / m["height"]
m["width"], m["height"] = new_w, new_h
for e in m["enemies"]:
e["pos"] = [round(e["pos"][0] * sx, 1), round(e["pos"][1] * sy, 1)]
for p in m["packs"]:
p["vertices"] = [[round(v[0] * sx, 1), round(v[1] * sy, 1)] for v in p["vertices"]]
for pa in m["patrols"]:
pa["vertices"] = [[round(v[0] * sx, 1), round(v[1] * sy, 1)] for v in pa["vertices"]]
for ic in m["icons"]:
ic["pos"] = [round(ic["pos"][0] * sx, 1), round(ic["pos"][1] * sy, 1)]
# Extras already use the kg pixel space; rescale too.
# Use the first map's pre-swap factor — extras are dungeon-level.
for ex in entry.get("extras", []):
ex["pos"] = [round(ex["pos"][0] * (new_w / 6144), 1),
round(ex["pos"][1] * (new_h / 4096), 1)]
dungeons.append(entry)
dungeons.sort(key=lambda d: d["name"])