﻿################################################################################
#
# Units 軍隊
# https://ck2.paradoxwikis.com/Unit_modding
#
################################################################################
#
# 參考：..\common\special_troops\*
# 
################################################################################
################################################################################
#
# Special troops 特殊部隊
# 
################################################################################
########################################
# 結構
########################################
my_special_unit = {
    morale = 4
    maintenance = 3
    phase_skirmish_attack = 0.5
    phase_melee_attack = 5
    phase_pursue_attack = 8
    phase_skirmish_defense = 4
    phase_melee_defense = 4
    phase_pursue_defense = 3
    base_type = heavy_infantry
}

########################################
# 旗標
########################################
morale
士氣
數值：整數
例子：

maintenance
維護花費
數值：整數
例子：

phase_skirmish_attack
遠程戰鬥階段攻擊力
數值：整數
例子：

phase_melee_attack
混戰戰鬥階段攻擊力
數值：整數
例子：

phase_pursue_attack
追擊戰鬥階段攻擊力
數值：整數
例子：

phase_skirmish_defense
遠程戰鬥階段防禦力
數值：整數
例子：

phase_melee_defense
混戰戰鬥階段防禦力
數值：整數
例子：

phase_pursue_defense
追擊戰鬥階段防禦力
數值：整數
例子：

base_type
數值：軍隊
例子：base_type = heavy_infantry

########################################
# 
########################################
增加一個特殊部隊後，需要為新增加的特殊部隊在下列位置登錄sprite
參考：..\gfx\interface\unitpanel_specialunits_bigstrip.dds 和 gfx\interface\unitpanel_specialunits_smallstrip.dds


修改 ..\interface\unitpanel.gfx 的 noOfFrames
每增加一個新的特殊部隊，數值加一
spriteType = {
	name = "GFX_unitpanel_specialtroops_smallstrip"
	texturefile = "gfx\\interface\\unitpanel_specialunits_smallstrip.dds"
	noOfFrames = 6
}
spriteType = {
	name = "GFX_unitpanel_specialtroops_bigstrip"
	texturefile = "gfx\\interface\\unitpanel_specialunits_bigstrip.dds"
	noOfFrames = 6
}


在 ..\common\modifier_definitions\* 增加修飾語定義（參考：702_Modifier_definitions）
my_special_unit = {
	show_as_percent = no
	is_good = yes
	is_monthly = no
	is_hidden = no
	max_decimals = 0
}

my_special_unit_offensive = {
	show_as_percent = yes
	is_good = yes
	is_monthly = no
	is_hidden = no
	max_decimals = 2
}

my_special_unit_defensive = {
	show_as_percent = yes
	is_good = yes
	is_monthly = no
	is_hidden = no
	max_decimals = 2
}

my_special_unit_morale = {
	show_as_percent = yes
	is_good = yes
	is_monthly = no
	is_hidden = no
	max_decimals = 2
}


增加本地化
my_special_unit;Special unit;;;;;;;;;;;;;x
my_special_unit_offensive;Special unit Offensive;;;;;;;;;;;;;x
my_special_unit_defensive;Special unit Defensive;;;;;;;;;;;;;x
my_special_unit_morale;Special unit Morale;;;;;;;;;;;;;x
my_special_unit_modifier;Combat Modifier boost to Special unit Troops: $PERC$;;;;;;;;;;;;;x


將新的軍隊增加到 ..\common\technology.txt
它通常與 base_type 關聯（在這裏的例子是 TECH_HEAVY_INFANTRY）
例子：
TECH_HEAVY_INFANTRY = {
	modifier = {
		(...)
		my_special_unit_OFFENSIVE = 0.6
		my_special_unit_DEFENSIVE = 0.6
	}      
}
