无编辑摘要 |
无编辑摘要 |
||
(未显示1个用户的5个中间版本) | |||
第1行: | 第1行: | ||
<includeonly>{{infobox | |||
|class=eu4box-inline | |class=eu4box-inline | ||
|header= | |header= | ||
<!--Anchor-->{{#if:{{{ | <!--Anchor-->{{#if:{{{event_id|}}}|{{anchor|{{{event_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=]] {{{ | <!--Event Name--><{{{header|h3}}}>[[File:Event_{{{icon_type|default}}}.png|30px|link=]] {{{event_name}}}</{{{header|h3}}}><!--End Event Name--> | ||
|content = | |content = | ||
<!--Versioning-->{{#if:{{{ | <!--Versioning-->{{#if:{{{version|}}}|{{SVersion|{{{version}}}|infobox}} | ||
|<span style="color: red;"> | |<span style="color: red;"> 缺少版本信息</span>[[Category:Pages with infoboxes without versioning]]<hr>}}<!--End Versioning & Start Core Text--> | ||
{{#ifeq:{{{cond_event_text}}}|yes| [[File:event_trigger.png|22px|link=]] '''The below description is one of several available for this event.'''<br/>}} | {{#ifeq:{{{cond_event_text}}}|yes| [[File:event_trigger.png|22px|link=]] '''The below description is one of several available for this event.'''<br/>}} | ||
{{#if:{{{ | {{#if:{{{event_text|}}} |''{{{event_text}}}''<hr>}} | ||
{{#if:{{{ | {{#if:{{{flavor_text|}}} |<div class="mw-collapsible mw-collapsed"> '''趣味文本:''' | ||
<div class="mw-collapsible-content">''{{{ | <div class="mw-collapsible-content">''{{{flavor_text}}}''</div></div><hr>}} | ||
<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" | {<!---->{{!}} width="100%" cellspacing="4" | ||
{{!}}<span class="subheading"> | {{!}}<span class="subheading">'''触发于:'''</span> | ||
<!-- -->{{{ | <!-- -->{{{triggered by}}} | ||
{{!}}- valign="top" | {{!}}- valign="top" | ||
{{!}}<span class="subheading"> | {{!}}<span class="subheading">'''触发条件:'''</span> | ||
<!-- -->{{{ | <!-- -->{{{trigger|* 无}}} | ||
<!--immediate-->{{#if:{{{ | <!--immediate-->{{#if:{{{immediate|}}} | | ||
{{!}}- | {{!}}- | ||
{{!}}<hr /> | {{!}}<hr /> | ||
{{!}}- | {{!}}- | ||
{{!}}<span class="subheading">即时效果</span> | {{!}}<span class="subheading">''' 即时效果'''</span> | ||
<!-- -->{{{ | <!-- -->{{{immediate}}} | ||
}} | }} | ||
{{!}}- | {{!}}- | ||
{{!}}<hr /> | {{!}}<hr /> | ||
{{#ifeq: {{{option conditions|no}}} | yes |<div class="subheading"> | {{#ifeq: {{{option conditions|no}}} | yes |<div class="subheading">'''选择条件:'''</div>}} | ||
<!--options -->{{{ | <!--options -->{{{options}}} | ||
{{!}}} | {{!}}} | ||
</div> | </div> | ||
</div> | </div> | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{template doc}}[[Category: | {{template doc}}[[Category:Infoboxes]]</noinclude> |
2024年2月27日 (二) 18:28的最新版本
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:
id
General Santa Anna Captured
趣味文本:
"Santa Anna, alive, can be of incalculable benefit to Texas; Santa Anna, dead, would just be another casualty."
触发于:
|
触发条件:
|
Use Santa Anna to press for a deal.
Let him run back to Mexico, we fight on!
|
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}} }}
id
The Lone Star State
趣味文本:
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.
触发于:
|
触发条件:
|
选择条件:
可用条件: Is AI We'll join the union!
总是可用: Full statehood is unnecessary.
总是可用: We don't need help from the Yankees.
|