Template:Loyalist/doc:修订间差异

(merge from official wiki)
 
无编辑摘要
 
第1行: 第1行:
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude><!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->{{Hatnote|See also: {{template|Radical}}}}
<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude><!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->{{Hatnote|See also: {{template|Radical}}}}
Generates a standardized text for effects that create {{icon|loyalist|3=1}}s in events or journal entries.
生成事件或日志条目中产生 {{icon|loyalist|3=1}} 效忠派效果的标准化文本。


==Usage==
== 使用方法 ==
The first parameter sets the percentage of loyalists generated. This can be set directly as a number, e.g. 4%, or it can use one of <code>small, medium, large,</code> or <code>very large</code> which correspond to <code>2%, 5%, 10%,</code> and <code>20%</code>
第一个参数设定效忠派生成的比例。既可以直接输入数字(如4% )也可以使用<code>small, medium, large, very large</code> 来表示<code>2%, 5%, 10%, 20%</code>


Two modifier parameters can add pre and post text to describe which pops are made more radical. <code>type</code> is a "prefix" text, intended primarily for use as strata or profession.
另有两个修正参数可以添加至前缀文本和后缀文本,以描述哪类人群变得更忠诚。<code>type</code> 是一项前缀文本,主要用于阶层或职业。例如:


For example, <code><nowiki>{{loyalist|medium|type={{icon|Aristocrats|3=1}}}}</nowiki></code> gives: {{loyalist|medium|type={{icon|Aristocrats|3=1}}}}
<code><nowiki>{{loyalist|medium|type={{icon|Aristocrats|3=1}} 贵族}}</nowiki></code> 输出为:{{loyalist|medium|type={{icon|Aristocrats|3=1}} 贵族}}


<code>where</code> is a "postfix" text, intended primarily for use with interest groups, states or countries. It always adds "in" plus the input text.
<code>where</code> 是一项后缀文本,主要用于利益集团、地区或国家。例如:


For example, <code><nowiki>{{loyalist|large|where=the {{icon|Armed Forces|3=1}}}}</nowiki></code> gives: {{loyalist|large|where=the {{icon|Armed Forces|3=1}}}}
<code><nowiki>{{loyalist|large|where={{icon|Armed Forces|3=1}} 军队}}</nowiki></code> 输出为:{{loyalist|large|where={{icon|Armed Forces|3=1}} 军队}}


A final parameter <code>color</code> can be used to change the color of the percentage as with the template {{template|color}}. This is mainly intended for use with wiki tooltip templates using a brown background to match in-game text colors. Set to <code>color=green</code> for such use.
最后,<code>color</code> 参数可以用来替代本模板中预设的百分比数字的模板颜色({{template|color}} )。该参数主要用于百科棕色提示框中,以更好地匹配游戏中的颜色。例如,可以将颜色参数设定为<code>color=green</code>


For example, <code><nowiki>{{loyalist|small|color=green}}</nowiki></code> gives: <span style="color: #c2bdb8; padding:15px; border-radius: 10px; background: radial-gradient(#564346,#201a1a);">{{loyalist|small|color=green}}</span>
<code><nowiki>{{loyalist|small|color=green}}</nowiki></code> 输出为:<span style="color: #c2bdb8; padding:15px; border-radius: 10px; background: radial-gradient(#564346,#201a1a);">{{loyalist|small|color=green}}</span>


<noinclude>[[Category:Template documentation]]</noinclude>
<noinclude>[[Category:Template documentation]]</noinclude>

2025年9月20日 (六) 15:00的最新版本

这是Template:Loyalist的模板文档
当直接浏览时,使用变量可能会失效,请不要使用硬编码来代替页面名或地址。
See also: {{Radical}}

生成事件或日志条目中产生 Political loyalist.png效忠派效果的标准化文本。

使用方法

第一个参数设定效忠派生成的比例。既可以直接输入数字(如4%)也可以使用small, medium, large, very large来表示2%, 5%, 10%, 20%

另有两个修正参数可以添加至前缀文本和后缀文本,以描述哪类人群变得更忠诚。type是一项前缀文本,主要用于阶层或职业。例如:

{{loyalist|medium|type={{icon|Aristocrats|3=1}}贵族}}输出为:5%Pop aristocrats.png贵族人群将变为 Political loyalist.png效忠派

where是一项后缀文本,主要用于利益集团、地区或国家。例如:

{{loyalist|large|where={{icon|Armed Forces|3=1}}军队}}输出为:10%IG armed forces.png军队人群将变为 Political loyalist.png效忠派

最后,color参数可以用来替代本模板中预设的百分比数字的模板颜色({{color}})。该参数主要用于百科棕色提示框中,以更好地匹配游戏中的颜色。例如,可以将颜色参数设定为color=green

{{loyalist|small|color=green}}输出为:2% 的 人群将变为 Political loyalist.png效忠派