派閥のMOD制作¶
旧バージョンの資料
原文はゲームバージョン3.4向けです。現行版では派閥の要求・行動やキーが変わっている可能性があります。
本ページでは、既存の派閥を変更する方法と、新しい派閥を作る方法を解説します。派閥はcommon/pop_faction_types/xxx.txtに定義します。
データ構造¶
| プロパティ | 説明 |
|---|---|
election_header = <GFX_entry_key> |
民主制の選挙画面で派閥リーダー欄に付けるヘッダーテクスチャ。民主制では少なくとも現職と各派閥リーダーが候補になり、派閥リーダーにはこの画像と派閥名が表示されます。無所属リーダーは「Independent」と書かれた代替画像を使います。 |
guiding_ethic = <ethic_key> |
派閥の指導志向。既定では、この志向を持つPOPだけが加入できます。 |
use_guiding_ethic_as_pop_filter = <yes/no> |
noなら指導志向を持たないPOPも加入できます。 |
unique = <yes/no> |
yesなら帝国内に同種派閥を1つだけ作れます。バニラ派閥はすべてyesです。 |
support_multiplier = <float> |
民主制選挙で、この派閥に属する候補の支持を乗算します。 |
resources = { <economy_unit> } |
派閥の資源生産を定める経済単位。生産量は派閥支持率と派閥満足度で乗算されます。バニラは常にcategory = pop_factionsです。 |
is_potential = { <conditions> } |
帝国がこの派閥を持ちうる条件。バニラではゲシュタルト意識を除外し、開始から10年経過し、他種族と一度遭遇していることを要求します。 |
parameters = { ... } |
派閥行動から呼び出す事前定義パラメータ。バニラは下記のようにparameter:empireから所属帝国を参照できるようにします。 |
can_join_pre_triggers = { ... } |
POPが加入可能かを高速に事前判定する疑似条件。許可される真偽値はhas_owner、is_enslaved、is_being_purged、is_being_assimilated、has_planet、is_sapientだけです。バニラでは常に奴隷化中・浄化中を除外します。これがないと銀河の数千POPごとに全条件を評価し、負荷が高くなります。 |
can_join_faction = { <conditions> } |
POPが加入できる条件。POPスコープ。 |
attraction = { ... } |
POPに対する派閥魅力。バニラの基礎値は100、市民権を持つPOPは×1.25、派閥リーダーが現職なら×1.25、リーダー不在なら×0.75です。ただしPOPは同時に最大1派閥の要件だけを満たし、リーダーはランダムに選ばれ、派閥リーダーとしての任命を解除できず、解雇・死亡後もランダムに再選されるため、原文では実質的に無関係とされています。 |
leader = { ... } |
派閥リーダーへランダム選出される重み。バニラの基礎値は100で、イベントリーダーは×0。覇権主義派閥(Supremacist)は異種族リーダーも除外します。異星人が人類の優越を説くような、没入感を損なう状況を避けるためです。重みが正の候補がいなくても派閥は作られ、その後ずっとリーダー不在になります。 |
demand = { ... } |
派閥要求。複数指定可。下記の各フィールドを持ちます。 |
demand.title / unfulfilled_title / desc |
要求のフレーバーテキスト。達成・未達成で題名を変えられます。 |
demand.fulfilled_effect / unfulfilled_effect |
要求が派閥満足度へ与える影響。 |
demand.potential / trigger |
前者は要求を表示する条件、後者は達成条件。派閥スコープで、ownerから帝国を参照します。 |
on_create = { <effects> } |
派閥作成時に派閥へ実行する効果。バニラではpop_faction_event = { id = factions.1 }で、派閥名とリーダーを知らせるイベントを呼びます。派閥スコープ。 |
on_destroy = { <effects> } |
派閥解散時に帝国へ実行する効果。バニラでは「志向の推奨」「志向の抑圧」の静的補正を除去します。帝国スコープ。 |
actions = { ... } |
帝国が派閥へ行える行動のリスト。 |
actions.title / description |
派閥行動の名称と説明のローカライズキー。 |
actions.cost = { <resource_key> = <int> } |
行動の費用。 |
actions.potential / valid |
前者は行動を一覧へ表示する条件、後者は実行可能条件。派閥スコープ。 |
actions.effect = { <effects> } |
行動時に実行する効果。派閥スコープ。 |
actions.ai_weight = { ... } |
AIがこの行動を選ぶ可能性。 |
バニラのパラメータ定義は次のとおりです。
parameters = {
empire = {
type = country
valid_objects = { is_same_value = root }
}
}
派閥の例¶
帝国主義派閥¶
次はバニラのimperialist派閥の完全な定義例です。
imperialist = {
election_header = "GFX_faction_header_yellow"
guiding_ethic = ethic_militarist #only pops of this ethic can join the faction
unique = yes
support_multiplier = 1
resources = {
category = pop_factions
produces = {
unity = 0.5
}
}
is_potential = {
is_faction_allowed = yes
if = {
limit = {
has_faction = imperialist
any_pop_faction = {
is_pop_faction_type = imperialist
num_pops >= 5
}
}
}
else = {
count_owned_pop = {
count >= 5
limit = {
has_ethic = ethic_militarist
}
}
}
}
parameters = {
empire = {
type = country
valid_objects = {
is_same_value = root
}
}
}
can_join_pre_triggers = {
is_enslaved = no
is_being_purged = no
}
can_join_faction = {
is_shackled_robot = no
can_think = yes
}
attraction = {
base = 100
modifier = {
factor = 1.25
exists = from
from = {
exists = leader
leader = { leader_class = ruler }
}
}
modifier = {
factor = 0.75
exists = from
from = {
NOT = { exists = leader }
}
}
modifier = {
factor = 1.25
has_citizenship_rights = yes
}
}
leader = {
base = 100
modifier = {
factor = 0.0
is_event_leader = yes
}
}
demand = {
title = "FACTION_OUTRAGED_GC"
unfulfilled_title = "FACTION_OUTRAGED_GC"
desc = "FACTION_OUTRAGED_GC_DESC"
fulfilled_effect = -20
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
has_country_flag = faction_militarist_outraged_gc
}
}
trigger = {
owner = {
has_country_flag = faction_militarist_outraged_gc
}
}
}
demand = {
title = "IMPERIALIST_PHILOSOPHY"
unfulfilled_title = "IMPERIALIST_NO_PHILOSOPHY"
desc = "IMPERIALIST_PHILOSOPHY_DESC"
unfulfilled_effect = -30
fulfilled_effect = 0.001
potential = {
exists = owner
owner = {
any_relation = {
has_communications = root.owner
is_country_type = default
NOT = { exists = overlord }
}
}
}
trigger = {
owner = {
OR = {
has_policy_flag = unrestricted_wars
has_policy_flag = liberation_wars
}
}
}
}
demand = {
title = "IMPERIALIST_CONQUEST"
unfulfilled_title = "IMPERIALIST_NO_CONQUEST"
desc = "IMPERIALIST_CONQUEST_DESC"
fulfilled_effect = 10
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
any_relation = {
has_communications = root.owner
is_country_type = default
NOT = { exists = overlord }
}
}
}
trigger = {
owner = {
has_country_flag = imperialist_conquest_timed_flag
}
}
}
demand = {
title = "SUPREMACIST_FANATIC_PURIFIERS"
unfulfilled_title = "SUPREMACIST_NOT_FANATIC_PURIFIERS"
desc = "SUPREMACIST_FANATIC_PURIFIERS_DESC"
fulfilled_effect = 10
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
has_valid_civic = civic_fanatic_purifiers
}
}
trigger = {
owner = {
has_valid_civic = civic_fanatic_purifiers
}
}
}
demand = {
title = "IMPERIALIST_RIVALS1"
unfulfilled_title = "IMPERIALIST_FEW_RIVALS1"
desc = "IMPERIALIST_RIVALS_DESC1"
fulfilled_effect = 5
unfulfilled_effect = -5
potential = {
exists = owner
owner = {
num_communications > 2
NOT = { has_valid_civic = civic_fanatic_purifiers }
num_rivals < 2
}
}
trigger = {
owner = {
num_rivals > 0
}
}
}
demand = {
title = "IMPERIALIST_RIVALS2"
unfulfilled_title = "IMPERIALIST_FEW_RIVALS2"
desc = "IMPERIALIST_RIVALS_DESC2"
fulfilled_effect = 10
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
num_communications > 2
NOT = { has_valid_civic = civic_fanatic_purifiers }
num_rivals = 2
}
}
trigger = {
owner = {
num_rivals > 1
}
}
}
demand = {
title = "IMPERIALIST_RIVALS3"
unfulfilled_title = "IMPERIALIST_FEW_RIVALS3"
desc = "IMPERIALIST_RIVALS_DESC3"
fulfilled_effect = 15
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
num_communications > 2
NOT = { has_valid_civic = civic_fanatic_purifiers }
num_rivals > 2
}
}
trigger = {
owner = {
num_rivals > 2
}
}
}
demand = {
title = "IMPERIALIST_OVERLORD" #Imperial Hegemony
unfulfilled_title = "IMPERIALIST_NOT_OVERLORD"
desc = "IMPERIALIST_OVERLORD_DESC"
fulfilled_effect = 5
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
num_communications > 2
NOT = { has_valid_civic = civic_fanatic_purifiers }
}
}
trigger = {
OR = {
owner = {
is_overlord = yes
}
owner = {
has_federation = yes
federation = {
has_federation_type = hegemony_federation
}
is_federation_leader = yes
}
}
}
}
demand = {
title = "IMPERIALIST_UNDERLING"
unfulfilled_title = "IMPERIALIST_NOT_UNDERLING"
desc = "IMPERIALIST_UNDERLING_DESC"
unfulfilled_effect = -25
fulfilled_effect = 0.001
potential = {
exists = owner
owner = {
has_overlord_dlc = no
is_subject = yes
}
}
trigger = {
owner = {
is_subject = no
}
}
}
demand = {
title = "IMPERIALIST_BULWARK"
unfulfilled_title = "IMPERIALIST_NOT_BULWARK"
desc = "IMPERIALIST_BULWARK_DESC"
unfulfilled_effect = -25
fulfilled_effect = 0.001
potential = {
exists = owner
owner = {
has_overlord_dlc = yes
is_subject = yes
is_specialist_subject_type = { TYPE = bulwark }
}
}
trigger = {
owner = {
OR = {
is_subject = no
is_specialist_subject_type = { TYPE = bulwark }
}
}
}
}
demand = {
title = "IMPERIALIST_SLAYER"
unfulfilled_title = "IMPRERIALIST_NOT_SLAYER"
desc = "IMPERIALIST_SLAYER_DESC"
fulfilled_effect = 10
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
host_has_dlc = "Leviathans Story Pack"
OR = {
has_country_flag = killed_guardian
any_country = {
is_guardian_country = yes
has_communications = prev
}
}
}
}
trigger = {
owner = {
has_country_flag = killed_guardian
}
}
}
demand = {
title = "IMPERIALIST_MILITARY_APPLICATIONS"
unfulfilled_title = "IMPERIALIST_NO_MILITARY_APPLICATIONS"
desc = "IMPERIALIST_MILITARY_APPLICATIONS_DESC"
fulfilled_effect = 5
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
host_has_dlc = "Ancient Relics Story Pack"
has_technology = tech_arcane_deciphering
OR = {
has_modifier = artifact_find_military_application_army
has_modifier = artifact_find_military_application_shield_damage
has_modifier = artifact_find_military_application_armor_damage
}
}
}
trigger = {
owner = {
OR = {
has_modifier = artifact_find_military_application_army
has_modifier = artifact_find_military_application_shield_damage
has_modifier = artifact_find_military_application_armor_damage
}
}
}
}
demand = {
title = "IMPERIALIST_PEACEFUL_APPLICATIONS"
unfulfilled_title = "IMPERIALIST_NO_PEACEFUL_APPLICATIONS"
desc = "IMPERIALIST_PEACEFUL_APPLICATIONS_DESC"
unfulfilled_effect = -5
fulfilled_effect = 0.001
potential = {
exists = owner
owner = {
host_has_dlc = "Ancient Relics Story Pack"
has_technology = tech_arcane_deciphering
OR = {
has_modifier = artifact_find_peaceful_application_happy_bios
has_modifier = artifact_find_peaceful_application_consumer_goods
has_modifier = artifact_find_peaceful_application_amenities
has_modifier = artifact_find_peaceful_application_leader_improvement
}
}
}
trigger = {
owner = {
NOR = {
has_modifier = artifact_find_peaceful_application_happy_bios
has_modifier = artifact_find_peaceful_application_consumer_goods
has_modifier = artifact_find_peaceful_application_amenities
has_modifier = artifact_find_peaceful_application_leader_improvement
}
}
}
}
demand = {
title = "STRONG_DIPLO_STANCE"
unfulfilled_title = "STRONG_DIPLO_STANCE"
desc = "STRONG_DIPLO_STANCE_DESC"
fulfilled_effect = 10
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
is_homicidal = no
is_country_type = default
OR = {
has_policy_flag = diplo_stance_belligerent
has_policy_flag = diplo_stance_supremacist
}
}
}
trigger = {
owner = {
OR = {
has_policy_flag = diplo_stance_belligerent
has_policy_flag = diplo_stance_supremacist
}
}
}
}
demand = {
title = "WEAK_DIPLO_STANCE"
unfulfilled_title = "WEAK_DIPLO_STANCE"
desc = "WEAK_DIPLO_STANCE_DESC"
fulfilled_effect = 0.01
unfulfilled_effect = -10
potential = {
exists = owner
owner = {
is_homicidal = no
is_country_type = default
has_policy_flag = diplo_stance_cooperative
}
}
trigger = {
owner = {
NOT = { has_policy_flag = diplo_stance_cooperative }
}
}
}
demand = {
title = "IMPERIALIST_BENEVOLENT_SUBJUGATION_POLICY"
unfulfilled_title = "IMPERIALIST_NO_BENEVOLENT_SUBJUGATION_POLICY"
desc = "IMPERIALIST_BENEVOLENT_SUBJUGATION_POLICY_DESC"
unfulfilled_effect = -5
fulfilled_effect = 0.001
potential = {
exists = owner
owner = {
is_subject = no
has_policy_flag = benevolent_terms
}
}
trigger = {
owner = {
NOT = { has_policy_flag = benevolent_terms }
}
}
}
demand = {
title = "IMPERIALIST_OPPRESSIVE_SUBJUGATION_POLICY"
unfulfilled_title = "IMPERIALIST_ADOPT_OPPRESSIVE_SUBJUGATION_POLICY"
desc = "IMPERIALIST_OPPRESSIVE_SUBJUGATION_POLICY_DESC"
fulfilled_effect = 5
unfulfilled_effect = -0.001
potential = {
exists = owner
owner = {
is_subject = no
NOT = { has_policy_flag = benevolent_terms }
}
}
trigger = {
owner = {
has_policy_flag = oppressive_terms
}
}
}
on_create = {
pop_faction_event = { id = factions.1 }
}
on_destroy = {
if = {
limit = {
has_modifier = promoted_militarist
}
remove_modifier = promoted_militarist
}
if = {
limit = {
has_modifier = suppressed_militarist
}
remove_modifier = suppressed_militarist
}
}
actions = {
embrace_faction = {
title = "EMBRACE_FACTION"
description = "EMBRACE_FACTION_DESC"
cost = {
unity = 5000
}
potential = {
exists = owner
owner = {
OR = {
is_subject = no
NOT = { any_agreement = { agreement_preset = preset_dominion } }
}
}
}
valid = {
custom_tooltip = {
fail_text = EMBRACE_FACTION_COOLDOWN
parameter:empire = {
NOT = { has_modifier = embraced_faction_timer }
}
}
support > 0.20
parameter:empire = {
NOT = { has_ethic = "ethic_fanatic_militarist" }
}
}
effect = {
add_modifier = { modifier = embraced_faction days = 3600 }
parameter:empire = {
shift_ethic = ethic_militarist
hidden_effect = {
add_modifier = { modifier = embraced_faction_timer days = 3600 }
every_pop_faction = {
limit = { NOT = { is_same_value = root } }
add_modifier = { modifier = embraced_another_faction days = 3600 }
}
}
}
hidden_effect = {
save_event_target_as = TargetFaction
parameter:empire = {
every_relation = {
limit = {
is_ai = no
is_country_type = default
has_communications = prev
has_intel_level = {
who = prev
category = government
level >= 1
}
}
country_event = { id = factions.2000 }
}
}
}
}
ai_weight = {
base = 1
modifier = {
factor = 0
support < 0.50
owner = {
has_ethic = ethic_militarist
}
}
modifier = {
factor = 0
owner = { has_valid_civic = civic_fanatic_purifiers }
}
modifier = {
factor = 0
NOT = {
owner = {
exists = ruler
ruler = {
leader_of_faction = imperialist
}
}
}
}
modifier = {
factor = 0
owner = {
count_pop_faction = {
count < 4
}
}
}
}
}
promote_faction = {
title = "PROMOTE_FACTION"
description = "PROMOTE_FACTION_DESC"
potential = {
exists = owner
parameter:empire = {
NOR = {
has_modifier = suppressed_militarist
has_modifier = promoted_militarist
}
}
}
effect = {
parameter:empire = {
add_modifier = { modifier = promoted_militarist days = -1 }
}
}
ai_weight = {
base = 0
}
}
cancel_promote_faction = {
title = "CANCEL_PROMOTE_FACTION"
description = "CANCEL_PROMOTE_FACTION_DESC"
potential = {
exists = owner
parameter:empire = { has_modifier = promoted_militarist }
}
effect = {
parameter:empire = {
remove_modifier = promoted_militarist
}
}
ai_weight = {
base = 0
}
}
suppress_faction = {
title = "SUPPRESS_FACTION"
description = "SUPPRESS_FACTION_DESC"
potential = {
exists = owner
parameter:empire = {
NOR = {
has_modifier = suppressed_militarist
has_modifier = promoted_militarist
}
}
}
effect = {
add_modifier = { modifier = suppressed_faction days = -1 }
parameter:empire = {
add_modifier = { modifier = suppressed_militarist days = -1 }
}
}
ai_weight = {
base = 0
}
}
cancel_suppress_faction = {
title = "CANCEL_SUPPRESS_FACTION"
description = "CANCEL_SUPPRESS_FACTION_DESC"
potential = {
exists = owner
parameter:empire = { has_modifier = suppressed_militarist }
}
effect = {
remove_modifier = suppressed_faction
parameter:empire = {
remove_modifier = suppressed_militarist
}
}
ai_weight = {
base = 0
}
}
}
}
AIが派閥を受容するのは、現職統治者がその派閥のリーダーである場合だけです。また、狂信的な浄化主義の帝国は派閥を受容しません。
一部の要求は、達成時に満足度を+0.001、未達成時に-0.001だけ変えます。これは要求を緑または赤で表示するためです。影響が完全に0だと黄色になり、誤解を招くためです。
出典: Stellaris Wiki — Pop Faction modding(原文更新日: 2022年12月30日、版ID 71756)
翻訳日: 2026年9月18日 / 対応バージョン: 3.4
本ページは原文Wiki(CC BY-SA 3.0)の内容を翻訳した非公式ファン翻訳です。