Npc Dialogueのロゴ

Npc Dialogue

コミュニティ
christos-antono
npc-dialogue

LLMでNPCのセリフを作成し、キャラクターらしさとゲームの雰囲気を反映させます。キャラクター設定ファイル、各プロンプトにキャラクター自身のセリフからランダムに選んだ新しいサンプルを含める方法、シーン情報(場所、時刻、天気、プレイヤーが持つものや運転するもの、危険)、NPCごとの会話履歴、音声モデル向けの話し方タグを1つ付けた短い音声出力、プレイヤーの指示への対応、推論をオフにした高速モデル、出力の整形(拒否応答、名前の接頭辞、長さ、差別的表現のルール)を解説します。NPCの返答がありきたり、機械的、長すぎる、説教くさい、キャラクターらしくない場合、返答を拒否する、ゲームの雰囲気を壊す、または遅すぎる場合や、新しいキャラクターの設定を追加する場合に使用してください。

Add to TypingMind

概要

公開者christos-antono
リポジトリNPCTalk
スキル名npc-dialogue
スター
201
フォーク
17
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    christos-antonoがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Npc Dialogue」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/christos-antono/NPCTalk/tree/main/.agents/skills/npc-dialogue
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/christos-antono/NPCTalk.git /tmp/NPCTalk
mkdir -p .claude/skills
cp -r /tmp/NPCTalk/.agents/skills/npc-dialogue .claude/skills/npc-dialogue
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでNpc Dialogueを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にNpc Dialogueを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Npc Dialogueは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

NPC dialogue

The voice can be perfect and the NPC still sounds like a chatbot. What fixes it is in the prompt: who they are, how they really talk, where they are, and hard rules about the shape of a spoken line.

The prompt (what examples/gta-v/mod/Dialogue.cs sends)

system:  RULES (shared by everyone; the game's tone and the shape of a line)
         You are <Name>. <persona>
         Lines you've actually said (situation|line): <30 random lines from their own list, fresh every call>
         Examples of how you talk: <8 written examples, optional>
         Right now: <scene facts>
history: the last exchanges with this NPC (per NPC, so each one remembers you)
user:    what the player said
  • The sample of real lines is what makes them sound like themselves. A fresh random 30 each call stops them repeating catchphrases. Use lines you have the rights to: written by you in the character's style (examples/gta-v/sample-lines/franklin.txt), or the game's own lines kept locally if the user extracts them for a private build (NpcVoice/lines/<Voice>.txt, never committed).
  • Scene facts are short and concrete: "Grove Street, Davis, 9pm, foggy. Franklin is holding a pistol and is wanted by the police (2 stars)." NPCs react to the gun, the weather, the car; that's what makes it feel like the game and not a chat window.
  • Personas are a few lines each: who they are, how they talk (slang, catchphrases, what they swear like), who they love and hate. File format (NpcVoice/characters/<Key>.txt):
    name: Lamar Davis
    voice: LamarDavis                 folder in voices/ (default: the file name)
    models: ...                       other model names that are this character
    slurs: no                         yes only if the source character uses them (see Content)
    ---
    Franklin's loud, cocky best friend ... calls Franklin "busta", says "homie", "dog" ...
    _npc.txt is the persona for everyone without a file.

Rules that shape a spoken line (keep these in any game)

  • Only the words said out loud: no narration, asterisks, quotes, name prefix, emoji.
  • Short: usually one or two sentences, 5-25 words; cap it (45 words) and cut at the last full sentence.
  • At most one delivery tag, at the very start ([angry], [laughing], [whispering]...): the voice model acts it, and the game can pick a mood voice folder from it.
  • React to what was said and to the scene; don't echo the player, don't end every line with a question.
  • Stay in character; never mention being an AI or a game.
  • Do what you're told. If the player tells them to do something physical, they do it and say what their character would say while doing it. With actions on, ask the action picker first whether it's an order; if it is, write the line again knowing "you're right now" (skill npc-actions).

The tone rules are per game. GTA V's are M-rated: foul-mouthed, hostile, roasting the player back harder. A cozy farming game wants the opposite. Write them for the game, in the game's register.

Clean the output (never trust it raw)

Dialogue.Clean drops refusals (an empty reply, so an NPC never reads out a safety lecture), strips quotes, *actions* and a Name: or [Name] prefix wherever the model put it, applies the content rules, and cuts to 45 words at the last full sentence.

Content

  • Racial slurs are replaced by default, from everyone. slurs: yes in a persona allows them only for a character who uses them in the source material, the way they do; every persona in this repo has it off.
  • Insults about race (including "ape"/"monkey" jabs) and anti-gay slurs are blocked for everyone.
  • Swearing follows the game's tone; profanity isn't a problem in an M-rated game.

Speed

  • Use a fast model and turn reasoning off: Cerebras qwen-3.8-27b answers in ~0.3 s (DisableReasoning = true). Reasoning models add 1-5 s, and the player hears every millisecond.
  • MaxTokens = 160, Temperature = 0.9.
  • Run the action picker in parallel with the LLM, not after it.
  • Log the LLM's time per exchange; it occasionally spikes to 5-8 s. If that matters, fire a second request after ~2 s and take whichever answers first.

Test without the game

npcvoice-check talk <Character> "<what the player says>" (GTA example) builds exactly the prompt the mod sends and runs the LLM and the action picker; npcvoice-check talk runs a set of exchanges for several characters. Read ten replies per character before tuning anything.

よくある質問

AIスキル「Npc Dialogue」では何ができますか?

LLMでNPCのセリフを作成し、キャラクターらしさとゲームの雰囲気を反映させます。キャラクター設定ファイル、各プロンプトにキャラクター自身のセリフからランダムに選んだ新しいサンプルを含める方法、シーン情報(場所、時刻、天気、プレイヤーが持つものや運転するもの、危険)、NPCごとの会話履歴、音声モデル向けの話し方タグを1つ付けた短い音声出力、プレイヤーの指示への対応、推論をオフにした高速モデル、出力の整形(拒否応答、名前の接頭辞、長さ、差別的表現のルール)を解説します。NPCの返答がありきたり、機械的、長すぎる、説教くさい、キャラクターらしくない場合、返答を拒否する、ゲームの雰囲気を壊す、または遅すぎる場合や、新しいキャラクターの設定を追加する場合に使用してください。

TypingMindでNpc Dialogueを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Npc Dialogueはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにNpc Dialogueをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/christos-antono/NPCTalk/tree/main/.agents/skills/npc-dialogueを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Npc Dialogueを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Npc Dialogueで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもNpc Dialogueを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Npc Dialogue」は無料ですか?

はい。christos-antonoがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