CR: BG3-Chatbox fuer Dialoge + Doc-Updates (TYRVEIL.md, WELT.md)

- dialogue_choices zu dialogue_box umgebaut: Panel am unteren Bildrand
  zeigt jede Dialog-Zeile mit Sprechernamen lesbar an, Antwortauswahl
  integriert; Sprechblasen bleiben als Ambiente (CHANGEREQUESTS_DONE.md)
- DialogueSystem spiegelt jede Zeile in die Box, Anzeigenamen aus neuer
  speakers-Map der Dialog-Dateien (Fallback: grossgeschriebene ID)
- Einmal-Effekt-Grundlage: GameState.completed_dialogues (gespeichert,
  Save/Load-fest), DialogueSystem wendet Options-Effekte nur beim ersten
  Durchlauf an
- Doc-Updates des Users eingecheckt: TYRVEIL.md (Protagonisten-Akte),
  WELT.md (Buch-Kanon), ueberarbeitete STORY/CHARACTERS/SPEC,
  CHANGEREQUESTS-Workflow

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-07-05 00:34:06 +02:00
parent 9fd103e9ce
commit 0f4ab3d3eb
14 changed files with 624 additions and 200 deletions

View file

@ -30,6 +30,7 @@ var intellect := DEFAULT_INTELLECT
var blade_heart_tone := 0
var humanity := 0
var relationships: Dictionary = {}
var completed_dialogues: Dictionary = {}
var is_permadeath_enabled := true
@ -41,6 +42,7 @@ func reset() -> void:
blade_heart_tone = 0
humanity = 0
relationships.clear()
completed_dialogues.clear()
is_permadeath_enabled = true
blade_heart_tone_changed.emit(blade_heart_tone)
@ -95,6 +97,19 @@ func adjust_relationship(npc_id: String, amount: int) -> void:
set_relationship(npc_id, get_relationship(npc_id) + amount)
## Markiert einen Dialog als bereits geführt. Liegt hier statt im
## StorySystem, weil GameState das einzige gespeicherte Autoload ist und
## das Flag Save/Load überleben muss (sonst ließen sich Dialog-Effekte
## durch Neuladen erneut abgreifen).
func mark_dialogue_completed(dialogue_id: String) -> void:
completed_dialogues[dialogue_id] = true
## Gibt zurück, ob ein Dialog bereits vollständig geführt wurde.
func has_completed_dialogue(dialogue_id: String) -> bool:
return completed_dialogues.get(dialogue_id, false)
## Serialisiert den kompletten Zustand als Dictionary für das SaveSystem.
func to_save_dict() -> Dictionary:
return {
@ -104,6 +119,7 @@ func to_save_dict() -> Dictionary:
"blade_heart_tone": blade_heart_tone,
"humanity": humanity,
"relationships": relationships.duplicate(),
"completed_dialogues": completed_dialogues.duplicate(),
"is_permadeath_enabled": is_permadeath_enabled,
}
@ -123,6 +139,10 @@ func apply_save_dict(data: Dictionary) -> void:
var saved_relationships: Dictionary = data.get("relationships", {})
for npc_id in saved_relationships:
relationships[String(npc_id)] = clampi(int(saved_relationships[npc_id]), RELATIONSHIP_MIN, RELATIONSHIP_MAX)
completed_dialogues.clear()
var saved_dialogues: Dictionary = data.get("completed_dialogues", {})
for dialogue_id in saved_dialogues:
completed_dialogues[String(dialogue_id)] = bool(saved_dialogues[dialogue_id])
blade_heart_tone_changed.emit(blade_heart_tone)
for npc_id in relationships:
relationship_changed.emit(npc_id, relationships[npc_id])