階層修改
此頁面正在翻譯中
階層(英文:Estate)是一個國家之內的派系,影響國內政治。
階層
階層能在 Europa Universalis IV/common/estates/*.txt 找到。階層遵循這樣的一般格式:
<estate> = {
icon = <index>
color = { <rgb> } # What color the estate appears as in the estate mapmode
# If true, country will get estate
trigger = {
<triggers>
}
# These scale with loyalty & power
country_modifier_happy = {
<modifiers>
}
country_modifier_neutral = {
<modifiers>
}
country_modifier_angry = {
<modifiers>
}
land_ownership_modifier = {
<modifiers>
}
province_independence_weight = {
factor = <float>
modifier = {
factor = <float>
#Insert conditions here
}
}
# Influence modifiers
base_influence = <float>
influence_modifier = {
desc = <key> # The new name to apply
trigger = {
<triggers>
}
influence = <float>
}
# Loyalty modifiers
loyalty_modifier = {
desc = <key> # The new name to apply
trigger = {
<triggers>
}
loyalty = <float>
}
custom_name = {
desc = <key> # The new name to apply
trigger = {
OR = {
}
}
}
contributes_to_curia_treasury = <bool> #yes/no
privileges = {
#'privileges' includes the names of the estate privileges this estate uses.
#Estate privileges can be found in the Europa Universalis IV/common/estates_privileges/00_privileges.txt
}
agendas = {
#'agendas' includes the names of the estate privileges this estate uses.
#Estate agendas can be found in the Europa Universalis IV/common/estates_agendas/*.txt
}
influence_from_dev_modifier = <float> #Determines percent influence from development
}
階級帶來的國家修正將會隨著其忠誠度和影響力而擴大
階層特權
Europa Universalis IV/common/estate_privileges
#所有范围都是国家范围
#所有参数都是可选的
<estate_privilege> = {
icon = <index>
land_share = <number> #要让出的王冠领地(给阶级)
max_absolutism = <float> #特权对最大专治度的影响
loyalty = <float> #这个特权生效产生的忠诚度影响
influence = <float> #这个特权生效产生的影响力修正
is_valid = { <triggers> } #国家启用该特权的条件
can_select = { <triggers> } #国家是否允许选择特权条件
on_granted = { <effects> } #特权立即执行的效果
can_revoke = { <triggers> } #国家是否可以撤销特权的条件
on_revoked = { <effects> } #特权被撤销的影响
on_invalid = { <effects> } #由于权限无效造成撤销的影响
penalties = { <modifiers> } #特权激活时代负面修正
benefits = { <modifiers> } #特权激活时的正面修正
conditional_modifier = {
#如果指令为真,应用的修正
trigger = { <triggers> }
modifier = { <modifiers> }
is_bad = <bool> #yes/no修正是否是负面的
}
modifier_by_land_ownership = { <modifiers> } #修正与阶级领地相乘
mechanics = { <mechanics> } #特权引用的特殊机制
cooldown_years = <int> #特权无法撤销的时间限制
on_cooldown_expires = { effects } #Effect executed once the specified cooldown_years timer has run down
ai_will_do = { #If above ESTATE_PRIVILEGE_GRANT_THRESHOLD define, AI will try to apply. If below
factor = <float> #ESTATE_PRIVILEGE_REVOKE_THRESHOLD, AI will try to revoke.
modifier = {
factor = <float>
<triggers>
}
}
}
It is important to note the addition of 'benefits = {
階層議程
This is taken from Europa Universalis IV/common/estate_agendas/xx_example.txt
#(Nearly) all scopes are country scope
#All parameters are optional (but it will not be much of an agenda without some of them...)
<estate_agenda> = {
max_days_active = <float> #Lets you override the default of 20 years for an agenda
can_select = { triggers } #Conditions for whether the agenda can be offered to you
provinces_to_highlight = { triggers } #Conditions for provinces to be highlighted by the agenda. Root = country, this = province.
selection_weight = { #Determines how likely (compared to the estate's other agendas) this agenda is to be selected.
factor = <float> #initial factor will ignore numbers below 1, use a modifier for that!
modifier = { factor = <float> triggers = <triggers> }
}
pre_effect = { effects } #Effects executed to set up the task (set flags and targets), before it is shown to the player.
immediate_effect = { effects } #Effects executed when the agenda is accepted by the country
task_requirements = { triggers } #Conditions for completing the task successfully
task_completed_effect = { effects } #Effects executed when the agenda is successfully completed
failing_effect = { effects } #Effects executed when the agenda is failed (i.e. when fail_if is true or time runs out)
fail_if = { triggers } #Conditions for when the agenda should be auto-failed
on_invalid = { effects } #Effects executed when the country no longer has that estate or the invalid_trigger is true.
#Useful for clearing flags, modifiers etc.
invalid_trigger = { triggers } #Conditions for when the agenda should end without it counting as a fail (executing on_invalid
#rather than failing_effect). Happens by default it the estate giving the agenda is removed.
modifier = { modifier } #Country modifier granted while the agenda is active
}
階層預載
#Define estate loyalty and influence modifiers here
<estate> = {
modifier_definition = {
type = #Either loyalty or influence
key = <key> #This is what will be referenced in other files
trigger = {
<trigger>
}
}
}
階層王冠領地
Europa Universalis IV/common/estate_crown_land Bonuses:
<bonus> = {
key = <key>
range_from = <float>
range_to = <float>
modifier = {
<modifiers>
}
}
Interactions:
<interaction> = {
key = <key>
random_seed = random_seed
cooldown_months = <float>
trigger = {
<triggers>
}
effect = {
<effect>
}
ai_will_do = {
factor = <float>
modifier = {
factor = <float>
<triggers>
}
}
}
界面
有關階層的所有圖片與圖標都在Europa Universalis IV/interface/countryestatesview.gfx 中進行定義,編輯GFX_estates_icons的noOfFrames以使得新增階層後的階層數目與所填數字匹配,對 GFX_estate_interactions 進行修改則可以完成對階層特權的定義。
spriteType = {
name = "GFX_estates_icons"
texturefile = "gfx//interface//estates//estates_icons.dds"
noOfFrames = 11 #增加这一数字,以和增加后的阶层数匹配
loadType = "INGAME"
}
All privilege icons have to be defined in this format
spriteType = {
name = "<key>"
texturefile = "gfx/interface/privileges/*.dds"
}
GFX
階層圖標存放在
Europa
Universalis
IV/gfx/interface/estates_icons.dds,這也是用在階層特權界面的圖標。
*每個圖標為 44 x 44 像素大小
同樣還有另一版圖標位於Europa
Universalis
IV/gfx/interface/estates_icons_colour-stroke.dds,這是用於階層土地界面的圖標。
- 每個圖標為 44 x 44 像素大小
特權圖標則位於 Europa Universalis IV/gfx/interface/privileges/privilege_*.dds
本地化
典型地階層需要定義下列本地化關鍵字:
<estate>: "名称"
<estate>_desc: "描述"
<privilege>: "名称"
<privilege_desc>: "描述"
<agenda>: "名称"
<agenda_desc>: "描述"
影響和忠誠修正用這個: §Y$VAL$%§!
在它們的工具提示(tooltips)內顯示它們改變的影響或忠誠數量。
一個階層能在本地化字符串中用:$$
引用,它將顯示該階層的當前名稱,適配該階層的任何自定義名稱實例。不過,需要本地化作用域支持動態本地化(例如,不會工作在互動標題中)。
參考資料
階層代碼關鍵字
