首页所有页面

盾徽模组制作

Coats of arms (CoA) are heraldic designs to uniquely identify a title or a dynasty.

它们由一个框内的盾牌组成,可以显示为二维(字符屏幕)或三维(地图)。

Shield

有多种系统用于确定CoA的屏蔽

Type Predefined Random
Title (county and above) Default, uses gfx/flags/<title>.tga If religion group has has_coa_on_barony_only = no
Title (barony) If coat_of_arms = {} is specified in /common/landed_titles/ Default
Dynasty If coat_of_arms = {} is specified in /common/dynasties/ Default

Flags

landed 标题在 /gfx/flags/ 文件夹中使用预定义的标志,并带有硬编码名称 <title_code>.tga.

这是拥有高阶男爵头衔的默认设置,但可以通过设置来禁用 has_coa_on_barony_only = no at religion group level.

Notes:

  • 由于游戏加载时旗帜缓存到精灵的方式,缺少一个旗帜会导致所有旗帜在缺失旗帜之后都发生偏移。
  • 男爵领不能使用这种系统:即使旗帜文件夹中有与男爵领名称匹配的图像文件,也不会被使用。

coat_of_arms

Titles and dynasties can use a coat_of_arms = {} block in their definition.

In vanilla, this system is used for Dynasty Shields graphical DLC以及基督徒和异教徒的男爵等级以上的头衔。

46= {

	name="Kantakouzenos"

	culture="greek"

	religion="orthodox"

	coat_of_arms = {

		template = 0

		layer = {

			texture = 8

			texture_internal = 45

			emblem = 0

			color = 0

			color = 0

			color = 0

		}

	}

}

d_york = {

	(...)

	pagan_coa = {

		template = 0

		layer = {

			texture = 2

			texture_internal = 12

			emblem = 0

			color = 0

			color = 0

			color = 0

		}

		religion = "norse_pagan"

	}

	(...)

}

一个更简短但阅读率较低的替代方案是将所有参数分组为 data = { }.

The order determines the meaning of each value: template, (texture, emblem, texture_internal, color1, color2, color3)+

如果模板由多个图层组成,则在每个图层重复使用。

In vanilla this is used for b_cluny barony title, and few dynasties.

43= {

	name="Bagratuni"

	culture="armenian"

	coat_of_arms= {

		data= { 0 0 0 14 5 3 3 }

		religion=orthodox

	}

}

b_cluny = {

	coat_of_arms = {

		data = { 0 4 12 45 2 2 2 0 0 19 2 1 3 0 0 19 2 1 3 0 0 19 2 1 3 }

		religion="catholic"

	}

}

pagan_coa

头衔可以有一套特殊的纹章,当异教角色持有时,该纹章会用来代替主纹章。这些定义是通过 pagan_coa tag in the same way as coat_of_arms tag.

For example:

d_western_isles = {

	pagan_coa = {

		template = 0

		layer = {

			texture = 2

			texture_internal = 8

			emblem = 0

			color = 0

			color = 0

			color = 0

		}

		religion = "norse_pagan"

	}

}

