人口修改

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


位置

人口類型位於 game/common/pop_types

結構

每一種人口類型被定義在它自己的頂層塊。類型名決定該人口的關鍵字。

game/common/pop_types/pop.txt

[pop] = {
	[fields]
}

必要欄位

關鍵字 數值類型 描述 例子
demotes_to 人口類型 What pop this pop demotes to. Can be the same pop type to prevent actual demotion. demotes_to = tribesmen
conquest_demote_chance 整數[0..100] UNCONFIRMED The chance for this pop to be demoted when the city is conquered. conquest_demote_chance = 50
base_happyness 小數[0.0..1.0] 該人口的基本幸福度。 base_happyness = 0.2
color 顏色 The colour used for this pop in the pie chart for pops composition. color = hsv { 0.65 0.7 0.8 }

可選欄位

關鍵字 數值類型 預設值 描述 例子
province modifier 小數 N/A Applies the modifier to the province, multiplied by the pop's current happiness. tax_income = 0.015
can_promote_to 人口 none What pop type can this pop promote to via manual promotion in the UI. can_promote_to = citizen
score 布爾值 no If yes, this pop counts for scoring. score = yes
block_colonization 布爾值 no If yes, this pop can't be used to colonise provinces. block_colonization = yes
ai_max_percentage 整數[0..100] unknown UNCONFIRMED How many pops max of this type the AI will aim for in a given province. ai_max_percentage = 30

動態腳本元素

代價

關鍵字 描述 例子
[pop]_promotion The cost of promoting to the given pop. Only used for pops that can be promoted to. citizen_promotion = { oratory = 10 }
[pop]_move The cost of forcibly moving the given pop. slaves_move = { civic = 5 }

修正

關鍵字 作用域 描述 例子
local_[pop]_happyness 省份 Applied to the happiness of all pops of this type in the province. local_freemen_happyness = 0.25
global_[pop]_happyness 國家 Applied to the happiness of all pops of this type in the country. global_freemen_happyness = 0.10
local_[pop]_output 省份 Applied to the output of all pops of this type in the province, after happiness. local_tribesmen_output = 0.05
global_[pop]_output 國家 Applied to the output of all pops of this type in the country, after happiness. global_citizen_output = 0.1

觸發器

關鍵字 數值類型 作用域 描述 例子
[pop]_happiness 小數[0.0..1.0] 省份 Compares with the (average?) happiness for the pops of this type in the province. slaves_happiness <= 0.40
num_of_[pop] 整數[0..int] 省份 Compares with the amount of pops of this type in the province. num_of_citizen >= 4

相關信息

效果

  • create_pop
  • create_state_pop
  • define_pop
  • kill_pop
  • move_pop
  • set_pop_culture
  • set_pop_culture_same_as
  • set_pop_religion
  • set_pop_religion_same_as
  • set_pop_type

觸發器

  • pop_culture
  • pop_culture_group
  • pop_religion
  • pop_type
  • pop_hapiness
  • country_population
  • total_population

列表

  • pops_in_province

本地化

關鍵字 描述 例子
[pop] The localisation key for the pop. Should be singular. freemen:0 "Freeman"
[pop]_header UNKNOWN, but probably when saying stuff like "2 Citizens". citizen_header:0 "#t Citizens#!"

例子

citizen = {                             # 以 "citizen" 关键字定义一个新的人口类型。
	research_points = 0.25          # 这个人口类型生产 0.25 研究点/人口,在 100% 幸福度和 +0% 产出修正……
	commerce_value = 0.01           # ……并且增加 0.01 商业价值到该省份。
	demotes_to = freemen            # 当该人口被降级,通常通过征服,它降级到自由民类型的人口。
	
	conquest_demote_chance = 50     # 在征服中,每个公民人口有 50% 的几率被降级。<b>不确定,看起来有点高,需要测试</b> UNCONFIRMED, LOOKS A BIT HIGH, TEST OUT
	
	base_happyness = 0.2            # 这个类型的人口的基本形幅度是 20% 。
	
	score = yes                     # 这个人口用作计分。
	
	color = hsv { 0.65  0.7  0.8 }  # 这个人口的颜色在人口饼图中是蓝色。
	
	ai_max_percentage = 30          # <b>未知</b> UNKNOWN
}

添加一種人口類型

The game automatically adds a row for new pop types in the file game/common/province_setup.csv, and an entry is then needed on each row for the game to be able to interpret the file correctly. The new row is added alphabetically within the four existing pop type rows. If the new pop-type starts with "M", its new row will be inserted between "Freedmen" and "Slaves". Thus, taking Roma as an example, starting with 1 pop-type "M":

1,roman,roman_pantheon,cloth,21,15,1,4,3,40,0,Roma,Latium

Note the "1," inserted between the freedmen amount 15 and slave amount 4. Again, this has to be done on each row.