英白拉多:罗马
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
资助我们
×
欢迎访问英白拉多:罗马百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“盾徽修改”的源代码
←
盾徽修改
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Version|2.0}} '''Coats of arms''', or '''flags''', are images used to visually identify a country. A country can either be given a unique pre-scripted flag, or have one automatically generated by the game (following pre-defined patterns). == Location == Flag scripting (for both pre-scripted flags and autogeneration patterns) is located in <code>game/common/coat_of_arms/coat_of_arms</code>. By default, they are organized into different files for prescripted flags and templates for randomly generated flags. The images for the actual emblems and patterns used in flags are located in <code>game/gfx/coat_of_arms</code> with different folders for patterns, colored emblems and textured emblems. == Template types == ===Pre-scripted flags=== In vanilla, all pre-scripted flags are defined in <code>common/coat_of_arms/coat_of_arms/00_pre_scripted_countries.txt</code>. For example: <pre> ETR = { pattern = "pattern_solid.tga" color1 = "etruscan_blue" color2 = "bone_white" colored_emblem = { texture = "ce_chimera.dds" color1 = "bone_white" } } </pre> Every pre-scripted flag must have a name/key. If a flag's key matches that of a tag, then it will be automatically be used as that country's flag (in this example, ETR is the tag for {{flag|Etruria}}, so this flag will be used for Etruria), but this is not necessary. In addition, a pre-scripted flag can always be assigned to any country in script by using the <code>change_country_flag = KEY</code> command in country scope (regardless of whether or not it was or is currently also assigned to a particular tag). Note that this can be done completely separately from changing a country's tag and (map) colour. The possible elements are: {| class="wikitable" !Key !Description !Example !Notes |- |pattern |The pattern used, refers to a file in <code>game/gfx/coat_of_arms/pattern</code> |<code>pattern = "pattern_solid.tga"</code> |Is not required, will be solid red if not specified. More info below. |- |color1 |The color used for the red in the pattern file |<code>color1 = "bone_white"</code> |This color is required, since it also colors the folds on the flag. Default is hot pink |- |color2 |The color used for the yellow in the pattern file |<code>color2 = "pitch_black"</code> |This color is required, since it also colors the armor on the units ingame. Default is lime green |- |color3 |The color used for the white in the pattern file |<code>color3 = "ck2_yellow"</code> |This color is not required and is only used on patterns which have three colors. Has no other impact. |- |colored emblem |This is used to specify a colored emblem to be placed on the flag |<pre>colored_emblem = { texture = "ce_chimera.dds" color1 = "bone_white" }</pre> |This part is not required and multiple can be used. More details below. |- |textured emblem |This is used to specify a textured emblem to be placed on the flag |<pre>textured_emblem = { texture = "te_skull_goat.dds" }</pre> |This part is not required. More details below. |} ===Randomly generated flags=== Randomly generated flags are used for all countries that do not have a pre-scripted flag. This includes most countries at start, as well as all those dynamically generated over the course of the game (unless they are assigned a pre-scripted flag through script). Templates for randomly generated flags are wrapped in a <code>template = {}</code> block and have the same structure as the definitions for pre-scripted flags, except that fields can be given a (separately defined) list of values instead of a single value - the game will randomly choose an element in the list (subject to weights and conditions) when generating a flag using the template. For example: <pre> template = { flag_type_checkers_canton_01 = { pattern = "pattern_canton_01.tga" color1 = list "triggered_colors_list1" color2 = list "triggered_colors_list3" color3 = list "triggered_colors_list2" #checkers colored_emblem = { mask = { 2 } texture = list "checkers" color1 = list "triggered_colors_list3" color2 = list "triggered_colors_list2" instance = { rotation = 180 } } } } </pre> Lists are defined in <code>common\coat_of_arms\template_lists</code>, and must be in a block corresponding to its type (<code>coat_of_arms_template_lists, colored_emblem_texture_lists, color_lists,</code> or <code>pattern_texture_lists</code>). Each value in a list is associated with a weight (which determines how likely it is to appear) and can also have a special selection trigger that places a condition on when that value is allowed to be chosen. For example: <pre> borders = { 2 = "ce_border_simple_01.tga" 4 = "ce_border_simple_02.tga" # 4 times more likely to appear than the one in the line below 1 = "ce_border_checker_01.tga" 1 = "ce_border_rug_01.tga" 1 = "ce_border_stars_01.dds" 1 = "ce_border_triangles_01.dds" 1 = "ce_border_triangles_02.dds" 1 = "ce_border_zigzag_01.dds" 1 = "ce_border_zigzag_02.dds" special_selection = { trigger = { country_culture_group = "hellenic" # These will only be chosen for countries in the Hellenistic culture group } 4 = "ce_border_meander_01.tga" 4 = "ce_border_meander_02.tga" 4 = "ce_border_meander_03.tga" } special_selection = { trigger = { primary_culture = "hebrew" # This will only be chosen for countries with Hebrew primary culture } 4 = "ce_border_leaves_01.dds" } } </pre> When randomly generating a flag for starting countries, the flag will be generated based on a fixed seed so that it will always have the same flag, even across different starts or setups as long as nothing changes about which patterns and values it is eligible for. This gives the illusion of all starting countries having a pre-scripted flag, even though this is (typically) not the case. Note that when randomly generating flags, the game does not check to see if there already exists a flag with the same set of values (and therefore an identical flag) - for instance, see {{flag|Veneto}} and {{flag|Parthia}} in vanilla. This can be mitigated by increasing the number of possible choices in each list. == Template elements == ===Patterns=== A pattern must be specified if not using a textured emblem that is full size (256x256). *color1 indicates the color of the red fields *color2 indicates the color of the yellow fields *color3 indicated the color of the white fields For example the rebel flag: <pre> REB = { pattern = "pattern_diagonal_split_01.tga" color1 = "phrygia_red" color2 = "pitch_black" } </pre> ===Colored Emblems=== Color emblems are an optional part of which multiple can be used. They can have the following subelements. {| class="wikitable" !Key !Description !Example !Notes |- |texture |The emblem used, refers to a file in <code>game/gfx/coat_of_arms/colored_emblems</code> |<code>texture="ce_gryphon_01.dds"</code> |Required |- |color1 |The color used for the pink in the emblem file |<code>color1 = "bone_white"</code> |This is required, otherwise hot pink is used. |- |color2 |The color used for the yellow in the yellow file |<code>color2 = "pitch_black"</code> |Required if the emblem has a yellow color. If not specified lime green is used |- |mask |Applies the flag pattern as a opacity mask on the emblem, with each number corresponding to a colour in the pattern. |<code>mask = { 1 }</code> |By default, the mask is <code>{ 1 2 3 }</code>, which has no effect. Removing 1 from the array will make red areas in the pattern transparent, 2 will make yellow areas transparent, 3 will make white areas transparent. |} An instance field can be used to adjust other elements of the emblem. Multiple of these can be used within the colored_emblem area. This is not required. Example: <pre> BYZ = { pattern = "pattern_solid.tga" color1= "roman_red" color2= "ck2_yellow" colored_emblem = { texture = "ce_writing_greek_beta.dds" color1 = "ck2_yellow" instance = { position = { 0.3 0.3 } scale = { -0.35 0.35 } } instance = { position = { 0.7 0.3 } scale = { 0.35 0.35 } } instance = { position = { 0.3 0.7 } scale = { -0.35 -0.35 } } instance = { position = { 0.7 0.7 } scale = { 0.35 -0.35 } } } } </pre> {| class="wikitable" !Key !Description !Example !Notes |- |position |Indicates the position of this instance. |<code>position = { x y }</code> |Values are from 0 to 1 |- |scale |Indicates the scale used for this instance. |<code>scale = { x y }</code> |Values are from 0 to 255, with 1 being normal size Negative values mirror the emblem around its own centrepoint |- |rotation |Rotation rotates the emblem around the centrepoint of the whole flag |<code>rotation = 90</code> | |- |depth |Unknown |<code>depth=0.010000</code> |Is used in tags like MAP, but effect is unknown |} This can not be used to vary colors ===Textured Emblems=== A textured emblem simply places an image as-is on the flag. If not using a pre-existing design, textured emblems are the recommended way of making your own flag as it is by far the easiest way. Textured emblems can have any size, but 256x256 is recommended. Example: <pre> BAR = { pattern = "pattern_solid.tga" color1 = "ck2_black" color2 = "phrygia_red" textured_emblem = { texture = "te_skull_goat.dds" } } </pre> The textured emblem is overlaid on the whole image. ===Colors=== Colors can be defined in three ways: *using a named color <code>color1 = pitch_black</code> *using an rgb value <code>color1 = rgb { 255 255 255}</code> *using an hsv value <code>color1 = hsv { 1.0 1.0 1.0}</code> Named colors can be found in the <code>/common/named_colors/</code> folder. A new one can be made by adding another file in this folder with entries like so: <pre> colors = { custom_color = hsv { 0 0 0.12 } custom_color = rgb{ 128 128 128 } } </pre> The entries are made in either HSV or RGB format. Note that all values in HSV colours are out of 1, while all values in RGB colours are out of 255. Colours defined here can also be assigned to directly to countries in script to change their colour on the map (using the <code>change_country_color = COLOUR</code> command) ==Making a new pattern or emblem== ===Patterns=== All patterns consist of 256x256 images with a maximum of three colors. Formats confirmed to work so far are png, dds and tga. *red (rgb 255 0 0) used for color1 *yellow (rgb 255 255 0) used for color2 *white (rgb 255 255 255) used for color3 The blocks don't have to be connected and can have any shape. ===Colored Emblems=== Colored emblems consist of 256x256 or 512x512 images (mostly). Other sizes also exist but these are recommened. Formats confirmed to work so far are: png, dds and tga. The colors below are the main colors used in making emblems. *pink (rgb 255 0 128) used for color1 *light yellow (rgb 255 255 128) used for color2 *blue (rgb 0 0 255) which denotes the amount of black The blue channel (for color 1 and 2) is a special one. It can be set to 0 to make it completely black, or to 255 to make it completely white. If using just the blue channel (with red and green set to 0) will vary the color between white (255 255 255) and black (0 0 0). This effectively denotes how much black and white you can to mix in: 0-128 for black, and 128-255 for black. This way you can make any color fade into black or white without needing the color2. Fades are made by lowering the green channel. So an rgb value of (255 128 128) will be a mix of color1 and color2 in equal proportions. The alpha value denotes transparency. A value of 255 is non-transparent and a value of 0 will show just the background. ==Converting flag emblems into images== The following instruction guide, specific to GIMP, details how to make flags from the game into images. * Obtain a detailed log for how a specific tag's emblem looks in game by using the '''coat_of_arms <TAG>''' console command * This information will be saved in the game log, found at PATH\Paradox Interactive\Imperator\logs * Open the texture file for the coloured emblem of interest (pink and yellow images) * Decompose into RGBA (or RGB if no alpha) layers, Colors -> Components -> Decompose... * Switch image back to RGB mode, Image -> Mode -> RGB * For red layer, fill completely with colour 1 * For green layer (if not completely filled or same colour as red layer): ** Duplicate ** On original layer, Ctrl+A -> Ctrl+C (Copy whole layer) ** On duplicate layer: *** fill completely with colour 2 *** right click -> Add Layer Mask (or shift+left click layer) *** Make sure layer mask is selected (border is on left thumbnail) *** Ctrl+V -> Right click pasted layer -> Anchor Layer *** Right click layer -> Apply Layer Mask *** Delete/hide original layer * For blue layer (if not completely grey): ** Duplicate twice ** On duplicate layer #1: *** Colours -> Curves -> set to (0, 0) to (127/128, 255) *** Colours -> Linear Invert *** Ctrl+A (Copy whole layer) ** On a new black layer (this will generate "blue #1"): *** right click -> Add Layer Mask *** Ctrl+V -> Right click pasted layer -> Anchor Layer *** Right click layer -> Apply Layer Mask *** Delete/hide duplicate layer ** On duplicate layer #2: *** Colours -> Curves -> set to (127/128, 0) to (224, 255) *** Ctrl+A (Copy whole layer) ** On a new white layer (this will generate "blue #2"): *** right click -> Add Layer Mask *** Ctrl+V -> Right click pasted layer -> Anchor Layer *** Right click layer -> Apply Layer Mask *** Delete/hide duplicate layer * Arrange blue #1 > blue #2 > green > red layers ** Merge them * Copy Alpha Layer * On merged blue/green/red layers: ** right click -> Add Layer Mask ** Ctrl+V -> Right click pasted layer -> Anchor Layer ** Right click layer -> Apply Layer Mask {{Modding navbox}} [[Category:模组制作]] [[en:Coat_of_arms_modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:Countries
(
查看源代码
)
Template:Flag
(
查看源代码
)
Template:Flag/core
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
盾徽修改
。
×
登录
密码
记住登录
加入英白拉多:罗马百科
忘记密码?
其他方式登录