Logo Rpgmaker Dialog

Rpgmaker Dialog

Cộng đồng
nightquill
rpgmaker-dialog

Use this skill when writing, editing, or reviewing NPC dialog in an RPG Maker MV or MZ project. Triggers: editing CommonEvents.json or MapXXX.json dialog, writing character lines, reviewing text escape codes like \N[] or \V[], or when the user mentions dialog, NPC lines, conversation, text, cutscene dialog, or character voice in an RPG Maker context. Provides: dialog command code reference, text escape codes, voice consistency workflow, and helper scripts for extraction, injection, and validation.

Tổng quan

Nhà phát hànhnightquill
Kho mãrpgmaker-agent-skills
Tên kỹ năngrpgmaker-dialog
Sao
30
Bản fork
3
Tệp đi kèm
4
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được nightquill công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Rpgmaker Dialog trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/nightquill/rpgmaker-agent-skills/tree/main/skills/rpgmaker-dialog
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nightquill/rpgmaker-agent-skills.git /tmp/rpgmaker-agent-skills
mkdir -p .claude/skills
cp -r /tmp/rpgmaker-agent-skills/skills/rpgmaker-dialog .claude/skills/rpgmaker-dialog
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Rpgmaker Dialog trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Rpgmaker Dialog ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Rpgmaker Dialog với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

RPG Maker Dialog Skill

This skill covers reading, writing, and editing NPC dialog in RPG Maker MV and MZ projects. It teaches agents where dialog lives in the project files, what the event command structure looks like, and how to maintain character voice consistency when drafting new lines.

All dialog suggestions generated by this skill are drafts for developer review — never authoritative final copy.


Where Dialog Lives

Dialog is stored as structured event commands in three locations:

1. data/CommonEvents.json

Reusable dialog sequences — inn conversations, quest hand-ins, shop greetings. This file is a JSON array where index 0 is always null. Each event object has an id, name, and list of event commands.

json
[
  null,
  {
    "id": 1,
    "name": "Innkeeper Dialog",
    "trigger": 0,
    "switchId": 0,
    "list": [
      { "code": 101, "indent": 0, "parameters": ["Actor1", 0, 0, 2] },
      { "code": 401, "indent": 0, "parameters": ["Welcome to the village inn!"] },
      { "code": 0,   "indent": 0, "parameters": [] }
    ]
  }
]

2. data/MapXXX.json event pages

NPC dialog attached to a specific map. Each map file has an events array (null at index 0). Each event has a pages array, and each page has a list of event commands.

json
{
  "events": [
    null,
    {
      "id": 1,
      "name": "Innkeeper",
      "pages": [
        {
          "list": [
            { "code": 101, "indent": 0, "parameters": ["Actor1", 0, 0, 2] },
            { "code": 401, "indent": 0, "parameters": ["Hello traveler!"] },
            { "code": 0,   "indent": 0, "parameters": [] }
          ]
        }
      ]
    }
  ]
}

3. data/System.json terms

UI text — menu labels, battle messages, status names. Not NPC dialog, but text fields agents may need to review or update. Modify with care; this file also holds the currency unit name (currencyUnit) and other engine settings.


Dialog Command Codes

Every dialog block follows this structure. For the full command code reference, see ../shared/references/event-command-codes.md.

Code 101 — Show Text (header)

Starts a dialog block. Sets the face portrait and window position.

json
{ "code": 101, "indent": 0, "parameters": ["Actor1", 0, 0, 2] }

Parameters: [faceName: string, faceIndex: int, backgroundType: int, positionType: int]

ParameterValues
faceNameFilename of the face sprite sheet (e.g., "Actor1")
faceIndex0–7: which portrait in the 4×2 sprite sheet
backgroundType0 = window, 1 = dim, 2 = transparent
positionType0 = top, 1 = middle, 2 = bottom

Code 401 — Show Text (line)

One line of dialog text. Must follow a code 101. Multiple 401s form a multi-line message (RPG Maker shows up to 4 lines per text window).

json
{ "code": 401, "indent": 0, "parameters": ["Please, \\N[1], you must help us!"] }

Parameters: [text: string] — one entry per visible line.

Code 102 — Show Choices

Presents the player with a choice menu.

json
{ "code": 102, "indent": 0, "parameters": [["Yes", "No"], 1, 0, 2, 0] }

Parameters: [choices: string[], cancelType: int, defaultType: int, positionType: int, background: int]

cancelType: -1 = disallow cancel, 0–N = cancel maps to that choice index.

Code 402 — When [Choice]

Branch block for one specific choice. Indent increases by 1.

json
{ "code": 402, "indent": 1, "parameters": [0, "Yes"] }

Code 403 — When Cancel

Branch executed when the player presses cancel (if cancelType ≠ -1).

json
{ "code": 403, "indent": 1, "parameters": [] }

Code 404 — End Choice

Closes the choice block. Indent returns to the level of the 102.

json
{ "code": 404, "indent": 1, "parameters": [] }

Code 0 — List Terminator

Every event command list must end with this entry. Insert new dialog blocks before the code-0 terminator, never after it.

json
{ "code": 0, "indent": 0, "parameters": [] }

Complete Example

