コンテンツにスキップ
Stellaris v2.6 対応 翻訳

外交のMOD制作

旧バージョンの資料

原文はゲームバージョン2.6向けです。従属国の節には3.4で再設計された仕組みも追記されていますが、原文自体が作成途中です。

本ページは外交、従属国、連邦、銀河共同体のMOD制作を扱います。

外交アクション

外交アクションはcommon/diplomatic_actions/xxx.txtに定義します。新しいアクションは追加できず、既存アクションを限定的に変更できるだけです。

プロパティ 説明
icon 外交GUIへ表示する状態アイコンのGFX参照。
requires_actor_peace = <yes/no> yesなら戦争中の帝国は実行できません。
requires_recipient_peace = <yes/no> yesなら戦争中の帝国を対象にできません。
requires_actor_independence = <yes/no> yesなら従属国は実行できません。
requires_recipient_independence = <yes/no> yesなら従属国を対象にできません。
requires_actor_federation_leader = <yes/no> yesなら連邦議長国でない加盟国は実行できません。
requires_recipient_federation_leader = <yes/no> yesなら連邦議長国でない加盟国を対象にできません。
should_notify_all_communications = <yes/no> yesなら受諾時、関係国の少なくとも一方と通信を持つ全帝国へ通知します。
potential = { <conditions> } 満たさない場合、外交画面から隠します。
possible = { <conditions> } 満たさない場合、送信を禁止します。
proposable = { <conditions> } possibleと同様です。両者の差は原文では不明です。

その他のフィールドは強くハードコードされており、変更する意味はほとんどありません。

外交経済

外交関連の資源維持費・生産を実装する抽象オブジェクトで、common/diplomacy_economy/xxx.txtに定義します。インスタンスはonceかper_relationへ置きます。前者は帝国ごとに最大1回、後者は関係相手ごとに同じ帝国へ複数回適用できます。

  • trigger — 適用条件。帝国Aスコープ。per_relationではFROMが帝国Bです。
  • resources — 帝国Aへ適用する経済単位。per_relationでは、有効な帝国Bごとに1回ずつ帝国Aへ適用します。
once = {
    federation = {
        trigger = { has_federation = yes }
        resources = {
            category = federation
            upkeep = { influence = 1 }
        }
    }
}

per_relation = {
    rivalry = {
        trigger = { has_rival = FROM }
        resources = {
            category = rivalries
            produces = { influence = 0.5 }
        }
    }
    non_aggression_pact = {
        trigger = { has_non_aggression_pact = FROM }
        resources = {
            category = non_aggression_pacts
            upkeep = { influence = 0.25 }
        }
    }
    ...
}

従属国

Stellarisの従属国定義は3.4で再設計されました。この節は原文でも作成途中です。

契約プリセット

common/agreement_presetsに定義します。

  • icon
  • term_data
    • discrete_terms — 統合可否などの各種条件。
      • key — 後述する契約条件の名前。
      • value
    • resource_terms
      • key — 後述する契約条件の名前。
      • value
  • overlord_weight
  • subject_weight
  • potential
  • hidden — 真偽値、既定false。

契約資源

common/agreement_resourcesに定義します。resourcesの中にcategoryとupkeepを指定します。

契約条件

common/agreement_termsに定義します。

  • term_type — discreteまたはresource。
  • hidden — 既定false。契約画面へ表示するかどうか。

契約条件値

common/agreement_term_valuesに定義します。

  • icon
  • triggered_loyalty_change
  • term
    • activate_effect
    • deactivate_effect
  • potential

特化従属国タイプ

common/specialist_subject_typesに定義します。

  • icon / icon_large
  • preferred_ethic
  • base_conversion_time — このタイプへ転換する月数。
  • on_progress_complete — 転換完了時の効果。
  • levels — 発動順に並べたレベルエントリ。第1レベルは経験値不要で常に有効です。
    • experience_needed_for_next_level — 次レベルに必要な経験値。
    • perks — このレベル以上で従属国と宗主国へ適用する特典。

特化従属国特典

common/specialist_subject_perksに定義します。

  • icon
  • main_perk — 真偽値。
  • subject_modifier — 従属国へ適用する補正。
  • overlord_modifier — 宗主国へ適用する補正。
  • overlord_relay_network_modifier — 従属国に隣接する宗主国植民地へ適用する補正。
  • activate_effect / deactivate_effect — 特典の適用・除去時に実行する効果。
  • desc — 説明の上書き。

連邦

