dialogue-systems
하는 일
분기, 선택지, 기억되는 상태가 있는 게임 대화의 설계와 연결을 안내합니다. NPC 대화나 스토리 분기를 만드는 게임 작가와 개발자를 위한 스킬입니다.
사용하는 경우
- ✓분기와 플레이어 선택지가 있는 대화를 설계할 때.
- ✓앞선 선택이 나중에 캐릭터의 말을 바꿔야 할 때.
- ✓Ink, Yarn Spinner, 직접 만든 대화 형식 중 무엇을 쓸지 골라야 할 때.
스킬 링크
https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/disciplines/dialogue-systems/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“선택지가 세 개인 NPC 대화를 만들고 싶어요. 한 선택이 나중에 NPC의 말투를 바꿉니다. 어떤 대화 도구를 써야 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 대화를 대사와 선택지의 그래프로 모델링하고, 조건과 변수를 추가합니다. 필요에 따라 Ink, Yarn Spinner 또는 간단한 직접 구현을 제안한 뒤, 스크립트를 게임 루프에 연결합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Dialogue systems
Model conversations as a graph: nodes hold lines, choices branch the flow,
conditions gate options, and variables remember what the player did. The first
real decision is build vs. buy — adopt a proven authoring tool (Ink or
Yarn Spinner) or write a small data-driven runner. This skill owns both Ink
and Yarn; the visual-novel and rpg genres consume it.
When to use
- Use to design branching conversations, choice menus, or narrative state (flags, relationship values) that affect later dialogue.
- Use to decide between Ink, Yarn Spinner, and a custom JSON/resource format.
- Use to wire a dialogue script into your game loop (advance line, present choices, run commands, resolve variables).
When not to use: for engine UI (text boxes, portraits, choice buttons), use
godot-ui-control or the engine's UI skill. For persisting narrative variables
across sessions, use save-systems. For data-as-resources in Godot/Unity, see
godot-resources / unity-scriptableobjects.
Core workflow
- Choose the authoring approach.
- Ink — prose-first, writer-friendly, weave/gather flow; great for dialogue-heavy or CYOA narrative. Integrate via ink runtime / inkle plugins.
- Yarn Spinner — node-based, explicit
<<commands>>, strong for game-driven dialogue with lots of engine hooks. - Custom runner — a JSON/resource graph + a small interpreter when you need full control or minimal dependencies. Don't build a language; build a graph.
- Define the node contract. A node yields one of: a line (speaker + text), a set of choices, a command/side-effect, or an end/jump. The runner advances through nodes and hands lines/choices to the UI.
- Separate variables from flow. Keep a variable store (booleans, numbers, strings) the dialogue reads/writes; gate choices with conditions over it.
- Localize from the start. Author with line IDs, not raw strings, so the displayed text comes from a string table keyed by locale.
- Drive it from the game loop. The runner is a state machine:
currentnode → emit content → wait for input (continue or choice) → advance. - Verify by walking branches. Exercise each choice path; confirm conditions, variable writes, and that every branch reaches an end or a valid jump.
Patterns
1. Engine-neutral dialogue graph (data, not code)
{
"start": "guard_intro",
"nodes": {
"guard_intro": {
"speaker": "Guard", "line": "DLG_GUARD_001",
"choices": [
{ "text": "DLG_OPT_BRIBE", "to": "bribe", "if": "gold >= 50",
"set": { "gold": "gold - 50" } },
{ "text": "DLG_OPT_LEAVE", "to": "end" }
]
},
"bribe": {
"speaker": "Guard", "line": "DLG_GUARD_BRIBED",
"set": { "gate_open": true },
"next": "end"
},
"end": { "end": true }
}
}
line/text are string-table IDs (localization), not literal text. if
gates a choice; set mutates the variable store. The gold cost sits on the
choice, so it is paid once per pick even if the bribe node is revisited; the
idempotent gate_open write can live on the node. A string set value is an
expression, so a literal string needs inner quotes: "mood": "'angry'". The full
interpreter that walks this graph is in references/runner.md.
2. Runner step (a state machine over the graph)
# Godot 4.7. The runner holds the current node and a variable store. Every line
# waits for the player: the UI calls choose() or the continue callback.
func goto(id: String) -> void:
current = graph.nodes[id]
apply_set(current.get("set", {}))
if current.get("end", false):
ui.close()
return
if current.has("line"):
ui.show_line(current.get("speaker", ""), localize(current.line))
if current.has("choices"):
var shown = current.choices.filter(func(c): return eval_cond(c.get("if", "")))
ui.show_choices(shown) # only choices whose condition passes
elif current.has("next"):
var next_id: String = current.next
ui.show_continue(func(): goto(next_id)) # advance when the player continues
func choose(choice: Dictionary) -> void: # called when the player picks a choice
apply_set(choice.get("set", {})) # write on the transition (revisit-safe)
goto(choice.to)
3. Ink — branching with knots, choices, and variables (inkle)
// Ink: '*' = once-only
자주 묻는 질문
대화 시스템을 직접 만들어야 하나요?
스킬은 먼저 직접 만들지 구입할지를 결정해야 한다고 말하며, 검증된 도구를 흔한 선택으로 소개합니다.
대화 상자와 버튼도 다루나요?
아니요. 그것은 엔진 UI 스킬이 다루고, 이 스킬은 대화 로직을 다룹니다.
서사 플래그를 저장하나요?
세션 사이에 플래그를 저장하는 것은 저장 시스템 스킬에 속합니다.
상세 정보
작성자의 원본 설명
Build branching dialogue and narrative — a node/choice graph with conditions, variables, and localization hooks — and choose between authoring tools Ink and Yarn Spinner or a custom data-driven runner. Engine-neutral. Use when the user mentions dialogue system, branching dialogue, conversation tree, choices, Ink (.ink), Yarn Spinner (.yarn), or NPC dialogue.
인기도
- GitHub 스타
- 6.6k
- 순위
- #13795
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 28.
댓글
- …
이 저장소의 다른 스킬
router
6.6k에이전트가 엔진과 작업 종류를 파악해, 요청에 맞는 게임 개발 스킬을 골라 주도록 돕습니다.
ai-behavior-trees-utility-ai
6.6k에이전트가 적이나 캐릭터가 우선순위와 점수로 행동을 고르는 행동 트리와 유틸리티 AI 시스템을 만들도록 돕습니다.
audio-design
6.6k에이전트에게 게임 오디오 믹싱을 가르칩니다. 버스, 데시벨 음량, 대사 아래에서의 덕킹, 적응형 음악, 효과음 변주를 다룹니다.
camera-systems
6.6k에이전트가 부드럽게 따라가고, 레벨 안에 머물고, 3D에서 회전하거나 둘러볼 수 있는 게임 카메라를 만들도록 돕습니다.