#!/usr/bin/env python3 """T1 companion concept drafts for pets 7-9 via the LAN local Turbo API (same flow as generate_enemy_designs.py). Each companion uses its prototype portrait as identity reference (image 1) and FireCat as style reference (image 2). Body plans are chosen to fit the validated anatomy adapters: VineSprite / TideWhale biped_short, ThunderLeopard quadruped_heavy. Drafts go to Doc/Design/Character/{Id}/drafts/. Usage: python Tools/generate_companion_designs.py # all three python Tools/generate_companion_designs.py TideWhale # selected only """ from __future__ import annotations import json import sys import requests from generate_enemy_designs import ROOT, run, status DESIGN = ROOT / "Doc/Design/Character" PORTRAITS = ROOT / "AIClient/Assets/Bundles/UI/Texture/Prototype" STYLE = ROOT / "Doc/Design/Character/FireCat/firecat.png" COMMON = ( "Image 1 is the EXISTING prototype identity reference made of primitive shapes: keep its recognizable palette and idea while replacing " "the primitive proxy geometry with a real character. Image 2 is STYLE ONLY: match the FireCat companion's friendly polished chibi 3D " "mobile-game render, big expressive glossy eyes, appealing rounded volumes and clean readable shapes; do not copy cat features. " "One friendly T1 companion creature for a cozy meadow tower-defense game. Calm neutral rigging-friendly standing pose, bilaterally " "symmetrical, all feet grounded on a common flat plane with visible gaps between the limbs, head facing forward. Single full-body " "character centered, very shallow front three-quarter view (about 15 degrees off frontal), everything in frame with generous margin. " "Pure solid white #FFFFFF background to all corners, soft studio light, tiny contact shadow under the feet. Every part is solid and " "attached to the body: no floating pieces, no separate water drops, sparks, petals or particles. Simple smooth surfaces suitable for a " "2000-triangle mobile model with a 1024 texture. Exactly one character; no text, no watermark, no UI, no props, no scenery, no floor base." ) COMPANIONS = [ {"id": "VineSprite", "name": "藤蔓灵", "role": "pet 7 grass support (heal)", "seed": 71001, "portrait": 7, "size": (1024, 1024), "subject": "VineSprite, a small upright two-legged forest-green vine spirit, clearly different from a mint leaf bud: a rounded " "forest-green head with a pale lime face, a soft leaf hood that drapes over the back of the head, two thick curling vine " "tendrils springing from the top of the head and attached along their whole length, one small pink five-petal flower on the " "hood, a slim body wrapped by a single attached vine spiral, two short vine arms ending in rounded leaf hands, two short " "stubby root-like legs with flat rounded feet both grounded, gentle caring smile."}, {"id": "ThunderLeopard", "name": "雷鸣豹", "role": "pet 8 lightning damage (chain)", "seed": 81001, "portrait": 8, "size": (1536, 1024), "subject": "ThunderLeopard, a small sturdy FOUR-LEGGED leopard cub standing on all four paws: soft violet-purple fur with a few darker " "purple rosette spots, cream muzzle and belly, round ears, big bright golden eyes, a confident playful grin. Two broad " "solid cyan lightning-bolt-shaped crystal plates fused onto the shoulders like small armor, and one short cyan zigzag " "crystal crest on the forehead; the crystals are solid attached parts with shallow seams, not floating. Medium thick tail " "with a cyan crystal tip, attached. Four distinct stout legs with rounded paws all grounded, level back, head held forward " "at rest, neck readable and separable from the shoulders for a later short head-and-shoulder pounce animation. " "Landscape composition showing the whole body length."}, {"id": "TideWhale", "name": "潮汐鲸", "role": "pet 9 water guardian (shield)", "seed": 91001, "portrait": 9, "size": (1024, 1024), "subject": "TideWhale, a chubby baby whale standing UPRIGHT on two short stubby feet like a small round plush toy, not swimming and not " "floating: a round cyan-blue whale body with a smooth cream belly with soft grooves, a gently domed head, big friendly " "eyes, a small happy smile, two short rounded flippers held at the sides as arms, a small rounded dorsal fin, a short " "whale tail with two rounded flukes resting behind on the ground, two short separate stubby legs with flat round feet, " "a protective calm look. No water spout, no splash, no bubbles."}, ] def main() -> None: wanted = set(sys.argv[1:]) with requests.Session() as session: state = status(session) if not (state.get("connected") and state.get("ready")): raise SystemExit(f"local images not ready: {state}") for c in COMPANIONS: if wanted and c["id"] not in wanted: continue refs = [PORTRAITS / f"proto_pet_{c['portrait']}.png", STYLE] rec = run(c, session, design=DESIGN, refs=refs, common=COMMON, size=c["size"]) print(json.dumps({"id": rec["id"], "status": rec["status"], "drafts": len(rec["drafts"]), "error": rec["error"]}, ensure_ascii=False)) if __name__ == "__main__": main()