政體模組製作

本頁面所適用的版本可能已經過時,最後更新於2.8


政府是在2.4版本中引入的,與角色相關。

他們允許將持有的地產類型與實際政府類型分離開來,這在2.4版本以前是有效的。

出於性能原因,政府只在頭銜獲得/移除、領主關係改變和宗教信仰改變時才會發生政府類型改變的判定[1]


政府組

政府組織為硬編碼:總共5組:

  • feudal_governments, for which is_feudal = yes
  • republic_governments, for which is_republic = yes
  • theocracy_governments, for which is_theocracy = yes
  • tribal_governments, for which is_tribal = yes
  • nomadic_governments, for which is_nomadic = yes

Government

Here is the list of flags available for governments:[2]

變數名稱 變數類別 變數說明 代碼實例
color rgb 政府map mode中更改政府類型的顏色
title_prefix string 頭銜本地化的前綴(比如temple_count). title_prefix = "temple_"
frame_suffix string 要使用的角色邊框的gfx名稱後綴 frame_suffix = "_tribal"
potential character triggers 角色選擇此政府類型的條件。在遊戲開始時,若有多種政府符合條件,則會選擇第一個符合條件的政府(註:似乎首先評估封建制政府)
potential = {
	NOT = {	religion_group = muslim	}
	is_patrician = no
}
merchant_republic bool 使用merchant republic機制:產生家庭宮殿和貴族,並允許建立沿海貿易戰。 merchant_republic = yes
uses_bride_price bool 啟用商業共和國中的彩禮機制(結婚時用) uses_bride_price = yes
uses_decadence bool 如果一個角色在政府和宗教中被scripted,將使用decadence機制。 uses_decadence = yes
uses_jizya_tax bool uses_jizya_tax = yes
uses_piety_for_law_change bool 字面意思:改變法律花費虔誠
uses_prestige_for_law_change bool 字面意思:改變法律花費威望
allows_matrilineal_marriage bool 字面意思:允許入贅婚姻
allow_title_revokation bool 字面意思:允許回收頭銜
allow_looting bool 字面意思:允許劫掠
can_imprison_without_reason bool 字面意思:允許無理由抓捕犯人
can_revoke_without_reason bool 字面意思:允許無理由回收頭銜
ignores_de_jure_laws bool 字面意思:忽略法理法
dukes_called_kings bool 字面意思:公爵宣稱王位
barons_need_dynasty bool 如果值為yes,男爵獲得土地後都會獲得生成隨機家族 barons_need_dynasty = yes
can_create_empires bool 這個政府的人能否建立自定義帝國,默認為yes can_create_empires = no
can_create_kingdoms bool 這個政府的人能否建立自定義王國,默認為yes can_create_kingdoms = no
can_usurp_kingdoms_and_empires bool 字面意思:可以篡奪公國頭銜和王國頭銜
have_gender_laws bool 令該政府允許性別法,影響某些介面。 have_gender_laws = no
can_build_holdings bool
can_build_forts bool
can_build_castle bool 字面意思:允許建設城堡
can_build_city bool 字面意思:允許建設城市
can_build_temple bool 字面意思:允許建設寺廟
can_build_tribal bool 字面意思:允許建設部落
can_grant_kingdoms_and_empires_to_other_government bool 能否把王國頭銜和帝國頭銜授予另一個政府類型的角色,默認為yes
can_grant_kingdoms_and_empires_to_other_government_group bool 能否把王國頭銜和帝國頭銜授予另一個政府類型的角色,默認為no
can_be_granted_kingdoms_and_empires_by_other_government bool 這個政府類型的人能否從另一個政府類型的人那裡得到王國和帝國頭銜,默認為yes
can_be_granted_kingdoms_and_empires_by_other_government_group bool 這個政府類型的人能否從另一個政府集團的人那裡得到王國和帝國頭銜,默認為no
free_retract_vassalage bool 字面意思:免費收回封臣頭銜
free_levies_in_offensive_war bool 在進攻性質的戰爭中,提高稅收而不惹怒封臣 free_levies_in_offensive_war = yes
max_consorts int 字面意思:老婆和小妾之和最大值
max_liege_levy 用以代替王權法(字面:最大領主徵兵)
max_liege_tax 用以代替王權法(字面:最大領主稅)
aggression double 改變x20%的宣戰意願,以及AI可能的宣戰速度。1為默認值,不會造成任何更改。任何低於1的數值會降低AI的宣戰可能系,0則AI永遠不會宣戰(腳本除外)。負值則視為無效,不應使用。
unit_modifier modifiers 工作效果類似religion modding
unit_home_modifier modifiers 工作效果類似religion modding
character_modifier modifiers 工作效果類似religion modding
preferred_holdings List<holding>
allowed_holdings

allowed_holdings_culture
allowed_holdings_religion
allowed_holdings_culture_and_religion

List<holding> Will not get the wrong government type penalty
 # 不会因为同一文化的部落收到错误的政府类型惩罚
allowed_holdings_culture = {
  TRIBAL​
}
builds_with_prestige List<holding> 決定用黃金還是聲望建設新的定居點。 builds_with_prestige = yes
builds_with_piety List<holding> 決定用黃金還是聲望建設新的定居點。 builds_with_piety = yes
accepts_liege_governments