連邦の完全なMOD制作は、連邦種別、連邦特典、連邦法カテゴリ、連邦法から成ります。連邦種別のレベルが連邦特典を参照し、法カテゴリと法は政策のMOD制作における政策と選択肢のように機能します。

連邦種別

common/federation_types/xxx.txtに定義します。

  • icon — 連邦種別のGFXアイコン。
  • potential — 種別選択画面に表示する条件。帝国スコープ。
  • allow — 選択可能な条件。帝国スコープ。
  • levels — 発動順のレベル一覧。キーはフレーバーにすぎず任意ですが、UIが5レベル用なのでlevel_1~level_5を推奨します。第1レベルは経験値不要で常に有効です。
    • experience — 次レベルまでに必要な経験値。100 200 300 400なら第5レベル到達には合計1000が必要です。
    • perks — レベル有効化時に有効化し、無効化時に除去する連邦特典。
  • on_create — 連邦作成時の効果。
  • ai_weight — 高いほどAIが結成・加盟・種別変更を好みます。

次は既定の連邦種別です。

default_federation = {
    icon = "GFX_default_federation"
    potential = { always = yes }
    allow = {
        custom_tooltip = {
            fail_text = requires_actor_not_barbaric_despoilers
            NOT = { has_valid_civic = civic_barbaric_despoilers }
        }
    }
    levels = {
        level_1 = {
            experience = @xp_to_level_2
            perks = { default_federation_passive }
        }
        ...
    }
    on_create = {
        remove_federation_flag = enable_federation_cooldowns
        set_federation_law = centralization_minimal
        set_federation_law = succession_type_rotation
        ...
    }
    ai_weight = {
        base = 0
        modifier = {
            desc = federation_acceptance_honorbound_warriors
            add = -10
            from = { has_ai_personality = honorbound_warriors }
        }
        ...
    }
}

一般的なai_weightと異なり、連邦種別の各modifierは、AI受諾値表示用のdescローカライズキーを持ちます。

連邦特典

common/federation_perks/xxx.txtに定義します。他の「特典」と異なり自由選択はできず、連邦レベルに結び付きます。

  • federation_modifier — 連邦スコープへの補正。
  • members_modifier — 議長国を含む全加盟国への補正。
  • leader_modifier — 連邦議長国だけへの補正。
  • on_activate — レベル上昇で有効化されたとき連邦へ実行する効果。
  • on_deactivate — レベル低下で無効化されたときの効果。on_activateを取り消すために使います。

次は研究共同体の受動効果です。第1レベルのエントリから有効化されます。

research_federation_passive = {
    federation_modifier = {
        description = research_federation_passive_effect
        federation_research_sharing_mult = 0.25
    }
    on_activate = { set_federation_settings = { research_sharing = yes } }
    on_deactivate = { set_federation_settings = { research_sharing = no } }
}

連邦法カテゴリ

common/federation_law_categories/xxx.txtに定義します。

  • potential — GUIに表示する条件。
  • laws — 連邦法キーの一覧。
  • centralization = <yes/no> — 中央集権度カテゴリが使用します。

次は「継承の基準」の連邦法カテゴリです。

law_category_succession_power = {
    potential = {
        OR = {
            has_federation_law = succession_type_strongest
            has_federation_law = succession_type_strongest_hegemony
        }
    }
    laws = {
        succession_power_economy
        succession_power_diplomatic_weight
        succession_power_tech
        succession_power_fleet
    }
}

連邦法

common/federation_laws/xxx.txtに定義します。

  • potential — 法案を表示する条件。
  • allow — 投票で有効化できる条件。
  • modifier — 連邦スコープへの補正。
  • on_enact — この法へ変更したとき連邦へ実行する効果。
  • ai_weight — AIの受諾値。

次は「継承の基準:外交発言力」の連邦法です。

succession_power_diplomatic_weight = {
    potential = {
        OR = {
            has_federation_law = succession_type_strongest
            has_federation_law = succession_type_strongest_hegemony
        }
    }
    allow = {
        custom_tooltip = {
            NOT = {
                AND = {
                    NOT = { has_federation_law = succession_power_diplomatic_weight }
                    has_modifier = federation_law_category_succession_power_cooldown
                    has_any_federation_law_in_category = law_category_succession_power
                }
            }
        }
    }
    on_enact = {
        set_federation_succession_type = diplomatic_weight
        if = {
            limit = { has_federation_flag = enable_federation_cooldowns }
            add_modifier = {
                modifier = federation_law_category_succession_power_cooldown
                days = @cooldown
            }
        }
        add_cohesion = -5
    }
    ai_weight = {
        base = 26
        modifier = {
            add = 25
            federation = {
                has_federation_type = trade_federation
                NOT = { federation = { has_federation_law = succession_power_economy } }
            }
        }
        ...
    }
}

