编辑“特质模组制作

警告:您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您登录创建一个账户,您的编辑将归属于您的用户名,且将享受其他好处。

该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。

最后版本 您的文本
第1行: 第1行:
{{Version|1.0}}
{{Version|1.0}}{{需要翻译}}
特质被游戏内的[[ 角色]] 持有,可以修正他们的属性、好感、性格和其他参数。
Traits are possessed by [[character]]s in the game and can modify their attributes, opinions, personality and other parameters.
== Creating a trait ==
Traits are defined in .txt files in the directory {{path|common/traits}}.


== 创建一个特质 ==
Example trait:
特质在<code>common/traits</code>中的txt文件中定义。
 
举例:
<pre>
<pre>
my_new_trait = {
my_new_trait = {
index = 0 # 特质的唯一数字标识符
index = 0 # A unique numerical indentifier for the trait
education = yes #yes 或no,定义这个特质是否是教育特质
education = yes #yes/no to define whether this is an Education trait
# 旗标和修正
# Flags and modifiers
      ... # 旗标和修正
      ... # Flags and modifiers
      ... # 旗标和修正
      ... # Flags and modifiers
      
      
}
}
</pre>
</pre>
=== 特殊特质旗标 ===
=== Special trait flags ===
{| class="wikitable sortable" width="100%"
{| class="wikitable sortable" width="100%"
! width="10%" | 名称
! width="10%" | Name
! width="25%" | 描述
! width="25%" | Description
! width="25%" | 用法
! width="25%" | Usage
|-
|-
|index
|index
| 用于保存文件的数字标识符(索引值)。最多可以是65535。
|Numerical identifier used in save files. Can be at most 65535
|index = X
|index = X
|-
|-
|health
|health
| 改变实际健康值。
|Changes actual health value
|health = X.X
|health = X.X
|-
|-
|fertility
|fertility
| 生育力百分比修改器。
|Percentage modifier on fertility
|fertility = X.X
|fertility = X.X
|-
|-
|inherit_chance
|inherit_chance
| 遗传给子女的几率。
|Chance of passing on the trait to children
|inherit_chance = X
|inherit_chance = X
|-
|-
|birth
|birth
|100 个角色中,有多少个角色天生就有这个特质(不遗传时)。可以有小数。
|How many characters out of 100 are born with this trait (when not inherited). Can have decimals
|birth = X
|birth = X
|-
|-
|random_creation
|random_creation
| 在100个角色中,有多少角色是带着这个特质被创造出来的?(相对于实际出生而言,这是对生成角色、剧本角色等而言的。)
|How many characters out of 100 are created with this trait? (As opposed to actually being born; this is for things like generated characters, script characters, etc.)
|random_creation = X
|random_creation = X
|-
|-
|triggered_opinion
|triggered_opinion
| 如果相关条件得到满足,则适用
|Applied if the associated conditions are fulfilled
|<pre>
|<pre>
triggered_opinion = {
triggered_opinion = {
opinion_modifier = opinion_modifier_key
opinion_modifier = opinion_modifier_key


# 以下所有参数是可选的
# Everything below is optional
parameter = doctrine_parameter_key
parameter = doctrine_parameter_key
check_missing = yes
check_missing = yes
第65行: 第64行:
|-
|-
|compatibility
|compatibility
| 这不是一个好感修正,但可以被'compatibility_modifier' 'trait_compatibility' 触发使用。Compatibility是检查特质持有者与所列(另一个角色的)特质的相性。
|This is not a opinion modifier, but can be used by 'compatibility_modifier' and 'trait_compatibility' trigger. Compatibility is checked for the trait holder vs the listed traits (of another character.)
|<pre>
|<pre>
compatibility = {
compatibility = {
第74行: 第73行:
|-
|-
|parent_inheritance_sex
|parent_inheritance_sex
| 指定该特质是否可以从男性/ 女性/ 所有父母那里继承(默认为全部)。
|specifies whether the trait can be inherited from male/female/all parents (all by default)
|parent_inheritance_sex = male/female/all
|parent_inheritance_sex = male/female/all
|-
|-
|child_inheritance_sex
|child_inheritance_sex
| 指定该特质是否可以由男性/ 女性/ 所有子代继承(默认为全部)。
|specifies whether the trait can be inherited by male/female/all children (all by default)
|child_inheritance_sex = male/female/all
|child_inheritance_sex = male/female/all
|-
|-
|genetic
|genetic
| 如果设置为“yes”(默认为“no”),继承将遵循以下规则。特质可以是隐性的。子女可以从显性和隐性的父母特质中继承该特质。
|If set to yes (no by default), the inheritance will follow the following rules: The trait can be inactive. Children can inherit the trait from both active and inactive parent traits.
显性有100% 的机会被继承,隐性的特质有50% 的机会被继承。如果该特质从父母双方成功继承,它就会变成显性的。
An active trait is inherited with 100% chance, an inactive trait with a 50% chance. If the trait is successfully inherited from both parents, it becomes active.
如果只从父母一方继承,则为隐性特质。
If it's inherited only from one parent, it's inactive.
|genetic = yes/no
|genetic = yes/no
|-
|-
|inherit_from_real_father
|inherit_from_real_father
| 该特质是否应该从亲生(生)父亲那里继承?( 默认为“yes”)
|Should the trait be inherited from the real (biological) father? (yes by default)
|inherit_from_real_father = yes/no
|inherit_from_real_father = yes/no
|-
|-
|enables_inbred
|enables_inbred
| 这个特质可以让角色的子女被考虑为近亲繁殖(默认为“no”)。
|This trait enables the children of the character to be considered for the inbred trait (no by default).
只有在父母有共同祖先的情况下,它才会启用近亲繁殖概率,所以如果父母没有关系,就不会有' 近亲繁殖' 的风险。
It only enables the inbred chance if there are common ancestors of the parents, so there is no risk of 'inbred' if the parents are not related.
如果近亲繁殖没有被父母的特质启用,但是他们有共同的祖先,那么有机会(和近亲繁殖特质启用时一样),孩子会得到一个随机的特质,该特质enabling_inbred = yes
If inbred is not enabled by parents' traits, but there are common ancestors, there's a chance (same as for inbred trait when it's enabled) the child will get a random trait with enables_inbred = yes.
|enables_inbred = yes/no
|enables_inbred = yes/no
|-
|-
|good
|good
| 标记该特质为{{Ruby|好的|good}}(默认为no)。
|marks this trait as good (default no)
|good = yes/no
|good = yes/no
|-
|-
|genetic_constraint_all
|genetic_constraint_all
| 当获得特质时,将采用这种遗传约束(genetic constraint )。为了添加新的遗传约束,在common\ethnicities中设置范围前,需要在gfx\portraits\trait_portrait_modifiers中进一步修改。
|This genetic constraint will be applied when gaining the trait
|genetic_constraint_all = beauty
|genetic_constraint_all = beauty
|-
|-
|forced_portrait_age_index
|forced_portrait_age_index
| 角色将使用这个肖像年龄{{Ruby|索引值|index}},而不是标记为“{{Ruby|通用|generic}}”的某个年龄子基因。如果你想在它们之间随机化,你可以指定多个这样的{{Ruby|索引值|index}}。如果多个特征被强制索引,则会在所有的{{Ruby|索引值|index}}之间随机化。
|The character will use this portrait age index instead of one of the age sub-genes marked as "generic". You can specify more than one such index if you want to randomize between them. If multiple traits force indexes, it randomizes between all of them
|forced_portrait_age_index = 1
|forced_portrait_age_index = 1
|-
|-
|forced_portrait_age_index
|forced_portrait_age_index
| 显示你可以定义不止一个{{Ruby|索引值|index}}的例子。
|Example showing that you can define more than one index
|forced_portrait_age_index = 2
|forced_portrait_age_index = 2
|-
|-
|portrait_extremity_shift
|portrait_extremity_shift
| 获得该特质时,每个{{Ruby|形态基因|morph gene}}将以这个百分比向0或1(中最近的一个)移动;例如,0.4 将向0移动25% ,结果为0.3
|When gaining this trait, every single morph gene will be shifted by this percentage towards 0 or 1; whichever it is closest to. E.G., 0.4 will shift 25% towards 0, resulting in 0.3
|portrait_extremity_shift = 0.25
|portrait_extremity_shift = 0.25
|-
|-
|immortal
|immortal
| 将阻止视觉上的衰老,并使角色免疫自然死亡。仍可被脚本杀死。生育力将与视觉上的年龄相匹配。你可以使用set_immortal_age来改变视觉上的年龄。
|Will stop visual aging, and make the character immune to natural death. Can still be killed by script. Fertility will match visual age. You can use set_immortal_age to change the visual age
|immortal = yes
|immortal = yes
|-
|-
|physical
|physical
| 将该特质标记为身体特质
|Marks the trait as physical
|physical = yes
|physical = yes
|-
|-
|health_trait
|health_trait
| 将该特质标记为与健康有关
|Marks the trait as health related
|health_trait = yes
|health_trait = yes
|-
|-
|fame
|fame
| 标记该特质为名誉相关
|Marks the trait as fame related
|fame = yes
|fame = yes
|-
|-
|trait_exclusive_if_realm_contains
|trait_exclusive_if_realm_contains
| 将领特质随机分配给将领时考虑的地形类型列表。只有当将领的文化中包含一个具有列表中指定地形类型之一的省份时,才会分配/ 考虑这些特质。
|A list of terrain types that are taken into consideration when commander traits are randomly assigned to commanders. These traits are only assigned/considered if the commander's culture contains a province that has one of the terrain types specified in the list
|trait_exclusive_if_realm_contains = {}
|trait_exclusive_if_realm_contains = {}
|}
|}


=== 创建永生特质 ===
=== Creating immortal traits ===
如同上一代游戏,授予永生属性的特质在游戏发布时未出现,但已经编写好了程序,可以轻易被创建。只需要在特质中加入以下参数:<code>immortal = yes</code>
As with the previous game, traits that grant immortality are not present in the game at launch but are already programmed and can be easily created. It only requires adding the following parameter to a trait: <code>immortal = yes</code>
 
为了让你的永生者看起来永远年轻,你可以设置永生年龄。例如,<code>set_immortal_age = 30</code>。
== 本地化 ==
默认情况下,名称键值是trait_<key>,描述键值是trait_<key>_desc。
== 图标 ==
默认的图标路径位于<code>gfx/interface/icons/traits/<trait>.dds</code>。


这些可以用动态描述进行覆盖。
For your immortals to look forever young, you can use the effect immortal age. Such as, <code>set_immortal_age = 30</code>
例如:
== Localization ==
By default, the name key is trait_<key>, and the desc key is trait_<key>_desc.
== Icon ==
The default icon path is gfx/interface/icons/traits/<trait>.dds.


These can be overridden with dynamic descriptions.
E.G.,
name = some_loc_key
name = some_loc_key
 
Or
或者
 
<pre>
name = {
name = {
first_valid = { ... }
first_valid = { ... }
}
}
</pre>


参数是:'''''name ,desc,icon'''''
The parameters are: '''''name, desc, icon'''''.
 
The root scope is the character.
Note that in some cases there may be no root, so make sure your first check is a fallback for "NOT = { exists = this }" if you add dynamic names, descs, or icons.


Root作用域是该角色。注意,某些情况下可能没有Root,所以如果你在添加动态名称、描述和图标,确保你的第一个检查是“NOT = { exists = this }”作为{{Ruby|fallback|回退}}。
An example:
举例:
<pre>
<pre>
icon = {
icon = {
请注意您对十字军之王3百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在十字军之王3百科:版权的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。 未经许可,请勿提交受版权保护的作品!

为防止机器编辑,请完成下方验证

取消 编辑帮助(在新窗口中打开)