Coat of arms modding:修订间差异

本页面讲述的内容长期有效
无编辑摘要
 
第13行: 第13行:
}
}
</pre>
</pre>
如果 "coat_of_arms_name" 与称号、家族或王朝的键名相同(例如 "d_leon" ),游戏将在游戏开始时自动使用该纹章作为默认布局。这也适用于修改过的称号、家族或王朝。


== 有效键值 ==
== 有效键值 ==
第28行: 第30行:
|-
|-
| colspan="3" | <code>pattern</code>
| colspan="3" | <code>pattern</code>
| The path to the file for the background pattern (usually located in {{path|gfx/coat_of_arms/patterns/}}.<br />A pattern should be included to avoid graphical issues with the masking textures when using textured emblems.
| 背景图案文件的路径(通常位于 {{path|gfx/coat_of_arms/patterns/}}.<br /> )。应包含一个图案,以避免在使用纹理纹章时出现图形问题。.
| <pre>pattern = "pattern_vertical_split_01"</pre>
| <pre>pattern = "pattern_vertical_split_01"</pre>


第37行: 第39行:
color4
color4
color5</pre>
color5</pre>
| Specifies a color, to be used in the pattern or as a color reference in colored_emblems.<br />Usually refers to a color defined in {{path|common/named_colors}}.<br />Can also explicitly define RGB, HSV and 8-Digit Hexadecimal values.
| 指定一种颜色,用于图案或作为有色徽章中的颜色参考。 <br /> 通常是指在 {{path|common/named_colors}} <br /> 中定义的颜色。还可以显式定义RGB、HSV和8位十六进制值。
| <pre>color1 = "white"
| <pre>color1 = "white"
color2 = hsv { 1.0 1.0 1.0 }
color2 = hsv { 1.0 1.0 1.0 }
第47行: 第49行:
| rowspan="7" | <code>textured_emblem</code>
| rowspan="7" | <code>textured_emblem</code>
| colspan="2" | ---
| colspan="2" | ---
| Multiple textured emblems can be specified. Each is itself a scripting object with the following valid keywords:
| 可以指定多个纹理标志。每个标志本身是一个脚本对象,具有以下有效关键字:
| ---
| ---
|-
|-
| colspan="2" | <code>texture</code>
| colspan="2" | <code>texture</code>
| The path to the file for the emblem (usually located in {{path|gfx/coat_of_arms/textured_emblems/}}).
| 徽章文件的路径(通常位于{{path|gfx/coat_of_arms/textured_emblems/}} 中)。
| <pre>texture = "te_griffin_01.dds"</pre>
| <pre>texture = "te_griffin_01.dds"</pre>
|-
|-
| colspan="2" | <code>mask</code>
| colspan="2" | <code>mask</code>
| The coat of arms' background pattern can be used as a clipping mask for emblems.
| 徽章的背景图案可用作徽标的剪贴蒙版。
| <pre>mask = { 1 3 }</pre>
| <pre>mask = { 1 3 }</pre>
|-
|-
| rowspan="4" | <code>instance</code>
| rowspan="4" | <code>instance</code>
| <code>scale</code>
| <code>scale</code>
| Given as a 2-dim float, has default value { 1.0 1.0 }
| 作为一个二维浮点数,具有默认值 { 1.0, 1.0 }
| rowspan="4" | <pre>instance = { 
| rowspan="4" | <pre>instance = { 
scale = { 0.5 0.5 }  
scale = { 0.5 0.5 }  
第69行: 第71行:
|-
|-
| <code>position</code>
| <code>position</code>
| Given as a 2-dim float, has default value { 0.0 0.0 }
| 给定一个二维浮点数,具有默认值 { 0.0, 0.0 }
|-
|-
| <code>rotation</code>
| <code>rotation</code>
| Given as float value, has default value 0.0
| 给定为浮点数值,具有默认值0.0
|-
|-
| <code>depth</code>
| <code>depth</code>
| Used to order rendering, given as float value with default of 0.0
| 用于指定渲染顺序的值,以浮点数表示,默认为0.0


|-
|-
| rowspan="6" | <code>colored_emblem</code>
| rowspan="6" | <code>colored_emblem</code>
| colspan="2" | ---
| colspan="2" | ---
| Multiple colored emblems can be specified. Each is itself a scripting object with the following keywords:
| 可以指定多个彩色标记。每个标记本身是一个带有以下关键字的脚本对象:
| ---
| ---
|-
|-
| colspan="2" | <code>texture</code>
| colspan="2" | <code>texture</code>
| The path to the file for the emblem (usually located in {{path|gfx/coat_of_arms/colored_emblems/}}).
| 徽章文件的路径(通常位于{{path|gfx/coat_of_arms/colored_emblems/}} )。
| <pre>texture = "ce_crown.tga"</pre>
| <pre>texture = "ce_crown.tga"</pre>
|-
|-
| colspan="2" | "
| colspan="2" | "
| All fields from textured_emblem are valid
| 所有来自 <code>textured_emblem</code> 的字段都是有效的。
| ---
| ---
|-
|-
| colspan="2" | <code>color1</code>
| colspan="2" | <code>color1</code>
| defines the base colour of the emblem
| 定义了徽章的基本颜色
| rowspan="3" | <pre>color1 = color2
| rowspan="3" | <pre>color1 = color2
color2 = "white"
color2 = "white"
第98行: 第100行:
|-
|-
| colspan="2" | <code>color2</code>
| colspan="2" | <code>color2</code>
| defines the secondary color of the emblem (the Green channel in the texture)
| 定义了徽标的辅助颜色(纹理中的绿色通道)
|-
|-
| colspan="2" | <code>color3</code>
| colspan="2" | <code>color3</code>
| currently unavailable, will default to white
| 目前不可用,将默认为白色。


|-
|-
| rowspan="4" | <code>sub</code>
| rowspan="4" | <code>sub</code>
| colspan="2" | ---
| colspan="2" | ---
| Multiple subs can be specified, each is itself a complete coat of arms scripting object, allowing all fields except another sub, i.e. no sub nesting.
| 可以指定多个子对象,每个子对象本身都是一个完整的家族纹章脚本对象,允许设置除另一个子对象以外的所有字段,即不支持嵌套子对象。
| ---
| ---
|-
|-
| rowspan="3" | <code>instance</code>
| rowspan="3" | <code>instance</code>
| <code>scale</code>
| <code>scale</code>
| Given as a 2-dim float, has default value { 1.0 1.0 }
| 作为一个二维浮点数,具有默认值 { 1.0, 1.0 }
| ---
| ---
|-
|-
| <code>offset</code>
| <code>offset</code>
| Given as a 2-dim float, has default value { 0.0 0.0 }
| 给定一个二维浮点数,具有默认值 { 0.0, 0.0 }
| ---
| ---
|-
|-
| <code>depth</code>
| <code>depth</code>
| Used to order rendering, given as float value with default of 0.0
| 用于指定渲染顺序的值,以浮点数表示,默认为0.0
| ---
| ---
|}
|}
第164行: 第166行:
[[File:Emblem examples.png]]
[[File:Emblem examples.png]]


== Inheritance and subs ==
== 继承和子类 ==
这一部分主要关注继承问题,但为了促进讨论,首先谈论一下子类的两个要点:


This section is largely dedicated towards inheritance, but to facilitate that discussion, first two points on subs:
第一个" 基本家族纹章" 是一个隐含的子类:
 
The first "base coat of arms" is an implicit sub:
<pre>
<pre>
a = {
a = {
第185行: 第186行:
</pre>
</pre>


Each instance field (coat of arms instances, not emblem instances) is transformed into a separate sub:
每个实例字段(家族纹章实例,而不是徽标实例)都被转化为一个独立的子级:
<pre>
<pre>
a = {
a = {
第218行: 第219行:
</pre>
</pre>


With that out of the way, let's dive into inheritance.
说了这些,让我们深入探讨继承。


Inheritance is achieved through the parent keyword. It basically says "Fetch the coat of arms given as value, and use it to populate any fields not explicitly set".
'''继承'''是通过父关键字实现的。它基本上表示“取出给定的家族纹章作为值,并用它来填充任何未明确设置的字段”。


 举例:
 举例:
第244行: 第245行:
</pre>
</pre>


When it comes to emblems the inheritance is "all or nothing": if at least one emblem (of any type) is specified, no emblems are inherited, but if no emblem is specified, all the parent's emblems are inherited.
当谈到徽章时,继承是" 全有或全无" 的:如果至少指定一个徽章(任何类型),则不继承任何徽章,但如果没有指定徽章,则继承所有父级的徽章。


The inheritance rules become slightly more complicated once subs are involved. The two guiding rules are:
一旦涉及到子级,继承规则会稍微复杂一些。有两个指导规则:


When a parent is specified, all values are fetched from its first sub (which many times will be an "implicit" sub).
当指定了一个父级时,所有值都从其第一个子级(通常是" 隐式" 子级)获取。
If a sub doesn't specify a parent it will piggyback on the parent of its first sub. However, in this case all values will be fetched from the corresponding sub in the parent. Setting parent = "none" disables this automatic inheritance.
 
Example:
如果一个子级没有指定父级,它将依附于其第一个子级的父级。然而,在这种情况下,所有值将从父级中相应的子级获取。设置父级为"none" 将禁用此自动继承。
 
示例:
<pre>
<pre>
daddy = {
daddy = {
第271行: 第274行:
</pre>
</pre>


Inheritance chains ("deep inheritance") is resolved in a bottom up manner. Users must take care not to create inheritance loops.
继承链(" 深度继承" )是以自下而上的方式解决的。必须小心,不要创建继承循环。


<pre>
<pre>
第299行: 第302行:
</pre>
</pre>


And finally, a real example:
最后,一个真实的例子:
<pre>
<pre>
k_england_and_france = {
k_england_and_france = {
第314行: 第317行:
}
}
</pre>
</pre>
== 轻松使用游戏内设计器 ==
与皇家宫廷DLC一同,P社还开发了一款便捷的内置编辑器,可用于直接将创建的盾徽导出为有效的脚本代码。您只需使用设计器创建所需的盾徽,然后按下“复制到剪贴板”即可。游戏将在使用的计算机的临时存储器中创建完整且有效的盾徽所需代码。
然后,您可以使用CTRL+V键组合直接将其插入到相应的修改文件的文本中。您只需确保设置正确的名称(例如k_england)。
修改者还可以在此处使用一个小技巧,暂时删除本地化文件;这样,CK无法加载标题的名称,而是在游戏中显示标题对应的关键字。
玩家也可以通过盾徽设计师更改标题名称,或者在这种情况下,简单地复制关键字并将其粘贴到适当的文件中。通过这种方式,您可以避免后续可能导致盾徽未在游戏中显示的拼写错误。
在这一点上需要再次强调,由于动态盾徽,可能会存在多个盾徽,因此它们的名称可能不直接与标题密钥匹配。因此,CK解释器无法识别拼写错误,也不会发出错误消息。如果自制的盾徽未显示出来,应当再次明确检查其正确的字符精确拼写。
===进阶盾徽设计器===
默认情况下,CoA Designer仅显示原始游戏的徽章。然而,扩展列表非常简单。要做到这一点,只需将更多的dds文件添加到<code><mod_root>\gfx\coat_of_arms\colored_emblems\</code>文件夹中 - 如本页已描述。此外,您现在可以在同一位置创建一个文本文件(一如既往地采用UTF-8 BOM编码)。在文本文件中,您可以为每个您想在设计师中提供的徽章创建一个单独的行,使用以下语法:
<pre>
<pic_name>.dds = { colors = <1,2,3> category = <string> }
</pre>
图像的名称必须与同一文件夹中的图像文件完全匹配。
您可以将<1、2或3>指定为颜色选项。这指定了用户可以为所选纹章设置多少种颜色。对此,.dds 图像文件起决定性作用。
游戏会自动将
#颜色值 0x000084(蓝色)识别为颜色
#颜色值 0x00FF94(浅绿色)识别为颜色
#颜色值 0xFF0084(品红色)识别为颜色
#CK 具有一定的容差,并试图将其他不同的颜色匹配到这些颜色值之一。
然而,这种校正并不完美,不能完全依赖;制作模组的人应始终确保使用正确的颜色。如果您在相应的文件中设置的值大于实际使用的颜色数,用户将获得一个更多的颜色显示,但不会出错。然而,如果制作模组的人在文本文件中指定的颜色数过少,自动校正将尝试将太多的颜色减少到一种颜色(如果它们足够相似),或者简单地将未知颜色设置为红褐色调,这不能由设计人员用户更改。
游戏原本支持以下类别之一:动物、圆圈和螺旋、十字和纽结、信仰、人造、自然、图案、部落印章、文字和图形。如果使用其他字符串,游戏将为用户添加一个新的可选择类别。由于类别名称显示为文本,因此还应为新类别添加一个本地化条目(<code>COA_DESIGNER_CATEGORY_<your_category_string_here>:0 "<您想要在所选语言中显示的类别名称>"</code>)。
===设计器的缺点===
与手动编码一个纹章对应盾徽相比,设计器可能在直观上更容易使用,但设计师无法用于继承或细分纹章。如上所示的真实示例,将英国和法国的纹章放在一起,实际上无法使用设计器创建。甚至包含卡斯蒂利亚、莱昂、阿拉贡、纳瓦拉和西西里的欧陆风云4(EU4)中的西班牙国旗也无法使用设计师重新创建。然而,设计器中的一个可以帮助创建基础纹章,所以之后您只需要手动编写继承关系。
==动态盾徽==
除了为任何给定的头衔分配的正常纹章外,您还可以创建动态纹章定义,这些定义存储在 {{path|\common\coat_of_arms\dynamic_definitions\}} 中:
<pre>
# Name must match a landed title definition
title_name = {
item = { # One or more items
trigger = { # 触发条件,当应该选择此项时,选择第一个有效项, root = the title
<trigger> # 这可以是任何预定义的触发器,或者像正常情况下那样内联定义的触发器。
}
coat_of_arms = name # 作为纹章文件中定义的纹章名称使用
}
}
</pre>
为了更新纹章,您需要在头衔范围内调用<code>update_dynamic_coa = yes</code>。
在所有拥有的头衔中,这已经在<code>on_character_culture_change</code>和<code>on_character_faith_change</code>中被调用,但是如果您希望在其他任何情况下更新动态纹章,您需要根据[[事件模组制作#触发动作 (on_action)|on_actions]]。


{{Modding navbox}}
{{Modding navbox}}
[[Category:模组制作]]
[[Category:模组制作]]
[[en:Coat of arms modding]]
[[en:Coat of arms modding]]

2023年6月21日 (三) 18:24的最新版本

盾徽Coat of arms)是用于盾牌和旗帜,识别头衔、宗族和家族的图像。

定义它们的脚本位于/Crusader Kings III/common/coat_of_arms/coat_of_arms

它们遵循以下的基本脚本语法:

coat_of_arms_name = {
    keyword1 = value1
    keyword2 = value2
    ...
}

如果 "coat_of_arms_name" 与称号、家族或王朝的键名相同(例如 "d_leon" ),游戏将在游戏开始时自动使用该纹章作为默认布局。这也适用于修改过的称号、家族或王朝。

有效键值[编辑 | 编辑源代码]

键值 注释 举例
parent 用于继承,阅读下文了解更多信息。 parent = k_england
pattern 背景图案文件的路径(通常位于 /Crusader Kings III/gfx/coat_of_arms/patterns/.
)。应包含一个图案,以避免在使用纹理纹章时出现图形问题。.
pattern = "pattern_vertical_split_01"
color1
color2
color3
color4
color5
指定一种颜色,用于图案或作为有色徽章中的颜色参考。
通常是指在 /Crusader Kings III/common/named_colors
中定义的颜色。还可以显式定义RGB、HSV和8位十六进制值。
color1 = "white"
color2 = hsv { 1.0 1.0 1.0 }
color3 = hsv360 { 360 100 100 }
color4 = rgb { 255 255 255 }
color5 = hex { aabbccdd }
textured_emblem --- 可以指定多个纹理标志。每个标志本身是一个脚本对象,具有以下有效关键字: ---
texture 徽章文件的路径(通常位于/Crusader Kings III/gfx/coat_of_arms/textured_emblems/中)。
texture = "te_griffin_01.dds"
mask 徽章的背景图案可用作徽标的剪贴蒙版。
mask = { 1 3 }
instance scale 作为一个二维浮点数,具有默认值 { 1.0, 1.0 }。
instance = { 
	scale = { 0.5 0.5 }  
	position = { 0.75 0.75 } 
	rotation = 45
	depth = 5  
}
position 给定一个二维浮点数,具有默认值 { 0.0, 0.0 }。
rotation 给定为浮点数值,具有默认值0.0。
depth 用于指定渲染顺序的值,以浮点数表示,默认为0.0。
colored_emblem --- 可以指定多个彩色标记。每个标记本身是一个带有以下关键字的脚本对象: ---
texture 徽章文件的路径(通常位于/Crusader Kings III/gfx/coat_of_arms/colored_emblems/)。
texture = "ce_crown.tga"
" 所有来自 textured_emblem 的字段都是有效的。 ---
color1 定义了徽章的基本颜色
color1 = color2
color2 = "white"
#color3 = hsv360 { 360 50 50 }
color2 定义了徽标的辅助颜色(纹理中的绿色通道)
color3 目前不可用,将默认为白色。
sub --- 可以指定多个子对象,每个子对象本身都是一个完整的家族纹章脚本对象,允许设置除另一个子对象以外的所有字段,即不支持嵌套子对象。 ---
instance scale 作为一个二维浮点数,具有默认值 { 1.0, 1.0 }。 ---
offset 给定一个二维浮点数,具有默认值 { 0.0, 0.0 }。 ---
depth 用于指定渲染顺序的值,以浮点数表示,默认为0.0。 ---

例子[编辑 | 编辑源代码]

下面是一些带有相应盾徽的例子。

flag_with_emblem = {
    pattern = "pattern_vertical_split_01"
    color1 = "lemon_yellow"
    color2 = "sky_blue"
 
    textured_emblem = {
        texture = "te_griffin_01"
    }
}
flag_with_culled_emblem = {
    pattern = "pattern_vertical_split_01"
    color1 = "lemon_yellow"
    color2 = "sky_blue"
 
    textured_emblem = {
        texture = "te_griffin_01"
        mask = { 1 }
    }
}
two_emblems_scaled_and_positioned = {
    pattern = "pattern_vertical_split_01"
    color1 = "lemon_yellow"
    color2 = "sky_blue"
 
    textured_emblem = {
        texture = "te_griffin_01"
        instance = { position = { 0.75 0.75 } scale = { 0.5 0.5 }  }
        instance = { position = { 0.75 0.25 } scale = { 0.5 0.5 }  }
    }
}

Emblem examples.png

继承和子类[编辑 | 编辑源代码]

这一部分主要关注继承问题,但为了促进讨论,首先谈论一下子类的两个要点:

第一个"基本家族纹章"是一个隐含的子类:

a = {
    pattern = "pattern_solid.tga"
    color1 = "blue"
    sub = { }
}
# the above is equal to:
b = {
    sub = {
        pattern = "pattern_solid.tga"
        color1 = "blue"
    }
    sub = { }
}

每个实例字段(家族纹章实例,而不是徽标实例)都被转化为一个独立的子级:

a = {
    color1 = "blue"
    instance = { offset = { 0 0 } } # A
    instance = { offset = { 1 0 } } # B
    sub {
        color1 = "red"
        instance = { offset= { 0 1 } } # C
        instance = { offset = { 1 1 } } # D
    }
}
# the above is equal to:
b = {
    sub = {
        color1 = "blue"
        instance = { offset = { 0 0 } } # A
    }
    sub = {
        color1 = "blue"
        instance = { offset = { 1 0 } } # B
    }
    sub {
        color1 = "red"
        instance = { offset = { 0 1 } } # C
    }
    sub {
        color1 = "red"
        instance = { offset = { 1 1 } } # D
    }
}

说了这些,让我们深入探讨继承。

继承是通过父关键字实现的。它基本上表示“取出给定的家族纹章作为值,并用它来填充任何未明确设置的字段”。

举例:

daddy = {
    pattern = "pattern_checkers_01.tga"
    color1 = "burned_red"
    color2 = "mid_grey"
    colored_emblem = {
        texture = "ce_angel.dds"
        color1 = "rust_brown"
        color2 = "rust_brown"
    }
}
 
child = {
    parent = "daddy"
    pattern = "pattern_checkers_diagonal_01.tga"
    color1 = "mint_green"
    # >color2 = "mid_grey"<        inherited
    # >colored_emblem = { ... }<   inherited
}

当谈到徽章时,继承是"全有或全无"的:如果至少指定一个徽章(任何类型),则不继承任何徽章,但如果没有指定徽章,则继承所有父级的徽章。

一旦涉及到子级,继承规则会稍微复杂一些。有两个指导规则:

当指定了一个父级时,所有值都从其第一个子级(通常是"隐式"子级)获取。

如果一个子级没有指定父级,它将依附于其第一个子级的父级。然而,在这种情况下,所有值将从父级中相应的子级获取。设置父级为"none"将禁用此自动继承。

示例:

daddy = {
    pattern = "pattern_solid.tga"
    sub = { }
    sub = { }
}
 
child = {
    parent = "daddy"
    # this implicit sub inherits from the implicit sub in daddy
    sub = {
        # Since no parent is specified this sub will piggyback on >parent = "daddy"< and inherit from the second sub of "daddy".
    }
    sub = {
        parent = "other_coa"
        # since parent is specified explicitly this will inherit from first sub of "other_coa"
    }
}

继承链("深度继承")是以自下而上的方式解决的。必须小心,不要创建继承循环。

grand_dad = {
    pattern = "pattern_solid.tga"
    sub = { }
}
 
daddy = {
    parent = "grand_dad"
    # >pattern = "pattern_solid.tga"< inherited
    color1 = "blue"
    # >sub = { }< inherited
}
 
child = {
    parent = "daddy"
    # >pattern = "pattern_solid.tga"< inherited
    # >color1 = "blue"< inherited
    sub = {
        # this inherits from the second sub in daddy
    }
    sub = {
        # since daddy only has 2 subs, this has no parent
    }
}

最后,一个真实的例子:

k_england_and_france = {
    sub = {
        parent = "k_france"  # defined elsewhere
        instance = { offset = { 0.0 0.0 } scale = { 0.5 0.5 }  } # top left
        instance = { offset = { 0.5 0.5 } scale = { 0.5 0.5 }  } # bottom right
    }
    sub = {
        parent = "k_england"  # defined elsewhere
        instance = { offset = { 0.5 0.0 } scale = { 0.5 0.5 }  } # top right
        instance = { offset = { 0.0 0.5 } scale = { 0.5 0.5 }  } # bottom left
    }
}

轻松使用游戏内设计器[编辑 | 编辑源代码]

与皇家宫廷DLC一同,P社还开发了一款便捷的内置编辑器,可用于直接将创建的盾徽导出为有效的脚本代码。您只需使用设计器创建所需的盾徽,然后按下“复制到剪贴板”即可。游戏将在使用的计算机的临时存储器中创建完整且有效的盾徽所需代码。 然后,您可以使用CTRL+V键组合直接将其插入到相应的修改文件的文本中。您只需确保设置正确的名称(例如k_england)。 修改者还可以在此处使用一个小技巧,暂时删除本地化文件;这样,CK无法加载标题的名称,而是在游戏中显示标题对应的关键字。 玩家也可以通过盾徽设计师更改标题名称,或者在这种情况下,简单地复制关键字并将其粘贴到适当的文件中。通过这种方式,您可以避免后续可能导致盾徽未在游戏中显示的拼写错误。

在这一点上需要再次强调,由于动态盾徽,可能会存在多个盾徽,因此它们的名称可能不直接与标题密钥匹配。因此,CK解释器无法识别拼写错误,也不会发出错误消息。如果自制的盾徽未显示出来,应当再次明确检查其正确的字符精确拼写。

进阶盾徽设计器[编辑 | 编辑源代码]

默认情况下,CoA Designer仅显示原始游戏的徽章。然而,扩展列表非常简单。要做到这一点,只需将更多的dds文件添加到<mod_root>\gfx\coat_of_arms\colored_emblems\文件夹中 - 如本页已描述。此外,您现在可以在同一位置创建一个文本文件(一如既往地采用UTF-8 BOM编码)。在文本文件中,您可以为每个您想在设计师中提供的徽章创建一个单独的行,使用以下语法:

<pic_name>.dds = { colors = <1,2,3> category = <string> }

图像的名称必须与同一文件夹中的图像文件完全匹配。

您可以将<1、2或3>指定为颜色选项。这指定了用户可以为所选纹章设置多少种颜色。对此,.dds 图像文件起决定性作用。 游戏会自动将

  1. 颜色值 0x000084(蓝色)识别为颜色
  2. 颜色值 0x00FF94(浅绿色)识别为颜色
  3. 颜色值 0xFF0084(品红色)识别为颜色
  4. CK 具有一定的容差,并试图将其他不同的颜色匹配到这些颜色值之一。

然而,这种校正并不完美,不能完全依赖;制作模组的人应始终确保使用正确的颜色。如果您在相应的文件中设置的值大于实际使用的颜色数,用户将获得一个更多的颜色显示,但不会出错。然而,如果制作模组的人在文本文件中指定的颜色数过少,自动校正将尝试将太多的颜色减少到一种颜色(如果它们足够相似),或者简单地将未知颜色设置为红褐色调,这不能由设计人员用户更改。

游戏原本支持以下类别之一:动物、圆圈和螺旋、十字和纽结、信仰、人造、自然、图案、部落印章、文字和图形。如果使用其他字符串,游戏将为用户添加一个新的可选择类别。由于类别名称显示为文本,因此还应为新类别添加一个本地化条目(COA_DESIGNER_CATEGORY_<your_category_string_here>:0 "<您想要在所选语言中显示的类别名称>")。

设计器的缺点[编辑 | 编辑源代码]

与手动编码一个纹章对应盾徽相比,设计器可能在直观上更容易使用,但设计师无法用于继承或细分纹章。如上所示的真实示例,将英国和法国的纹章放在一起,实际上无法使用设计器创建。甚至包含卡斯蒂利亚、莱昂、阿拉贡、纳瓦拉和西西里的欧陆风云4(EU4)中的西班牙国旗也无法使用设计师重新创建。然而,设计器中的一个可以帮助创建基础纹章,所以之后您只需要手动编写继承关系。

动态盾徽[编辑 | 编辑源代码]

除了为任何给定的头衔分配的正常纹章外,您还可以创建动态纹章定义,这些定义存储在 /Crusader Kings III/\common\coat_of_arms\dynamic_definitions\ 中:

# Name must match a landed title definition
title_name = {
	item = { # One or more items
		trigger = { # 触发条件,当应该选择此项时,选择第一个有效项, root = the title
			<trigger> # 这可以是任何预定义的触发器,或者像正常情况下那样内联定义的触发器。
		}
		coat_of_arms = name # 作为纹章文件中定义的纹章名称使用
	}
}

为了更新纹章,您需要在头衔范围内调用update_dynamic_coa = yes。 在所有拥有的头衔中,这已经在on_character_culture_changeon_character_faith_change中被调用,但是如果您希望在其他任何情况下更新动态纹章,您需要根据on_actions