連邦関連の動的文

帝国条件

  • is_federation_leader = yes/no — 連邦議長国か。
  • num_envoys_to_federation <=> int — 連邦へ割り当てた使節数。
  • is_in_federation_with = <country_scope> — 対象帝国と同じ連邦にいるか。

帝国効果

  • set_federation_leader = yes — この帝国を連邦議長国にします。

連邦条件

  • federation_experience <=> int / federation_cohesion <=> int / federation_cohesion_growth <=> int / federation_level <=> int — 経験値、団結度、月間団結度成長、レベルを検査します。
  • has_any_federation_law_in_category = <category> — 指定カテゴリに有効な法があるか。
  • has_federation_law = <law> / has_federation_perk = <perk> / has_federation_type = <type> / has_federation_setting = <setting> — 法、特典、種別、設定を検査します。

連邦効果

  • add_federation_experience = int / add_cohesion = int — 経験値・団結度を変更します。
  • set_federation_law = <law> / set_federation_type = <type> — 法を有効化、種別を変更します。
  • set_federation_succession_type = strongest/diplomatic_weight/rotation/challenge/random
  • set_federation_succession_term = status_change/years_10/years_20/years_30/years_40
  • set_only_leader_builds_fleets = yes/no
  • set_allow_subjects_to_join = yes/no
  • set_equal_voting_power = yes/no
  • set_free_migration = yes/no

上記の継承方式以下の効果は、連邦法の外で使うことを推奨しません。

set_diplomacy_action_setting = {
    action = <federation_vote_diplomatic_action>
    settings = { vote_type = unanimous_vote/majority_vote/leader }
}
set_federation_settings = {
    research_sharing = yes/no
    failed_vote_half_price = yes/no
}

銀河共同体

銀河共同体の完全なMOD制作は、決議カテゴリと決議から成り、政策と政策選択肢のように機能します。

決議カテゴリ

common/resolution_categories/xxx.txtに定義します。

  • group — 同じ値のカテゴリを銀河共同体画面でまとめるローカライズキー。
  • icon — カテゴリのGFXアイコン。
  • resolution_types — 決議キーの一覧。

次は「青いグループ」に属する生態学と技術の決議カテゴリです。

resolution_category_ecology = {
    group = environment_technology
    icon = "GFX_resolution_ecolgical_protection"
    resolution_types = { "resolution_ecology_repeal_1" ... }
}
resolution_category_galacticstudies = {
    group = environment_technology
    icon = "GFX_resolution_galactic_studies"
    resolution_types = { "resolution_galacticstudies_repeal_1" ... }
}

決議

common/resolutions/xxx.txtに定義します。

  • icon — 決議のGFXアイコン。
  • target = <yes/no> — 対象帝国を必要とするか。
  • harmful = <yes/no> — 対象選択時にAIが有害な決議とみなすか。
  • modifier — 可決中、全加盟国へ適用する補正。
  • triggered_modifier — potentialを満たす帝国だけへ適用する条件付き補正。帝国スコープ。
  • effect — 可決時に提案国へ実行する効果。対象付き決議では対象国へ実行します。
  • fail_effects — 否決時に実行する効果。effectと同様に提案国へ、対象付き決議では対象国へ実行します。
  • potential — 帝国の提案画面へ表示する条件。帝国スコープ。
  • allow — 帝国が提案できる条件。帝国スコープ。
  • ai_weight — AIの受諾値。
  • valid_target — 有効な対象帝国の条件。target = yesだけで使用します。

経済制裁第1段階と理事国非難の例です。

resolution_sanctions_economic_1 = {
    icon = "GFX_sanctions_orange"
    resources = {
        category = resolutions
        cost = { influence = @resolution_cost_denounce }
    }
    target = no
    effect = { custom_tooltip = sanctions_effect }
    modifier = { }
    triggered_modifier = {
        potential = { OR = { is_in_breach_of_any = yes has_modifier = resolution_denounced } }
        modifier = { resolution_sanctions_economic = 1 }
    }
    allow = {
        custom_tooltip = {
            fail_text = "requires_something_illegal"
            has_global_flag = resolution_with_breach_effect_passed
        }
        custom_tooltip = {
            NOT = {
                is_active_resolution = "resolution_sanctions_economic_2"
                is_active_resolution = "resolution_sanctions_economic_3"
            }
        }
    }
    ai_weight = {
        weight = @resolution_weight_normal
        modifier = { factor = 0 is_in_breach_of_any = yes }
        ...
    }
}

