diff --git a/art/README.md b/art/README.md index 0bcb15e..5c6a570 100644 --- a/art/README.md +++ b/art/README.md @@ -19,7 +19,7 @@ Ein Wolf ist `Creatures`, auch wenn er in einem Wald steht; der Wald ist | Ordner | Was hinein gehört | Basisgröße | Ausgabe | Stil | Freisteller | |---|---|---|---|---|---| -| `Terrain/` | **Overland-Kacheln**: Grasland, Steppe, Wald, Hügel, Gebirge — nahtlos, 32×32 | 32×32 | 64×64 (2×) | A (flach) | nein | +| `Terrain/` | **Bodenkacheln**: Overland (Grasland, Steppe, Wald, Hügel, Gebirge) + Schlachtfeld (Gras, Erde, Stein) — nahtlos, 32×32 | 32×32 | 64×64 (2×) | A (flach) | nein | | `Pictures/` | Vollbilder: Szenen, Kulissen, Dialoghintergründe, Titelbilder — mit oder ohne Figuren | 640×360 | 1280×720 (2×) | B (gemalt) | nein | | `Creatures/` | Monster und Tiere als Sprite | 96×96 | 192×192 (2×) | A (flach) | ja | | `Players/` | Spielerfiguren und Porträts | 64×80 / 64×64 | 128×160 / 128×128 (2×) | A (flach) | ja | @@ -72,6 +72,7 @@ art/ tools/ui_probe.py Auflösungs-Gegenprobe: Dialog/Kampf bei 320x180 vs 640x360 tools/falgen.py fal.ai-Lauf: Allowlist, Preisabfrage, Rohbild, Lizenzzeile tools/vergleich.py beschriftetes Vergleichsblatt aus beliebigen Bildern + tools/battle_mock.py Kampfszenen-Mock: Top-down-Feld + UI, 640x360/1280x720 tools/setup.py check / deps / comfy / models / workbench workflows/ ComfyUI-Jobdateien, eine pro Motiv (flux2_klein9b_api.json = Standard) license-log.csv jede Generierung, mit Prompt und Seed diff --git a/art/WORKFLOW.md b/art/WORKFLOW.md index e78856e..1d3eacf 100644 --- a/art/WORKFLOW.md +++ b/art/WORKFLOW.md @@ -428,7 +428,7 @@ Was die Umsetzung gelehrt hat: | Bevel invertiert (hell oben/links in einer Vertiefung) | die Slots wirkten wie erhabene Kacheln → Regel: vertieft = dunkel oben/links | | eine Linie reicht über hellen Flächen nicht | `INK` außen + `LINE` innen; nur `LINE` franst über Himmel und Fenstern aus | | deckendes Panel wirkt aufgeklebt | Alpha 232–238 über der Szene | -| Vollkörper-Sprite auf 26×26 gecroppt ist ein Fleck | Party-Porträts sind gezeichnete Kopf-Schulter-Silhouetten | +| Vollkörper-Sprite auf 26×26 gecroppt ist ein Fleck | Party-Porträts sind eigene Kopf-Schulter-Bilder (seit 14.11. generiert, 32×32); die Silhouette im Rahmen ist nur noch Platzhalter | | 1-px-Rahmen und 5×7-Text brauchen Platz | Dialog 292×59 + Party-Spalte 34 px = ~48 % der Bildhöhe; über Szene A (Tageslicht) wird es eng | Nichts davon gehört ins Lizenzlog, weil nichts generiert wird. Kommt ein diff --git a/art/final/Players/README.md b/art/final/Players/README.md index 1dd41ef..7b2e63f 100644 --- a/art/final/Players/README.md +++ b/art/final/Players/README.md @@ -5,14 +5,14 @@ > ([`../../WORKFLOW.md`](../../WORKFLOW.md) §0). Der Nachlauf dieser Kategorie > steht in [`../../../docs/roadmap.md`](../../../docs/roadmap.md) §0.0. -Spielerfiguren (64×80) und Porträts (64×64), freigestellt. +Spielerfiguren (64×80), Porträts (64×64) und HUD-Porträts (32×32). | | | |---|---| -| Basisgröße | **64x80 / 64x64** | -| Ausgabe | 256x320 / 256x256 (4× nearest) | +| Basisgröße | **64x80 / 64x64** (Figuren, Porträts), **32x32** (HUD-Porträts) | +| Ausgabe | 256x320 / 256x256 (4× nearest), 128×128 (HUD-Porträts, 4×) | | Stil | Richtung **A** (flach) | -| Alpha | ja, freigestellt mit Kontur | +| Alpha | ja, freigestellt mit Kontur — **nicht** bei Porträts | ## Pipeline @@ -28,6 +28,34 @@ python3 ../../tools/pixelize.py ../../raw/Players/.png \ |---|---|---|---| | `player_abenteurer_64px.png` | `raw/Players/player_abenteurer_s777.png` | 777 | `--size 64x80 --colors 32 --levels 0.5 --gamma 1.15 --cutout 12 --outline auto --recenter --upscale 4` | +## Porträts (seit 14.11.2026) + +Sechs Kopf-Schulter-Porträts für die Party-Spalte, Stil **A**, 32×32, +16 Farben, **kein** Freisteller (der dunkle Hintergrund gehört zum Bild). +Sie stecken im Party-Rahmen `../UI/ui_party_40px.png` und werden im Spiel von +der Engine in den Rahmen komponiert. + +| Datei | Rohbild | Seed | +|---|---|---| +| `portrait_krieger_32px.png` | `raw/Players/portrait_krieger_s6101.png` | 6101 | +| `portrait_magierin_32px.png` | `raw/Players/portrait_magierin_s6102.png` | 6102 | +| `portrait_zwerg_32px.png` | `raw/Players/portrait_zwerg_s6103.png` | 6103 | +| `portrait_elfin_32px.png` | `raw/Players/portrait_elfin_s6104.png` | 6104 | +| `portrait_halbling_32px.png` | `raw/Players/portrait_halbling_s6105.png` | 6105 | +| `portrait_gelehrter_32px.png` | `raw/Players/portrait_gelehrter_s6106.png` | 6106 | + +```bash +python3 ../../tools/pixelize.py ../../raw/Players/portrait_krieger_s6101.png \ + -o portrait_krieger_32px.png --size 32x32 --colors 16 --upscale 4 +``` + +Bewusst **keine** gemeinsame Palette: sechs verschiedene Gesichter sollen +verschiedene Haut-, Haar- und Stofftöne haben. Was sie zusammenhält, ist der +Style-Block und die Farbzahl, nicht ein erzwungener Palettensatz. + +Der Dialog-Porträt-Satz (64×64, größer, mit mehr Platz) ist noch offen — die +32er sind HUD-Miniaturen, keine Dialogbilder. + ## Regeln - Bei Sprites: `--cutout` ist Pflicht, `--outline auto` ebenfalls — sonst diff --git a/art/final/Players/portrait_elfin_32px.png b/art/final/Players/portrait_elfin_32px.png new file mode 100644 index 0000000..0b92b15 Binary files /dev/null and b/art/final/Players/portrait_elfin_32px.png differ diff --git a/art/final/Players/portrait_gelehrter_32px.png b/art/final/Players/portrait_gelehrter_32px.png new file mode 100644 index 0000000..8a4b570 Binary files /dev/null and b/art/final/Players/portrait_gelehrter_32px.png differ diff --git a/art/final/Players/portrait_halbling_32px.png b/art/final/Players/portrait_halbling_32px.png new file mode 100644 index 0000000..0e0a2b0 Binary files /dev/null and b/art/final/Players/portrait_halbling_32px.png differ diff --git a/art/final/Players/portrait_krieger_32px.png b/art/final/Players/portrait_krieger_32px.png new file mode 100644 index 0000000..4fba0db Binary files /dev/null and b/art/final/Players/portrait_krieger_32px.png differ diff --git a/art/final/Players/portrait_magierin_32px.png b/art/final/Players/portrait_magierin_32px.png new file mode 100644 index 0000000..c127306 Binary files /dev/null and b/art/final/Players/portrait_magierin_32px.png differ diff --git a/art/final/Players/portrait_zwerg_32px.png b/art/final/Players/portrait_zwerg_32px.png new file mode 100644 index 0000000..eb793f8 Binary files /dev/null and b/art/final/Players/portrait_zwerg_32px.png differ diff --git a/art/final/Terrain/README.md b/art/final/Terrain/README.md index 63fe43d..34e5639 100644 --- a/art/final/Terrain/README.md +++ b/art/final/Terrain/README.md @@ -1,13 +1,13 @@ -# Terrain — Overland-Kacheln +# Terrain — Overland-Kacheln und Schlachtfeld-Boden -> **Arbeitsstand 12.11.2026:** Die Dateien hier sind mit 4× aus der alten +> **Arbeitsstand 12.11.2026:** Die Overland-Kacheln sind mit 4× aus der alten > 320×180-Basis erzeugt. Verbindlich ist inzwischen **640×360 Basis, 2×** > ([`../../WORKFLOW.md`](../../WORKFLOW.md) §0). Der Nachlauf dieser Kategorie > steht in [`../../../docs/roadmap.md`](../../../docs/roadmap.md) §0.0. -Die Blöcke, aus denen die Overland-Karte zusammengesetzt wird: **Grasland, -Steppe, Wald, Hügel, Gebirge**. Eine Kachel, ein Geländetyp, nahtlos in alle -Richtungen. +Zwei Sätze, eine Palette-Idee: die **Overland-Karte** (Grasland, Steppe, Wald, +Hügel, Gebirge — Symbole) und der **Schlachtfeld-Boden** (Gras, Erde, Stein — +Flächen). Beide bei 32×32, damit die Kampfsprites auf beiden Größen sitzen. | | | |---|---| @@ -57,6 +57,41 @@ Dazu: - `_karte_demo_1280x720.png` — Komposition 10×5 Kacheln, zeigt die Nahtfreiheit und die Wiederholung. +## Schlachtfeld-Boden (14.11.2026) + +Für das Top-down-Schlachtfeld (eigener Screen, 18×9 Kacheln à 32 px, +[`../../prep/battle-mock/`](../../prep/battle-mock/)) gibt es drei +**Bodenflächen** statt Symbole. Sie sind bewusst fast leer: Figuren und +Raster müssen darauf lesbar bleiben. + +| Datei | Rohbild | Seed | Farben (1×) | +|---|---|---|---| +| `battle_gras_32px.png` | `raw/Terrain/battle_gras_s4001.png` | 4001 | 3 | +| `battle_erde_32px.png` | `raw/Terrain/battle_erde_s4001.png` | 4001 | 4 | +| `battle_stein_32px.png` | `raw/Terrain/battle_stein_s4001.png` | 4001 | 10 | + +```bash +python3 ../../tools/pixelize.py ../../raw/Terrain/battle_gras_s4001.png \ + -o battle_gras_32px.png --size 32x32 --colors 12 --inset 4 --pre-blur 0.5 \ + --flatten 6 --seal-edge --palette _palette_battle.png --upscale 4 +# Erde: --inset 10 --flatten 8 (das Rohbild hat Steine am Rand → Ecken-Artefakte) +``` + +Dazu `_palette_battle.png` — 12 Farben aus den drei Kacheln. Nicht dieselbe +Palette wie die Overland-Kacheln: die ist auf Grün/Creme ausgelegt und hat kein +Grau für Stein (siehe „Offene Punkte" in `../../WORKFLOW.md` §4.6). + +Drei Dinge, die der Boden gelehrt hat: + +1. **Flächen statt Symbole.** „Plain ground with a few tufts" funktioniert bei + 32 px; jede Textur wird zum Rauschen und jedes Objekt zum Muster. +2. **Rand-Artefakte zuerst wegschneiden.** Beim Erd-Rohbild lagen Steine an den + Ecken; bei `--inset 4` wiederholten sie sich auf jeder Kachelnaht. + `--inset 10` plus `--flatten 8` hat es gelöst — billiger als neu generieren. +3. **Stein ist der lauteste Boden.** Die Fugen und hellen Kanten tragen bei 32 px + stark auf; für eine Ruine okay, als flächiger Dungeon-Boden zu unruhig. Da + braucht es später eine ruhigere Variante (weniger Fugen, kein Kontrast). + ## Regeln - **Symbole, keine Texturen.** „Drei Berggipfel mit Schnee auf flachem Grund" diff --git a/art/final/Terrain/_palette_battle.png b/art/final/Terrain/_palette_battle.png new file mode 100644 index 0000000..829d024 Binary files /dev/null and b/art/final/Terrain/_palette_battle.png differ diff --git a/art/final/Terrain/battle_erde_32px.png b/art/final/Terrain/battle_erde_32px.png new file mode 100644 index 0000000..89cc2a1 Binary files /dev/null and b/art/final/Terrain/battle_erde_32px.png differ diff --git a/art/final/Terrain/battle_gras_32px.png b/art/final/Terrain/battle_gras_32px.png new file mode 100644 index 0000000..1d9689b Binary files /dev/null and b/art/final/Terrain/battle_gras_32px.png differ diff --git a/art/final/Terrain/battle_stein_32px.png b/art/final/Terrain/battle_stein_32px.png new file mode 100644 index 0000000..f7daee8 Binary files /dev/null and b/art/final/Terrain/battle_stein_32px.png differ diff --git a/art/final/UI/README.md b/art/final/UI/README.md index 5ae619f..a967e2e 100644 --- a/art/final/UI/README.md +++ b/art/final/UI/README.md @@ -48,7 +48,7 @@ mehr auf das Raster zu bringen. | `ui_slots_22px.png` | 22×22 (6 Stück) | leer, Waffe, Pflanze, leer, ausgewählt + Stapelzahl, gesperrt | | `ui_window_pack_148x112.png` | 148×112 | Inventar: Titelleiste, 5×3-Raster, Schließen, Fußzeile | | `ui_window_zauber_148x116.png` | 148×116 | Zauberbuch: Schulen-Tabs, 5×3-Raster, Kosten, Mem-Slots | -| `ui_party_34px.png` | 34×34 (3 Stück) | Party-Rahmen mit Porträt und HP-Rinne, erster aktiv | +| `ui_party_40px.png` | 40×42 (6 Stück) | Party-Rahmen mit Porträt (32×32) und HP-Rinne, erster aktiv; die Porträts kommen aus `../Players/portrait_*_32px.png` | | `ui_kampf_leiste_300x40.png` | 300×40 | Initiative-Reihe + Aktionen (ATTACK … END TURN) | | `ui_misc_170x104.png` | 170×104 | Balken HP/SP/MP, Checkbox, Slider, Tooltip, Cursor | | `ui_ladebalken_180x20.png` | 180×20 | Ladebalken mit Segmentmarken und Prozentwert | @@ -107,7 +107,7 @@ Umbra) — UI und Bild sollen nicht zwei Welten sein. - **Neun-Slice.** Panels sind derzeit feste Größen (292, 148, 300 px). Für variable Textboxen braucht es 9-Slice-Ränder (Ecken 4×4, Kanten 1 px) plus Regel, wie der Inhalt einrückt. -- **Höhe gegen Bildfläche.** Dialog 292×59 + Party-Spalte 34 px sind ~48 % der +- **Höhe gegen Bildfläche.** Dialog 292×59 + Party-Spalte 40 px sind ~48 % der Bildhöhe. Über Szene B trägt das, über Szene A (heller Himmel) wird es eng. Die 6-Zeilen-Box (89 px) frisst noch mehr — Entscheidung steht aus. - **Noch nicht gebaut:** Kartenrand, Kapitel-/Titelbild-Rahmen, Kampf-Log, diff --git a/art/final/UI/_mock_hud_A_1280x720.png b/art/final/UI/_mock_hud_A_1280x720.png index 14659fb..0a12def 100644 Binary files a/art/final/UI/_mock_hud_A_1280x720.png and b/art/final/UI/_mock_hud_A_1280x720.png differ diff --git a/art/final/UI/_mock_hud_B_1280x720.png b/art/final/UI/_mock_hud_B_1280x720.png index 2e1639a..94748fc 100644 Binary files a/art/final/UI/_mock_hud_B_1280x720.png and b/art/final/UI/_mock_hud_B_1280x720.png differ diff --git a/art/final/UI/ui_party_34px.png b/art/final/UI/ui_party_34px.png deleted file mode 100644 index 2929bc5..0000000 Binary files a/art/final/UI/ui_party_34px.png and /dev/null differ diff --git a/art/final/UI/ui_party_40px.png b/art/final/UI/ui_party_40px.png new file mode 100644 index 0000000..18ed600 Binary files /dev/null and b/art/final/UI/ui_party_40px.png differ diff --git a/art/license-log.csv b/art/license-log.csv index 559df3f..71b4f15 100644 --- a/art/license-log.csv +++ b/art/license-log.csv @@ -48,3 +48,12 @@ datum,endpoint_id,request_id,prompt,seed,lizenz 2026-11-14,fal-ai/flux-2/klein/9b,01a1dbe4-1ee4-7661-aff5-751eb73ffbca,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a giant spider seen from directly above, eight thick segmented legs spread wide, a bulbous abdomen and a small head, centered, isolated on a flat solid magenta background, complete silhouette with all eight legs visible, no cast shadow, no ground plane",271828,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" 2026-11-14,fal-ai/flux-2/klein/9b,01a1dbe4-6bf9-7370-9ee2-500d2aff729c,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a giant spider seen from directly above, eight long legs spread wide, a bulbous abdomen and a small head, centered, isolated on a flat neutral mid-grey background, complete silhouette with all eight legs visible, no cast shadow, no ground plane",271828,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" 2026-11-14,fal-ai/flux-2/klein/9b,01a1dbe7-b434-7d50-84c9-689ae6545c2d,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, full body of a giant spider with a bulbous abdomen and eight long legs, several small eyes, side-on three-quarter view, centered, isolated on a flat neutral mid-grey background, complete silhouette with all eight legs visible, no cast shadow, no ground plane",271828,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbed-cc72-7513-ab84-5d5cd4e463d5,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, top-down view of flat grassy battlefield ground, almost entirely plain muted olive green with a few small darker grass tufts, no objects, no trees, no stones, no symbols, uniform even lighting, seamless tile with a wide empty margin",4001,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbed-da09-71d0-9500-c0c26c35da1f,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, top-down view of flat dry earth ground, almost entirely plain muted ochre brown with a few small pebbles and dry patches, no objects, no plants, no symbols, uniform even lighting, seamless tile with a wide empty margin",4001,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbed-e4cd-7f02-9a8e-7005f6985ee2,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, top-down view of a worn stone floor, almost entirely plain dusty slate grey with a few darker joints and small cracks, no objects, no symbols, uniform even lighting, seamless tile with a wide empty margin",4001,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbfc-f6e5-78b2-a9cf-78b5e81b1865,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a stern human warrior in his thirties, short dark hair, a scar across the cheek, chainmail collar, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered",6101,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbfd-01f7-7dd0-9bea-8eb8424e37ac,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a young human woman with braided auburn hair and a deep blue hooded robe, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered",6102,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbfd-0b82-75c0-890a-8882e44dcea8,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a broad dwarf with a braided grey beard, a heavy brow and iron shoulder plates, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered",6103,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbfd-1a71-7730-9b22-116c69eb82fd,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of an elf woman with long pale hair, pointed ears and a green leather hood, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered",6104,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbfd-2478-7023-9559-fbf5fdc54a84,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a halfling man with curly brown hair, a sly grin and a leather jerkin, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered",6105,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" +2026-11-14,fal-ai/flux-2/klein/9b,01a1dbfd-2ef7-7561-b066-3107383e6448,"illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of an older human scholar with grey temples, a weathered face and a dark cloak, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered",6106,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1024x1024, 1.0486 MP, x-fal-billable-units 1.0 = 0.01 USD" diff --git a/art/prep/battle-mock/README.md b/art/prep/battle-mock/README.md new file mode 100644 index 0000000..8b43184 --- /dev/null +++ b/art/prep/battle-mock/README.md @@ -0,0 +1,67 @@ +# Kampfszenen-Mock — Top-down-Schlachtfeld + +Stand: 14.11.2026 · Prüfgröße **640×360** (1×), Ausgabe zusätzlich 2× als +1280×720. Erzeugt von `art/tools/battle_mock.py` — kein Modell, kein +`pixelize`, 0 €. + +![Mock](_mock_battle_1280x720.png) + +## Layout (Basisraster, 1×) + +| Bereich | Maße | Position | +|---|---|---| +| Schlachtfeld | **18×9 Kacheln à 32 px = 576×288** | 0, 0 | +| Party-Spalte | 40×272 (6 Rahmen, Porträt 32×32) | rechts, im 64-px-Rand zentriert | +| Statuszeile | Rest der Zeile unter dem Feld | 6, 294 | +| Aktionsleiste | 300×40 (`ui_kampf_leiste`) | 4, 316 | +| Kampf-Log | 324×40 | 312, 316 | + +Entscheidungen, die in dem Bild stecken: + +- **Kacheln 32 px.** Dieselbe Größe wie die Overland-Kacheln, damit eine + gemeinsame Bodenpalette möglich bleibt; 18×9 = 162 Felder ist die Zahl aus + der Auflösungsprobe (`prep/aufloesung/`). +- **Kampfsprites 48 px.** Das ist die 96er-Canvas halbiert. Bei 96 px wäre + eine Figur drei Kacheln hoch und würde das Feld erdrücken; bei 48 sind es + ~1,5 Kacheln, wie in Taktik-CRPGs üblich. Die Bestiarium-Datei bleibt + 96er-Canvas — die Skalierung passiert im Kampf. +- **Raster dauerhaft sichtbar**, 1 px, als **Overlay** mit Alpha 34 über das + Feld komponiert — auf Gras dunkelt das von (131,127,74) auf (117,113,67) ab, + auf Erde von (178,146,95) auf (158,129,85). Es gliedert das Feld, dominierte + vorher aber: siehe „Alpha-Falle" unten. +- **Reichweite** als goldene Feldkanten, das aktive Feld mit kräftiger + Goldkante, darüber ein kleiner Pfeil; TP-Leiste 18×2 über jedem Kopf. + +## Was echt ist, was Platzhalter + +| Teil | Quelle | +|---|---| +| Boden (Gras, Erde, Stein) | `final/Terrain/battle_*_32px.png` — neu am 14.11. | +| Gegner | `final/Creatures/` (Ork, Ghul, Skelett, Spinne) | +| Party-Rahmen, Aktionsleiste | `ui.py` (1× gezeichnet) | +| Party-Porträts | `final/Players/portrait_*_32px.png` (sechs generierte Porträts, Stil A) | +| Kampf-Log | **ad hoc im Mock gezeichnet**, kein Element in `ui.py` | +| Raster, Reichweite, Marker | im Mock gezeichnet — in der Engine ein Overlay | + +## Offen + +- **Alpha-Falle:** `ImageDraw` ersetzt beim Zeichnen die Pixel samt Alpha, es + blendet nicht. Zeichnet man eine 30-%-Linie direkt auf das RGBA-Feld, wird + daraus beim Komponieren über den schwarzen Hintergrund eine 100-%-schwarze + Linie — und neben dunklen Gras-Sprenkeln wirkt sie doppelt so dick. Raster + und Reichweite laufen deshalb über eine eigene Overlay-Ebene und + `alpha_composite`; jede neue Markierung muss das genauso machen. +- **Kampf-Log als Element**: feste 324×40 reichen für drei Zeilen; für + Scrollen und variable Höhe braucht es das 9-Slice-Panel. +- **Raster/Reichweite/Marker** sind noch Zeichencode im Mock, keine + UI-Bausteine. Sie gehören vermutlich ins Engine-Overlay, nicht ins Panel-Set. +- **Gelände**: Erde und Stein sind da, aber es fehlen Wegstücke mit klaren + Kanten, Wasser, Felsen und Bäume als Hindernisse. Die Gras-Kachel wiederholt + ihre Sprenkel sichtbar. +- **Party**: sechs Rahmen mit echten Porträts (`prep/portraits/`), aber die + Reihenfolge steckt im Code (`party_portraits()`), nicht in den Party-Daten. + Ein Partymitglied ist im Mock aktiv (Goldrahmen), obwohl der Ork dran ist — + das zeigt nur den Zustand, keine Regel. +- **Kachelgröße** ist gesetzt, aber nicht endgültig geprüft: 18×9 bei 32 px + gegen 12×6 bei 48 px wäre der nächste Vergleich, wenn der Screen zu fein + wirkt. diff --git a/art/prep/battle-mock/_mock_battle_1280x720.png b/art/prep/battle-mock/_mock_battle_1280x720.png new file mode 100644 index 0000000..ac29514 Binary files /dev/null and b/art/prep/battle-mock/_mock_battle_1280x720.png differ diff --git a/art/prep/battle-mock/_mock_battle_640x360.png b/art/prep/battle-mock/_mock_battle_640x360.png new file mode 100644 index 0000000..e214605 Binary files /dev/null and b/art/prep/battle-mock/_mock_battle_640x360.png differ diff --git a/art/prep/battle-terrain/prompt_erde.txt b/art/prep/battle-terrain/prompt_erde.txt new file mode 100644 index 0000000..d477fc7 --- /dev/null +++ b/art/prep/battle-terrain/prompt_erde.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, top-down view of flat dry earth ground, almost entirely plain muted ochre brown with a few small pebbles and dry patches, no objects, no plants, no symbols, uniform even lighting, seamless tile with a wide empty margin diff --git a/art/prep/battle-terrain/prompt_gras.txt b/art/prep/battle-terrain/prompt_gras.txt new file mode 100644 index 0000000..d49c067 --- /dev/null +++ b/art/prep/battle-terrain/prompt_gras.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, top-down view of flat grassy battlefield ground, almost entirely plain muted olive green with a few small darker grass tufts, no objects, no trees, no stones, no symbols, uniform even lighting, seamless tile with a wide empty margin diff --git a/art/prep/battle-terrain/prompt_stein.txt b/art/prep/battle-terrain/prompt_stein.txt new file mode 100644 index 0000000..eed5faa --- /dev/null +++ b/art/prep/battle-terrain/prompt_stein.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, top-down view of a worn stone floor, almost entirely plain dusty slate grey with a few darker joints and small cracks, no objects, no symbols, uniform even lighting, seamless tile with a wide empty margin diff --git a/art/prep/portraits/README.md b/art/prep/portraits/README.md new file mode 100644 index 0000000..d155447 --- /dev/null +++ b/art/prep/portraits/README.md @@ -0,0 +1,59 @@ +# Party-Porträts — sechs Köpfe im A-Stil + +Stand: 14.11.2026 · fal `klein/9b`, **6 Läufe à 0,0063 $ = 0,0378 $**. +Ergebnis: `art/final/Players/portrait_*_32px.png` (32×32, 16 Farben, 4×). + +**Frage:** Ersetzt echte Porträt-Kunst die gezeichneten Platzhalter im +Party-Rahmen? Die `bust()`-Silhouetten in `ui.py` waren ein beigefarbenes Oval +mit zwei Punktaugen — bei 4× liest sich das als Smiley. + +## Vorgehen + +Style-Block A + Porträt-Motiv aus `prompts/retro_crpg_style.md` §2 +(„head and shoulders, three-quarter view, plain dark backdrop, single light +from upper left"), ein Satz Figur pro Porträt, je ein eigener Seed. Kein +Cutout: der dunkle Hintergrund gehört zum Bild und füllt den Rahmen. + +| Datei | Figur | Seed | +|---|---|---| +| `portrait_krieger_32px.png` | Mensch, Krieger, Narbe, Kettenhemd | 6101 | +| `portrait_magierin_32px.png` | Mensch, Magierin, Zopf, blaue Robe | 6102 | +| `portrait_zwerg_32px.png` | Zwerg, grauer Zopfbart, Schulterplatten | 6103 | +| `portrait_elfin_32px.png` | Elfe, helles Haar, Kapuze | 6104 | +| `portrait_halbling_32px.png` | Halbling, lockig, Lederwams | 6105 | +| `portrait_gelehrter_32px.png` | Mensch, älterer Gelehrter, dunkler Mantel | 6106 | + +```bash +python3 art/tools/falgen.py --endpoint fal-ai/flux-2/klein/9b \ + --prompt-file art/prep/portraits/prompt_krieger.txt \ + --size 1024x1024 --seed 6101 --kategorie Players \ + --name portrait_krieger_s6101 + +~/.venvs/art/bin/python art/tools/pixelize.py \ + ~/Dokumente/workbench_taloria/assets/raw/Players/portrait_krieger_s6101.png \ + -o art/final/Players/portrait_krieger_32px.png \ + --size 32x32 --colors 16 --upscale 4 +``` + +## Was der Lauf gezeigt hat + +1. **32 px sind das Minimum für ein Gesicht.** Bei 26 px (der alten + Platzhaltergröße) verliert die Nase ihren Schatten und das Gesicht kippt + ins Blobs; bei 32 px tragen Augen, Nase und Kinnlinie. Der Party-Rahmen ist + deshalb von 34×34 auf 40×42 gewachsen (Porträt 32×32). +2. **16 Farben reichen.** Jedes Porträt hat eine eigene 16er-Palette; eine + gemeinsame Palette hätte die sechs Gesichter auf denselben Hautton + gezwungen. Der Style-Block und die Farbzahl halten die Serie zusammen. +3. **Der dunkle Hintergrund bleibt.** Kein Freisteller: das Blaugrau ist Teil + des Porträts und schließt den Rahmen. Der Rand wird nicht konturiert. +4. **Sechs verschiedene Figuren, ein Prompt-Skelett.** Nur der Figurensatz + ändert sich; Perspektive, Licht und Hintergrund sind identisch — deshalb + wirken sie wie eine Gruppe und nicht wie sechs Einzelbilder. + +## Offen + +- **Dialog-Porträts** (64×64 oder größer) sind ein eigener Satz; die 32er sind + HUD-Miniaturen. Bei Dialoggröße trägt auch Stil B. +- Die Reihenfolge im Party-Rahmen ist fest verdrahtet + (`party_portraits()` in `ui.py`); sie sollte später aus den Party-Daten + kommen, nicht aus dem Code. diff --git a/art/prep/portraits/_uebersicht.png b/art/prep/portraits/_uebersicht.png new file mode 100644 index 0000000..303c9dd Binary files /dev/null and b/art/prep/portraits/_uebersicht.png differ diff --git a/art/prep/portraits/prompt_elfin.txt b/art/prep/portraits/prompt_elfin.txt new file mode 100644 index 0000000..3692b0b --- /dev/null +++ b/art/prep/portraits/prompt_elfin.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of an elf woman with long pale hair, pointed ears and a green leather hood, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered diff --git a/art/prep/portraits/prompt_gelehrter.txt b/art/prep/portraits/prompt_gelehrter.txt new file mode 100644 index 0000000..33ba4a9 --- /dev/null +++ b/art/prep/portraits/prompt_gelehrter.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of an older human scholar with grey temples, a weathered face and a dark cloak, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered diff --git a/art/prep/portraits/prompt_halbling.txt b/art/prep/portraits/prompt_halbling.txt new file mode 100644 index 0000000..988d6f6 --- /dev/null +++ b/art/prep/portraits/prompt_halbling.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a halfling man with curly brown hair, a sly grin and a leather jerkin, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered diff --git a/art/prep/portraits/prompt_krieger.txt b/art/prep/portraits/prompt_krieger.txt new file mode 100644 index 0000000..544f499 --- /dev/null +++ b/art/prep/portraits/prompt_krieger.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a stern human warrior in his thirties, short dark hair, a scar across the cheek, chainmail collar, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered diff --git a/art/prep/portraits/prompt_magierin.txt b/art/prep/portraits/prompt_magierin.txt new file mode 100644 index 0000000..f27c1e2 --- /dev/null +++ b/art/prep/portraits/prompt_magierin.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a young human woman with braided auburn hair and a deep blue hooded robe, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered diff --git a/art/prep/portraits/prompt_zwerg.txt b/art/prep/portraits/prompt_zwerg.txt new file mode 100644 index 0000000..9585051 --- /dev/null +++ b/art/prep/portraits/prompt_zwerg.txt @@ -0,0 +1 @@ +illustrated fantasy RPG art, late-1980s role-playing game cover-illustration sensibility, flat color shapes with hard edges, limited palette of six to eight hues - muted ochre, dusty slate blue, olive green, warm cream highlights, deep umber shadow, no gradients except two-step blends, strong silhouettes, readable at small size, painterly but economical detail, head and shoulders portrait of a broad dwarf with a braided grey beard, a heavy brow and iron shoulder plates, three-quarter view, plain dark backdrop, single light from upper left, calm expression, centered diff --git a/art/tools/battle_mock.py b/art/tools/battle_mock.py new file mode 100644 index 0000000..565ddd5 --- /dev/null +++ b/art/tools/battle_mock.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python3 +"""Kampfszenen-Mock — Top-down-Schlachtfeld bei 640x360 (2x = 1280x720). + +Setzt den Screen aus fertigen Teilen zusammen: Bodenkacheln aus +`final/Terrain/`, Kreaturen aus `final/Creatures/`, UI aus `ui.py` (1x +gezeichnet). Kein Modell, kein pixelize. + +Layout: + 576x288 Schlachtfeld (18x9 Kacheln a 32 px) + 64 px Party-Spalte rechts + 288-316 Statuszeile (Runde, wer dran ist) + 316-356 Aktionsleiste (300x40) + Kampf-Log (324x40) + +Kampfsprites stehen auf 48 px — die 96er-Canvas halbiert. Damit ist eine +Figur ~1,5 Kacheln hoch; 96 px waeren drei Kacheln und wuerden das Feld +erdruecken. Die Bodenkacheln sind 32 px wie die Overland-Kacheln. +""" +from __future__ import annotations + +import sys +from pathlib import Path + +from PIL import Image, ImageDraw + +ART = Path(__file__).resolve().parent.parent +sys.path.insert(0, str(ART / "tools")) +import ui # noqa: E402 + +W, H = 640, 360 +TILE = 32 +COLS, ROWS = 18, 9 +FIELD_W, FIELD_H = COLS * TILE, ROWS * TILE +SPRITE = 48 # Kampf-Sprite (96er-Canvas halbiert) + +GROUND = ART / "final" / "Terrain" +CREATURES = ART / "final" / "Creatures" +PLAYERS = ART / "final" / "Players" +PORTRAITS = ("portrait_krieger_32px.png", "portrait_magierin_32px.png", + "portrait_zwerg_32px.png", "portrait_elfin_32px.png", + "portrait_halbling_32px.png", "portrait_gelehrter_32px.png") + +# Einheiten: Datei, Spalte, Zeile, TP/Max +UNITS = [ + ("monster_orc_96px.png", 5, 6, 18, 20), + ("monster_ghul_96px.png", 8, 4, 7, 16), + ("monster_skelett_96px.png", 11, 6, 12, 20), + ("monster_spinne_96px.png", 14, 3, 9, 12), +] +ACTIVE = 0 +LOG = ( + "ORK GREIFT GHUL AN - 7 SCHADEN", + "GHUL BEWEGT SICH 4 FELDER", + "SKELETT 12/20 TP - SPINNE BEREIT", +) + + +def load_tile(name: str) -> Image.Image: + im = Image.open(GROUND / f"battle_{name}_32px.png").convert("RGB") + return im.resize((TILE, TILE), Image.NEAREST) + + +def build_field() -> Image.Image: + tiles = {n: load_tile(n) for n in ("gras", "erde", "stein")} + field = Image.new("RGB", (FIELD_W, FIELD_H)) + m = [["gras"] * COLS for _ in range(ROWS)] + for r in range(ROWS): # Erdpfad diagonal + for dc in (0, 1): + c = 4 + r // 2 + dc + if c < COLS: + m[r][c] = "erde" + for r in range(2, 5): # Steinruine + for c in range(12, 15): + m[r][c] = "stein" + for r in range(ROWS): + for c in range(COLS): + field.paste(tiles[m[r][c]], (c * TILE, r * TILE)) + return field + + +def draw_grid(d: ImageDraw.ImageDraw) -> None: + """Raster auf eine Overlay-Ebene — ImageDraw ersetzt Pixel samt Alpha, + zeichnet man direkt aufs Feld, wird aus 30 % Deckkraft eine schwarze + Linie (Alpha landet auf dem INK-Hintergrund).""" + line = ui.alpha(ui.INK, 34) + for c in range(1, COLS): + d.line((c * TILE, 0, c * TILE, FIELD_H - 1), fill=line) + for r in range(1, ROWS): + d.line((0, r * TILE, FIELD_W - 1, r * TILE), fill=line) + + +def draw_reach(d: ImageDraw.ImageDraw, col: int, row: int, reach: int) -> None: + for r in range(ROWS): + for c in range(COLS): + if abs(c - col) <= reach and abs(r - row) <= reach: + x0, y0 = c * TILE, r * TILE + d.rectangle((x0 + 1, y0 + 1, x0 + TILE - 2, y0 + TILE - 2), + outline=ui.alpha(ui.GOLD, 70)) + d.rectangle((col * TILE, row * TILE, col * TILE + TILE - 1, + row * TILE + TILE - 1), outline=ui.alpha(ui.GOLD, 220)) + + +def place(im: Image.Image, path: Path, col: int, row: int, + hp: int, hpmax: int, active: bool) -> None: + spr = Image.open(path).convert("RGBA").resize((SPRITE, SPRITE), Image.NEAREST) + x = col * TILE + TILE // 2 - SPRITE // 2 + base = row * TILE + TILE + y = base - SPRITE + 4 + d = ImageDraw.Draw(im) + d.ellipse((x + 11, base - 5, x + SPRITE - 11, base + 1), fill=ui.alpha(ui.INK, 90)) + im.alpha_composite(spr, (x, y)) + # TP-Leiste ueber dem Kopf + bw = 18 + bx, by = x + (SPRITE - bw) // 2, y + 2 + d.rectangle((bx - 1, by - 1, bx + bw, by + 2), fill=ui.alpha(ui.INK, 200)) + d.rectangle((bx, by, bx + bw - 1, by + 1), fill=ui.SLATE_D) + filled = 0 if hpmax == 0 else round((bw - 1) * hp / hpmax) + if filled: + d.rectangle((bx, by, bx + filled, by + 1), fill=ui.BLOOD) + if active: # Marker: kleiner Goldpfeil + cx = col * TILE + TILE // 2 + d.polygon([(cx - 4, y - 8), (cx + 4, y - 8), (cx, y - 3)], + fill=ui.GOLD) + + +def main() -> int: + out_dir = Path(sys.argv[1]) if len(sys.argv) > 1 else ART / "prep" / "battle-mock" + out_dir.mkdir(parents=True, exist_ok=True) + + im = Image.new("RGBA", (W, H), ui.alpha(ui.INK)) + field = build_field().convert("RGBA") + overlay = Image.new("RGBA", field.size, (0, 0, 0, 0)) + od = ImageDraw.Draw(overlay) + draw_grid(od) + ucol, urow = UNITS[ACTIVE][1], UNITS[ACTIVE][2] + draw_reach(od, ucol, urow, 3) + field = Image.alpha_composite(field, overlay) + im.alpha_composite(field, (0, 0)) + + for i, (name, col, row, hp, hpmax) in enumerate(UNITS): + place(im, CREATURES / name, col, row, hp, hpmax, i == ACTIVE) + + portraits = [Image.open(PLAYERS / p).convert("RGBA").resize( + (32, 32), Image.NEAREST) for p in PORTRAITS] + party = ui.elem_party(portraits) + im.alpha_composite(party, (FIELD_W + (W - FIELD_W - party.size[0]) // 2, + (FIELD_H - party.size[1]) // 2)) + + d = ImageDraw.Draw(im) + draw_text = lambda x, y, t, c: ui.draw_text(d, x, y, t, c) # noqa: E731 + draw_text(6, FIELD_H + 6, "ORK IST DRAN", ui.OCHRE) + draw_text(6 + 6 * 12, FIELD_H + 6, " - REICHWEITE 3", ui.CREAM) + + bar = ui.elem_combat() + im.alpha_composite(bar, (4, H - 44)) + lx = 312 + lw = W - 4 - lx + ui.panel(d, (lx, H - 44, lx + lw - 1, H - 5)) + draw_text(lx + 5, H - 40, "KAMPF-LOG", ui.OCHRE) + for i, line in enumerate(LOG): + draw_text(lx + 5, H - 30 + i * 8, line, ui.CREAM_D) + + im.save(out_dir / "_mock_battle_640x360.png") + im.resize((W * 2, H * 2), Image.NEAREST).save( + out_dir / "_mock_battle_1280x720.png") + print(f"{out_dir}/_mock_battle_640x360.png + 2x") + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/art/tools/ui.py b/art/tools/ui.py index 8eba082..93a784f 100644 --- a/art/tools/ui.py +++ b/art/tools/ui.py @@ -369,21 +369,52 @@ def elem_spells() -> Image.Image: return im -def elem_party() -> Image.Image: - fw, fh, gap = 34, 34, 4 - im = Image.new("RGBA", (fw, fh * 3 + gap * 2), (0, 0, 0, 0)) +def party_portraits(size: int = 32) -> list[Image.Image] | None: + """Die sechs Party-Porträts aus `final/Players/`, falls vorhanden. + + Die Rahmen sind prozedural, die Porträts sind generierte Assets. Für den + Export (Vorschau) und die Mocks werden sie hier hineinkomponiert; im Spiel + macht das die Engine. + """ + names = ("krieger", "magierin", "zwerg", "elfin", "halbling", "gelehrter") + paths = [ART / "final" / "Players" / f"portrait_{n}_32px.png" for n in names] + if not all(p.exists() for p in paths): + return None + return [Image.open(p).convert("RGBA").resize((size, size), Image.NEAREST) + for p in paths] + + +def elem_party(portraits: list[Image.Image] | None = None, count: int = 6, + fw: int = 40, fh: int = 42, psize: int = 32) -> Image.Image: + """Party-Spalte: Rahmen mit Porträt und HP-Rinne, erster aktiv. + + `portraits` sind fertige Bilder in `psize`; ohne sie zeichnet die Funktion + die alten Silhouetten-Platzhalter (`bust`). Die Vorgaben (6× 40x42) + passen zur 640x360-Basis und zur Kampf-Spalte; die alten HUD-Mocks rufen + bewusst `count=3, fw=34, fh=34, psize=26` auf. + """ + gap = 4 + im = Image.new("RGBA", (fw, fh * count + gap * (count - 1)), (0, 0, 0, 0)) d = ImageDraw.Draw(im) figures = [(SLATE_D, OCHRE_D, (176, 140, 108, 255), (26, 30)), (OLIVE_D, PANEL_HI, (156, 122, 94, 255), (12, 30)), (PANEL_HI, SLATE_D, (150, 118, 92, 255), (30, 30))] - for i, (hood, trim, skin, hp) in enumerate(figures): + for i in range(count): y = i * (fh + gap) + hood, trim, skin, hp = figures[i % len(figures)] panel(d, (0, y, fw - 1, y + fh - 1)) - well(d, (3, y + 3, fw - 4, y + 26)) - bust(d, 3, y + 3, hood, trim, skin) - fillw = round(24 * hp[0] / hp[1]) - d.rectangle((4, y + 29, 4 + fillw, y + 31), fill=BLOOD) - d.rectangle((4, y + 29, fw - 5, y + 31), outline=INK) + well(d, (3, y + 3, fw - 4, y + fh - 6)) + if portraits and i < len(portraits): + im.alpha_composite(portraits[i], (4, y + 4)) + else: + tmp = Image.new("RGBA", (26, 26), (0, 0, 0, 0)) + bust(ImageDraw.Draw(tmp), 0, 0, hood, trim, skin) + im.alpha_composite(tmp, (4 + (psize - 26) // 2, + y + 4 + (psize - 26) // 2)) + fillw = round((fw - 10) * hp[0] / hp[1]) + by = y + fh - 5 + d.rectangle((4, by, 4 + fillw, by + 2), fill=BLOOD) + d.rectangle((4, by, fw - 5, by + 2), outline=INK) if i == 0: d.rectangle((0, y, fw - 1, y + fh - 1), outline=GOLD) return im @@ -489,7 +520,8 @@ def mock_hud(scene: Path) -> Image.Image: base = Image.open(scene).convert("RGBA").resize((320, 180), Image.LANCZOS) d = ImageDraw.Draw(base) - base.alpha_composite(elem_party(), (320 - 34 - 6, 6)) + base.alpha_composite(elem_party(count=3, fw=34, fh=34, psize=26), + (320 - 34 - 6, 6)) panel(d, (6, 6, 46, 20), fill=alpha(PANEL, 232)) draw_text(d, 11, 10, "MENU", CREAM) @@ -553,7 +585,7 @@ def main(argv=None) -> None: "ui_slots_22px": elem_slots(), "ui_window_pack_148x112": elem_pack(), "ui_window_zauber_148x116": elem_spells(), - "ui_party_34px": elem_party(), + "ui_party_40px": elem_party(party_portraits()), "ui_misc_170x104": elem_misc(), "ui_kampf_leiste_300x40": elem_combat(), "ui_ladebalken_180x20": elem_loadbar(), diff --git a/art/tools/ui_probe.py b/art/tools/ui_probe.py index 840b237..a3f8a97 100644 --- a/art/tools/ui_probe.py +++ b/art/tools/ui_probe.py @@ -80,7 +80,7 @@ def mock_dialog(w: int, h: int) -> tuple[Image.Image, int, int, int, int]: im = scene(SCENE_DIALOG, (w, h)) d = ImageDraw.Draw(im) - im.alpha_composite(elem_party(), (w - 34 - 6, 6)) + im.alpha_composite(elem_party(count=3, fw=34, fh=34, psize=26), (w - 34 - 6, 6)) panel(d, (6, 6, 46, 20), fill=alpha(PANEL, 232)) draw_text(d, 11, 10, "MENU", CREAM) @@ -105,7 +105,7 @@ def mock_kampf(w: int, h: int) -> tuple[Image.Image, int, int, int]: bar = elem_combat() # 300x40, feste Elementgröße bar_h = bar.height bar_y = h - bar_h - 6 - party = elem_party() # 34x110 + party = elem_party(count=3, fw=34, fh=34, psize=26) # 34x110 im.alpha_composite(party, (w - 34 - 6, 6)) # Rasterfeld: alles über der Aktionsleiste, links der Party-Spalte diff --git a/docs/projekt.md b/docs/projekt.md index 33cdd22..67ae169 100644 --- a/docs/projekt.md +++ b/docs/projekt.md @@ -55,6 +55,7 @@ Datei beschreibt nur, *wie* das Spiel darauf zugreift: | Party | feste Gruppe, Werte und Ausrüstung sichtbar im HUD | | Dialog | Text ist der Hauptträger; Porträt + Textbox, keine Vertonung | | Kampf | **rundenbasiert, taktisch mit Raster** — Initiative, Positionen, Reichweiten | +| Kampf-Ansicht | **eigenes Top-down-Schlachtfeld** (kein Viewport): 18×9 Felder à 32 px, Gegner als Sprites, Party als Porträtspalte — entschieden 14.11.2026, Mock in [`art/prep/battle-mock/`](../art/prep/battle-mock/) | | Konfliktlösung | Kampf ist eine Option, nicht die einzige (Dialog, Schleichen, Umgehen) | | Textsprache | Deutsch; Prompts/Asset-Doku Englisch | diff --git a/docs/roadmap.md b/docs/roadmap.md index b39589a..9f014ec 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -99,6 +99,10 @@ Die Richtungsfrage ist entschieden (Hybrid, siehe - [ ] **Weltpalette** als Datei (`art/final/Terrain/_palette_tiles.png` erweitern oder eine gemeinsame `_palette_world.png`): 16–32 Farben für A, 64 für B, UI-Anker separat. +- [x] **Kampf-Mock** (14.11.2026): eigenes Top-down-Schlachtfeld, 18×9 Felder + à 32 px, Kampfsprites bei 48 px, Party-Spalte, Aktionsleiste, + Kampf-Log. Datei und offene Punkte in + [`art/prep/battle-mock/`](../art/prep/battle-mock/README.md). - [ ] **Lesbarkeitsprobe** bei 1×: ein Szenen-Mock mit UI darüber (`art/final/UI/_mock_hud_A/B`), plus ein Overland-Ausschnitt mit Sprites. Wenn das bei der Basisauflösung nicht lesbar ist, ist der Stil falsch,