无编辑摘要 |
无编辑摘要 |
||
第1行: | 第1行: | ||
<includeonly>{{infobox | <<includeonly>{{infobox | ||
|class=eu4box-inline | |class=eu4box-inline | ||
|header= {{#if:{{{ | |header= | ||
<!--Anchor-->{{#if:{{{id|}}}|{{anchor|{{{id}}} }} <div style="float:right; font-size:smaller"><abbr title="{{{event_id}}}">id</abbr></div> }}<!--End Anchor --> | |||
<!--Event Name--><{{{header|h3}}}>[[File:Event_{{{icon_type|default}}}.png|30px|link=]] {{{ 标题}}}</{{{header|h3}}}><!--End Event Name--> | |||
|content = | |||
<!--Versioning-->{{#if:{{{ 版本|}}}|{{SVersion|{{{ 版本}}}|infobox}} | |||
|<span style="color: red;">missing versioning</span>[[Category:Pages with infoboxes without versioning]]<hr>}}<!--End Versioning & Start Core Text--> | |||
|content = {{#if:{{{ | {{#ifeq:{{{cond_event_text}}}|yes| [[File:event_trigger.png|22px|link=]] '''The below description is one of several available for this event.'''<br/>}} | ||
---- | {{#if:{{{ 事件文本|}}} |''{{{ 事件文本}}}''<hr>}} | ||
{{#if:{{{趣味文本|}}} |<div class="mw-collapsible mw-collapsed"> ''Flavor text:'' | |||
{{#ifeq:{{{cond_event_text}}}|yes| [[File:event_trigger.png|22px|link=]] '''The below description is one of several available for this event.'''<br/> | <div class="mw-collapsible-content">''{{{趣味文本}}}''</div></div><hr>}} | ||
}} | |||
{{#if:{{{ | |||
----}} | |||
<div class="mw-collapsible {{#ifeq:{{{collapse}}}|yes|mw-collapsed}}"> | <div class="mw-collapsible {{#ifeq:{{{collapse}}}|yes|mw-collapsed}}"> | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
{ | {<!---->{{!}} width="100%" cellspacing="4" | ||
{{!}}<span class="subheading">Is triggered by</span> | |||
<!-- -->{{{ 触发于}}} | |||
{{!}}- valign="top" | |||
{{{ | {{!}}<span class="subheading">Trigger conditions</span> | ||
{{!}} | <!-- -->{{{ 触发|*None}}} | ||
<!--immediate-->{{#if:{{{ 即时效果|}}} | | |||
{{{ | {{!}}- | ||
{{!}}<hr /> | |||
{{!}}- | |||
{{!}}<span class="subheading"> 即时效果</span> | |||
{{#if:{{{ | <!-- -->{{{ 即时效果}}} | ||
}} | |||
{{!}}- | {{!}}- | ||
{{!}}<hr /> | |||
{{{ | {{#ifeq: {{{option conditions|no}}} | yes |<div class="subheading">Option conditions</div>}} | ||
}} | <!--options -->{{{ 选项}}} | ||
{{!}}- | {{!}}} | ||
</div> | |||
{{#ifeq: {{{option conditions|no}}} | yes |<div class="subheading">Option conditions</div>}} | |||
{{{ | |||
}} | |||
{{!}}}</div> | |||
</div> | </div> | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{template doc}}[[Category:信息框]]</noinclude> | {{template doc}}[[Category:信息框]]</noinclude> |
2023年10月13日 (五) 02:43的版本
<
Event can be used to diplay description, trigger, trigger condition and options of an event in a compact infobox.
Parameter
Parameter | Description | Default | Status |
---|---|---|---|
version | To specify the major patch for which the event was written or updated. | empty | required |
event_id | Event identification code as it appears in the file to serve as an anchor | empty | optional |
event_name | Title of the event. | empty | required |
icon_type | Event icon, without "Event" prefix or .png | "default" | optional |
header | Header level, for Table of Contents | h3 | optional |
cond_event_text | Set to "yes" if the event has multiple descriptions available for use. | empty | optional |
event_text | In-game description text of the event. If multiple descriptions exist then use only the first one. | empty | optional, but desired |
flavor_text | Additional in-game description text of the event. Always collapsed | empty | optional, but desired |
triggered by | To specify the trigger of the event. | empty | required |
trigger | Trigger conditions of the event. |
|
optional |
immediate | The immediate effects of the event. | empty | optional |
option conditions | If set to ‘yes’ the section heading 'Option conditions' for events with conditional options is displayed. | empty | optional |
options | The possible effects of the event. Please use {{option}} .
|
empty | required |
collapse | Whether to collapse the event. If set to ‘yes’ the content will start collapsed. (Please use collapsed content on country pages.) |
empty | optional |
Usage
{{事件 |版本 = |id = <!-- optional, but desired --> |icon_type = <!-- optional, but desired --> |标题 = |事件文本 = <!-- optional, but desired --> |趣味文本 = <!-- optional, but desired --> |触发 = |触发于 = |即时效果 = <!-- optional, for immediate effects --> |选项 = <!-- use {{option}} template --> }}
Examples
{{Event |collapse = no |version = 1.1 |event_id = texan_war_of_independence.3 |event_name = General Santa Anna Captured |event_text = Antonio López de Santa Anna, the ruler of Mexico and one of its leading generals, has been captured in a swamp wearing a dragoon's uniform by our forces. He is offering to immediately sign a peace with us in exchange for his release. |flavor_text = "Santa Anna, alive, can be of incalculable benefit to Texas; Santa Anna, dead, would just be another casualty." |trigger = *Is Texas *Texas is the aggressor against Mexico in a diplomatic play *Mexico is AI and has Santa Anna as a character |triggered by = *Winning a battle |options = {{option |option_text=Use Santa Anna to press for a deal. |effect= *Texas and Mexico sign a white peace}} {{option|option_text=Let him run back to Mexico, we fight on!}} }}
will display:
<{{{标题}}}
Is triggered by
{{{触发于}}} |
Trigger conditions
|
{{{选项}}} |
Event with conditional options
The following code
{{Event |collapse = no |version = 1.1 |event_id = texan_war_of_independence.1 |event_name = The Lone Star State |event_text = Texas stands, after a hard-fought and bloody war, independent. There are many within the Republic that advocate for statehood within the United States of America. The Americans, by all accounts, would welcome us into their union. |flavor_text = The war with Mexico has ended, and our brave citizens have begun to lay down their arms and return to peacetime life. But what good is independence if we must spend every day watching our backs, waiting for the return of our oppressors? Texas can be stronger still as part of a greater union, one of like-minded states that will not infringe upon our God-given rights. |triggered by = *Journal Entry Completion: ''Texan Independence'' |option conditions = yes |options = {{option |trigger=Is AI |option_text=We'll join the union! |effect= *Texas is annexed by the USA}} {{option |trigger=always |option_text=Full statehood is unnecessary. |effect= *Texas becomes a dominion of the USA}} {{option |trigger=always |option_text=We don't need help from the Yankees. |effect= *The USA gains a claim on the state of Texas. *Texas gets {{green|+20%}} prestige for 5 years. |end}} }}<
{{{标题}}}
Is triggered by
{{{触发于}}} |
Trigger conditions
|
Option conditions
{{{选项}}} |