Phase 9: reproducible builds, balance from the server, spark check, play feedback

Build: every tool pinned (JDK, packwiz, Gradle plugins, Python packages), exports
normalised, tools/check_reproducible.py proves two clean builds are byte-identical.

Server-side balance: a server can load config/cobblesurvival/datapack.zip in place of
the jar's data, /reload applies it, tools/server_update.py packages it and refuses
when a client change is needed. JEI drop pages are sent by the server. Code-held
balance numbers moved to tuning/server.json.

Performance: spark in the pack (server only), tools/perf_test.py with fake players
whose chunks really are active, docs/performance.md.

Adrian's feedback: default keys R, U, J, §; drop pages link to Cobblemon Info and show
real chances; bosses only hurt in battles; battle XP halved; channels between the
islands low level; temperature ×3 with insulation doubled; hazards start at once; no
item dots on the map; a wild attack starts a battle; the starter only faints; quest
book on join with a basics page and an HMs page; regional forms obtainable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
claudeandClaude Opus 5.5 committed 2026-11-09 16:26:30 +01:00
1 parent 0741c84077
commit 4083791944
133 files changed
+8350 -3273

No files matched your search

+10 -8
View File
@@ -57,6 +57,8 @@ import sys
import zipfile
from pathlib import Path
import lock
ROOT = Path(__file__).resolve().parent.parent
OUT = ROOT / "datapacks/core/data/cobblesurvival/spawn_pool_world"
GUARDIANS = ROOT / "datapacks/core/data/cobblesurvival/guardians"
@@ -83,10 +85,7 @@ HIGH_ZONE_LEVEL = 30
def cobblemon_jar():
jars = sorted((ROOT / "build/server/mods").glob("Cobblemon-*.jar"))
if not jars:
sys.exit("no Cobblemon jar in build/server/mods: run tools/build.py and tools/selftest.py (or the quick check) first")
return jars[-1]
return lock.mod_jar("cobblemon")
def load_entries(jar):
@@ -388,8 +387,9 @@ def main():
lo, hi = zones[zid]["levels"]
kinds = {"submerged", "surface"} if "water" in zones[zid].get("rule", {}) else {"grounded"}
for name in roots:
root = f"cobblemon:{name}"
items = [i for i in raw_lines[root] if i[0].get("spawnablePositionType") in kinds]
base, _, form = name.partition(" ")
root = f"cobblemon:{base}"
items = [i for i in raw_lines[root] if i[0].get("spawnablePositionType") in kinds and (not form or i[0]["pokemon"].lower() == name)]
if not items:
# No usable spawn data at all: one plain entry across the band.
items = [({"type": "pokemon", "pokemon": name, "presets": ["natural"], "spawnablePositionType": "grounded"}, root, (lo, hi))]
@@ -416,8 +416,10 @@ def main():
"level": f"{a}-{b}", "weight": homeless["weight"], "condition": condition,
})
names = sorted({species[m]["name"] for _, m, _, _ in fitting if m in species})
report[zid].append((species.get(root, {}).get("name", root), names))
homeless_roots.add(root)
label = species.get(root, {}).get("name", root)
report[zid].append((f"{form.split()[0].title()} {label}" if form else label, names))
if not form: # a regional form comes on top of its line, which keeps its own home
homeless_roots.add(root)
low_flyers = [(zid, s["pokemon"]) for zid, spawns in pools.items() for s in spawns
if zones[zid]["levels"][0] < HIGH_ZONE_LEVEL and f"cobblemon:{s['pokemon'].split()[0].lower()}" in strong_flyers]