Difference between revisions of "Template:Option"

From Hearts of Iron 4 Wiki
Jump to navigation Jump to search
m (smaller star)
m (Protected "Template:Option": High traffic page ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{#if: {{{trigger|}}}
 
{{#if: {{{trigger|}}}
|[[File:event_trigger.png|16px|link=]] '''Enabled if:'''
+
|[[File:event_trigger.png|16px|link=]] {{#ifeq:{{{trigger}}}|always|'''Always enabled:'''|'''Enabled if:'''
{{{trigger}}}
+
{{{trigger}}}}}
 
<div style="margin-left: 20px;">
 
<div style="margin-left: 20px;">
<div style="color: white; width: 468px;"><div class="option_button" style="z-index: 1;">[[File:event_button.png|468px|link=]]</div><div class="option_title" style=" z-index: 2; position: relative; text-align: center; margin: -29px 0px 8px;">'''{{{option_text}}}'''</div></div>
+
<div style="color: #e5e5e5; width: 468px;"><div class="option_button" style="z-index: 1;">[[File:event_button.png|468px|link=]]</div><div class="option_title" style=" z-index: 2; position: relative; text-align: center; margin: -29px 0px 8px;">'''{{{option_text}}}'''</div></div>
 
{{{effect|*None}}}
 
{{{effect|*None}}}
 
{{#ifeq:{{{1}}}|end||----}}</div>
 
{{#ifeq:{{{1}}}|end||----}}</div>
|<div style="color: white; width: 488px;"><div class="option_button" style="z-index: 1;">[[File:event_button.png|488px|link=]]</div><div class="option_title" style=" z-index: 2; position: relative; text-align: center; margin: -29px 0px 8px;">'''{{{option_text}}}'''</div></div>
+
|<div style="color: #e5e5e5; width: 488px;"><div class="option_button" style="z-index: 1;">[[File:event_button.png|488px|link=]]</div><div class="option_title" style=" z-index: 2; position: relative; text-align: center; margin: -29px 0px 8px;">'''{{{option_text}}}'''</div></div>
 
{{{effect|*None}}}}}<noinclude>
 
{{{effect|*None}}}}}<noinclude>
 
{{template doc}}[[Category:Templates]]</noinclude>
 
{{template doc}}[[Category:Templates]]</noinclude>

Latest revision as of 22:26, 19 September 2017

Event button.png
{{{option_text}}}
  • None
[view] [edit]Template-info.png Template documentation


Option can be used to diplay the options of events in {{event}} infoboxes.

Parameter

Parameter Description Default Status
option_text The text of the option. empty required
effect Effects of the option.
  • None
required
trigger Conditions - if applicable - of the option.

If set to ‘always’ then it displays “Event trigger.pngAlways enabled:” else “Event trigger.pngEnabled if:” followed by the specified trigger.

empty optional
1 If set to 'end' the horizontal rule at the end of a conditional option is disabled. empty optional

Usage

{{Option
|option_text = 
|effect = 
}}

For events with conditional options:

{{Option
|option_text =
|trigger = <!-- required -->
|effect =
|end <!-- if has a trigger and is placed last -->
}}