################################################################################
#
# Portraits 肖像
# https://ck2.paradoxwikis.com/Portrait_modding
#
################################################################################
#
# 參考：..\gfx\characters\*
# 參考：..\interface\portrait_offsets\*
# 參考：..\interface\portrait_properties\*
# 參考：..\interface\portraits\*
# 所有含有 portrait 的檔案
#
################################################################################
#
# Portraits 肖像
#
################################################################################
肖像是通過疊加基礎元素構成：背景、通用頭部、面部元素（臉頰、頭髮、鼻子等等）、衣服、頭飾…
每種的基礎元素都帶有多個變化或框架
框架的選擇是基於：角色的DNA或角色的屬性（即觸發）
兒童角色是例外，因為他們是同單一圖像創建肖像，因此他們看起來都很相似

########################################
# 結構
########################################
spriteTypes = {
	
	### WESTERN MALE ####
	
	# CULTURE_INDEX: 0 = clothes behind, 1 = headgear behind, 2 = clothes, 3 = headgear mid, 4 = clothes infront, 5 = headgear
	
	# Northern European Male
	portraitType = {
		name = "PORTRAIT_westerngfx_male"
		effectFile = "gfx/FX/portrait.lua"
		layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
			"GFX_character_background:p0"
			"GFX_western_male_clothes_behind:p3:c0"
			"GFX_western_male_headgear_behind:p5:c1"
			"GFX_western_male_hair_behind:p1:h:y"
			"GFX_western_male_beard_behind:p4:h:y"
			"GFX_western_male_base:p2"
			"GFX_western_male_neck:d0"
			"GFX_western_male_cheeks:d4"
			"GFX_western_male_chin:d1"
			"GFX_western_male_mouth:d2:o75x49"
			"GFX_character_scars:p7:y"
			"GFX_character_reddots:p8"
			"GFX_character_boils:p9"
			"GFX_western_male_clothes:p3:c2"
			"GFX_western_male_headgear_mid:p5:c3"
			"GFX_western_male_ear:d7:o27x54"			
			"GFX_western_male_beard:p4:h:y"
			"GFX_western_male_nose:d3:o80x65"
			"GFX_western_male_eyes:d6:o47x74"
			"GFX_western_male_eyes2:d6:e:o74x92"
			"GFX_character_blinded_eyes:p10"
			"GFX_character_eyepatch:p13:y:o32x63"
		   	"GFX_western_male_hair:p1:h:y"
			"GFX_character_mask:p12:y:o40x45"
			"GFX_western_male_clothes_infront:p3:c4"
			"GFX_western_male_headgear:p5:c5"
			"GFX_character_imprisoned:p6"
			"GFX_player_overlay:p11"
		}

		hair_color_index = 8
		hair_color = { # dark, base, highlight
			{ 36 35 29 } { 196 172 91 } { 255 255 255 }
			{ 10 10 10 } {  50 50 50 } { 255 255 255 }
			{ 15 8 0 } { 176 155 108 } { 255 255 255 }
			{ 10 10 10 } { 125 85 56 } { 255 255 255 }
			{ 30 22 18 } { 150 90 55 } { 255 255 255 }
			{ 30 22 18 } { 178 80 41 } { 255 255 255 }
			{ 20 12 8 } { 78 54 37 } { 255 255 255 }
		}

		eye_color_index = 9
		eye_color = {
			{ 58 109 193}
			{ 120 74 46 }
			{ 34 103 36 }
		}
		
		headgear_that_hides_hair = { 10 }
	}
	
	# middle age
	portraitType = {
		name = "PORTRAIT_westerngfx_male1"
		effectFile = "gfx/FX/portrait.lua"
		layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
			"GFX_character_background:p0"						#0
			"GFX_western_male_clothes_behind:p3:c0"
			"GFX_western_male_headgear_behind:p5:c1"
			"GFX_western_male_hair_behind_midage:p1:h:y"
			"GFX_western_male_beard_behind_midage:p4:h:y"
			"GFX_western_male_base_midage:p2"					#5
			"GFX_western_male_neck_midage:d0"
			"GFX_western_male_cheeks_midage:d4"
			"GFX_western_male_chin_midage:d1"
			"GFX_western_male_mouth_midage:d2:o80x51"
			"GFX_character_scars:p7:y"
			"GFX_character_reddots:p8"							#20
			"GFX_character_boils:p9"
			"GFX_western_male_clothes:p3:c2"
			"GFX_western_male_headgear_mid:p5:c3"
			"GFX_western_male_ear_midage:d7:o27x54"					#15
			"GFX_western_male_beard_midage:p4:h:y"
			"GFX_western_male_nose_midage:d3:o81x65"					#10
			"GFX_western_male_eyes_midage:d6:o46x74"
			"GFX_western_male_eyes2:d6:e:o74x92"
			"GFX_character_blinded_eyes:p10"
			"GFX_character_eyepatch:p13:y:o32x63"
			"GFX_western_male_hair_midage:p1:h:y"
			"GFX_character_mask:p12:y:o40x45"
			"GFX_western_male_clothes_infront:p3:c4"
			"GFX_western_male_headgear:p5:c5"
			"GFX_character_imprisoned:p6"
			"GFX_player_overlay:p11"
		}

		hair_color_index = 8
		hair_color = { # dark, base, highlight
		
			{ 36 35 29 } { 196 172 91 } { 255 255 255 }
			{ 10 10 10 } { 50 50 50 } { 255 255 255 }
			{ 15 8 0 } { 176 155 108 } { 255 255 255 }
			{ 10 10 10 } { 125 85 56 } { 255 255 255 }
			{ 30 22 18 } { 150 90 55 } { 255 255 255 }
			{ 30 22 18 } { 178 80 41 } { 255 255 255 }
			{ 20 12 8 } { 78 54 37 } { 255 255 255 }
		}

		eye_color_index = 9
		eye_color = {
			{ 58 109 193}
			{ 120 74 46 }
			{ 34 103 36 }
		}
		
		headgear_that_hides_hair = { 10 }
	}
	
	# old age
	portraitType = {
		name = "PORTRAIT_westerngfx_male2"
		effectFile = "gfx/FX/portrait.lua"
		layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
			"GFX_character_background:p0"
			"GFX_western_male_clothes_behind:p3:c0"
			"GFX_western_male_headgear_behind:p5:c1"
			"GFX_western_male_hair_behind_oldage:p1:h:y"
			"GFX_western_male_beard_behind_oldage:p4:h:y"
			"GFX_western_male_base_oldage:p2"
			"GFX_western_male_neck_oldage:d0"
			"GFX_western_male_cheeks_oldage:d4"
			"GFX_western_male_chin_oldage:d1"
			"GFX_western_male_mouth_oldage:d2:o75x52"
			"GFX_character_scars:p7:y"
			"GFX_character_reddots:p8"
			"GFX_character_boils:p9"
			"GFX_western_male_clothes:p3:c2"
			"GFX_western_male_headgear_mid:p5:c3"
			"GFX_western_male_ear_oldage:d7:o25x51"
			"GFX_western_male_beard_oldage:p4:h:y"
			"GFX_western_male_nose_oldage:d3:o80x66"
			"GFX_western_male_eyes_oldage:d6:o46x73"
			"GFX_western_male_eyes2:d6:e:o74x92"
			"GFX_character_blinded_eyes:p10"
			"GFX_character_eyepatch:p13:y:o32x63"
			"GFX_western_male_hair_oldage:p1:h:y"
			"GFX_character_mask:p12:y:o40x45"
			"GFX_western_male_clothes_infront:p3:c4"
			"GFX_western_male_headgear:p5:c5"
			"GFX_character_imprisoned:p6"
			"GFX_player_overlay:p11"
		}

		hair_color_index = 8
		hair_color = { # dark, base, highlight
			{ 30 22 18 } { 180 170 151 } { 255 255 255 }
			{ 10 10 10 } {  200 200 200 } { 255 255 255 }
			{ 15 8 0 } { 214 210 195 } { 255 255 255 }
			{ 10 10 10 } { 143 134 127 } { 255 255 255 }
			{ 30 22 18 } { 174 161 151 } { 255 255 255 }
			{ 30 22 18 } { 180 170 151 } { 255 255 255 }
			{ 30 22 18 } { 180 170 151 } { 255 255 255 }
		}

		eye_color_index = 9
		eye_color = {
			{ 58 109 193}
			{ 120 74 46 }
			{ 34 103 36 }
		}
		
		headgear_that_hides_hair = { 10 }
	}

	(...)
}

