十字军之王3
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
×
欢迎访问十字军之王3百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Coat of arms modding
”
自由之民
(
讨论
|
贡献
)
2020年9月8日 (二) 19:20的版本
(文本替换 - 替换“
Category:Modding
”为“
Category:模组制作
”)
(
差异
)
←上一版本
|
最后版本
(
差异
) |
下一版本→
(
差异
)
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{Version|timeless}} '''Coat of arms''' are images used on shields and flags to identify titles, dynasties, and houses. They are scripted in ''game\common\coat_of_arms\coat_of_arms''. They follow the basic scripting syntax of: <syntaxhighlight> coat_of_arms_name = { keyword1 = value1 keyword2 = value2 ... } </syntaxhighlight> == Valid Keywords == {| class="wikitable" |- ! colspan="3" | Keyword ! Comment ! Example |- | colspan="3" | <syntaxhighlight>parent</syntaxhighlight> | Used for inheritance, read more below. | <syntaxhighlight>parent = k_england</syntaxhighlight> |- | colspan="3" | <syntaxhighlight>pattern</syntaxhighlight> | The path to the file for the background pattern (usually located in ''game/gfx/coat_of_arms/patterns/''). | <syntaxhighlight>pattern = "pattern_vertical_split_01"</syntaxhighlight> |- | colspan="3" | <syntaxhighlight>color1 color2 color3 color4 color5</syntaxhighlight> | Specifies a color, to be used in the pattern or as a color reference in colored_emblems.<br /><br />Usually refers to a color defined in ''common/named_colors''.<br /><br />Can also define RGB, Hexadecimal, and HSV. | <syntaxhighlight>color1 = "white" color2 = hsv { 1.0 1.0 1.0 } color3 = hsv360 { 360 100 100 } color4 = hex { ffffff } color5 = rgb { 255 255 255 }</syntaxhighlight> |- | rowspan="7" | <syntaxhighlight>textured_emblem</syntaxhighlight> | colspan="2" | --- | Multiple textured emblems can be specified. Each is itself a scripting object with the following valid keywords: | --- |- | colspan="2" | <syntaxhighlight>texture</syntaxhighlight> | The path to the file for the emblem (usually located in ''game/gfx/coat_of_arms/textured_emblems/''). | <syntaxhighlight>texture = "te_griffin_01.dds"</syntaxhighlight> |- | colspan="2" | <syntaxhighlight>mask</syntaxhighlight> | The coat of arms' background pattern can be used as a clipping mask for emblems. | <syntaxhighlight>mask = { 1 3 }</syntaxhighlight> |- | rowspan="4" | <syntaxhighlight>instance</syntaxhighlight> | <syntaxhighlight>scale</syntaxhighlight> | Given as a 2-dim float, has default value { 1.0 1.0 } | rowspan="4" | <syntaxhighlight>instance = { scale = { 0.5 0.5 } position = { 0.75 0.75 } rotation = 45 depth = 5 }</syntaxhighlight> |- | <syntaxhighlight>position</syntaxhighlight> | Given as a 2-dim float, has default value { 0.0 0.0 } |- | <syntaxhighlight>rotation</syntaxhighlight> | Given as float value, has default value 0.0 |- | <syntaxhighlight>depth</syntaxhighlight> | Used to order rendering, given as float value with default of 0.0 |- | rowspan="6" | <syntaxhighlight>colored_emblem</syntaxhighlight> | colspan="2" | --- | Multiple colored emblems can be specified. Each is itself a scripting object with the following keywords: | --- |- | colspan="2" | <syntaxhighlight>texture</syntaxhighlight> | The path to the file for the emblem (usually located in ''game/gfx/coat_of_arms/colored_emblems/''). | <syntaxhighlight>texture = "ce_crown.tga"</syntaxhighlight> |- | colspan="2" | " | All fields from textured_emblem are valid | --- |- | colspan="2" | <syntaxhighlight>color1</syntaxhighlight> | defines the base colour of the emblem | rowspan="3" | <syntaxhighlight>color1 = color2 color2 = "white" #color3 = hsv360 { 360 50 50 }</syntaxhighlight> |- | colspan="2" | <syntaxhighlight>color2</syntaxhighlight> | defines the secondary color of the emblem (the Green channel in the texture) |- | colspan="2" | <syntaxhighlight>color3</syntaxhighlight> | currently unavailable, will default to white |- | rowspan="4" | <syntaxhighlight>sub</syntaxhighlight> | 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" | <syntaxhighlight>instance</syntaxhighlight> | <syntaxhighlight>scale</syntaxhighlight> | Given as a 2-dim float, has default value { 1.0 1.0 } | --- |- | <syntaxhighlight>offset</syntaxhighlight> | Given as a 2-dim float, has default value { 0.0 0.0 } | --- |- | <syntaxhighlight>depth</syntaxhighlight> | Used to order rendering, given as float value with default of 0.0 | --- |} == Examples == Here follows a few examples with their corresponding coat of arms. <syntaxhighlight> flag_with_emblem = { pattern = "pattern_vertical_split_01" color1 = "lemon_yellow" color2 = "sky_blue" textured_emblem = { texture = "te_griffin_01" } } </syntaxhighlight> <syntaxhighlight> flag_with_culled_emblem = { pattern = "pattern_vertical_split_01" color1 = "lemon_yellow" color2 = "sky_blue" textured_emblem = { texture = "te_griffin_01" mask = { 1 } } } </syntaxhighlight> <syntaxhighlight> 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 } } } } </syntaxhighlight> [[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: <syntaxhighlight> a = { pattern = "pattern_solid.tga" color1 = "blue" sub = { } } # the above is equal to: b = { sub = { pattern = "pattern_solid.tga" color1 = "blue" } sub = { } } </syntaxhighlight> Each instance field (coat of arms instances, not emblem instances) is transformed into a separate sub: <syntaxhighlight> 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 } } </syntaxhighlight> 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". Example: <syntaxhighlight> 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 } </syntaxhighlight> 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: <syntaxhighlight> 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" } } </syntaxhighlight> Inheritance chains ("deep inheritance") is resolved in a bottom up manner. Users must take care not to create inheritance loops. <syntaxhighlight> 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 } } </syntaxhighlight> And finally, a real example: <syntaxhighlight> 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 } } </syntaxhighlight> {{Modding navbox}} [[Category:模组制作]]
摘要:
请注意您对十字军之王3百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
十字军之王3百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:Ambox 2020
(
编辑
)
Template:Clear
(
编辑
)
Template:Hover box
(
编辑
)
Template:Modding navbox
(
编辑
)
Template:Navbox
(
查看源代码
)(受保护)
Template:Navboxgroup
(
编辑
)
Template:Path
(
编辑
)
Template:Version
(
查看源代码
)(受保护)
Template:悬停
(
编辑
)
Template:需要翻译
(
编辑
)
×
登录
密码
记住登录
加入十字军之王3百科
忘记密码?
其他方式登录