Template:修正:修订间差异

(建立内容为“<includeonly>{{#cargo_query: | table = modifier_names | fields = chinese, english | format = template | template = word | where = modifier_names.chinese = "{{{1|5…”的新页面)
 
无编辑摘要
 
第1行: 第1行:
<includeonly>{{#cargo_query:
<includeonly><span class="tooltip{{{class|}}}" style="border-bottom-color: inherit;">{{{name|{{{1}}}}}}<!--
| table = modifier_names
--><span class="tooltiptext{{{class|}}}"<!--
| fields = chinese, english
-->style="color: #c2bdb8; font-style: normal; font-weight: normal; background: linear-gradient(to bottom,#564346,#302729); border: solid #b19656; border-radius: 10px; min-width: 300px; width:max-content; padding: 5px; margin:12px 0px; left:0;"><!--
| format = template
--><span style="color: white; font-weight: bold;">{{{name|{{{1}}}}}}</span><span style="float:right; margin-left:10px;">{{{scope|Country}}} modifier</span><!--
| template = word
--><br>{{{modifier|{{{2|}}}}}}</span></span></includeonly><noinclude>{{template doc}}[[Category:Templates]]</noinclude>
| where = modifier_names.chinese = "{{{1|5000}}}" OR modifier_names.english = "{{{1|5000}}}" OR modifier_names.alias = "{{{1|5000}}}" OR modifier_names.键值 = "{{{1|5000}}}" <> 0
}}</includeonly><noinclude>[[Category: 语义化模板]]{{template doc}}</noinclude>

2025年5月29日 (四) 22:04的最新版本

[阅读] [编辑]Template-info.png 模板文档

This template creates a hover tooltip to display modifier effects.

Parameter

Parameter Description Default Required
1 Modifier name n/a Required
2 Modifier effects n/a optional
scope Modifier scope Country optional
class Tooltip class level
  • Only 2 or 3
  • Use for tooltip-in-tooltip
n/a optional

Examples

2 must all be on one line, so use <br> to separate lines for display. As an example the following:

{{modifier
|Age of Caudillos
|'''+10%''' {{icon|Armed Forces|3=1}} pop attraction<br>'''+30%''' {{icon|Armed Forces|3=1}} political strength<br>'''+50%''' {{icon|Officers|3=1}} political strength}}

results in Age of Caudillos Age of Caudillos Country modifier
+10% IG armed forces.png pop attraction
+30% IG armed forces.png political strength
+50% Pop officers.png political strength

Non-country modifiers can be specified with scope, as for example:

{{modifier|Law Enactment Stalled|{{color|red|−15%}} Enactment chance|scope=Law enactment}}

Law Enactment StalledLaw Enactment StalledLaw enactment modifier
−15% Enactment chance


The inline display text can be styled with most wiki styling (outside/around the template) without affecting the tooltip text.

Styled example ''{{modifier|Law Enactment Stalled|{{color|red|−15%}} Enactment chance|scope=Law enactment}}'' following text

Styled example Law Enactment StalledLaw Enactment StalledLaw enactment modifier
−15% Enactment chance
following text

Styled example {{red|{{modifier|Law Enactment Stalled|{{color|red|−15%}} Enactment chance|scope=Law enactment}} }} following text
Styled example Law Enactment StalledLaw Enactment StalledLaw enactment modifier
−15% Enactment chance
following text