################################################################################
#
# Characteristics 特徵
#
################################################################################
特徵有兩種：DNA和性質
兩種都是字母的字串（並且性質可能是 0）
它們可以在遊戲中通過控制台指令 charinfo 查看

########################################
# DNA 基因
########################################
DNA是一種從父母繼承的字母的字串，它們在出生後不會改變
歷史角色的DNA可以在角色歷史中設定（參考：..\history\characters\*）：
125501 = {
	name="Temujin" # AKA: Genghis Khan
	dynasty=11100
	dna="bfimkolbecc"
	(...)
}

隨機生成的角色則會使用隨機的DNA字串，這些字串將會儲存在遊戲中

索引
d0 # Neck 頸
d1 # Chin 下巴
d2 # Mouth 嘴
d3 # Nose 鼻
d4 # Cheeks 臉頰
d5 # Unused 沒有使用
d6 # Eyes 眼睛
d7 # Ears 耳朵
d8 # Hair Color 毛髮顏色
d9 # Eye Color 眼睛顏色
d10 # Unused 沒有使用

所以 Genghis Khan 的 dna = "bfimkolbecc" 的意思是：
頸使用框架 b（在 mongol_male_neck_1.dds 的第 2 個框架）
下巴使用框架 f（在 mongol_male_neck_1.dds 的第 6 個框架）
嘴使用框架 i（在 mongol_male_neck_1.dds 的第 9 個框架）
鼻使用框架 m（在 mongol_male_neck_1.dds 的第 13 個框架）
…等等

