godot-genre-romance について
恋愛ゲームの関係値、デートイベント、キャラクタールート分岐を扱う Godot スキルです。複数軸の好感度、NPC の自律的な予定、関係変化を伝えるフィードバックを重視します。
主な機能
- 01魅力、信頼、安心感の追跡
- 02好みと繰り返しペナルティに基づくデート設計
- 03節目に応じたキャラクタールート分岐
- 04気分と予定による会話の制御
- 05ルートフラグとギャラリー解放状況の保存
活用シーン
- 01複数軸の関係値を持つ恋愛システムの構築
- 02デート選択肢と場所の繰り返しペナルティの設計
- 03告白条件、ルート固定、エンディングの実装
- 04NPC の予定と拒否条件の設定
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ thedivergentai/ game-dev-agentic-skills --skill godot-genre-romanceインストール後、Claude Code で/godot-genre-romanceを入力して読み込まれたか確認します。
同梱ファイル
SKILL.md と一緒にインストールされる参考資料やスクリプト。
references/migration-notes.mdromance-systems-deep.mdscripts/affection_manager.gddate_event_system.gddialogue_expression_parser.gdglobal_affection_tracker.gdnpc_schedule.gdplayer_romance_manager.gdromance_mood_manager.gdromance_patterns.gdroute_manager.gdseasonal_dialogue.gdui_feedback.gd詳細
コアループ
- 出会う:恋愛対象となるキャラクターと出会い、基本的な親密さを築きます。
- デートする:計画されたイベントに参加して好みを知り、相性を確かめます。
- 関係を深める:時間、ギフト、選択肢などのリソースを投入し、好感度やステータスを上げます。
- 分岐する:重要な節目に応じて、キャラクター固有の「ルート」へストーリーが分岐します。
- 結末を迎える:関係の質に応じて、専用のエンディング(グッド/ノーマル/バッド)に到達します。
絶対に避けるべきこと(エキスパート向けアンチパターン)
恋愛と NPC のロジック
- 「自動販売機」のような恋愛システムは絶対に作らないでください。キャラクターが自律的に感じられるよう、NPC の気分、タイミング、複数ステータスの閾値などの変数を必ず取り入れてください。
- 二元的な好感度(好き/嫌い)は絶対に使わないでください。信頼できる心理的な深みを表現するため、必ず多軸モデル(魅力、信頼、安心感)を使ってください。
- ステータスを 100% 隠すのは絶対に避けてください。プレイヤーが情報に基づいて選択できるよう、必ず視覚的なインジケーター(ハート UI、頬を赤らめるテキスト、脈打つハート)を表示してください。
- 「同じデート順」の罠は絶対に避けてください。同じ場所を 2 回連続で訪れた場合、必ず繰り返しペナルティ(約 30%)を適用してください。
- 見逃し可能な節目を絶対に忘れないでください。体験に重みを持たせるため、スケジュールの組み方が悪くてイベントを逃すなど、必ず意味のある結果を伴わせてください。
- NPC の自律性を絶対に無視しないでください。NPC にそれぞれのスケジュールを持たせ、信頼度が低い場合やイベントが重複する場合は、プレイヤーを拒否できるようにしてください。
- NPC のスケジュール確認にポーリング(
_process)を絶対に使わないでください。パフォーマンスに優れた状態更新のため、時間や日付の変化を通知するシグナル駆動型の TimeManager(Autoload)を必ず使ってください。 - 嫉妬のロジックでキャラクター参照をハードコードするのは絶対にやめてください。分離された自律的な NPC の反応を実現するため、**グループ(
add_to_group)**を使ってシーン内に恋愛イベントを通知してください。
技術と UI
- タイプライター表示に
_processを絶対に使わないでください。フレームレートに依存しない滑らかな表示には、必ずvisible_ratioに対するTweenを使ってください。 - 大規模なナラティブファイルをメインスレッドで解析しないでください。画面遷移時のカクつきを防ぐため、必ず
ResourceLoader.load_threaded_request()を使ってください。 - 好感度の確認に浮動小数点数の完全一致を絶対に使わないでください。微小な誤差によるロジックの失敗を防ぐため、必ず
is_equal_approx()を使ってください。 - 複雑な会話をすべてコードだけで構成しないでください。ナラティブデータとロジックを分離するため、会話ツリーは必ずカスタム
Resourceクラスとして設計してください。 - 制限時間のある選択肢で、グローバル OS クロックに絶対に依存しないでください。
Engine.time_scaleと一時停止状態を尊重するSceneTreeTimerを必ず使ってください。 - 透明なコントロールに
MOUSE_FILTER_STOPを設定したままにしないでください。会話の進行を妨げないよう、不透明でないレイヤーでは必ずIGNOREまたはPASSに設定してください。 - 会話の文字列をハードコードしないでください。国際化のため、テキストは必ずローカライズキーに対応付け、
tr()で取得してください。 - インターフェースで絶対的なピクセル位置指定を使わないでください。デバイス間でレスポンシブに拡大縮小できるよう、必ずアンカーとコンテナを使用してください。
🛠 エキスパート向けコンポーネント(scripts/)
必ず、該当するシステムを実装する前に以下を読んでください。
- affection_manager.gd — 多軸の魅力/信頼/安心感
- date_event_system.gd — デートと繰り返しペナルティ
- route_manager.gd — ルートロック/CG フラグ
オリジナルのエキスパート向けパターン
- affection_manager.gd - 多軸の魅力/信頼/安心感の追跡とギフトのロジック。
- date_event_system.gd - 繰り返しペナルティを伴う、バリエーションを考慮したデート。
- route_manager.gd - フラグベースのルート分岐と CG ギャラリーの永続化。
モジュール式コンポーネント
- romance_mood_manager.gd - 会話の選択肢を制御するムード修正。
- dialogue_expression_parser.gd - 立ち絵の切り替えに使う表情/感情タグ。
- global_affection_tracker.gd - 全軸のスナップショットをシーン間で共有する Autoload。
- romance_patterns.gd - タイプライター効果の Tween とハートが弾ける演出のヘルパー。
- ui_feedback.gd - 好感度のマイルストーンでハートが弾ける Tween 演出。
- npc_schedule.gd -
NPCScheduleリソースと hour_changed のルーティング。 - seasonal_dialogue.gd - 季節/祭りに応じた会話キーの上書き。
- player_romance_manager.gd - デート開始時に
call_groupで嫉妬を通知。
コアループ
- 出会う → 2. 予定を立てる/会話する → 3. デート/プレゼント → 4. マイルストーン → 5. ルートを固定するか、並行して進める
意思決定ツリー
好感度と会話
| 必要なもの | アクション |
|---|---|
| 複数軸のステータス | 必須 affection_manager.gd |
| グローバル HUD/嫉妬グループ | global_affection_tracker.gd + call_group |
| ムードで制御する台詞 | romance_mood_manager.gd |
| 立ち絵タグ | dialogue_expression_parser.gd |
ルートと並行デート
| 状況 | 選択肢 |
|---|---|
| ゲーム序盤の探索 | ルートは未固定のままにし、魅力を自由に上げます。信頼度によって、より深い個人的なシーンが解放されます |
| ゲーム中盤の独占的な告白 | 信頼度 ≥ しきい値かつプレイヤーが受け入れた場合、route_manager.gd でルートを固定し、ライバルとの恋愛フラグを凍結します |
| 複数人と並行してデートする展開 | 複数の魅力トラックを許可しますが、重複が発覚すると嫉妬グループが信頼度を下げます |
| 告白の準備状況 | 魅力によってプロンプトが表示され、成功するか穏やかに断られるかは信頼度で決まります。安心感によって、時間制限付き選択肢でパニックになって失敗するリスクが下がります |
好感度/デート/ルートのクラスのスタブを再度インライン化しないでください。上記のスクリプトを読み込んでください。
スキルチェーン
| フェーズ | スキル | 目的 |
|---|---|---|
| 1. ステータス | dictionaries, resources | 複数軸の好感度 |
| 2. タイムライン | autoload-architecture, signals | スケジュール/日数 |
| 3. ナラティブ | godot-dialogue-system, visual-novel | 分岐する選択肢 |
| 4. 永続化 | godot-save-load-systems | ルート、CG、フラグ |
| 5. 演出 | ui-theming, godot-tweening | ハート/赤面 |
よくある落とし穴
| 落とし穴 | 解決策 |
|---|---|
| 自動販売機のような恋愛 | 複数軸に加え、デートの繰り返しにペナルティを設けます |
| 不透明なステータス | 魅力/信頼度/安心感の増減を UI に表示します |
| 乱れたスクリプトインデックス | 上記のファイル名を使います(壊れたパスの断片は使いません) |
意思決定ツリーとスクリプトカタログを超える詳細な内容には、必須:romance-systems-deep.md。初回の配線では読み込まないでください。まず同梱の
scripts/を使ってください。
アーキテクチャの概要
1. 好感度マネージャー(中心)
すべてのキャラクターについて、複雑な関係性のステータスとプレゼントの好みを処理します。
## Godot-Specific Tips
* **Resources for Characters**: Use `CharacterProfile` resources to store base stats, sprites, and gift preferences.
* **RichTextLabel Animations**: Use custom BBCode for "blushing" text (pulsing pink) or "nervous" text (shaking).
* **Dialogic Integration**: While this skill focuses on the *systems*, pairing it with Godot's **Dialogic** plugin is highly recommended for handling the actual dialogue boxes.
## Reference
> Progressive disclosure: open Official Documentation links only when researching a specific API;
> load Related Skills when routing work to a peer domain — do not preload the whole lattice.
### Official Documentation
- [Resources](https://docs.godotengine.org/en/stable/tutorials/scripting/resources.html) — Author `CharacterProfile`, date locations, and seasonal dialogue as data Resources instead of hardcoded trees.
- [Singletons (Autoload)](https://docs.godotengine.org/en/stable/tutorials/scripting/singletons_autoload.html) — Host TimeManager / global affection trackers so schedules and stats survive scene changes.
- [Using signals](https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html) — Drive milestones, `stats_changed`, and hour/day clocks without `_process` polling.
- [Groups](https://docs.godotengine.org/en/stable/tutorials/scripting/groups.html) — Broadcast date starts to `romantic_interests` for jealousy without hardcoding NPC refs.
- [BBCode in RichTextLabel](https://docs.godotengine.org/en/stable/tutorials/ui/bbcode_in_richtextlabel.html) — Blush, shake, and custom emotive effects for dating-sim dialogue juice.
- [Evaluating expressions](https://docs.godotengine.org/en/stable/tutorials/scripting/evaluating_expressions.html) — Gate choices with runtime `Expression` checks against affection / route flags.
- [Saving games](https://docs.godotengine.org/en/stable/tutorials/io/saving_games.html) — Persist routes, CG gallery unlocks, and multi-axis relationship dictionaries.
- [Background loading](https://docs.godotengine.org/en/stable/tutorials/io/background_loading.html) — Thread-load large narrative Resources so route transitions do not hitch.
- [Internationalizing games](https://docs.godotengine.org/en/stable/tutorials/i18n/internationalizing_games.html) — Map dialogue and choice text through `tr()` / localization keys.
- [Size and anchors](https://docs.godotengine.org/en/stable/tutorials/ui/size_and_anchors.html) — Keep heart UI and choice panels responsive without absolute pixel layouts.
- [Pausing games](https://docs.godotengine.org/en/stable/tutorials/scripting/pausing_games.html) — Timed choices and romance menus must respect `SceneTree` pause / `time_scale`.
- [Tween](https://docs.godotengine.org/en/stable/classes/class_tween.html) — Typewriter `visible_ratio` and heart-burst pulses without `_process` timers.
### Related Skills
#### Prerequisites
- [godot-resource-data-patterns](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-resource-data-patterns/SKILL.md) — Character profiles, gift tables, and `DateLocation` data belong in typed Resources before wiring affection math.
- [godot-autoload-architecture](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-autoload-architecture/SKILL.md) — Global affection / TimeManager singletons need correct boot order and ownership so route state is not scene-local.
- [godot-signal-architecture](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-signal-architecture/SKILL.md) — Milestone, mood, and schedule buses must stay Signal-Up so UI and NPCs never poll relationship dictionaries.
- [godot-dialogue-system](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-dialogue-system/SKILL.md) — Branching conversation trees and choice consequences are the narrative substrate under affection gates.
#### Complements
- [godot-genre-visual-novel](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-genre-visual-novel/SKILL.md) — Pair route locks and CG gallery with VN presentation (portraits, backgrounds, advance UX).
- [godot-ui-rich-text](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-ui-rich-text/SKILL.md) — Custom BBCode / RichTextEffect patterns for blushing, nervous shake, and meta-linked choices.
- [godot-tweening](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-tweening/SKILL.md) — Typewriter reveals, portrait crossfades, and heart-burst juice without frame-tied timers.
- [godot-save-load-systems](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-save-load-systems/SKILL.md) — Serialize multi-axis stats, route flags, and gallery unlocks with a real save pipeline.
- [godot-inventory-system](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-inventory-system/SKILL.md) — Gift items and diminishing-return histories plug into affection via inventory ownership.
- [godot-ui-theming](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-ui-theming/SKILL.md) — Heart meters, blush chrome, and choice panels stay consistent across romance UI scenes.
#### Downstream / consumers
- [godot-monte-carlo-balancer](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-monte-carlo-balancer/SKILL.md) — Tune gift values, date thresholds, and repetition penalties so routes stay reachable without grind or soft-locks.
- [godot-quest-system](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-quest-system/SKILL.md) — Expose confession deadlines and missable milestones as timed quest gates on the calendar.
- [godot-audio-systems](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-audio-systems/SKILL.md) — Mood overlays and route beats usually need BGM / stinger buses coordinated with affection events.
#### Master
- [godot-master](https://github.com/thedivergentai/gd-agentic-skills/blob/main/skills/godot-master/SKILL.md) — Library router and mirrored module entry for discovering romance peers (dialogue, VN, save, UI).
コメント
Markdown 対応