Template:事件:修订间差异

无编辑摘要
无编辑摘要
 
(未显示2个用户的7个中间版本)
第1行: 第1行:
<includeonly>{{infobox
<includeonly>{{infobox
|class=eu4box-inline
|class=eu4box-inline
|header= {{#if:{{{event_id|}}}|{{anchor|{{{event_id}}} }} <div style="float:right; font-size:smaller"><abbr title="{{{event_id}}}">id</abbr></div> }}<!--end anchor -->{{#Switch: {{{header}}}
|header=
  | #Default = <h3 style="margin:0">{{{event_name}}}</h3>
<!--Anchor-->{{#if:{{{event_id|}}}|{{anchor|{{{event_id}}} }} <div style="float:right; font-size:smaller"><abbr title="{{{event_id}}}">id</abbr></div> }}<!--End Anchor -->
  | h2 = <h2>{{{event_name}}}</h2>
<!--Event Name--><{{{header|h3}}}>[[File:Event_{{{icon_type|default}}}.png|30px|link=]] {{{event_name}}}</{{{header|h3}}}><!--End Event Name-->
  | h4 = <h4>{{{event_name}}}</h4>
|content =
  | h5 = <h5>{{{event_name}}}</h5>
<!--Versioning-->{{#if:{{{version|}}}|{{SVersion|{{{version}}}|infobox}}
}}
|<span style="color: red;"> 缺少版本信息</span>[[Category:Pages with infoboxes without versioning]]<hr>}}<!--End Versioning & Start Core Text-->
|content = {{#if:{{{version|}}}|{{SVersion|{{{version}}}|infobox}}|<span style="color: red;">missing versioning</span>[[Category:Pages with infoboxes without versioning]]
{{#ifeq:{{{cond_event_text}}}|yes| [[File:event_trigger.png|22px|link=]] '''The below description is one of several available for this event.'''<br/>}}
----
{{#if:{{{event_text|}}} |''{{{event_text}}}''<hr>}}
}}
{{#if:{{{flavor_text|}}} |<div class="mw-collapsible mw-collapsed">&nbsp;'''趣味文本:'''
{{#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">''{{{flavor_text}}}''</div></div><hr>}}
}}
{{#if:{{{event_text|}}} |''{{{event_text}}}''
----}}
<div class="mw-collapsible {{#ifeq:{{{collapse}}}|yes|mw-collapsed}}">&nbsp;
<div class="mw-collapsible {{#ifeq:{{{collapse}}}|yes|mw-collapsed}}">&nbsp;
<div class="mw-collapsible-content">
<div class="mw-collapsible-content">
{{#ifeq:{{{fire_only_once}}}|yes|<div style="text-align:center">This event happens ''only once'' during a campaign.</div>}}
{<!---->{{!}} width="100%" cellspacing="4"
{{{!}} width="100%" cellspacing="4"
{{!}}<span class="subheading">''' 触发 于:'''</span>
{{!}}- valign="top"
<!-- -->{{{triggered by}}}
{{!}}width=60%{{!}}<span class="subheading">触发 条件</span>
{{!}}- valign="top"
{{{trigger|*None}}}
{{!}}<span class="subheading">''' 触发 条件:'''</span>
{{!}}width=40%{{!}}{{#if: {{{mtth|}}}
<!-- -->{{{trigger|*无}}}
| <span class="subheading"> 平均 触发 时间</span>
<!--immediate-->{{#if:{{{immediate|}}} |
{{{mtth}}}
     {{!}}-
| <span class="subheading"> 只触发于</span>
{{!}}<hr />
{{{triggered only}}}
{{!}}-
}}
{{!}}<span class="subheading">'''即时效果'''</span>
{{#if:{{{immediate|}}} |{{!}}-
<!-- -->{{{immediate}}}
{{!}}colspan="2"{{!}}<hr />
}}
{{!}}-
{{!}}-
{{!}}colspan="2"{{!}}<span class="subheading">Immediate effects</span>
{{!}}<hr />
{{{immediate}}}
{{#ifeq: {{{option conditions|no}}} | yes |<div class="subheading">'''选择条件:'''</div>}}
}}
<!--options -->{{{options}}}
{{!}}-
{{!}}}
{{!}}colspan="2"{{!}}<hr />
</div>
{{#ifeq: {{{option conditions|no}}} | yes |<div class="subheading">Option conditions</div>}}
{{{options}}}
{{#if:{{{after|}}} |{{!}}-
{{!}}colspan="2"{{!}}<hr />
{{!}}-
{{!}}colspan="2"{{!}}<span class="subheading">Effects after selecting any option</span>
{{{after}}}
}}
{{!}}}</div>
</div>
</div>
}}</includeonly><noinclude>
}}</includeonly><noinclude>
{{template doc}}[[Category: 信息框]]</noinclude>
{{template doc}}[[Category:Infoboxes]]</noinclude>

2024年2月27日 (二) 18:28的最新版本

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


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.
  • None
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

Event default.png General Santa Anna Captured

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.
 趣味文本:
"Santa Anna, alive, can be of incalculable benefit to Texas; Santa Anna, dead, would just be another casualty."

 
触发于:
  • Winning a battle
触发条件:
  • Is Texas
  • Texas is the aggressor against Mexico in a diplomatic play
  • Mexico is AI and has Santa Anna as a character

Event button.png
Use Santa Anna to press for a deal.
  • Texas and Mexico sign a white peace
Event button.png
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

Event default.png The Lone Star State

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.
 趣味文本:
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.

 
触发于:
  • Journal Entry Completion: Texan Independence
触发条件:

选择条件:

Event trigger.png可用条件: Is AI

Event button.png
We'll join the union!
  • Texas is annexed by the USA

Event trigger.png总是可用:

Event button.png
Full statehood is unnecessary.
  • Texas becomes a dominion of the USA

Event trigger.png总是可用:

Event button.png
We don't need help from the Yankees.
  • The USA gains a claim on the state of Texas.
  • Texas gets +20% prestige for 5 years.