如果框架比字母還要少，它會返回到索引第一個
例如下巴通常有四個框架，所以 a 等於第一個框架，e 等於第一個框架

########################################
# Properties 性質
########################################
性質在原版遊戲中擁有 18 個字母的字串。如果字串較短，會將 0 加在最後
只有毛髮（p1）和鬍鬚（p4）可以通過 "Customization Pack" DLC在遊戲中修改
其他性質數值來自於 portrait_properties.txt 檔案（參考：..\interface\portrait_properties\*）

索引
p0 # Background 背景
p1 # Hair 毛髮
p2 # Base Head 基礎頭部
p3 # Clothes 服裝
p4 # Beard 鬍鬚
p5 # Headgear 頭飾
p6 # Imprisoned 被監禁
p7 # Scars 傷痕
p8 # Red Dots 紅點
p9 # Boils 腫泡
p10 # Blinded 致盲
p11 # Player 玩家
p12 # Mask 面罩
p13 # Eyepatch 眼罩
p14 # Chinese makeup 中國化妝 # 2.8增加
p15 # Chinese makeup 2 中國化妝 2 # 2.8增加
p16 # Chinese empress jewelry 中國女皇飾品 # 2.8增加
p17 # Immortality 不朽 # 2.8增加

從2.6.1開始，性質數量可以通過 NDefines.NGraphics.NUMBER_OF_PROPERTIES 修改
（參考：..\common\defines.lua 和 ..\common\defines\*）
想要顯示靜態肖像的也可以通過這種方式增加

例如可以通過以下方式增加 p18：
取代定義 NDefines.NGraphics.NUMBER_OF_PROPERTIES = 19
然後在一個 *.gfx 檔案 定義 sprite，例如 GFX_custom（參考：..\interface\portraits\*）

spriteType = {
	name = "GFX_custom"
	texturefile = "gfx\\characters\\shared\\new_property.dds"
	noOfFrames = 2
	norefcount = yes
	can_be_lowres = yes
}

