Openrct2のロゴ

Openrct2

組織
CodeAtCode
openrct2

Use when developing OpenRCT2 plugins in TypeScript - plugin registration and game actions, window and widget UI, event hooks, park, map, ride and entity access, network API, storage, or ES5 runtime constraints

概要

公開者CodeAtCode
リポジトリoss-ai-skills
スキル名openrct2
スター
30
フォーク
3
同梱ファイル
4
ライセンスGPL-3.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

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

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

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

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

スキルの指示

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

Objective: Use this skill to reduce desynced multiplayer actions, ES5-transpilation failures, event-hook leak incidents, and game-action rejection bugs by enforcing action-validation discipline, ES5-compatible patterns, and hook-cleanup rules below.

OpenRCT2 Plugin Development

Develop plugins (scripts) for OpenRCT2 using JavaScript/TypeScript to extend the game with custom windows, game actions, event hooks, and multiplayer features.

Overview

OpenRCT2 plugins run in Duktape (ES5 runtime). Key capabilities:

  • JavaScript/TypeScript - ES5 compatible, use transpilers for ES6+
  • Game Actions - Multiplayer-synchronized state mutations
  • UI Windows - Custom windows with widgets
  • Hooks - Subscribe to game events
  • Network API - TCP sockets for localhost communication
  • Hot Reload - Real-time plugin development

Plugin Directory

Place .js files in the plugin directory:

  • Windows: C:\Users\YourName\Documents\OpenRCT2\plugin\
  • Mac: /Users/YourName/Library/Application Support/OpenRCT2/plugin/
  • Linux: $XDG_CONFIG_HOME/OpenRCT2/plugin/ or $HOME/.config/OpenRCT2/plugin/

Access via game: Red toolbox button → Open custom content folder

Plugin Types

Do do not mutate game state in local plugins because the server rejects direct mutations in multiplayer. Use game actions instead.

javascript
// Local plugin - info windows only
registerPlugin({
    name: 'Local Info Plugin',
    version: '1.0',
    type: 'local',  // Available to all players in multiplayer
    main: function() {
        // Can only use game actions, not direct mutations
        // Good for: info windows, tools, dashboards
    }
});

Remote plugins load only on server and distribute to clients. Mutate game state only in the execute context of custom game actions because that is the only server-side entry point.

javascript
// Remote plugin - server-side state mutation
registerPlugin({
    name: 'Remote Game Plugin',
    version: '1.0',
    type: 'remote',  // Server-side, synced to clients
    main: function() {
        // Can mutate game state in custom game action execute()
    }
});

Intransient plugins stay loaded across park changes and in title screen. Use context.sharedStorage for persistence because park storage clears on park load.

javascript
// Intransient plugin - persistent across parks
registerPlugin({
    name: 'Global Plugin',
    version: '1.0',
    type: 'intransient',  // Never unloaded
    main: function() {
        // Active in title screen and across parks
        // Use context.sharedStorage for persistence
    }
});

Game Actions

Game actions are the recommended way to mutate game state, ensuring multiplayer synchronization.

Validate Game Action Args Before Execute Because the Server Rejects Invalid Actions and Desyncs Multiplayer

Custom game actions must implement both query (validation) and execute (mutation). The query phase runs client-side to check permissions and args; execute runs server-side to mutate state.

javascript
context.registerAction({
    id: 'myplugin.award_cash',
    query: function(args) {
        // Validation - return error object if invalid
        if (args.amount < 0) {
            return { error: 'Amount must be positive' };
        }
        if (args.amount > 100000) {
            return { error: 'Amount too large' };
        }
        // Check permissions in multiplayer
        if (network.mode !== 'none') {
            var player = network.getPlayer(args.playerId);
            if (!player || !player.hasPermission('modify_park')) {
                return { error: 'No permission' };
            }
        }
        return {};  // Success
    },
    execute: function(args) {
        // Actual game state mutation - only runs on server
        park.cash += args.amount;
        return {};  // Success
    }
});

See references/game-actions.md for built-in action type tables and argument schemas.

Best Practices

Check UI Availability Because Headless Servers Lack the UI API

Do check typeof ui !== 'undefined' before using UI APIs because headless servers crash on undefined API access.

Use Game Actions for Mutations Because Direct State Changes Fail in Multiplayer

Do use context.executeAction() for all state mutations because direct property assignments like park.cash = are rejected by the server in multiplayer.

Namespace Your Data Because Unnamespaced Keys Conflict Across Plugins

Do use namespaced keys like MyPlugin.Settings.Enabled instead of Settings.Enabled because multiple plugins writing to the same key will overwrite each other's data.

Handle Errors Because Action Failures Must Be Logged

Do check result.error in every action callback because failed actions silent without error handling make debugging impossible.

Clean Up On Unload Because Event Hooks Leak Memory

Do track all context.setInterval() IDs and call clearInterval() on the plugin.unloaded event because unsubscribed hooks continue running after plugin reload, causing memory leaks and duplicate executions.

ES5 Limitations

OpenRCT2 uses Duktape (ES5). ES6+ features require transpilation. Avoid arrow functions because the ES5 runtime transpilation fails on them.

Not Supported

javascript
// Arrow functions - transpilation fails
var func = () => {};

// Classes - transpilation fails
class MyClass {}

// let/const - transpilation fails
let x = 1;

// Template literals - transpilation fails
`Hello ${name}`

// Spread operator - transpilation fails
[...arr]

// Destructuring - transpilation fails
var { x } = obj;

// find/includes - transpilation fails
arr.find(x => x > 0);
arr.includes(5);

ES5 Alternatives

javascript
// Function expressions - works
var func = function() {};

// Constructor functions - works
function MyClass() {}

// var - works
var x = 1;

// String concatenation - works
'Hello ' + name

// Array methods - works
arr.filter(function(x) { return x > 0; })[0];
arr.indexOf(5) !== -1;

Distribution

Publishing

  1. GitHub Releases - Recommended, attach compiled .js
  2. openrct2plugins.org - Community plugin repository

Versioning

javascript
registerPlugin({
    name: 'My Plugin',
    version: '1.2.3',  // Semantic versioning
    minApiVersion: 34,  // Minimum OpenRCT2 API version
    targetApiVersion: 34,  // Target API for behavior
});

Deep Dives

Load these reference files on demand for detailed API information:

  • Window and Widget UI - Window creation, widgets (ListView, GroupBox, tabs), events → references/ui.md
  • Hooks and Map Access - Event subscriptions, park info, map tiles, rides, entities → references/hooks-map.md
  • Network, Storage, Hot Reload, Debugging - TCP sockets, storage APIs, development workflow → references/network-storage.md
  • Game Actions Reference - Built-in action types, argument schemas, custom action patterns → references/game-actions.md

References

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

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

Use when developing OpenRCT2 plugins in TypeScript - plugin registration and game actions, window and widget UI, event hooks, park, map, ride and entity access, network API, storage, or ES5 runtime constraints

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

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/CodeAtCode/oss-ai-skills/tree/master/extend/openrct2を貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

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

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

Openrct2は何個のAIモデルで使えますか?

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

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

はい。CodeAtCodeがGitHubでGPL-3.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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