这告诉游戏,当异教统治者持有头衔时,不会显示正常的纹章,而是纹章编号 8 (i.e. the 9th 图像;计数从0开始norse_pagan手臂贴图编号2。

Random

随机 CoA 基于宗教对图案、徽章和颜色组合的限制,配置如下 coats of arms.txt.

这是王朝和男爵等级头衔的默认使用。对于男爵等级以上的头衔,可以通过设置在宗教团体级别激活 has_coa_on_barony_only = no.

在原版中,这个头衔用于大多数王朝,基督徒和异教徒的男爵等级头衔,以及穆斯林的所有等级头衔。

Frame

3D

如果显示在地图上,帧基于 graphical_culture 主教的宗教,并寻找一个名为EMFXActorType 3D gfx的 <graphical_culture>_<tier>_shield:

EMFXActorType = {

	name = "westerngfx_count_shield"

	actorfile = "gfx\models\Shields\count_shield.xac"

	scale = 0.5f

	use_animation = no

}

2D

当显示在其他屏幕上时,帧基于 coats of arms.txt, by matching religion of the liege [or dynasty head for dynasties].

在王朝定义中,框架可以通过以下方式被覆盖。 forced_coa_religiongroup [{{{1}}}].

Coats_of_arms.gfx

该文件用于定义用于绘制国徽的图形。注意,新的定义可以添加到接口/文件夹内的任何单独的 .gfx 文件中,而不仅仅是在原版 coats_of_arms.gfx 中

它包含一系列精灵类型和纹章类型,位于精灵类型组内。

spriteType

精灵类型似乎是CKII内部使用的,而不是在纹章数据中。在原版文件中只有精灵类型,具体如下:

spriteType = {

    name = "GFX_coa_size"

    texturefile = "gfx\\coats_of_arms\\coa_size.tga"

    noOfFrames = 1

}

CoatOfArmsType

CoatOfArmsType定义了用于绘制模板的模板,使用以下属性:

Attribute Description Data Type Example
name The name of the template String name = "coa_plain"
frame The frame used for drawing the CoA String frame = "gfx\\coats_of_arms\\frame.tga"
mask The mask used for the CoA seal String mask = "gfx\\interface\\seal_mask_CoA.tga"
seal_overlay The graphic used for the seal String seal_overlay = "gfx\\interface\\seal_overlay_CoA.dds"
effect The file containing the draw shaders String effect = "gfx/FX/coa_shield.lua"
layer One or more layer definitions Group See below

Layers

图层组定义了应使用多少层以及应使用哪些遮罩,使用以下属性:

Attribute Description Data Type Example
mask The visibility mask used for the layer. String mask = "gfx\\coats_of_arms\\plain.tga"
center 徽章绘制在图层上的中心坐标 Group center = { x= 0.25 y = 0.07 }
scale The scale which the emblem is drawn at Float scale = 0.5

Example

spriteTypes = {



   spriteType = {

        name = "GFX_coa_size"

        texturefile = "gfx\\coats_of_arms\\coa_size.tga"

        noOfFrames = 1

    }



    CoatOfArmsType = {

        name = "coa_plain"

        frame = "gfx\\coats_of_arms\\frame.tga"

        mask = "gfx\\interface\\seal_mask_CoA.tga"

        seal_overlay = "gfx\\interface\\seal_overlay_CoA.dds"

        effect = "gfx/FX/coa_shield.lua"



        layer = {

            mask = "gfx\\coats_of_arms\\plain.tga"

            center = { x= 0 y = 0 }

            scale = 1

        }

    }

}

Coats_of_arms.txt

该文件用于定义纹章的模板、颜色、徽章和图案纹理。

culture

这是文件中的根标签,里面包含以下标签:

Attribute Description Data Type Example
religion_group 用于指定一个宗教团体的独立纹章套装 String religion_group = "christian"
templates The list of templates used by the definition Group See below
color 可用于绘画的颜色列表 Group See below
banned_colors A list of color combinations that cannot be used Group See below
emblem The path of the texture containing the emblems String emblem = "gfx\\coats_of_arms\\emblem.tga"
noOfEmblem 纹理中定义的徽章数量 emblem tag Integer noOfEmblem = 25
textures A list of texture tags defining the patterns Group See below

templates

A template (as defined in Coats of arms.gfx)通过将模板的名称和层数包裹在 template tag. For example:

templates = {

    "coa_plain:1"

    "coa_party_per_pale:2"

    "coa_party_per_fess:2"

    "coa_party_per_cross:4"

    "coa_party_per_triangle:3"

}

color

The colors are defined using the RGB 格式范围为0-255,内含一对卷曲支架。由于这些数据以一系列数字形式存储,建议在列表中注明颜色名称。颜色由其他部分以ID为参照,从0开始。一个例子 colors definition:

color = {

    { 255 149 0 }     #0 Or (Gold)

    { 245 245 245 }   #1 Argent (White )

    { 48 92 164 }     #2 Azure ( Blue)

    { 201 43 43 }     #3 Gules (Red)

    { 131 192 114 }   #4 Vert (Light Green)

    { 20 20 20 }      #5 Sable (Black)

}

banned_colors

这是不使用的颜色组合列表,颜色按ID列出。为了禁止金色和银色(上述例子中)一起使用,你可以将它们组合成一组,如下: { 0 1 }. An example banned_colors definition:

banned_colors = 

{ 

    { 0 1 }                     #0        

    { 0 1 9}                    #1        

    { 2 3 4 6 7 8 9 12 14 }     #2        

    { 2 3 4 7 9 10  }           #3        

    { 2 4 6 7 9 10 13 14}       #4        

    { 5 10 14 15}               #5        

    { 2 4 6 10 11 12 }          #6

}

textures

The textures tag defines the pattern textures in a group of texture tags.

texture

The texture 标签定义了绘制纹章时使用的图案。每个图案纹理通常包含多个独立的图案。它包含以下选项:

Attribute Description Data Type Example
file The file path to the pattern texture String file = "gfx\\coats_of_arms\\pattern.tga"
size X轴和Y轴上的图案数量。 Group size = { x = 10 y = 3 }
noOfFrames 纹理中的图案总数。这可能与X计数乘以Y计数不同。 Integer noOfFrames = 27
color 绘制该图案的颜色数量。 Integer color = 2
max_emblems AI最多能使用多少徽章(默认值为1)。
还确保AI只使用最多有这么多槽位的模板。如果设置为“徽章=否”,则无效。在2.8.X补丁中添加。
Integer max_emblems = 2
emblem_chance AI使用徽章的概率(默认值为50)。在2.8.X补丁中添加。 Integer emblem_chance = 30
random 如果“否”,则不用于随机CoA Bool random = no

See also

External links

相关页面 (60)

Coats of arms.gfxDynastyDynasty moddingEU4转档器模组制作Graphical DLCGraphics moddingSteam创意工坊TitleTitle modding事件模组制作作用域修正内阁成员模组制作决议模组制作剧本模组制作单位模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宝物模组制作宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件模组制作死亡模组制作法律模组制作游戏规则模组制作特质模组制作界面模组制作疾病模组制作目标模组制作省份模组制作社团模组制作科技模组制作称号模组制作继承模组制作编辑游戏存档肖像模组制作脚本荣誉头衔模组制作血脉模组制作角色模组制作贸易路线模组制作音乐模组制作验证器