在 portraits.gfx 增加一個圖層："GFX_custom:p18"（參考：..\interface\portraits\*）
在 portrait_properties.txt 配置 p14：（參考：..\interface\portrait_properties\*）

# p18
18 = {
	0 = {
		factor = 50
	}
	1 = {
		factor = 50
	}
}

# 個人增加
2.7開始可以在性質裏增加隱藏圖層：hide_layers
例子：在 p6 的被監禁性質圖層中，當一個角色被監禁了（索引 1），將會隱藏 p1、p4、p5 圖層
# p6 imprisoned
6 = {
	0 = { # blank
		factor = 100
		modifier = {
			factor = 0
			prisoner = yes
		}
	}

	1 = { # prisoner
		factor = 100
		modifier = {
			factor = 0
			prisoner = no
		}
		hide_layers = {
			1 = { always = yes }
			4 = { always = yes }
			5 = { always = yes }
		}
	}
}

# 個人增加
性質圖層可以使用DNA的方法彩現
例如不想修改複雜的內容或沒有限制條件使用哪一種圖層索引（角色背景等等）
例子："GFX_custom_background:d0"

################################################################################
#
# Rendering 彩現
#
# 基於對玩家的實驗，這裏描述如何在遊戲中彩現肖像
#
################################################################################
########################################
# Children 兒童
########################################
對於兒童肖像：

在 ..\interface\portraits\* 搜尋名稱為 PORTRAIT_<culturegfx>_child_<sex> 的 spriteType 條目
在這裏：
1.
<culturegfx> 是角色的文化或文化群組的 graphical_culture 定義（參考：..\common\cultures\*）
<sex> 是 male（男性）或 female（女性）

########################################
# Feudal 封建
########################################
遊戲彩現封建成人肖像的方式如下：

在 ..\interface\portraits\portrait.gfx 搜尋名稱為 PORTRAIT_<culturegfx>_<sex><_period><age> 的 portraitType 條目
（或在 ..\interface\* 其他檔案裏的 portraitType）
在這裏：
1.
<culturegfx> 是角色的文化或文化群組的 graphical_culture 定義（參考：..\common\cultures\*）
<sex> 是 male（男性）或 female（女性）
<age> 是整數。0 為青年（16-29歲），1 為中年（31-49歲），2 為老年（大於 50 歲）
<_period> 是 _early （950年之前），_late （1250之後）或留空
定義 <_period> 日期：EARLY_PORTRAIT_AND_UNIT_BEFORE_YEAR 和 LATE_PORTRAIT_AND_UNIT_AFTER_YEAR
（參考：..\common\defines.lua 和 ..\common\defines\*）

2.
如果沒有匹配的 portraitType 條目，嘗試使用一些預設值：沒有日期、沒有年齡，在 graphical_cultures 列表中增加備用人種，從文化群組增加人種，或增加 westerngfx 作為最後手段

3.
如果有匹配的 portraitType 條目，請按次序應用圖層。對於每一個圖層的 GFX_TYPE:[d|p]INDEX 定義：
3.1
在 ..\interface\portraits\portrait_sprites.gfx 的 spriteTypes 搜尋 GFX_TYPE 條目並查看框架N的數值（索引）
（或在 ..\interface\* 其他檔案裏的 spriteTypes）
3.2
框架使用：
如果字母是 d，在角色DNA的索引中搜尋字母，並轉換為字母的數值（d1）
如果字母是 p，轉換為性質索引的數值（p2），並在 ..\interface\portrait_properties\* 定義。性質的選擇是根據權重進行的，大於等於 100 的第一個因子將會被自動選擇
4.
在 ..\common\graphicalculturetypes\* 定義人種膚色，用於管理混合種族的孩子

########################################
# Theocracy 神權
########################################
與封建角色相同的彩現方式，但頭飾和服裝圖層是例外：
1.
搜尋角色宗教定義（參考：..\common\religions\*）
查看框架索引（起始為 0）（參考：..\interface\portraits\portrait_sprites.gfx 和 ..\gfx\characters\* 的 religious_<female/male>_headgear 和 religious_<female/male>_clothes）
religious_clothing_head：用於宗教領袖的框架索引
religious_clothing_priest：用於其他神職人員的框架索引
2.
它們使用硬編碼 sprites 的 GFX_religious_male_clothes, GFX_religious_male_headgear 等等
取代在 portrait.gfx 定義的 sprites