json
[
  { "code": 101, "indent": 0, "parameters": ["Actor1", 0, 0, 2] },
  { "code": 401, "indent": 0, "parameters": ["Would you like to rest? It's 50 gold."] },
  { "code": 102, "indent": 0, "parameters": [["Yes", "No"], 1, 0, 2, 0] },
  { "code": 402, "indent": 1, "parameters": [0, "Yes"] },
  { "code": 101, "indent": 2, "parameters": ["Actor1", 0, 0, 2] },
  { "code": 401, "indent": 2, "parameters": ["Sweet dreams!"] },
  { "code": 402, "indent": 1, "parameters": [1, "No"] },
  { "code": 101, "indent": 2, "parameters": ["Actor1", 0, 0, 2] },
  { "code": 401, "indent": 2, "parameters": ["Come back anytime."] },
  { "code": 404, "indent": 1, "parameters": [] },
  { "code": 0,   "indent": 0, "parameters": [] }
]

Text Escape Codes

RPG Maker text supports inline escape codes for dynamic content. The most critical codes to know:

CodeEffectExample
\N[n]Actor name by ID\N[1] → "Hero"
\V[n]Variable value\V[1] → current value of variable 1
\C[n]Text color\C[1] = blue, \C[0] = default white
\I[n]Inline icon\I[64] → icon 64 from IconSet.png

Full table: ../shared/references/text-codes.md

NEVER strip or modify text codes during extraction or editing. Preserve them verbatim. \N[1] in the source must appear as \N[1] in extracted output and any re-injected content.

In JSON files, backslashes are escaped: the source text \N[1] is stored as \\N[1] in the JSON string. When reading with json.load(), Python gives you the raw \N[1] string.


Voice Consistency Workflow

Before drafting new dialog for any character, always extract and review their existing lines first. This is the single most important rule for maintaining believable character voice.

Quick summary:

  1. Extract existing lines with extract_npc_lines.py
  2. Analyze tone, vocabulary, sentence length, verbal tics
  3. Draft new lines matching the identified voice patterns
  4. Validate that all \N[id] and \I[id] references point to real entries

Full step-by-step guide: references/character-voice.md


Never Fabricate References

Before using \N[id] or \I[id] in any dialog line:

  • Check data/Actors.json to confirm the actor ID exists
  • Check data/Items.json to confirm the item ID exists
  • Never invent IDs. A non-existent \N[99] displays a blank string in-game and corrupts voice/immersion silently.

\V[n] (variable) and \C[n] (color) do not require database cross-checks — variables are runtime values, colors are engine constants (0–31).

Run validate_dialog_refs.py before finalizing any dialog changes.


Helper Scripts

These scripts live in skills/rpgmaker-dialog/scripts/. Run them from the repository root with PYTHONPATH=. python skills/rpgmaker-dialog/scripts/<script>.py.

ScriptPurpose
extract_npc_lines.pyExtract all dialog lines attributed to a named NPC across the whole project
inject_dialog.pyInject a new dialog block into a CommonEvent or Map event
validate_dialog_refs.pyValidate that all \N[id] and \I[id] text code references exist in the database

All write operations default to dry-run mode. Pass --apply to write changes. A .bak backup is created automatically before any modification.

Quick usage

bash
# Extract all dialog lines for the Hero NPC
PYTHONPATH=. python skills/rpgmaker-dialog/scripts/extract_npc_lines.py \
  --project fixtures/example-mv-project --npc Hero

# Inject new dialog into CommonEvent 1 (dry run)
PYTHONPATH=. python skills/rpgmaker-dialog/scripts/inject_dialog.py \
  --project fixtures/example-mv-project \
  --target common-event:1 \
  --lines "Good morning, traveler." "The weather's fine today."

# Validate all dialog references in the project
PYTHONPATH=. python skills/rpgmaker-dialog/scripts/validate_dialog_refs.py \
  --project fixtures/example-mv-project

Navigation

DocumentContents
references/character-voice.mdStep-by-step voice consistency workflow with examples
../shared/references/text-codes.mdFull text escape code reference table
../shared/references/event-command-codes.mdDialog event command code reference (101, 401, 102, 402, 403, 404)
../rpgmaker-core/SKILL.mdProject structure, safety rules, MV/MZ detection

All dialog suggestions generated by this skill are drafts for developer review. The developer makes the final creative and structural decisions.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Rpgmaker Dialog làm được gì?

Use this skill when writing, editing, or reviewing NPC dialog in an RPG Maker MV or MZ project. Triggers: editing CommonEvents.json or MapXXX.json dialog, writing character lines, reviewing text escape codes like \N[] or \V[], or when the user mentions dialog, NPC lines, conversation, text, cutscene dialog, or character voice in an RPG Maker context. Provides: dialog command code reference, text escape codes, voice consistency workflow, and helper scripts for extraction, injection, and validation.

Vì sao nên dùng Rpgmaker Dialog trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Rpgmaker Dialog là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Rpgmaker Dialog trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/nightquill/rpgmaker-agent-skills/tree/main/skills/rpgmaker-dialog. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Rpgmaker Dialog?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Rpgmaker Dialog với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Rpgmaker Dialog với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Rpgmaker Dialog có miễn phí không?

Có. Kỹ năng này được nightquill phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