War modding

本頁面部分全部內容上次核對於3.3版本


這個界面是關於製作 Casus Belli(宣戰理由) and War Goal(戰爭目標).

Casus Belli(宣戰理由)[編輯 | 編輯原始碼]

宣戰理由的定義文件在 "common/casus_belli/xxx.txt".

數據結構[編輯 | 編輯原始碼]

  • show_in_diplomacy = <yes/no> – 決定這個宣戰理由是否在外交中表現出來。
  • show_notification = <yes/no> – 確定這個宣戰理由是否在得到時生成通知消息。
  • aggregated_message_key – Localisation key(本地化條目) (e.g. = "MESSAGE_NEW_CASUS_BELLI_TRIAL_OF_ADVANCEMENT_TARGET")
  • potential – 決定這個宣戰理由是否有效的條件塊。如果條件塊判定為假(false),這個宣戰理由不會被給予。 (範圍ROOT/THIS = casus belli owner, FROM = casus belli target country)
  • is_valid – 一個每天要檢查的條件塊。 如果條件塊判定為真(true),則自動啟用這個宣戰理由,否則禁用這個。如果這個宣戰理由是由腳本(script)添加的,那麼此屬性無關緊要。
  • destroy_if – 一個每天要檢查的條件塊。如果條件塊判定為真(true),則自動禁用這個宣戰理由,只影響腳本(script)添加的戰爭原因。

宣戰理由例子[編輯 | 編輯原始碼]

要求臣服(subjugation)宣戰理由

cb_subjugation = {
	show_in_diplomacy = yes
	show_notification = yes
	potential = {
		OR = {
			is_country_type = default
			is_country_type = awakened_fallen_empire
		}
		NOT = { is_in_federation_with = from }
		is_subject = no
	}
	is_valid = {
		NOT = { is_overlord_to = FROM }
		is_country_type = awakened_fallen_empire
		NOT = { has_authority = auth_machine_intelligence }
	}
}

只有覺醒的墮落帝國才會自動授予這種理由。普通帝國必須通過腳本授予它: add_casus_belli = { type = cb_subjugation who = from days = 360 }

本地化必須使用這個條目來定義: "casus_belli_xxx:".

War Goals(戰爭目標)[編輯 | 編輯原始碼]

戰爭目標的定義文件在"common/war_goals/xxx.txt".

數據結構[編輯 | 編輯原始碼]

  • casus_belli = <casus belli key> – 必須。決定對目標使用此站長目標的宣戰理由。
  • hide_if_no_cb = <yes/no> – 如果判定為是,則若沒有必要的戰爭理由,這個戰爭目標是隱藏的。
  • total_war = <yes/no> – 決定這場戰爭目標是否是一場全面戰爭。
    • 被這一方面佔領的星系將立即被割讓, 讓cede_claimsrelease_occupied_systems_on_status_quo 字段變得無關緊要。
    • 如果另一方投降,他們所有的星系都將被放棄。即使被允許,AI也不會向全面戰爭的戰爭目標投降。
    • 由於領土主張在全面戰爭中沒有意義,如果一個帝國只能對另一個帝國使用全面戰爭的戰爭目標,那麼普通遊戲規則將阻止領土索賠,例如 種族潔癖 Fanatic Purifiers 種族潔癖Fanatic Purifiers
  • set_defender_wargoal = <war goal key> – 可選。防禦方將被迫使用指定的戰爭目標
  • defender_default = <yes/no> – 如果防禦方沒有及時選擇戰爭目標,它將讓防禦方默認戰爭目標(默認為羞辱wg_humiliation)。如果多個戰爭目標被設置為默認防禦方,則選擇文件中腳本化的第一個。
  • threat_multiplier = <float> – 征服星系和行星所產生的威脅會在此戰爭目標的戰爭中乘以這個數值。
  • cede_claims = <yes/occupied_only/no> – 確定進攻方是否應該從防禦方手中割讓已宣稱的星系。
    • 如果yes,當贏得了戰爭時,這個戰爭目標的使用者將放棄來自另一方的所有主張,並且只有在戰爭以現狀結束時才會放棄完全佔領的領土宣稱。
    • 如果occupied_only,這個戰爭目標的使用者只有在沒有輸掉這場戰爭的情況下才會放棄完全佔領的領土。
    • 如果no,這個戰爭目標的使用者永遠不會放棄領土宣稱。
  • release_occupied_systems_on_status_quo = <yes/no> – 如果是,在維持現狀之後,當那個星球上有至少一個非機械人的智慧生命pop存在,被佔領的星系將作為一個獨立的帝國被釋放。
    • 這個戰爭目標的使用者總是首先放棄完全佔領的領土。如果所有殖民地都以這種方式割讓,被佔領的星系將不會被釋放。
  • surrender_acceptance = <int> – 決定AI投降的接受程度。
  • war_exhaustion = <float> – 在這場戰爭中產生的厭戰度乘以這個值。
  • show_claims_in_description = <yes/no> – 確定是否應該在描述中顯示聲明。
  • potential & possible – 觸發條件塊來檢查這個戰爭目標是否列出/可用於對抗目標帝國。 (Scopes: ROOT/THIS = war goal country FROM = war goal target country)
  • on_accept & on_status_quo效果塊,在這個戰爭目標達成後執行(因為對手投降了)或當戰爭以現狀結束時。
    (Scopes: ROOT/THIS = war goal country, FROM = war goal target country)
    • 使用以下條件檢查是否有帝國以這種方式釋放:
exists = last_created_country
last_created_country = { has_country_flag = released_empire }
  • on_wargoal_set – 效果塊,當這個戰爭目標被接受時執行。 (Scopes: ROOT/THIS = war goal country, FROM = war goal target country)
  • allowed_peace_offers = { … } – 決定使用此戰爭目標時允許什麼樣的和平提議。可以由以下任意數組成: status_quo, surrender, demand_surrender. 「Total War(全面戰爭)」的戰爭目標使用這一點來防止在全面戰爭期間投降,使他們只能以維持現狀或完全摧毀任何一方結束。
  • ai_weight = <int>/{ … } –一個權重數或一個塊,包含:modifier_rule字段。 (Scopes: ROOT/THIS = the acting country, FROM = the targeted country)
  • galactic_empire_joins_defender – 可選,觸發條件塊來檢查銀河帝國的成員是否加入戰爭。 (Scopes: ROOT/THIS = war goal country, FROM = war goal target country)

另外,還有一個圖標 (at /interface with "GFX_xxx")並且應該定義本地化(with keys "war_goal_xxx:", "war_goal_xxx_desc:").

戰爭目標的例子[編輯 | 編輯原始碼]

征服戰爭的目標:

wg_subjugation = {
	casus_belli = cb_subjugation

	hide_if_no_cb = no
	release_occupied_systems_on_status_quo = yes

	allowed_peace_offers = {
		status_quo
		surrender
		demand_surrender
	}

	surrender_acceptance = -100

	potential = {
		NOR = {
			has_valid_civic = civic_inwards_perfection
			has_authority = auth_corporate
		}
		has_total_war_cb = no
		NAND = {
			is_galactic_emperor = yes
			from = { is_galactic_community_member = yes }
		}
	}
	possible = {
		custom_tooltip = {
			fail_text = has_claimed_all_systems
			from = {
				is_country_type = default
				any_owned_planet = {
					is_colony = yes
					root = {
						NOT = { has_claim = prev.solar_system }
					}
				}
			}
		}
		custom_tooltip = {
			fail_text = cannot_subjugate_empire_member
			NAND = {
				has_galactic_emperor = yes
				is_galactic_community_member = no
				from = { is_galactic_community_member = yes }
			}
		}
		custom_tooltip = {
			fail_text = "cannot_use_against_custodian"
			from = { is_galactic_custodian = no }
		}
		custom_tooltip = {
			fail_text = "cannot_use_against_emperor"
			from = { is_galactic_emperor = no }
		}
		custom_tooltip = {
			fail_text = "cannot_use_against_btc"
			from = { has_been_declared_crisis = no }
		}
		custom_tooltip = {
			fail_text = pax_galactica_active
			NAND = {
				is_active_resolution = resolution_emperor_pax_galactica
				is_galactic_community_member = yes
				from = { is_galactic_community_member = yes }
			}
		}
	}
	on_accept = {
		hidden_effect = {
			from = {
				add_threat = {
					who = root
					amount = 0.5
				}
			}
		}
		if = {
			limit = { from = { has_been_declared_crisis = no } }
			from = {
				set_subject_of = {
					who = root
					subject_type = vassal
				}
			}
		}
	}

	on_status_quo = {
		if = {
			limit = {
				exists = last_created_country
				last_created_country = {
					has_country_flag = released_empire
				}
			}

			last_created_country = {
				set_subject_of = {
					who = root
					subject_type = vassal
				}
			}
		}
	}

	ai_weight = {
		weight = 10
		modifier = {
			factor = 0
			has_ai_personality_behaviour = wants_tribute
		}
	}
}

在勝利時,勝利國將放棄所有要求,而主要的失敗國將成為主要勝利國的附庸。

  • 如果勝利國將割讓主要失敗國的所有殖民地,使它們不存在,這個戰爭目標就不能在一開始就被使用。然而,攻擊者可以在宣戰後提出進一步的要求。

在維持現狀下,這一方的帝國將放棄所有完全佔領的領土,然後從所有剩餘的完全佔領的敵人系統中創建一個獨立的帝國,它成為主要勝利國的附庸。


帝國 帝國思潮政府 • 國民理念 • 起源承諾議程傳統 • 飛升天賦法令政策遺珍科技自定義帝國
人口 崗位派系
領袖 領袖領袖特質
物種 物種物種特質
行星 行星行星特徵 • 軌道礦藏建築 • 區劃行星決議
星系 星系恆星基地巨型結構蟲洞 • 星門地圖
艦隊 艦隊艦船 • 部件
地面戰 陸軍轟炸姿態
外交 外交 • 聯邦 • 星海共同體評價修正宣戰理由 • 戰爭目標
事件 事件異常現象特殊項目考古遺址
遊玩 遊玩定義研究 • 經濟遊戲開局
動態修改 動態指令效果觸發條件作用域修正變量AI
媒體/本地化 Maya 導出器圖形肖像旗幟事件圖片界面圖標音樂本地化
Other 控制台命令存檔編輯Steam 創意工坊模組製作教程