########################################
# Republic 共和
########################################
與封建角色相同的彩現方式，但頭飾和服裝圖層是例外
它們使用硬編碼 sprites 的 GFX_merchant_male_clothes、GFX_merchant_male_headgear 等等
取代在 portrait.gfx 定義的 sprites

########################################
# Color Link 顏色連結 # 個人增加
########################################
hair_color # 毛髮顏色
eye_color # 眼睛顏色
顏色必須至少定義一行，否則會出錯

毛髮顏色由暗色、基礎和亮色三種RGB組成，眼睛則使用一種
每一行代表一種顏色
hair_color = { # 毛髮有兩種顏色
	{ 36 35 29 } { 196 172 91 } { 255 255 255 }
	{ 10 10 10 } { 50 50 50 } { 255 255 255 }
}
eye_color = { # 眼睛有三種顏色
	{ 58 109 193 }
	{ 120 74 46 }
	{ 34 103 36 }
}

將圖層連結顏色數值為 h（毛髮）和 e（眼睛）：GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
"GFX_western_male_hair_behind:p1:h:y"
"GFX_western_male_eyes2:d6:e:o74x92"

第一行是毛髮圖層使用p1性質索引並連結毛髮顏色
第二行是眼睛圖層使用d6基因索引並連結眼睛顏色

顏色的連結並不只限於毛髮和眼睛圖層，其他圖層也可以使用

################################################################################
#
# Clothing override 服裝取代
#
################################################################################
在2.7增加了一種新的機制，用於取代基於規則設定的服裝圖層
唯一的例子在原版遊戲的 DLC070 中的 ..\interface\portraits\society_clothes.gfx
一般的結構如下：
portraitType = {
	name = "PORTRAIT_<override_type>_clothing_male"

	weight = {
		additive_modifier = {
			value = 10000
			# Conditions (in portrait scope) for modifier to apply
		}
	}

	layer = { # GFX_empty can be used to disable a layer
		"GFX_xxx_male_clothing_behind:c0"
		"GFX_xxx_male_headgear_behind:c1"
		"GFX_xxx_male_clothing_front:c2"
		"GFX_xxx_male_headgear_mid:c3"
		"GFX_xxx_male_clothing_infront:c4"
		"GFX_xxx_male_headgear_front:c5"
	}

	allow_property_values = {
		<property_index> = {
			<frame_index> = {
				# Conditions (in portrait scope) for frame to be used
			}
		}
	}
}

例子：
portraitType = {
	name = "PORTRAIT_society_orthodox_clothing_female"

	weight = {
		additive_modifier = {
			value = 10000
			portrait_age > child
			portrait_is_female = yes
			portrait_clothing = yes
			portrait_society = monastic_order_orthodox
			NOT = { portrait_tier = king }
		}
	}

	layer = { 
		"GFX_empty:c0"
		"GFX_empty:c2"
		"GFX_empty:c3"
		"GFX_society_orthodox_monk_female_headgear_behind:c1"
		"GFX_society_orthodox_monk_female_headgear_front:c5"
		"GFX_empty:c4"
	}

	# Hide hair, ranks, slot 3 is for Greek orthodox, 4 for Russian orthodox.
	allow_property_values = {
		1 = {
			0 = {
				always = yes
			}
		}
		3 = {
			0 = {
				portrait_society_rank = 1
			}
			1 = {
				portrait_society_rank = 2
			}
			2 = {
				portrait_society_rank = 3
			}
			3 = {
				portrait_society_rank = 4
				portrait_culture = greek
			}
			4 = {
				portrait_society_rank = 4
				NOT = { portrait_culture = greek }
			}
		}
		5 = {
			0 = {
				portrait_society_rank = 1
			}
			1 = {
				portrait_society_rank = 2
			}
			2 = {
				portrait_society_rank = 3
			}
			3 = {
				portrait_society_rank = 4
				NOT = { portrait_culture = russian }
			}
			4 = {
				portrait_society_rank = 4
				portrait_culture = russian
			}
		}
	}
}

