game: Inventar und fünf Vollbilder in 1920 — Titel scharf, Startgepäck
|
|
@ -1,63 +1,61 @@
|
|||
# Pictures
|
||||
|
||||
> **Stand 15.11.2026:** Die vier Bilder sind aus den Rohbildern **neu gerechnet**
|
||||
> (`--size 640x360 --upscale 2`) — bei Kacheln und Sprites war der Nachlauf eine
|
||||
> Halbierung, hier nicht: die 320er Basis steckte im Bild selbst, ein Halbieren
|
||||
> hätte nur das alte Detail weggeworfen. Verbindlich ist **640×360 Basis, 2×**
|
||||
> ([`../../WORKFLOW.md`](../../WORKFLOW.md) §0); der Nachlauf ist damit
|
||||
> abgeschlossen ([`../../../docs/roadmap.md`](../../../docs/roadmap.md) §0.0).
|
||||
Vollbilder für **Titel, Kapitel und Illustrationen** — mit oder ohne Figuren.
|
||||
Seit der Draufsicht-Entscheidung (14.11.2026) ist `Pictures/` nicht mehr der
|
||||
Spielbildschirm: Welt, Städte und Dungeons sind Karten (`../Terrain/`), Dialoge
|
||||
liegen als Panel darüber.
|
||||
|
||||
Vollbilder für **Titel, Kapitel und Illustrationen** — **mit oder ohne
|
||||
Figuren**. Seit der Draufsicht-Entscheidung (14.11.2026) ist `Pictures/` nicht
|
||||
mehr der Spielbildschirm: Welt, Städte und Dungeons sind Karten
|
||||
(`../Terrain/`), Dialoge liegen als Panel darüber. Hier bleiben Titelbild,
|
||||
Kapitelbilder, Zwischenbilder und Illustrationen.
|
||||
> **Stand 17.11.2026:** Fünf Bilder in **1920×1080**, gemalt, **1:1** aus
|
||||
> FLUX.2 [pro]. Die alten 1280er (640er Basis, 2×) sind ersetzt; es gibt keine
|
||||
> Halbierung und keinen `pixelize`-Lauf mehr für diese Kategorie. Belege:
|
||||
> [`../../prep/pictures-1920/`](../../prep/pictures-1920/README.md).
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Basisgröße | **640x360** |
|
||||
| Ausgabe | 1280x720 (2× nearest) |
|
||||
| Basisgröße | **1920×1080** |
|
||||
| Ausgabe | 1:1 |
|
||||
| Stil | Richtung **B** (gemalt) |
|
||||
| Alpha | nein, deckend |
|
||||
|
||||
## Pipeline
|
||||
|
||||
```bash
|
||||
python3 ../../tools/pixelize.py ../../raw/Pictures/<roh>.png \
|
||||
-o <name>_1280x720.png --size 640x360 --colors 64 --levels 0.5 --gamma 1.3 --upscale 2
|
||||
export FAL_KEY=...
|
||||
python3 ../../tools/falgen.py --endpoint fal-ai/flux-2-pro \
|
||||
--size 1920x1080 --kategorie Pictures --name <name>_1920x1080 \
|
||||
--prompt-file <prompt>.txt
|
||||
```
|
||||
|
||||
FLUX liefert 1920×**1072** (Vielfaches von 16); der letzte Schritt skaliert
|
||||
mit Lanczos auf 1920×1080 (0,75 % vertikal, unsichtbar).
|
||||
|
||||
## Inhalt
|
||||
|
||||
| Datei | Rohbild | Seed | Aufruf |
|
||||
| Datei | Rohbild | Modell | Prompt |
|
||||
|---|---|---|---|
|
||||
| `szene_waffenhaendler_1280x720.png` | `raw/Pictures/szene_waffenhaendler_v2_seed512733.png` | 512733 | `--size 640x360 --colors 64 --levels 0.5 --gamma 1.3 --upscale 2` |
|
||||
| `taverne_B_1280x720.png` | `raw/Pictures/szene_taverne_B_seed771102.png` | 771102 | `--size 640x360 --colors 64 --levels 0.5 --gamma 1.3 --upscale 2` |
|
||||
| `taverne_A_1280x720.png` | `raw/Pictures/szene_taverne_flux2_gpu_seed771102.png` | 771102 | `--size 640x360 --colors 32 --upscale 2` (leer, Richtung A) |
|
||||
| `waldrand_1280x720.png` | `raw/Pictures/terrain_waldrand_s90210.png` | 90210 | `--size 640x360 --colors 64 --levels 0.5 --gamma 1.3 --upscale 2` |
|
||||
| `titel_westreich_1920x1080.png` | `titel_westreich_1920x1080_v2` | pro | `prep/pictures-1920/prompt_titel.txt` |
|
||||
| `taverne_A_1920x1080.png` | `taverne_A_1920x1080` | pro | `prompt_taverne_a.txt` (Richtung A) |
|
||||
| `taverne_B_1920x1080.png` | `taverne_B_1920x1080` | pro | `prompt_taverne_b.txt` |
|
||||
| `szene_waffenhaendler_1920x1080.png` | `szene_waffenhaendler_1920x1080` | pro | `prompt_waffenhaendler.txt` |
|
||||
| `waldrand_1920x1080.png` | `waldrand_1920x1080` | pro | `prompt_waldrand.txt` |
|
||||
|
||||
**Titelgrafik** (15.11.2026): `titel_westreich_1280x720.png` — zwei vermummte
|
||||
Pilger auf dem Weg zum Tor von Garana, Abendlicht, freie dunkle Fläche oben
|
||||
rechts für den Titel. Rohbild über fal:
|
||||
Kosten: 6 erfolgreiche Läufe à 0,062 $ = **0,373 $** (ein Titel-Lauf und der
|
||||
erste Waldrand-Lauf scheiterten; kein Bild, keine Rechnung). Alle Zeilen mit
|
||||
`request_id` in [`../../license-log.csv`](../../license-log.csv).
|
||||
|
||||
```bash
|
||||
python3 ../../tools/falgen.py --endpoint fal-ai/flux-2-pro --size 1536x864 \
|
||||
--seed 771201 --name titel_westreich_fal_s771201 --kategorie Pictures --prompt "..."
|
||||
python3 ../../tools/pixelize.py <roh>.png -o titel_westreich_1280x720.png \
|
||||
--size 640x360 --colors 64 --levels 0.5 --gamma 1.3 --upscale 2 \
|
||||
--crop 0,0,52,56
|
||||
```
|
||||
## Titelgrafik
|
||||
|
||||
`--crop` schneidet die Signatur des Modells in der rechten unteren Ecke ab
|
||||
(neu in `pixelize.py`); das erste Rohbild mit demselben Motiv zeigte
|
||||
moderne Wanderer mit Rucksäcken und ist verworfen — Prompt-Regel daraus:
|
||||
**„hooded cloaks, walking staff" statt „travellers with a pack"**, sonst malt
|
||||
das Modell Gegenwartskleidung. Beide Läufe stehen im Lizenzlog.
|
||||
Zwei vermummte Pilger mit Laterne auf dem Weg zum Tor von Garana, Abendlicht,
|
||||
dunkle Fläche oben links für die Wortmarke. Der zweite Lauf wurde gewählt; der
|
||||
erste antwortete mit HTTP 422 (transient), der Waldrand-Lauf lief beim ersten
|
||||
Versuch in den 180-s-Timeout und wurde mit 300 s wiederholt.
|
||||
|
||||
Prompt-Regel aus dem alten Lauf bleibt: **„hooded cloaks, walking staff"** statt
|
||||
„travellers with a pack" — sonst malt das Modell Gegenwartskleidung.
|
||||
|
||||
## Regeln
|
||||
|
||||
- **`--levels 0.5 --gamma 1.3` ist Pflicht** bei Nacht- und Innenszenen: ohne
|
||||
Tonwertspreizung fällt die halbe Fläche auf Schwarz zusammen.
|
||||
- Kein Dithering global — bei dieser Motivgröße wirkt es als Filter (siehe
|
||||
`../../WORKFLOW.md` §4.3).
|
||||
- Neue Datei → Zeile in der Tabelle oben (Name, Seed, Rohdatei).
|
||||
- **Kein `pixelize`** für Vollbilder: sie bleiben gemalt; Quantisierung würde
|
||||
die Tonwerte zerstören, die den Titel tragen.
|
||||
- **Lanczos** nur für den 1072→1080-Schritt, nie für eine 1,5×-Vergrößerung.
|
||||
- Neue Datei → Zeile in der Tabelle oben (Name, Rohbild, Prompt).
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 101 KiB |
BIN
art/final/Pictures/szene_waffenhaendler_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 45 KiB |
BIN
art/final/Pictures/taverne_A_1920x1080.png
Normal file
|
After Width: | Height: | Size: 2.2 MiB |
|
Before Width: | Height: | Size: 121 KiB |
BIN
art/final/Pictures/taverne_B_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.1 MiB |
|
Before Width: | Height: | Size: 127 KiB |
BIN
art/final/Pictures/titel_westreich_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 103 KiB |
BIN
art/final/Pictures/waldrand_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.5 MiB |
|
|
@ -188,3 +188,8 @@ datum,endpoint_id,request_id,prompt,seed,lizenz
|
|||
2026-11-17,fal-ai/flux-2/klein/9b,01a1e9cd-06ab-7791-8b2a-d3c9592cc278,"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, single isolated round medallion icon with a simple metal rim, a crossed dagger and lockpick in the center, dark leather grip and steel blade, side-on flat view, centered, isolated on a flat solid magenta background, complete silhouette, no text, no letters, no cast shadow",8104,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 512x512, 0.2621 MP, x-fal-billable-units 1.0 = 0.01 USD, 4 Bilder"
|
||||
2026-11-17,fal-ai/flux-2/klein/9b,01a1e9cd-7a70-7d90-b211-e3024d76592b,"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, single isolated round medallion icon, thick silver metal rim around the whole circle, a bold upright sword fully inside the medallion, steel blade with a gold crossguard, centered, the circle fills the frame, isolated on a flat solid magenta background, complete silhouette, no text, no letters, no cast shadow",8105,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 512x512, 0.2621 MP, x-fal-billable-units 1.0 = 0.01 USD, 4 Bilder"
|
||||
2026-11-17,fal-ai/flux-2/klein/9b,01a1e9cd-90a8-7a30-8292-fcde58419b78,"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, single isolated round medallion icon, thick silver metal rim around the whole circle, an open spellbook with a small four-pointed star fully inside the medallion, centered, the circle fills the frame, isolated on a flat solid magenta background, complete silhouette, no text, no letters, no cast shadow",8106,"FLUX.2 [klein] 9B über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 512x512, 0.2621 MP, x-fal-billable-units 1.0 = 0.01 USD, 4 Bilder"
|
||||
2026-11-17,fal-ai/flux-2-pro,01a1e9d0-a608-7132-9e60-9aef21cb61de,"painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, view from behind of two cloaked travelers with a lantern on a wet muddy road approaching a torch-lit medieval town gate at dusk, two round stone towers flanking a timber-framed gatehouse, warm amber light spilling through the open gate, dark pine forest on the left, rolling hills and a few lit windows on the right, reflective puddles in the rutted road, cool blue twilight sky, eye level, wide establishing framing, one dominant shape, two supporting shapes, everything else quiet, no text, no letters",,"FLUX.2 [pro] über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1920x1080, 2.0736 MP, x-fal-billable-units 1.5 = 0.06 USD"
|
||||
2026-11-17,fal-ai/flux-2-pro,01a1e9d0-f65b-79e0-aea3-3ee060241cee,"illustrated fantasy RPG environment 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, first-person view of a harbor tavern interior at dusk, eye level, wide establishing framing, timber beams and a shuttered window with cold light behind it, clear value separation between foreground, middle ground and sky, one dominant shape, two supporting shapes, everything else quiet",,"FLUX.2 [pro] über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1920x1080, 2.0736 MP, x-fal-billable-units 1.5 = 0.06 USD"
|
||||
2026-11-17,fal-ai/flux-2-pro,01a1e9d1-4742-7970-b326-79a1d166440e,"painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, first-person view of a harbor tavern interior at dusk, eye level, wide establishing framing, timber beams and a shuttered window with cold light behind it, dust in the warm light, one dominant shape, two supporting shapes, everything else quiet",,"FLUX.2 [pro] über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1920x1080, 2.0736 MP, x-fal-billable-units 1.5 = 0.06 USD"
|
||||
2026-11-17,fal-ai/flux-2-pro,01a1e9d1-8eb3-7792-ab51-daf154aae382,"painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, first-person view of a weapons merchant's stall in a town square at dusk, a stocky merchant standing behind a heavy wooden counter, three heavy swords and one axe hanging on a beam behind him, clean empty counter top, warm lantern light from one side, cool evening sky above the roofs, eye level, wide establishing framing, one dominant shape, two supporting shapes, everything else quiet",,"FLUX.2 [pro] über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1920x1080, 2.0736 MP, x-fal-billable-units 1.5 = 0.06 USD"
|
||||
2026-11-17,fal-ai/flux-2-pro,01a1e9d5-05ce-7aa3-9143-6840822c6b0f,"painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, a forest edge at dawn seen from a low rise, moss, roots and ferns, cold morning mist between the trunks, one warm shaft of light from the left, no people, no buildings, no animals, empty wilderness, eye level, wide establishing framing, one dominant shape, two supporting shapes, everything else quiet",,"FLUX.2 [pro] über fal.ai (BFL Non-Commercial License: Gewichte/Selbsthosting; Outputs nach §2d frei nutzbar, keine IP-Indemnity) - 1920x1080, 2.0736 MP, x-fal-billable-units 1.5 = 0.06 USD"
|
||||
|
|
|
|||
|
50
art/prep/inventar/README.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Inventar — Modal über der Karte
|
||||
|
||||
Stand: 17.11.2026 · erste Fassung, ohne Item-Icons.
|
||||
|
||||
**Frage:** Reicht eine Liste mit Ausrüsten/Ablegen, solange es keine Icons
|
||||
gibt? **Ja** — die Mechanik ist sichtbar, das 5×3-Raster aus `ui.md` wartet
|
||||
auf die Icons.
|
||||
|
||||
| Bild | Zeigt |
|
||||
|---|---|
|
||||
| [`_inventar_1920x1080.png`](_inventar_1920x1080.png) | Aldric: Schwert/Kette/Schild ausgerüstet, Rucksack mit Vorrat, Seil, Leder, Dolch |
|
||||
|
||||
## Aufbau
|
||||
|
||||
- Dim + `ModalPanel`, 1400×760, mittig.
|
||||
- Partei-Reiter oben (bis sechs Figuren), ausgewählter Reiter gold.
|
||||
- Links **AUSGERÜSTET**: Waffe, Rüstung, Schild mit „Ablegen".
|
||||
- Rechts **RUCKSACK**: alle Gegenstände; ausrüstbare Typen (`weapon`, `armor`,
|
||||
`shield`) haben „Ausrüsten", Verbrauchsgüter nicht.
|
||||
- Fußzeile: RK, Angriff, TP der gewählten Figur.
|
||||
|
||||
Öffnen: Taste **I** oder der Knopf **INVENTAR** oben links in der Stadt.
|
||||
Schließen: **I**, **Esc** oder „Schließen".
|
||||
|
||||
## Daten
|
||||
|
||||
- `inventory` ist eine Liste aus `{"id": ..., "count": n}`.
|
||||
- `equipment` referenziert ids: `{"weapon": "schwert", "armor": "kette",
|
||||
"shield": true}`.
|
||||
- Startausrüstung steht in `classes.json` (`starting_equipment`) und wird in
|
||||
`Game.neue_figur()` gesetzt; das Startgepäck (`items`) landet im Rucksack.
|
||||
- `Game.ausruesten()` nimmt ein Stück aus dem Rucksack und legt das vorher
|
||||
ausgerüstete Stück zurück. `Game.ablegen()` macht das Gegenteil. Beide
|
||||
ändern nur die Figur; `Game.rk()` rechnet sofort neu.
|
||||
|
||||
```bash
|
||||
godot --headless --path game -- --check
|
||||
godot --headless --path game res://tools/probe_inventar.tscn -- --check
|
||||
godot --path game res://tools/schuss.tscn -- \
|
||||
res://tools/probe_inventar.tscn art/prep/inventar/_inventar_1920x1080.png
|
||||
```
|
||||
|
||||
## Offen
|
||||
|
||||
- **Item-Icons** und das 5×3-Raster aus `ui.md`; bis dahin ist die Liste die
|
||||
ehrliche Fassung.
|
||||
- **Benutzen** für Verbrauchsgüter (Vorrat, Trank) und Gold; `Game` hat noch
|
||||
kein Goldfeld.
|
||||
- **Tausch zwischen Figuren**, Gewicht/Traglast, Ausrüstungszwang je Klasse
|
||||
(der Magier kann derzeit jede Rüstung anlegen, wenn sie im Rucksack liegt).
|
||||
BIN
art/prep/inventar/_inventar_1920x1080.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
50
art/prep/pictures-1920/README.md
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# Vollbilder ×1920 — fünf gemalte Bilder
|
||||
|
||||
Stand: 17.11.2026 · FLUX.2 [pro], 1920×1080, **6 erfolgreiche Läufe =
|
||||
0,373 $** (Lizenzzeilen in [`../../license-log.csv`](../../license-log.csv)).
|
||||
|
||||
**Frage:** Reicht ein 1920er Neulauf der fünf Vollbilder für einen scharfen
|
||||
Titel, ohne die gemalte Handschrift zu verlieren? **Ja.** Kein `pixelize`, keine
|
||||
Halbierung — die Bilder gehen gemalt in die Engine.
|
||||
|
||||
| Bild | Zeigt |
|
||||
|---|---|
|
||||
| [`_kontakt_5.png`](_kontakt_5.png) | alle fünf bei 640×360 |
|
||||
| `../titel/_titel_1920x1080.png` | der Titelschirm mit dem neuen Bild |
|
||||
|
||||
## Läufe
|
||||
|
||||
| Motiv | Prompt | Status |
|
||||
|---|---|---|
|
||||
| Titel | [`prompt_titel.txt`](prompt_titel.txt) | Lauf 1 HTTP 422, Lauf 2 gewählt |
|
||||
| Taverne A | [`prompt_taverne_a.txt`](prompt_taverne_a.txt) | aus `flux2_klein9b_api.json` |
|
||||
| Taverne B | [`prompt_taverne_b.txt`](prompt_taverne_b.txt) | aus `flux2_klein9b_b.json` |
|
||||
| Waffenhändler | [`prompt_waffenhaendler.txt`](prompt_waffenhaendler.txt) | aus `szene_waffenhaendler_B_v2.json` |
|
||||
| Waldrand | [`prompt_waldrand.txt`](prompt_waldrand.txt) | erster Lauf Timeout, zweiter gewählt |
|
||||
|
||||
Die Prompts der vier alten Motive stammen aus den ComfyUI-Workflows; nur der
|
||||
Titel bekam einen neuen Prompt (die alte Formulierung war nicht mehr auffindbar).
|
||||
Der neue Titel hält die Komposition: zwei vermummte Pilger mit Laterne, Tor von
|
||||
Garana, Abendlicht, dunkle Fläche oben links für die Wortmarke.
|
||||
|
||||
## Nachbearbeitung
|
||||
|
||||
FLUX liefert **1920×1072** (Vielfaches von 16). Der einzige Schritt ist
|
||||
`resize((1920,1080), LANCZOS)` — 0,75 % vertikal, unsichtbar. Kein
|
||||
`--levels`, kein `--gamma`, kein `--colors`: Das sind gemalte Vollbilder, keine
|
||||
Pixelkacheln.
|
||||
|
||||
## Was der Lauf gekostet hat
|
||||
|
||||
6 × 0,0622 $ = **0,373 $**. Der 422-Titel und der Timeout-Waldrand haben kein
|
||||
Bild und keine Rechnung erzeugt. `falgen.py` wartet seitdem **300 s** statt
|
||||
180 s auf [pro]; 1920er Läufe können über drei Minuten brauchen.
|
||||
|
||||
## Was jetzt gilt
|
||||
|
||||
- `art/final/Pictures/` ist **1920×1080**, 1:1, ohne Halbierung.
|
||||
- `game/assets/pictures/` enthält dieselben fünf Dateien; die alten 1280er
|
||||
sind gelöscht.
|
||||
- `game/scenes/title/titel.gd` lädt `titel_westreich_1920x1080.png`.
|
||||
- Die Titel-Wortmarke sitzt weiter bei x=91, damit ihre Creme-Füllung auf 110
|
||||
mit Untertitel und Menü fluchtet.
|
||||
BIN
art/prep/pictures-1920/_kontakt_5.png
Normal file
|
After Width: | Height: | Size: 1.9 MiB |
1
art/prep/pictures-1920/prompt_taverne_a.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
illustrated fantasy RPG environment 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, first-person view of a harbor tavern interior at dusk, eye level, wide establishing framing, timber beams and a shuttered window with cold light behind it, clear value separation between foreground, middle ground and sky, one dominant shape, two supporting shapes, everything else quiet
|
||||
1
art/prep/pictures-1920/prompt_taverne_b.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, first-person view of a harbor tavern interior at dusk, eye level, wide establishing framing, timber beams and a shuttered window with cold light behind it, dust in the warm light, one dominant shape, two supporting shapes, everything else quiet
|
||||
1
art/prep/pictures-1920/prompt_titel.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, view from behind of two cloaked travelers with a lantern on a wet muddy road approaching a torch-lit medieval town gate at dusk, two round stone towers flanking a timber-framed gatehouse, warm amber light spilling through the open gate, dark pine forest on the left, rolling hills and a few lit windows on the right, reflective puddles in the rutted road, cool blue twilight sky, eye level, wide establishing framing, one dominant shape, two supporting shapes, everything else quiet, no text, no letters
|
||||
1
art/prep/pictures-1920/prompt_waffenhaendler.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, first-person view of a weapons merchant's stall in a town square at dusk, a stocky merchant standing behind a heavy wooden counter, three heavy swords and one axe hanging on a beam behind him, clean empty counter top, warm lantern light from one side, cool evening sky above the roofs, eye level, wide establishing framing, one dominant shape, two supporting shapes, everything else quiet
|
||||
1
art/prep/pictures-1920/prompt_waldrand.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
painterly fantasy RPG scene, dense detail held together by strong value structure, deep blue-black shadows against a single warm amber light source, cool desaturated blues and umbers, warm cream highlights, high contrast, chunky readable volumes, light falling off in visible soft steps, no fine linework, atmosphere over clarity, late-1980s role-playing game cover-painting sensibility, a forest edge at dawn seen from a low rise, moss, roots and ferns, cold morning mist between the trunks, one warm shaft of light from the left, no people, no buildings, no animals, empty wilderness, eye level, wide establishing framing, one dominant shape, two supporting shapes, everything else quiet
|
||||
105
art/prep/pictures-1920/rendern.log
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
=== titel_westreich_1920x1080_v1 ===
|
||||
Hinweis: 1920x1080 ist kein Vielfaches von 16 — fal rundet ggf.
|
||||
Modell: FLUX.2 [pro] (fal-ai/flux-2-pro) — 2.0736 MP × 0.03 $/processed megapixels = 0.0622 $
|
||||
Traceback (most recent call last):
|
||||
File "/Users/torsten/repos/taloria/art/tools/falgen.py", line 224, in <module>
|
||||
sys.exit(main())
|
||||
^^^^^^
|
||||
File "/Users/torsten/repos/taloria/art/tools/falgen.py", line 184, in main
|
||||
body, headers = api(f"https://fal.run/{a.endpoint}", key, payload)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/Users/torsten/repos/taloria/art/tools/falgen.py", line 69, in api
|
||||
with urllib.request.urlopen(req, timeout=180) as r:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 215, in urlopen
|
||||
return opener.open(url, data, timeout)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 521, in open
|
||||
response = meth(req, response)
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 630, in http_response
|
||||
response = self.parent.error(
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 559, in error
|
||||
return self._call_chain(*args)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 492, in _call_chain
|
||||
result = func(*args)
|
||||
^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 639, in http_error_default
|
||||
raise HTTPError(req.full_url, code, msg, hdrs, fp)
|
||||
urllib.error.HTTPError: HTTP Error 422: Unprocessable Entity
|
||||
=== titel_westreich_1920x1080_v2 ===
|
||||
Hinweis: 1920x1080 ist kein Vielfaches von 16 — fal rundet ggf.
|
||||
Modell: FLUX.2 [pro] (fal-ai/flux-2-pro) — 2.0736 MP × 0.03 $/processed megapixels = 0.0622 $
|
||||
Rohbild: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/titel_westreich_1920x1080_v2.png
|
||||
Anfrage: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/titel_westreich_1920x1080_v2.json
|
||||
Lizenzlog: 1 Zeile ergänzt (request_id 01a1e9d0-a608-7132-9e60-9aef21cb61de)
|
||||
=== taverne_A_1920x1080 ===
|
||||
Hinweis: 1920x1080 ist kein Vielfaches von 16 — fal rundet ggf.
|
||||
Modell: FLUX.2 [pro] (fal-ai/flux-2-pro) — 2.0736 MP × 0.03 $/processed megapixels = 0.0622 $
|
||||
Rohbild: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/taverne_A_1920x1080.png
|
||||
Anfrage: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/taverne_A_1920x1080.json
|
||||
Lizenzlog: 1 Zeile ergänzt (request_id 01a1e9d0-f65b-79e0-aea3-3ee060241cee)
|
||||
=== taverne_B_1920x1080 ===
|
||||
Hinweis: 1920x1080 ist kein Vielfaches von 16 — fal rundet ggf.
|
||||
Modell: FLUX.2 [pro] (fal-ai/flux-2-pro) — 2.0736 MP × 0.03 $/processed megapixels = 0.0622 $
|
||||
Rohbild: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/taverne_B_1920x1080.png
|
||||
Anfrage: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/taverne_B_1920x1080.json
|
||||
Lizenzlog: 1 Zeile ergänzt (request_id 01a1e9d1-4742-7970-b326-79a1d166440e)
|
||||
=== szene_waffenhaendler_1920x1080 ===
|
||||
Hinweis: 1920x1080 ist kein Vielfaches von 16 — fal rundet ggf.
|
||||
Modell: FLUX.2 [pro] (fal-ai/flux-2-pro) — 2.0736 MP × 0.03 $/processed megapixels = 0.0622 $
|
||||
Rohbild: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/szene_waffenhaendler_1920x1080.png
|
||||
Anfrage: /Users/torsten/Dokumente/workbench_taloria/assets/raw/Pictures/szene_waffenhaendler_1920x1080.json
|
||||
Lizenzlog: 1 Zeile ergänzt (request_id 01a1e9d1-8eb3-7792-ab51-daf154aae382)
|
||||
=== waldrand_1920x1080 ===
|
||||
Hinweis: 1920x1080 ist kein Vielfaches von 16 — fal rundet ggf.
|
||||
Modell: FLUX.2 [pro] (fal-ai/flux-2-pro) — 2.0736 MP × 0.03 $/processed megapixels = 0.0622 $
|
||||
Traceback (most recent call last):
|
||||
File "/Users/torsten/repos/taloria/art/tools/falgen.py", line 224, in <module>
|
||||
sys.exit(main())
|
||||
^^^^^^
|
||||
File "/Users/torsten/repos/taloria/art/tools/falgen.py", line 184, in main
|
||||
body, headers = api(f"https://fal.run/{a.endpoint}", key, payload)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/Users/torsten/repos/taloria/art/tools/falgen.py", line 69, in api
|
||||
with urllib.request.urlopen(req, timeout=180) as r:
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 215, in urlopen
|
||||
return opener.open(url, data, timeout)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 515, in open
|
||||
response = self._open(req, data)
|
||||
^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 532, in _open
|
||||
result = self._call_chain(self.handle_open, protocol, protocol +
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 492, in _call_chain
|
||||
result = func(*args)
|
||||
^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1405, in https_open
|
||||
return self.do_open(http.client.HTTPSConnection, req,
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/urllib/request.py", line 1361, in do_open
|
||||
r = h.getresponse()
|
||||
^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 1478, in getresponse
|
||||
response.begin()
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 343, in begin
|
||||
version, status, reason = self._read_status()
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/http/client.py", line 304, in _read_status
|
||||
line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/socket.py", line 720, in readinto
|
||||
return self._sock.recv_into(b)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1264, in recv_into
|
||||
return self.read(nbytes, buffer)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
File "/opt/homebrew/Cellar/python@3.12/3.12.15_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/ssl.py", line 1116, in read
|
||||
return self._sslobj.read(len, buffer)
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
TimeoutError: The read operation timed out
|
||||
=== fertig ===
|
||||
29
art/prep/pictures-1920/rendern.sh
Executable file
|
|
@ -0,0 +1,29 @@
|
|||
#!/usr/bin/env bash
|
||||
# Fünf Vollbilder in 1920×1080 über FLUX.2 [pro] (ein Bild je Aufruf).
|
||||
# Der Titel bekommt zwei Fassungen; die übrigen vier je eine.
|
||||
set -uo pipefail
|
||||
|
||||
HIER="$(cd "$(dirname "$0")" && pwd)"
|
||||
REPO="$(cd "$HIER/../../.." && pwd)"
|
||||
PY="$HOME/.venvs/art/bin/python"
|
||||
LOG="$HIER/rendern.log"
|
||||
|
||||
: > "$LOG"
|
||||
|
||||
lauf() {
|
||||
local prompt="$1" name="$2"
|
||||
echo "=== $name ===" | tee -a "$LOG"
|
||||
"$PY" "$REPO/art/tools/falgen.py" \
|
||||
--endpoint fal-ai/flux-2-pro \
|
||||
--prompt-file "$HIER/prompt_$prompt.txt" \
|
||||
--size 1920x1080 --kategorie Pictures --name "$name" 2>&1 | tee -a "$LOG"
|
||||
}
|
||||
|
||||
lauf titel titel_westreich_1920x1080_v1
|
||||
lauf titel titel_westreich_1920x1080_v2
|
||||
lauf taverne_a taverne_A_1920x1080
|
||||
lauf taverne_b taverne_B_1920x1080
|
||||
lauf waffenhaendler szene_waffenhaendler_1920x1080
|
||||
lauf waldrand waldrand_1920x1080
|
||||
|
||||
echo "=== fertig ===" | tee -a "$LOG"
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
Stand: 17.11.2026 · Beleg zu `docs/roadmap.md` Phase 1.
|
||||
|
||||
**Frage:** Trägt das vorhandene Titelbild einen Schirm, ohne ein neues
|
||||
Modell-Rendering? **Ja** — das Bild liegt in `art/final/Pictures/` (1280×720),
|
||||
die Wortmarke ist aus dem vorhandenen TTF gesetzt.
|
||||
Modell-Rendering? **Ja** — das Bild liegt in `art/final/Pictures/`
|
||||
(**1920×1080**, 17.11.2026), die Wortmarke ist aus dem vorhandenen TTF gesetzt.
|
||||
|
||||
| Bild | Zeigt |
|
||||
|---|---|
|
||||
|
|
@ -13,9 +13,8 @@ die Wortmarke ist aus dem vorhandenen TTF gesetzt.
|
|||
|
||||
## Aufbau
|
||||
|
||||
- Hintergrund: `Pictures/titel_westreich_1280x720.png`, auf 1920 skaliert
|
||||
(gemaltes Register, linear). Das Bild ist **noch kein** 1920er Neulauf; der
|
||||
steht in der Roadmap.
|
||||
- Hintergrund: `Pictures/titel_westreich_1920x1080.png`, **1:1** (gemaltes
|
||||
Register). Neulauf vom 17.11.2026: [`../pictures-1920/`](../pictures-1920/README.md).
|
||||
- Wortmarke: `ui/titel_taloria.png` — Pirata One 200 px, Creme mit dunkler
|
||||
Kontur und Schatten, mit Pillow gesetzt. **Kein Modellaufruf, 0 $.** Sie ist
|
||||
die einzige UI-Datei, die nicht aus `ui.py` kommt.
|
||||
|
|
@ -37,8 +36,6 @@ godot --path game res://tools/schuss.tscn -- \
|
|||
|
||||
## Offen
|
||||
|
||||
- `Pictures/` in **1920×1080** neu rendern (fünf Bilder, ca. 0,3 $); bis dahin
|
||||
ist der Titel eine 1,5×-Vergrößerung.
|
||||
- Slot-Metadaten (Datum, Party, Ort) im Lade-Panel; `Saves` speichert sie noch
|
||||
nicht.
|
||||
- „Weiter" ist fest Slot 1; ein „letzter Spielstand" braucht einen Zeiger.
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 572 KiB After Width: | Height: | Size: 1.3 MiB |
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 2.9 MiB |
|
|
@ -66,7 +66,8 @@ def api(url: str, key: str, payload: dict | None = None) -> tuple[dict, dict]:
|
|||
"Authorization": f"Key {key}",
|
||||
"Content-Type": "application/json",
|
||||
})
|
||||
with urllib.request.urlopen(req, timeout=180) as r:
|
||||
# 1920x1080 über [pro] kann über drei Minuten brauchen.
|
||||
with urllib.request.urlopen(req, timeout=300) as r:
|
||||
return json.loads(r.read().decode()), dict(r.headers)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,8 @@ seine Regeln sind rasterunabhängig.
|
|||
1. **2×-Nachlauf** — Terrain, Creatures, Players, NPCs und Objects halbiert
|
||||
([`../art/tools/nachlauf2x.py`](../art/tools/nachlauf2x.py), verlustfrei);
|
||||
`Pictures/` als einzige Ausnahme aus den Rohbildern **neu gerechnet**
|
||||
(`--size 640x360`). Alle Kategorien liegen jetzt in 2×.
|
||||
(`--size 640x360`). Alle Kategorien liegen jetzt in 2×. Die Bilder wurden
|
||||
am 17.11.2026 durch **1920×1080, 1:1** ersetzt (FLUX.2 [pro]).
|
||||
2. **9-Slice-Panel** — `art/final/UI/ui_panel_9slice_12px.png` (Rand 2 px bei
|
||||
1×) ersetzt feste Panelgrößen; pixelgleich zu `panel()` für 4×4 bis 400×56,
|
||||
geprüft von [`../art/tools/ui_slice.py`](../art/tools/ui_slice.py).
|
||||
|
|
@ -184,9 +185,8 @@ Folgefragen, die bewusst nicht hier, sondern in 0.1/0.2 entschieden werden:
|
|||
- [x] **Fontgröße: 8×10** (14.11.2026) — Zeichen und Umlaute fehlen noch,
|
||||
siehe 0.2
|
||||
- [x] **Nachlauf:** `art/final/` ist komplett auf 2× (14.11.2026, Werkzeug:
|
||||
`art/tools/nachlauf2x.py`). Offen ist nur `Pictures/` — dort steckt die
|
||||
320er Basis im Bild selbst, also ein Neulauf aus dem Rohbild statt einer
|
||||
Halbierung.
|
||||
`art/tools/nachlauf2x.py`). `Pictures/` wurde am 17.11.2026 als
|
||||
**1920×1080, 1:1** neu gerendert — der letzte 640er Rest ist damit weg.
|
||||
|
||||
### 0.1 Grafikstil
|
||||
|
||||
|
|
@ -546,7 +546,10 @@ Struktur, Datenmodell und Effekt-Vokabel stehen in [`engine.md`](engine.md).
|
|||
`tools/probe_erstellung.tscn`. Startausrüstung, vier Volk-Porträts
|
||||
(384 px) und vier Klassen-Embleme (64 px) sind in Maske und Roster —
|
||||
Entwurf in [`charaktererstellung.md`](charaktererstellung.md).
|
||||
- [ ] **Kartenwechsel** (Overland ↔ Stadt ↔ Dungeon), Inventar-UI.
|
||||
- [x] **Inventar**: Modal über der Karte, Partei-Reiter, ausgerüstete Slots und
|
||||
Rucksack mit Ausrüsten/Ablegen; Startgepäck in `classes.json`. Bewusst eine
|
||||
Liste, kein 5×3-Raster, solange Item-Icons fehlen (`prep/inventar/`).
|
||||
- [ ] **Kartenwechsel** (Overland ↔ Stadt ↔ Dungeon).
|
||||
- [x] **Titelschirm** (`scenes/title/titel.tscn`): gemaltes Titelbild,
|
||||
vorgerenderte Wortmarke `ui/titel_taloria.png`, Neu/Weiter/Laden/Beenden.
|
||||
„Weiter" liest Slot 1, „Laden" zeigt drei Slots.
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ bespielbar (Ortsbild → Gebiet → zurück).
|
|||
| `art/final/Creatures/` | 11 Kreaturen **1:1** in Anzeigegröße (84/108/144/288/384/480) |
|
||||
| `game/scripts/systems/charakter.gd` | Punktekauf, Volksbonus, Ableitung und Prüfung der Erstellung |
|
||||
| `game/scenes/title/titel.*` | Titelschirm: Neu, Weiter, Laden (3 Slots), Beenden |
|
||||
| `game/scenes/ui/inventar.*` | Inventar-Modal: Partei-Reiter, Slots, Rucksack, Ausrüsten/Ablegen |
|
||||
| `art/prep/inventar/` | Beleg des Inventars: Screenshot, Datenmodell, offene Punkte |
|
||||
| `game/scenes/creation/erstellung.*` | Roster (1–6) und Figurenmaske; Einstieg nach „Neu" |
|
||||
| `docs/charaktererstellung.md` | Entwurf der Party-Erstellung: Ablauf, Schirm, Regeln, Prüfkriterien |
|
||||
| `game/assets/gemalt/` | **gemalte Assets** (Hintergrund, Figuren, Props, Porträts, Ortsbild) |
|
||||
|
|
@ -98,8 +100,8 @@ Pixel-UI. Umsetzung: `game/scenes/world/stadt.gd` (`gedaempft = true`) und
|
|||
ein neues Gebiet = neues JSON + Eintrag im Ortsbild.
|
||||
3. **Animation**: es gibt keine. Bewegung ist ein 0,1-s-Tween zwischen Feldern.
|
||||
Für ein gemaltes Register ist das tragbar, für ein Pixel-Register auch.
|
||||
4. **Inventar, Kampf** — offen. Titelschirm (Neu/Weiter/Laden) und
|
||||
Partyerstellung sind der Einstieg.
|
||||
4. **Kampf** — offen. Titelschirm (Neu/Weiter/Laden), Partyerstellung und
|
||||
Inventar stehen.
|
||||
5. **Kreaturen** — **fertig (17.11.2026)**: acht Zeichnungen in Anzeigegröße
|
||||
(84/108/144) plus Oger, Drache und Endgegner (288/384/480), `klasse` in
|
||||
`monsters.json`, keine Halbierung mehr. Auch die großen Klassen haben Werte
|
||||
|
|
@ -160,7 +162,8 @@ Ohne Raws läuft das Spiel; sie fehlen nur, wenn `pixelize.py` oder
|
|||
|
||||
## Was diese Session gekostet hat
|
||||
|
||||
Renderings: **≈ 0,82 $** über 29 FLUX-Läufe (14.–17.11.). Davon **0,372 $**
|
||||
für die elf Kreaturen der 3×-Leiter (44 Rohbilder: acht Motive à 768²,
|
||||
Oger 1536², Drache und Endgegner 2048²). Jede Zeile steht mit `request_id` in
|
||||
Renderings: **≈ 1,33 $** über 45 FLUX-Läufe (14.–17.11.). Davon
|
||||
**0,372 $** Kreaturen (44 Rohbilder), **0,101 $** vier Volk-Porträts,
|
||||
**0,038 $** vier Klassen-Embleme und **0,373 $** fünf Vollbilder in 1920×1080
|
||||
(sechs erfolgreiche [pro]-Läufe). Jede Zeile steht mit `request_id` in
|
||||
[`../art/license-log.csv`](../art/license-log.csv).
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@ eigener Viewport — das ist die Draufsicht-Entscheidung aus
|
|||
Fenster liegen mittig über der abgedunkelten Karte; die Partyspalte bleibt
|
||||
sichtbar. Mock: [`../art/prep/map-mock/`](../art/prep/map-mock/) (`_mock_inventar`).
|
||||
|
||||
> **Umsetzung 17.11.2026:** Das Fenster zeigt eine **Liste** (ausgerüstete
|
||||
> Slots + Rucksack) statt des 5×3-Rasters. Grund: Es gibt noch keine
|
||||
> Item-Icons; ein Raster aus leeren Kästchen wäre unehrlicher. Das Raster kommt
|
||||
> mit den Icons. Beleg: [`../art/prep/inventar/`](../art/prep/inventar/README.md).
|
||||
|
||||
### Kampf
|
||||
|
||||
```
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 224 KiB |
BIN
game/assets/pictures/szene_waffenhaendler_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.6 MiB |
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://jilkyjxbqbek"
|
||||
path="res://.godot/imported/szene_waffenhaendler_1280x720.png-bc52671f0ee0a37a93c7cbb02608bae1.ctex"
|
||||
uid="uid://cgcc1m8gtxfqk"
|
||||
path="res://.godot/imported/szene_waffenhaendler_1920x1080.png-af637714c5432ad4d5a90f027d18ffd8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/pictures/szene_waffenhaendler_1280x720.png"
|
||||
dest_files=["res://.godot/imported/szene_waffenhaendler_1280x720.png-bc52671f0ee0a37a93c7cbb02608bae1.ctex"]
|
||||
source_file="res://assets/pictures/szene_waffenhaendler_1920x1080.png"
|
||||
dest_files=["res://.godot/imported/szene_waffenhaendler_1920x1080.png-af637714c5432ad4d5a90f027d18ffd8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 87 KiB |
BIN
game/assets/pictures/taverne_A_1920x1080.png
Normal file
|
After Width: | Height: | Size: 2.5 MiB |
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ckaa4u5qh6oo7"
|
||||
path="res://.godot/imported/taverne_A_1280x720.png-0a0c3436c9acbc531edf89cd45a634d0.ctex"
|
||||
uid="uid://dcxkbymhn1s0h"
|
||||
path="res://.godot/imported/taverne_A_1920x1080.png-8e829b3be4088d7915656d7cfa942d54.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/pictures/taverne_A_1280x720.png"
|
||||
dest_files=["res://.godot/imported/taverne_A_1280x720.png-0a0c3436c9acbc531edf89cd45a634d0.ctex"]
|
||||
source_file="res://assets/pictures/taverne_A_1920x1080.png"
|
||||
dest_files=["res://.godot/imported/taverne_A_1920x1080.png-8e829b3be4088d7915656d7cfa942d54.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 253 KiB |
BIN
game/assets/pictures/taverne_B_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.4 MiB |
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bqexa8f687emr"
|
||||
path="res://.godot/imported/taverne_B_1280x720.png-f1e021ba1101602bcfc88b1701209179.ctex"
|
||||
uid="uid://dnamrf1i6h8vj"
|
||||
path="res://.godot/imported/taverne_B_1920x1080.png-6bc28e4b34f43fb9f279e074337108a8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/pictures/taverne_B_1280x720.png"
|
||||
dest_files=["res://.godot/imported/taverne_B_1280x720.png-f1e021ba1101602bcfc88b1701209179.ctex"]
|
||||
source_file="res://assets/pictures/taverne_B_1920x1080.png"
|
||||
dest_files=["res://.godot/imported/taverne_B_1920x1080.png-6bc28e4b34f43fb9f279e074337108a8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 309 KiB |
BIN
game/assets/pictures/titel_westreich_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.7 MiB |
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://buynp0nbf1c28"
|
||||
path="res://.godot/imported/titel_westreich_1280x720.png-0dfbda1464b68dc38ea6d232adb67959.ctex"
|
||||
uid="uid://c4mxh0h6eunpl"
|
||||
path="res://.godot/imported/titel_westreich_1920x1080.png-68c5024fc1cb4afbdf92a0d4708aaaa4.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/pictures/titel_westreich_1280x720.png"
|
||||
dest_files=["res://.godot/imported/titel_westreich_1280x720.png-0dfbda1464b68dc38ea6d232adb67959.ctex"]
|
||||
source_file="res://assets/pictures/titel_westreich_1920x1080.png"
|
||||
dest_files=["res://.godot/imported/titel_westreich_1920x1080.png-68c5024fc1cb4afbdf92a0d4708aaaa4.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
Before Width: | Height: | Size: 206 KiB |
BIN
game/assets/pictures/waldrand_1920x1080.png
Normal file
|
After Width: | Height: | Size: 3.8 MiB |
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b6me75643b6db"
|
||||
path="res://.godot/imported/waldrand_1280x720.png-fd46593f7be7fdc709c5357000adcf56.ctex"
|
||||
uid="uid://cndvw0dd3pcs7"
|
||||
path="res://.godot/imported/waldrand_1920x1080.png-b0b77adb2138a7382c713472ff6d4fc1.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/pictures/waldrand_1280x720.png"
|
||||
dest_files=["res://.godot/imported/waldrand_1280x720.png-fd46593f7be7fdc709c5357000adcf56.ctex"]
|
||||
source_file="res://assets/pictures/waldrand_1920x1080.png"
|
||||
dest_files=["res://.godot/imported/waldrand_1920x1080.png-b0b77adb2138a7382c713472ff6d4fc1.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
|
|
@ -44,7 +44,11 @@
|
|||
"starting_equipment": {
|
||||
"armor": "kette",
|
||||
"shield": true,
|
||||
"weapon": "schwert"
|
||||
"weapon": "schwert",
|
||||
"items": [
|
||||
"vorrat",
|
||||
"seil"
|
||||
]
|
||||
}
|
||||
},
|
||||
"cleric": {
|
||||
|
|
@ -119,7 +123,11 @@
|
|||
"starting_equipment": {
|
||||
"armor": "leder",
|
||||
"shield": true,
|
||||
"weapon": "keule"
|
||||
"weapon": "keule",
|
||||
"items": [
|
||||
"vorrat",
|
||||
"seil"
|
||||
]
|
||||
}
|
||||
},
|
||||
"magier": {
|
||||
|
|
@ -187,7 +195,11 @@
|
|||
}
|
||||
],
|
||||
"starting_equipment": {
|
||||
"weapon": "stab"
|
||||
"weapon": "stab",
|
||||
"items": [
|
||||
"vorrat",
|
||||
"laterne"
|
||||
]
|
||||
}
|
||||
},
|
||||
"thief": {
|
||||
|
|
@ -238,7 +250,11 @@
|
|||
"starting_equipment": {
|
||||
"armor": "leder",
|
||||
"shield": false,
|
||||
"weapon": "dolch"
|
||||
"weapon": "dolch",
|
||||
"items": [
|
||||
"vorrat",
|
||||
"laterne"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ signal neu
|
|||
signal weiter(slot: int)
|
||||
|
||||
const THEME := preload("res://scripts/ui/ui_theme.gd")
|
||||
const BILD := "res://assets/pictures/titel_westreich_1280x720.png"
|
||||
const BILD := "res://assets/pictures/titel_westreich_1920x1080.png"
|
||||
const TITEL := "res://assets/ui/titel_taloria.png"
|
||||
|
||||
var _wurzel: Control
|
||||
|
|
|
|||
237
game/scenes/ui/inventar.gd
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
extends Control
|
||||
## Inventar als Modal über der Karte (docs/ui.md §1).
|
||||
##
|
||||
## Zeigt pro Party-Figur die ausgerüsteten Slots und den Rucksack. Ausrüsten
|
||||
## nimmt ein Stück aus dem Rucksack, Ablegen legt es zurück; die RK kommt aus
|
||||
## `Game.rk()` und ändert sich sofort.
|
||||
|
||||
signal geschlossen
|
||||
|
||||
const THEME := preload("res://scripts/ui/ui_theme.gd")
|
||||
|
||||
const SLOTS := [
|
||||
{"key": "weapon", "label": "Waffe"},
|
||||
{"key": "armor", "label": "Rüstung"},
|
||||
{"key": "shield", "label": "Schild"},
|
||||
]
|
||||
|
||||
var _index := 0
|
||||
var _wurzel: Control
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
theme = THEME.baue()
|
||||
set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||
_wurzel = Control.new()
|
||||
_wurzel.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT)
|
||||
add_child(_wurzel)
|
||||
_bauen()
|
||||
|
||||
|
||||
func _bauen() -> void:
|
||||
_leeren(_wurzel)
|
||||
|
||||
var dimm := UiTheme.dimmung()
|
||||
dimm.color = Color(0.04, 0.03, 0.02, 0.72)
|
||||
_wurzel.add_child(dimm)
|
||||
|
||||
var p := Panel.new()
|
||||
p.position = Vector2(260, 160)
|
||||
p.size = Vector2(1400, 760)
|
||||
p.add_theme_stylebox_override("panel", THEME.flaeche(Color(1, 1, 1)))
|
||||
_wurzel.add_child(p)
|
||||
|
||||
var titel := Label.new()
|
||||
titel.text = "INVENTAR"
|
||||
titel.position = Vector2(40, 24)
|
||||
titel.add_theme_color_override("font_color", UiTheme.GOLD)
|
||||
p.add_child(titel)
|
||||
|
||||
# Partei-Reiter
|
||||
var x := 40
|
||||
for i in Game.party.size():
|
||||
var b := Button.new()
|
||||
b.text = str(Game.party[i].get("name", "?"))
|
||||
b.position = Vector2(x, 80)
|
||||
b.size = Vector2(170, 52)
|
||||
b.focus_mode = Control.FOCUS_NONE
|
||||
b.clip_text = true
|
||||
b.modulate = Color(1.45, 1.25, 0.95) if i == _index else Color(1, 1, 1)
|
||||
b.pressed.connect(_waehlen.bind(i))
|
||||
p.add_child(b)
|
||||
x += 180
|
||||
|
||||
if Game.party.is_empty():
|
||||
var leer := Label.new()
|
||||
leer.text = "Keine Figur in der Party."
|
||||
leer.position = Vector2(40, 180)
|
||||
p.add_child(leer)
|
||||
_schliessen_knopf(p)
|
||||
return
|
||||
|
||||
var figur: Dictionary = Game.party[_index]
|
||||
_ausgeruestet(p, figur)
|
||||
_rucksack(p, figur)
|
||||
|
||||
var werte := Label.new()
|
||||
werte.text = "RK %d Angriff +%d TP %d/%d" % [
|
||||
Game.rk(figur), Game.angriffsbonus(figur),
|
||||
int(figur["hp"]["current"]), int(figur["hp"]["max"])]
|
||||
werte.position = Vector2(40, 680)
|
||||
werte.size = Vector2(700, 40)
|
||||
werte.clip_text = true
|
||||
p.add_child(werte)
|
||||
|
||||
_schliessen_knopf(p)
|
||||
|
||||
|
||||
func _ausgeruestet(p: Panel, figur: Dictionary) -> void:
|
||||
var kopf := Label.new()
|
||||
kopf.text = "AUSGERÜSTET"
|
||||
kopf.position = Vector2(40, 160)
|
||||
kopf.add_theme_color_override("font_color", UiTheme.GOLD)
|
||||
p.add_child(kopf)
|
||||
|
||||
var equipment: Dictionary = figur.get("equipment", {})
|
||||
for i in SLOTS.size():
|
||||
var slot: Dictionary = SLOTS[i]
|
||||
var y := 210 + i * 84
|
||||
var slot_label := Label.new()
|
||||
slot_label.text = str(slot["label"])
|
||||
slot_label.position = Vector2(40, y)
|
||||
slot_label.size = Vector2(160, 52)
|
||||
slot_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
slot_label.clip_text = true
|
||||
p.add_child(slot_label)
|
||||
|
||||
var id := ""
|
||||
if str(slot["key"]) == "shield":
|
||||
if bool(equipment.get("shield", false)):
|
||||
id = "schild"
|
||||
else:
|
||||
id = str(equipment.get(slot["key"], ""))
|
||||
|
||||
var wert := Label.new()
|
||||
wert.text = _item_name(id) if not id.is_empty() else "—"
|
||||
wert.position = Vector2(210, y)
|
||||
wert.size = Vector2(260, 52)
|
||||
wert.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
wert.clip_text = true
|
||||
wert.modulate = Color(0.9, 0.84, 0.70)
|
||||
p.add_child(wert)
|
||||
|
||||
if not id.is_empty():
|
||||
var b := Button.new()
|
||||
b.text = "Ablegen"
|
||||
b.position = Vector2(480, y)
|
||||
b.size = Vector2(200, 52)
|
||||
b.focus_mode = Control.FOCUS_NONE
|
||||
b.clip_text = true
|
||||
b.pressed.connect(_ablegen.bind(str(slot["key"])))
|
||||
p.add_child(b)
|
||||
|
||||
|
||||
func _rucksack(p: Panel, figur: Dictionary) -> void:
|
||||
var kopf := Label.new()
|
||||
kopf.text = "RUCKSACK"
|
||||
kopf.position = Vector2(720, 160)
|
||||
kopf.add_theme_color_override("font_color", UiTheme.GOLD)
|
||||
p.add_child(kopf)
|
||||
|
||||
var inventar: Array = figur.get("inventory", [])
|
||||
if inventar.is_empty():
|
||||
var leer := Label.new()
|
||||
leer.text = "leer"
|
||||
leer.position = Vector2(720, 210)
|
||||
leer.modulate = Color(0.75, 0.70, 0.60)
|
||||
p.add_child(leer)
|
||||
return
|
||||
|
||||
for i in inventar.size():
|
||||
var eintrag = inventar[i]
|
||||
var id := ""
|
||||
var anzahl := 1
|
||||
if typeof(eintrag) == TYPE_DICTIONARY:
|
||||
id = str(eintrag.get("id", ""))
|
||||
anzahl = int(eintrag.get("count", 1))
|
||||
else:
|
||||
id = str(eintrag)
|
||||
if id.is_empty():
|
||||
continue
|
||||
var y := 210 + i * 56
|
||||
if y > 700:
|
||||
break
|
||||
|
||||
var item_label := Label.new()
|
||||
item_label.text = _item_name(id)
|
||||
item_label.position = Vector2(720, y)
|
||||
item_label.size = Vector2(340, 44)
|
||||
item_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
item_label.clip_text = true
|
||||
p.add_child(item_label)
|
||||
|
||||
if anzahl > 1:
|
||||
var zahl := Label.new()
|
||||
zahl.text = "x%d" % anzahl
|
||||
zahl.position = Vector2(1070, y)
|
||||
zahl.size = Vector2(40, 44)
|
||||
zahl.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
p.add_child(zahl)
|
||||
|
||||
if _ist_ausruestbar(id):
|
||||
var b := Button.new()
|
||||
b.text = "Ausrüsten"
|
||||
b.position = Vector2(1120, y)
|
||||
b.size = Vector2(250, 44)
|
||||
b.focus_mode = Control.FOCUS_NONE
|
||||
b.clip_text = true
|
||||
b.pressed.connect(_ausruesten.bind(id))
|
||||
p.add_child(b)
|
||||
|
||||
|
||||
func _schliessen_knopf(p: Panel) -> void:
|
||||
var b := Button.new()
|
||||
b.text = "Schließen"
|
||||
b.position = Vector2(1120, 680)
|
||||
b.size = Vector2(240, 56)
|
||||
b.focus_mode = Control.FOCUS_NONE
|
||||
b.clip_text = true
|
||||
b.pressed.connect(func() -> void: geschlossen.emit())
|
||||
p.add_child(b)
|
||||
|
||||
|
||||
func _waehlen(index: int) -> void:
|
||||
_index = index
|
||||
_bauen()
|
||||
|
||||
|
||||
func _ausruesten(id: String) -> void:
|
||||
if Game.party.is_empty():
|
||||
return
|
||||
Game.ausruesten(Game.party[_index], id)
|
||||
_bauen()
|
||||
|
||||
|
||||
func _ablegen(slot: String) -> void:
|
||||
if Game.party.is_empty():
|
||||
return
|
||||
Game.ablegen(Game.party[_index], slot)
|
||||
_bauen()
|
||||
|
||||
|
||||
func _item_name(id: String) -> String:
|
||||
if id.is_empty():
|
||||
return "—"
|
||||
var item: Dictionary = Content.entry("items", id)
|
||||
return str(item.get("name", id))
|
||||
|
||||
|
||||
func _ist_ausruestbar(id: String) -> bool:
|
||||
var typ := str(Content.entry("items", id).get("type", ""))
|
||||
return typ in ["weapon", "armor", "shield"]
|
||||
|
||||
|
||||
func _leeren(node: Node) -> void:
|
||||
for kind in node.get_children():
|
||||
node.remove_child(kind)
|
||||
kind.queue_free()
|
||||
1
game/scenes/ui/inventar.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://diskvqdrx6qkd
|
||||
12
game/scenes/ui/inventar.tscn
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://scenes/ui/inventar.gd" id="1"]
|
||||
|
||||
[node name="Inventar" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1")
|
||||
|
|
@ -43,6 +43,8 @@ var _blockiert: Dictionary = {}
|
|||
var _dialog: PanelContainer
|
||||
var _dialog_text: Label
|
||||
var _dialog_name: Label
|
||||
var _inventar: Control
|
||||
var _inventar_ebene: CanvasLayer
|
||||
var _modern := false
|
||||
@export var gemalt := false
|
||||
## Gewählter Standard (docs/stand.md): Kacheln mit gemalten Figuren, gedämpfter
|
||||
|
|
@ -434,6 +436,16 @@ func _input(event: InputEvent) -> void:
|
|||
# so ist die Bewegung deterministisch und im Test nachvollziehbar.
|
||||
var taste: int = event.physical_keycode if event.physical_keycode != 0 \
|
||||
else event.keycode
|
||||
if taste == KEY_I:
|
||||
if _inventar != null:
|
||||
_inventar_schliessen()
|
||||
else:
|
||||
_inventar_oeffnen()
|
||||
return
|
||||
if _inventar != null:
|
||||
if taste == KEY_ESCAPE:
|
||||
_inventar_schliessen()
|
||||
return
|
||||
var richtung := Vector2i.ZERO
|
||||
match taste:
|
||||
KEY_UP, KEY_W, KEY_KP_8:
|
||||
|
|
@ -468,6 +480,24 @@ func _input(event: InputEvent) -> void:
|
|||
return
|
||||
|
||||
|
||||
func _inventar_oeffnen() -> void:
|
||||
if _inventar != null:
|
||||
return
|
||||
_inventar_ebene = CanvasLayer.new()
|
||||
_inventar_ebene.layer = 5
|
||||
add_child(_inventar_ebene)
|
||||
_inventar = load("res://scenes/ui/inventar.tscn").instantiate()
|
||||
_inventar_ebene.add_child(_inventar)
|
||||
_inventar.geschlossen.connect(_inventar_schliessen)
|
||||
|
||||
|
||||
func _inventar_schliessen() -> void:
|
||||
if _inventar_ebene != null:
|
||||
_inventar_ebene.queue_free()
|
||||
_inventar = null
|
||||
_inventar_ebene = null
|
||||
|
||||
|
||||
## Sprechen mit dem nächsten NSC (ein Feld Abstand, auch diagonal).
|
||||
func _sprechen() -> void:
|
||||
if _dialog.visible:
|
||||
|
|
@ -538,6 +568,15 @@ func _ui() -> void:
|
|||
menue.size = Vector2(48, 18) * UiTheme.SKALA
|
||||
wurzel.add_child(menue)
|
||||
|
||||
var inventar_knopf := Button.new()
|
||||
inventar_knopf.text = "INVENTAR"
|
||||
inventar_knopf.position = Vector2(62, 8) * UiTheme.SKALA
|
||||
inventar_knopf.size = Vector2(80, 18) * UiTheme.SKALA
|
||||
inventar_knopf.focus_mode = Control.FOCUS_NONE
|
||||
inventar_knopf.clip_text = true
|
||||
inventar_knopf.pressed.connect(_inventar_oeffnen)
|
||||
wurzel.add_child(inventar_knopf)
|
||||
|
||||
# Rückwand der Partyspalte: ohne sie steht das HUD auf der Stadtmauer und
|
||||
# wirkt aufgeklebt (Befund aus dem ersten Render).
|
||||
var breite: int = 44 * UiTheme.SKALA
|
||||
|
|
|
|||
|
|
@ -250,6 +250,24 @@ func _selbstpruefung() -> bool:
|
|||
ok = _pruefe("Figur: TP 9, RK 15 (Kette+Schild), Angriff +1",
|
||||
int(figur["hp"]["max"]) == 9 and Game.rk(figur) == 15
|
||||
and Game.angriffsbonus(figur) == 1) and ok
|
||||
ok = _pruefe("Startgepäck: Vorrat und Seil",
|
||||
Game.inventar_hat(figur, "vorrat") == 1
|
||||
and Game.inventar_hat(figur, "seil") == 1) and ok
|
||||
Game.inventar_hinzufuegen(figur, "leder")
|
||||
ok = _pruefe("Inventar: Leder anlegen, Kette zurück, RK 13",
|
||||
Game.ausruesten(figur, "leder")
|
||||
and str(figur["equipment"].get("armor", "")) == "leder"
|
||||
and Game.inventar_hat(figur, "kette") == 1
|
||||
and Game.rk(figur) == 13) and ok
|
||||
ok = _pruefe("Inventar: Rüstung ablegen, Leder zurück",
|
||||
Game.ablegen(figur, "armor")
|
||||
and not figur["equipment"].has("armor")
|
||||
and Game.inventar_hat(figur, "leder") == 1) and ok
|
||||
Game.inventar_hinzufuegen(figur, "dolch")
|
||||
ok = _pruefe("Inventar: Dolch statt Schwert, Schwert zurück",
|
||||
Game.ausruesten(figur, "dolch")
|
||||
and str(figur["equipment"].get("weapon", "")) == "dolch"
|
||||
and Game.inventar_hat(figur, "schwert") == 1) and ok
|
||||
|
||||
# Roster: 1..6, siebte Figur abgelehnt, Entfernen gibt den Platz frei.
|
||||
var sicherung: Array = Game.party.duplicate(true)
|
||||
|
|
|
|||
|
|
@ -96,6 +96,9 @@ func neue_figur(id: String, vorgabe: Dictionary) -> Dictionary:
|
|||
equipment[feld] = str(start[feld])
|
||||
if bool(start.get("shield", false)):
|
||||
equipment["shield"] = true
|
||||
var inventar := []
|
||||
for item_id in start.get("items", []):
|
||||
inventar.append({"id": str(item_id), "count": 1})
|
||||
return {
|
||||
"id": id, "name": vorgabe["name"],
|
||||
"race": vorgabe["race"], "class": vorgabe["class"],
|
||||
|
|
@ -105,7 +108,7 @@ func neue_figur(id: String, vorgabe: Dictionary) -> Dictionary:
|
|||
"hp": {"current": hp_max, "max": hp_max},
|
||||
"skills": _startfertigkeiten(klasse),
|
||||
"spells": {"known": [], "prepared": [], "slots": {}},
|
||||
"inventory": [], "equipment": equipment,
|
||||
"inventory": inventar, "equipment": equipment,
|
||||
"conditions": [],
|
||||
}
|
||||
|
||||
|
|
@ -138,6 +141,93 @@ func angriffsbonus(figur: Dictionary) -> int:
|
|||
return int(leiter[stufe - 1])
|
||||
return int(leiter[leiter.size() - 1]) if not leiter.is_empty() else 0
|
||||
|
||||
# ------------------------------------------------------------- Inventar ----
|
||||
# Ein Gegenstand ist `{"id": ..., "count": n}`; Ausrüstung referenziert ids.
|
||||
# Ausrüsten nimmt ein Stück aus dem Rucksack, Ablegen legt es zurück.
|
||||
|
||||
func inventar_hat(figur: Dictionary, id: String) -> int:
|
||||
for eintrag in figur.get("inventory", []):
|
||||
if typeof(eintrag) == TYPE_DICTIONARY:
|
||||
if str(eintrag.get("id", "")) == id:
|
||||
return int(eintrag.get("count", 0))
|
||||
elif str(eintrag) == id:
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
func inventar_hinzufuegen(figur: Dictionary, id: String, anzahl: int = 1) -> void:
|
||||
if id.is_empty() or anzahl <= 0:
|
||||
return
|
||||
var inventar: Array = figur.get("inventory", [])
|
||||
for eintrag in inventar:
|
||||
if typeof(eintrag) == TYPE_DICTIONARY and str(eintrag.get("id", "")) == id:
|
||||
eintrag["count"] = int(eintrag.get("count", 0)) + anzahl
|
||||
return
|
||||
inventar.append({"id": id, "count": anzahl})
|
||||
figur["inventory"] = inventar
|
||||
|
||||
|
||||
func inventar_entfernen(figur: Dictionary, id: String, anzahl: int = 1) -> bool:
|
||||
var inventar: Array = figur.get("inventory", [])
|
||||
for i in inventar.size():
|
||||
var eintrag = inventar[i]
|
||||
var treffer := false
|
||||
var zahl := 1
|
||||
if typeof(eintrag) == TYPE_DICTIONARY:
|
||||
treffer = str(eintrag.get("id", "")) == id
|
||||
zahl = int(eintrag.get("count", 1))
|
||||
else:
|
||||
treffer = str(eintrag) == id
|
||||
if not treffer:
|
||||
continue
|
||||
if zahl <= anzahl:
|
||||
inventar.remove_at(i)
|
||||
else:
|
||||
eintrag["count"] = zahl - anzahl
|
||||
return true
|
||||
return false
|
||||
|
||||
|
||||
func ausruesten(figur: Dictionary, id: String) -> bool:
|
||||
var item: Dictionary = Content.entry("items", id)
|
||||
if item.is_empty():
|
||||
return false
|
||||
var typ := str(item.get("type", ""))
|
||||
if typ not in ["weapon", "armor", "shield"]:
|
||||
return false
|
||||
if inventar_hat(figur, id) <= 0:
|
||||
return false
|
||||
var equipment: Dictionary = figur.get("equipment", {})
|
||||
if typ == "shield":
|
||||
if bool(equipment.get("shield", false)):
|
||||
inventar_hinzufuegen(figur, "schild")
|
||||
equipment["shield"] = true
|
||||
else:
|
||||
var alt := str(equipment.get(typ, ""))
|
||||
if not alt.is_empty():
|
||||
inventar_hinzufuegen(figur, alt)
|
||||
equipment[typ] = id
|
||||
figur["equipment"] = equipment
|
||||
inventar_entfernen(figur, id)
|
||||
return true
|
||||
|
||||
|
||||
func ablegen(figur: Dictionary, slot: String) -> bool:
|
||||
var equipment: Dictionary = figur.get("equipment", {})
|
||||
if slot == "shield":
|
||||
if not bool(equipment.get("shield", false)):
|
||||
return false
|
||||
equipment["shield"] = false
|
||||
inventar_hinzufuegen(figur, "schild")
|
||||
else:
|
||||
var id := str(equipment.get(slot, ""))
|
||||
if id.is_empty():
|
||||
return false
|
||||
equipment.erase(slot)
|
||||
inventar_hinzufuegen(figur, id)
|
||||
figur["equipment"] = equipment
|
||||
return true
|
||||
|
||||
func notiz(text: String) -> void:
|
||||
log_lines.append(text)
|
||||
if log_lines.size() > 200:
|
||||
|
|
|
|||
40
game/tools/probe_inventar.gd
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
extends Node
|
||||
## Probe für das Inventar-Modal.
|
||||
##
|
||||
## godot --headless --path game res://tools/probe_inventar.tscn -- --check
|
||||
## godot --path game res://tools/schuss.tscn -- \
|
||||
## res://tools/probe_inventar.tscn art/prep/inventar/_inventar_1920x1080.png
|
||||
|
||||
const SZENE := preload("res://scenes/ui/inventar.tscn")
|
||||
|
||||
var fehler := 0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Game.party_schnellstart()
|
||||
# Etwas Inhalt in den Rucksack, damit das Fenster nicht leer ist.
|
||||
var figur: Dictionary = Game.party[0]
|
||||
Game.inventar_hinzufuegen(figur, "leder")
|
||||
Game.inventar_hinzufuegen(figur, "dolch")
|
||||
|
||||
var ui: Control = SZENE.instantiate()
|
||||
add_child(ui)
|
||||
await get_tree().process_frame
|
||||
|
||||
ok("Modal baut", ui.get_child_count() > 0)
|
||||
ok("Partyspalte hat Figuren", Game.party.size() == 4)
|
||||
ok("Ausrüsten aus dem Rucksack", Game.ausruesten(figur, "leder")
|
||||
and str(figur["equipment"].get("armor", "")) == "leder")
|
||||
ok("Kette liegt im Rucksack", Game.inventar_hat(figur, "kette") == 1)
|
||||
ok("Ablegen legt zurück", Game.ablegen(figur, "armor")
|
||||
and Game.inventar_hat(figur, "leder") == 1)
|
||||
|
||||
print("\nProbe: %s" % ("bestanden" if fehler == 0 else "FEHLGESCHLAGEN"))
|
||||
if OS.get_cmdline_user_args().has("--check"):
|
||||
get_tree().quit(0 if fehler == 0 else 1)
|
||||
|
||||
|
||||
func ok(name: String, wahr: bool) -> void:
|
||||
if not wahr:
|
||||
fehler += 1
|
||||
print(" %s %s" % [("ok " if wahr else "FEHL"), name])
|
||||
1
game/tools/probe_inventar.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://b7j5mdjruaii5
|
||||
6
game/tools/probe_inventar.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://tools/probe_inventar.gd" id="1"]
|
||||
|
||||
[node name="ProbeInventar" type="Node"]
|
||||
script = ExtResource("1")
|
||||