accepts_liege_governments_culture
accepts_liege_governments_religion
accepts_liege_governments_culture_and_religion

List<government> 列表中的政府類型是有效的,不會受到錯誤的政府負面意見修正。
# Gets the wrong religion modifier instead
accepts_liege_governments = { 
  muslim_government​
}
free_revoke_on_governments

free_revoke_on_governments_culture
free_revoke_on_governments_religion
free_revoke_on_governments_culture_and_religion

List<government> 領主可以自由撤銷與特定政府類型的封臣
# 其他宗教的部落服用可以被免费吊销头衔
free_revoke_on_governments_religion = { 
  tribal_government​
}
free_revoke_on_tiers

free_revoke_on_tiers_culture
free_revoke_on_tiers_religion
free_revoke_on_tiers_culture_and_religion

List<tier> 被取消頭銜的附庸不會觸發任何負面意見修正
free_revoke_on_tiers = { count duke }
ignore_in_vassal_limit_calculation List<government> 具有指定政體的封臣不會計入你的封臣上限限制。
ignore_in_vassal_limit_calculation = {
  tribal_government​
}​
vassal_call_to_arms List<government>
no_vassal_tax List<government>
forced_contract List<government> 無論封臣意見如何,有特定政府類型的封臣將上交最大徵召兵和最高領主稅。對這些封臣的暴君行動可以不受其他政府類型封臣的反對。
commander_limit 字面意思:指揮官上限
capital_move_delay 字面意思:遷都最短間隔
can_change_to_nomad_on_start bool 游牧領主(同一文化)的部落統治者將成為游牧統治者,除非對該人物或者該人物的頭銜另有規定。它只是為了在遊戲開始前評估政府類型。
gets_religion_opinion_penalties bool 該政府類型持有者關心人們是否信仰不同宗教,默認yes
gives_religion_opinion_penalties bool 其他人關心該政府類型持有者是否信仰不同宗教,默認yes
vassal_government_opinion_penalties bool 因為"accepts_liege_governments"(接受領主政府)或類似事件而獲得負面意見修正,默認yes
offmap_power offmap 使用succ_offmap_succession時為文化和宗教使用什麼offmap power。
can_demand_religious_conversion bool 民眾是否可以利用該政府類型的需求鉑銥該宗教,宗教設定上的對應變數也必須允許該行為。該變數默認為yes
can_inherit bool 該政府類型的人能否繼承頭銜,默認為yes
men_can_take_consorts bool 如果有,男人可以選擇女性配偶。默認yes,若max_cousorts=0,則該變數不起作用。
women_can_take_consorts bool 如果有,女人可以選擇男性配偶。默認yes,若max_cousorts=0,則該變數不起作用。
marriage_ignore_religion bool 如果設置了,AI在考慮結婚時會忽略宗教信仰,默認no。

圖案

為了給政府類型添加自定義圖形,需要一些interface修改。創建一個後綴為.gfx的文件放在interface文件夾。在gfx文件中,你可以為政府圖標添加一個spriteType塊。以及為5個字符框架圖像圖像添加5個。所有的6個spriteTypes必須在一個spriteTypes區塊內。所有這些spriteTypes的名字都必須以你在government txt文件中的frame_suffix結尾。你可以在\interface\generalstuff.gfx中找到代碼。

實際的圖形文件放在gfx\interface folder,所有的6個文件都要以.dds格式保存。

例如,如果要為世俗政府添加自定義圖形,用frame_suffix = _secular :

spriteTypes = {
	
	### character stuff
	spriteType = {
		name = "GFX_charframe_150_secular"
		texturefile = "gfx\\interface\\charframe_150_secular.tga"
		noOfFrames = 6
		allwaystransparent = yes
	}
	spriteType = {
		name = "GFX_charframe_100_secular"
		texturefile = "gfx\\interface\\charframe_100_secular.tga"
		noOfFrames = 6
		allwaystransparent = yes
	}
	spriteType = {
		name = "GFX_charframe_75_secular"
		texturefile = "gfx\\interface\\charframe_75_secular.tga"
		noOfFrames = 6
		allwaystransparent = yes
	}
	spriteType = {
		name = "GFX_charframe_50_secular"
		texturefile = "gfx\\interface\\charframe_50_secular.tga"
		noOfFrames = 6
		allwaystransparent = yes
	}
	spriteType = {
		name = "GFX_charframe_34_secular"
		texturefile = "gfx\\interface\\charframe_34_secular.tga"
		noOfFrames = 6
		allwaystransparent = yes
	}
	
	### government icons
	spriteType = {
		name = "GFX_icon_secular_government"
		texturefile = "gfx\\interface\\government_icon_secular.dds"
	}

}

本地化

別忘了把你的新政府本地化,它的工作原理與其他本地化類似:

secular_government;Secular;;;;;;;;;;;;;x
secular_government_desc;No religions allowed!;;;;;;;;;;;;;x

請注意,政府的功能列表(比如不受懲罰持有城堡、神廟)是自動生成的(基於你txt文件中的內容)。這部分位於政府說明文本(_government_desc)下。如果你不想解釋這些變數帶來的政府屬性,可以把_government_desc的屬性留空


參考