c0 到 c5 是文化索引，引用基礎 portraitType 的服裝圖層以取代
（It's unknown if more culture index can be added dynamically by modders）
c0 # clothes behind 服裝底層
c1 # headgear behind 頭飾底層
c2 # clothes 服裝
c3 # headgear mid 頭飾中層
c4 # clothes infront 服裝頂層
c5 # headgear 頭飾

allow_property_values 區塊可以以類似的方式在 ..\interface\portrait_properties\* 使用
選擇 p3（服裝）和p5（頭飾）框架取代 layer 區塊的 sprites

########################################
# Portrait scope 肖像範圍
########################################
使用了一種的新範圍，這是一種角色範圍的限制版本，增加 protrait_ 到條件前綴

portrait_age
角色年齡相比的肖像閾值（child, young, middle or old）
由於閾值是可配置的，因此數值不是直接在這裏硬編碼
（閾值可能是指類似 GFX_western_male_chin_oldage 中的 oldage？）
類型：child、oldage
例子1：portrait_age > child
例子2：portrait_age < oldage

portrait_is_female
是女性
類型：布爾值
例子：

portrait_has_trait
擁有指定特質（參考：..\common\traits\*）
類型：特質
例子：portrait_has_trait = vaishnavist_hindu

portrait_religion
信仰指定宗教（在主程式中看見，需測試）（參考：..\common\religions\*）
類型：宗教
例子：

portrait_culture
是指定文化（參考：..\common\cultures\*）
類型：文化
例子：portrait_culture = greek

portrait_culture_group
是指定文化群組（參考：..\common\cultures\*）
類型：文化群組
例子：portrait_culture_group = west_germanic

portrait_gfx_culture
（在主程式中看見，需測試）
類型：
例子：

portrait_government
政體類型（在主程式中看見，需測試）（參考：..\common\governments\* 或 999_Misc）
類型：政體
例子：

portrait_tier
擁有指定階級（參考：999_Misc）
類型：階級
例子：portrait_tier = king

portrait_title_tier
（在主程式中看見，需測試）
類型：
例子：

portrait_society
屬於指定社團（參考：..\common\societies\*）
類型：社團
例子：portrait_society = monastic_order_benedictine

portrait_society_rank
在社團的位階
類型：整數
例子：portrait_society_rank = 1

portrait_clothing
類型：布爾值
例子：

################################################################################
#
# Custom ethnicities 自訂人種
#
################################################################################
可以在 portraitTypes 圖層中創建新的資源
並（或）混合原版遊戲現有的或 DLC 的資源以創建新的人種
例如一個 customgfx 人種有 norsegfx 的肖像和 byzantinegfx 的服裝

########################################
# New assets 新資源
########################################
創建一個新圖像 sprites，你需要：

在資料夾 ..\gfx\characters\* 創建兩個資料夾（gothic_male 和 gothic_female）用於儲存 sprites
例如有 12 個框架的 gothic_male_clothes.dds

在資料夾 ..\interface\* 創建一個 portraits_gothic_spritetypes.gfx 檔案並登錄每一個圖像 sprties：
spriteTypes = {
	spriteType = {
		name = "GFX_gothic_male_clothes"
		texturefile = "gfx\\characters\\gothic_male\\gothic_male_clothes.dds"
		noOfFrames = 12
		norefcount = yes
		can_be_lowres = yes
	}
	...
}

########################################
# DLC assets DLC資源
########################################
使用DLC資源比創建新資源更容易
但因為DLC資源本身不能被打包到模組裏
所以不擁有包含這些資源（例如 "Norse Portraits" DLC）的使用者將會看到 gothicgfx 肖像和服裝，但是卻沒有頭

