name: stellaris-modding
description: Use when creating, editing, or reviewing Stellaris mods and you need self-contained guidance on Clausewitz/PDX script structure, file placement, scopes, triggers, effects, on_actions, events, technologies, buildings, districts, POP/jobs, traits, governments, relics, archaeology, decisions, special projects, situations, megastructures, components, zones, or vanilla-aligned conventions informed by CWTools and vanilla Stellaris.
Stellaris Modding
Stellaris mod 制作のための documents-only な self-contained reference skill。
bundled references/ だけで判断できるように構成している。ローカル環境の追加資料、補助ツール、外部サイトの存在は前提にしない。ユーザーが別途ファイルを与えた場合だけ、それを追加の一次資料として扱う。
基本方針
- まず対象ドメインを決める。
- そのドメインに最も近い reference を先に読む。
- スコープや論理条件が怪しいときは、必ず基礎 reference に戻る。
- 構文上は書けそうでも、実運用はバニラ慣習に従う。
読み始め
基礎
| トピック |
リファレンス |
用途 |
| PDXスクリプト基礎 |
1.基礎概念 |
構文、エンコーディング、コメント、変数 |
| 条件式と論理演算 |
2.条件式と論理演算 |
AND/OR/NOT/NOR/NAND、calc_true_if |
| スコープ |
3.スコープ |
root、from、prev、主要スコープ遷移 |
主要コンテンツ
| トピック |
リファレンス |
用途 |
| アノマリー |
4.アノマリー |
anomaly category、on_success、anomaly event |
| イベント |
5.イベント |
event type、option、after、継承 |
| テクノロジー |
6.テクノロジー |
potential、weight_modifier、technology_swap |
| オンアクション |
7.オンアクション |
events、random_events、スコープ一覧 |
| エフェクト |
8.エフェクト |
制御構文、生成、変数、反復、scripted effect |
| 政府 |
9.政府 |
authority、civic、origin、government |
| 遺物・考古学 |
10.遺物・考古学サイト |
relic、artifact action、archaeological site |
| POPと職業 |
11.POPと職業 |
pop category、job、swappable_data、経済カテゴリ連携 |
| 特性 |
12.特性 |
species trait、leader trait、replace_traits |
| 惑星地形と惑星補正 |
13.惑星地形と惑星補正 |
deposit、blocker、planet modifier |
| 建造物とディストリクト |
14.建造物とディストリクト |
building、district、building_sets、convert_to |
| 惑星ディシジョン |
15.惑星ディシジョン |
potential、allow、effect、resources |
| スペシャルプロジェクト |
16.スペシャルプロジェクト |
requirements、on_success、abort_trigger |
追加で読むべき reference
実務ルール
scope、trigger、effect が曖昧なら、先に基礎 reference を読む。
- 頻繁に発火するイベントは
is_triggered_only = yes と pre_triggers を優先する。
MTTH や重いポーリングより、on_action、遅延イベント、shared logic を優先する。
- 似た定義を複製する前に、
convert_to、technology_swap、swappable_data、scripted_effects、scripted_triggers、inline_script で吸収できないか考える。
- jobs/buildings/districts の出力変更は、個別定義だけでなく経済カテゴリの継承も確認する。
triggered_*_modifier はツールチップ表示と実適用がズレやすいので、必要なら custom_tooltip で補足する。
- 外部資料がない限り、この skill では「bundled references に書いてあること」だけを根拠に結論を組み立てる。