resolution_council_denouncement = {
    icon = "GFX_resolution_purges"
    potential = { has_federations_dlc = yes }
    resources = {
        category = resolutions
        cost = { influence = @resolution_cost_t1 }
    }
    target = yes
    harmful = yes
    valid_target = {
        is_country_type = default
        is_galactic_community_member = yes
        NOT = { is_same_value = from }
        OR = {
            opinion_level = { who = from level < neutral }
            from = { is_rival = prev }
            is_in_breach_of_any = yes
        }
    }
    effect = { add_modifier = { modifier = resolution_denounced days = 3600 } }
    potential = {
        is_galactic_council_established = yes
        NOT = { has_global_flag = resolution_council_denouncement_abolished }
    }
    allow = { is_part_of_galactic_council = yes }
    ai_weight = { weight = @resolution_weight_disliked }
}

resolution_sanctions_economicは通常の補正ではなく静的補正です。補正ブロックで= 1なら静的補正1回分、= 2なら2倍の効果になります。

銀河的関心事項

common/galactic_focuses/xxx.txtに定義します。

  • icon — GFX参照。
  • potential — 有効になる条件。グローバルスコープ。
  • trigger — 達成条件。グローバルスコープ。
  • effect — 達成時、銀河共同体の各加盟国へ実行する効果。帝国スコープ。
galactic_focus_crisis_prethoryn = {
    icon = "GFX_galactic_focus_threat_to_galaxy"
    effect = {
        add_resource = { influence = 100 }
        country_event = { id = crisis.211 }
    }
    potential = {
        has_global_flag = galactic_focus_crisis_prethoryn
        NOT = { has_global_flag = prethoryn_invasion_defeated }
    }
    trigger = {
        custom_tooltip = {
            fail_text = "galactic_focus_crisis_prethoryn"
            has_global_flag = prethoryn_invasion_defeated
        }
    }
}

銀河共同体関連の動的文

帝国条件

  • num_envoys_to_galcom <=> int — 割り当てた使節数。
  • is_proposing_resolution = <resolution/any> — 特定または何らかの決議を提案中か。
  • is_galactic_community_member = yes/no / is_part_of_galactic_council = yes/no — 共同体・理事会の構成国か。
  • galactic_community_rank <=> int — 外交発言力順位。非加盟国は-1。
  • is_permanent_councillor = yes/no — 常任理事国か。
  • is_in_breach_of_any = yes/no — 何らかの銀河法に違反中か。

帝国効果

  • pass_resolution = <resolution> — この帝国が提案したものとして即時可決します。対象付き決議には使えません。
  • pass_resolution_no_cooldown = <resolution_type> — カテゴリのクールダウンを無視して即時可決します。
  • pass_targeted_resolution = { resolution = <type> target = <target> } — 指定対象を持つ、最初に見つかった(最も古い)提案中・投票中・否決済み決議、または新規決議を即時可決します。対象の妥当性を無視します。
  • add_to_galactic_council = yes / remove_from_galactic_council = yes — 理事国へ追加・除去。
  • add_permanent_councillor = yes / remove_permanent_councillor = yes — 常任理事国へ追加・除去。
  • add_to_galactic_community = yes / remove_from_galactic_community = yes — 銀河共同体へ追加・除去。

グローバル条件

  • is_galactic_community_formed = yes/no — 共同体が設立済みか。
  • is_years_since_community_formationn <=> int — 共同体設立後の年数(原文のキー表記どおり)。
  • is_galactic_council_established = yes/no / is_years_since_council_establishment <=> int — 理事会の設立有無・設立後年数。
  • num_council_positions <=> int — 理事国枠数。
  • is_voting_on_resolution = <resolution/any> — 特定または何らかの決議を投票中か。
  • is_active_resolution = <resolution> — 決議が有効か。

グローバル効果

  • set_council_size = int — 理事国枠数を設定。
  • increase_council_size = yes / decrease_council_size = yes — 枠数を1増減。
  • set_council_veto = yes/no — 理事国の拒否権を設定。
  • set_council_emergency_measures = yes/no — 理事国の緊急措置提案権を設定。

出典: Stellaris Wiki — Diplomacy modding(原文更新日: 2025年4月7日、版ID 103443)
翻訳日: 2026年9月18日 / 対応バージョン: 2.6(従属国は3.4以降の追記を含む)
本ページは原文Wiki(CC BY-SA 3.0)の内容を翻訳した非公式ファン翻訳です。