原因是因為一旦 gothicgfx 定義了一些 portraitTypes 條目，遊戲就會彩現它們
即使這些圖層引用未知的資源，也不會正確顯示定義在 graphical_cultures 列表中備用的另一個人種（或預設的 westerngfx）
如果沒有找到 portraitType 條目就會發生

對於這個問題的一些解決方法：
1.
將人種 portraitTypes 打包到子模組中。這樣的玩家：
1.1
如果他們擁有指定的DLC將會啟動子模組
1.2
如果他們沒有指定的DLC將會看見備用人種
2.
為人種提供備用 portraitTypes 而不是使用DLC資源。沒有指定DLC的玩家需要下載這些額外的備用 portraitTypes 並使用

########################################
# New ethnicity 新人種
########################################
定義一個新的 gothicgfx 人種
它用於引用登錄在 ..\interface\* 的徽章、肖像、兵種等等各種圖像的顯示

步驟是：
在主模組的 ..\common\graphicalculturetypes\* 增加一個 *.txt 檔案，和以下內容：（這個步驟必須設定）
gothicgfx = {
	skin_tone = 0
}

在主模組的 ..\common\cultures\00_cultures.txt 檔案中（或增加新檔案）
修改或增加新的 gothic 文化，和以下內容：
graphical_cultures = { gothicgfx occitangfx }

注意：如果使用子模組，在列表中最後一個 culturegfx 使用原版遊戲基礎類型之一（occitangfx, muslimgfx, byzantinegfx, westerngfx）是非常重要
如果是 westerngfx，它可以被省略因為它是預設的，或者被用作第三層的人種
如果使用備用 portraitTypes 則不是必須的

在子模組（或主模組，根據你的選擇）的 ..\interface\* 增加一個 portraits_gothic.gfx 檔案（或複製原版遊戲的另一個 portraits.gfx）
它們具有以下結構：
spriteTypes = {
	spriteType = {
		name = "PORTRAIT_gothicgfx_child_male"
	}
	spriteType = {
		name = "PORTRAIT_gothicgfx_child_female"
	}
	portraitType = {
		name = "PORTRAIT_gothicgfx_male"
	}
	portraitType = {
		name = "PORTRAIT_gothicgfx_male1"
	}
	portraitType = {
		name = "PORTRAIT_gothicgfx_male2"
	}
	portraitType = {
		name = "PORTRAIT_gothicgfx_female"
	}
	portraitType = {
		name = "PORTRAIT_gothicgfx_female1"
	}
	portraitType = {
		name = "PORTRAIT_gothicgfx_female2"
	}
}

為每一個 portraitType 的每一個圖層引用正確的 spriteType（自訂、原版遊戲或DLC spriteType）：
portraitType = {
	name = "PORTRAIT_gothicgfx_female"
	effectFile = "gfx/FX/portrait.lua"
	layer = { # GFX_TYPE:[d|p]INDEX:COLOR_LINK:DONT_REFRESH_IF_VALID:CULTURE_INDEX
		"GFX_character_background:p0"
		"GFX_byzantine_female_clothes_behind:p3:c0"
		"GFX_byzantine_female_headgear_behind:p5:c1"
		"GFX_norse_female_hair_behind:p1:h:y"
		"GFX_norse_female_base:p2"
		"GFX_norse_female_neck:d0"
		"GFX_norse_female_mouth:d2"
		"GFX_norse_female_nose:d3"
		"GFX_norse_female_chin:d1"
		"GFX_norse_female_cheeks:d4"
		"GFX_norse_female_eyes:d6"
		"GFX_norse_female_eyes2:d6:e"
		"GFX_character_scars:p7:y"
		"GFX_character_reddots:p8"
		"GFX_character_boils:p9"
		"GFX_character_blinded_eyes:p10"
		"GFX_norse_female_ear:d7"			
		"GFX_byzantine_female_clothes:p3:c2"
		"GFX_empty:p5:c3"
		"GFX_norse_female_hair:p1:h:y"
		"GFX_empty:p3:c4"
		"GFX_byzantine_female_headgear:p5:c5"
		"GFX_character_imprisoned:p6"
		"GFX_player_overlay:p11"
	}
}
