版本 Diff 差异对比

条目:阶层修改 · 对比历史版本与当前版本间的真实 Wikitext 差异

+32 行新增-29 行移除
历史基准版本Rev #82211
/* 阶层特权 */
32536682021-04-29 11:23:43
当前最新版本Rev #95109
/* 界面 */
白马II号2023-03-02 01:53:27
Wikitext 语法逐行变动
当前版本新增历史版本移除
{{version|1.30}}{{需要翻译}}
{{N|阶层|Estate}}是一个国家之内的派系,影响国内政治。
== 阶层 ==
阶层能在 {{path|common/estates/*.txt}} 找到。阶层遵循这样的一般格式:
<source>
<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 {{path|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 {{path|common/estates_agendas/*.txt}}
}
influence_from_dev_modifier = <float> #Determines percent influence from development
}
</source>
阶级带来的国家修正将会随着其忠诚度和影响力而扩大
== 阶层特权 ==
{{path|common/estate_privileges}}
<source>
#所有范围都是国家范围
#所有参数都是可选的
<estate_privilege> = {
icon = <index>
- max_absolutism = <float> #Change in max absolutism while this privilege is enacted
-       loyalty = <float>               #这个
-       influence = <float>          #这个特权生效产生的忠诚度影响  
- is_valid = { <triggers> } #这个特权造成的影响力修正
- can_select = { <triggers> } #Conditions for whether the country is allowed to select the privilege
- on_granted = { <effects> } #国家启用此特权的条件
- can_revoke = { <triggers> } #国家是否允许选择特权的条件
- on_revoked = { <effects> } #立刻生效的效果
- on_invalid = { <effects> } #国家是否可撤销的条件
- penalties = { <modifiers> } #特权被撤销造成的影响
-       benefits = { <modifiers> }             #特权激活时的效果
+        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修饰符是否是负面的
+ 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>
}
}
}
</source>
It is important to note the addition of 'benefits = { <modifiers> }', which is not included in {{path|common/estate_privileges/xx_example.txt}}
== 阶层议程 ==
This is taken from {{path|common/estate_agendas/xx_example.txt}}
<source>
#(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
}
</source>
== 阶层预载 ==
<source>
#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>
}
}
}
</source>
== 阶层王冠领地 ==
{{path|common/estate_crown_land}}
Bonuses:
<source>
<bonus> = {
key = <key>
range_from = <float>
range_to = <float>
modifier = {
<modifiers>
}
}
</source>
Interactions:
<source>
<interaction> = {
key = <key>
random_seed = random_seed
cooldown_months = <float>
trigger = {
<triggers>
}
effect = {
<effect>
}
ai_will_do = {
factor = <float>
modifier = {
factor = <float>
<triggers>
}
}
}
</source>
== 界面 ==
- For estate pictures to work you have to go into interface/countryestatesview.gfx and edit the noOfFrames at GFX_estates_icons and GFX_estate_interactions to match your amount 用于该阶层自身的图标通过 '''GFX_estates_icons''' 定义:
+ 有关阶层的所有图片与图标都在{{path|interface/countryestatesview.gfx}} 中进行定义,编辑GFX_estates_icons的noOfFrames以使得新增阶层后的阶层数目与所填数字匹配,对 GFX_estate_interactions 进行修改则可以完成对阶层特权的定义。
<source>
spriteType = {
- name = \"GFX_estates_icons\"
- texturefile = \"gfx//interface//estates//estates_icons.dds\"
- noOfFrames = 6
- loadType = \"INGAME\"
+ name = "GFX_estates_icons"
+ texturefile = "gfx//interface//estates//estates_icons.dds"
+ noOfFrames = 11 #增加这一数字,以和增加后的阶层数匹配
+ loadType = "INGAME"
}
</source>
All privilege icons have to be defined in this format
<source>
spriteType = {
- name = \"<key>\"
- texturefile = \"gfx/interface/privileges/*.dds\"
+ name = "<key>"
+ texturefile = "gfx/interface/privileges/*.dds"
}
</source>
== GFX ==
- Estate icons are found in {{path|gfx/interface/estates_icons.txt}}
- *Each icon is 44 x 44 pixels
- Privilege icons are found in {{path|gfx/interface/privileges/privilege_*.dds}}
+ 阶层图标存放在 {{path|gfx/interface/estates_icons.dds}},这也是用在阶层特权界面的图标。<br>
+ *每个图标为 44 x 44 像素大小
+ 同样还有另一版图标位于{{path|gfx/interface/estates_icons_colour-stroke.dds}},这是用于阶层土地界面的图标。
+ *每个图标为 44 x 44 像素大小
+ 特权图标则位于 {{path|gfx/interface/privileges/privilege_*.dds}}
== 本地化 ==
典型地阶层需要定义下列本地化关键字:
<source>
- <estate>: \"名称\"
- <estate>_desc: \"描述\"
- <privilege>: \"名称\"
- <privilege_desc>: \"描述\"
- <agenda>: \"名称\"
- <agenda_desc>: \"描述\"
+ <estate>: "名称"
+ <estate>_desc: "描述"
+ <privilege>: "名称"
+ <privilege_desc>: "描述"
+ <agenda>: "名称"
+ <agenda_desc>: "描述"
</source>
影响和忠诚修正用这个: <code>§Y$VAL$%§!</code> 在它们的工具提示(tooltips)内显示它们改变的影响或忠诚数量。
一个阶层能在本地化字符串中用:<code>$<estate>$</code> 引用,它将显示该阶层的当前名称,适配该阶层的任何自定义名称实例。不过,需要本地化作用域支持动态本地化(例如,不会工作在互动标题中)。
== 参考资料 ==
<references/>
阶层代码关键字
#{{icon|estate_church}} - <code>estate_church</code>
#{{icon|estate_nobles}} - <code>estate_nobles</code>
#{{icon|estate_burghers}} - <code>estate_burghers</code>
#{{icon|estate_cossacks}} - <code>estate_cossacks</code>
#{{icon|estate_nomadic_tribes}} - <code>estate_nomadic_tribes</code>
#{{icon|estate_dhimmi}} - <code>estate_dhimmi</code>
#{{icon|estate_jains}} - <code>estate_jains</code>
#{{icon|estate_brahmins}} - <code>estate_brahmins</code>
#{{icon|estate_maratha}} - <code>estate_maratha</code>
#{{icon|estate_rajput}} - <code>estate_rajput</code>
#{{icon|estate_vaisyas}} - <code>estate_vaisyas</code>
{{Modding navbox}}
[[Category:模组制作]]
[[en:Estate modding]]