重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
godot-genre-visual-novel by thedivergentai/gd-agentic-skills
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-genre-visual-novel分支叙事、有意义的选择以及人性化功能定义了视觉小说。
[shake]、[wave])来增加视觉分量。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
ResourceLoader.load_threaded_request() 以防止过渡卡顿。StringName(例如 &"met_alice")以实现更快的字典查找。_process 进行逐字动画;必须使用 Tween 作用于 visible_ratio 以实现平滑、帧率无关的文本显示效果。z_index)。visible_ratio 设置为 1.0。queue_free() 以防止内存泄漏。| 阶段 | 技能 | 目的 |
|---|---|---|
| 1. 文本与 UI | ui-system, rich-text-label | 对话框、bbcode 效果、打字机效果 |
| 2. 逻辑 | json-parsing, resource-management | 加载脚本、管理角色数据 |
| 3. 状态 | godot-save-load-systems, dictionaries | 标志位、历史记录、持久化数据 |
| 4. 音频 | audio-system | 语音、背景音乐过渡 |
| 5. 打磨 | godot-tweening, shaders | 角色过渡、背景效果 |
解析脚本并指挥其他系统。
# story_manager.gd
extends Node
var current_script: Dictionary
var current_line_index: int = 0
var flags: Dictionary = {}
func load_script(script_path: String) -> void:
var file = FileAccess.open(script_path, FileAccess.READ)
current_script = JSON.parse_string(file.get_as_text())
current_line_index = 0
display_next_line()
func display_next_line() -> void:
if current_line_index >= current_script["lines"].size():
return
var line_data = current_script["lines"][current_line_index]
if line_data.has("choice"):
present_choices(line_data["choice"])
else:
CharacterManager.show_character(line_data.get("character"), line_data.get("expression"))
DialogueUI.show_text(line_data["text"])
current_line_index += 1
逐字显示文本。
# dialogue_ui.gd
func show_text(text: String) -> void:
rich_text_label.text = text
rich_text_label.visible_ratio = 0.0
var tween = create_tween()
tween.tween_property(rich_text_label, "visible_ratio", 1.0, text.length() * 0.05)
视觉小说的核心功能。在每行之前保存状态。
var history: Array[Dictionary] = []
func save_state_to_history() -> void:
history.append({
"line_index": current_line_index,
"flags": flags.duplicate(),
"background": current_background,
"music": current_music
})
func rollback() -> void:
if history.is_empty(): return
var trusted_state = history.pop_back()
restore_state(trusted_state)
追踪决策以影响未来场景。
func make_choice(choice_id: String) -> void:
match choice_id:
"be_nice":
flags["relationship_alice"] += 1
jump_to_label("alice_happy")
"be_mean":
flags["relationship_alice"] -= 1
jump_to_label("alice_sad")
[wave]、[shake]、[color] 等效果,为文本增添情感。每周安装数
64
仓库
GitHub 星标数
68
首次出现
2026年2月10日
安全审计
安装于
opencode62
gemini-cli61
codex61
kimi-cli60
github-copilot60
amp60
Branching narratives, meaningful choices, and quality-of-life features define visual novels.
[shake], [wave]) to add visual weight.ResourceLoader.load_threaded_request() to prevent transition stutters.StringName (&"met_alice") for faster dictionary lookups._process for letter-by-letter animation; strictly use a Tween onvisible_ratio for smooth, frame-independent reveals.z_index) for visual clarity.visible_ratio to 1.0 instantly on input.queue_free() when actors exit the stage to prevent memory leaks.| Phase | Skills | Purpose |
|---|---|---|
| 1. Text & UI | ui-system, rich-text-label | Dialogue box, bbcode effects, typewriting |
| 2. Logic | json-parsing, resource-management | Loading scripts, managing character data |
| 3. State | godot-save-load-systems, dictionaries | Flags, history, persistent data |
| 4. Audio |
Parses the script and directs the other systems.
# story_manager.gd
extends Node
var current_script: Dictionary
var current_line_index: int = 0
var flags: Dictionary = {}
func load_script(script_path: String) -> void:
var file = FileAccess.open(script_path, FileAccess.READ)
current_script = JSON.parse_string(file.get_as_text())
current_line_index = 0
display_next_line()
func display_next_line() -> void:
if current_line_index >= current_script["lines"].size():
return
var line_data = current_script["lines"][current_line_index]
if line_data.has("choice"):
present_choices(line_data["choice"])
else:
CharacterManager.show_character(line_data.get("character"), line_data.get("expression"))
DialogueUI.show_text(line_data["text"])
current_line_index += 1
Displaying text character by character.
# dialogue_ui.gd
func show_text(text: String) -> void:
rich_text_label.text = text
rich_text_label.visible_ratio = 0.0
var tween = create_tween()
tween.tween_property(rich_text_label, "visible_ratio", 1.0, text.length() * 0.05)
Essential VN feature. Store the state before every line.
var history: Array[Dictionary] = []
func save_state_to_history() -> void:
history.append({
"line_index": current_line_index,
"flags": flags.duplicate(),
"background": current_background,
"music": current_music
})
func rollback() -> void:
if history.is_empty(): return
var trusted_state = history.pop_back()
restore_state(trusted_state)
Track decisions to influence future scenes.
func make_choice(choice_id: String) -> void:
match choice_id:
"be_nice":
flags["relationship_alice"] += 1
jump_to_label("alice_happy")
"be_mean":
flags["relationship_alice"] -= 1
jump_to_label("alice_sad")
[wave], [shake], [color] effects to add emotion to text.Weekly Installs
64
Repository
GitHub Stars
68
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode62
gemini-cli61
codex61
kimi-cli60
github-copilot60
amp60
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
122,000 周安装
audio-system |
| Voice acting, background music transitions |
| 5. Polish | godot-tweening, shaders | Character transitions, background effects |