Difference between revisions of "Template:Event"

From Europa Universalis 4 Wiki
Jump to navigation Jump to search
m (Updated format)
m (grammar)
 
Line 9: Line 9:
 
|content = {{#if:{{{version|}}}|{{SVersion|{{{version}}}|infobox|nocat={{{nocat|}}}}}|<span style="color: red;">missing versioning</span>[[Category:Pages with infoboxes without versioning]]
 
|content = {{#if:{{{version|}}}|{{SVersion|{{{version}}}|infobox|nocat={{{nocat|}}}}}|<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/>
+
{{#ifeq:{{{cond_event_text}}}|yes| [[File:event_trigger.png|22px|link=]] '''The description below is one of several available for this event.'''<br/>
 
}}
 
}}
 
{{#if:{{{event_text|}}} |''{{{event_text}}}''
 
{{#if:{{{event_text|}}} |''{{{event_text}}}''

Latest revision as of 00:36, 15 February 2020

[view] [edit]Template-info.png Template documentation


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
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
fire_only_once As in the script code - Set to yes if the event happens only once during a campaign. empty optional
mtth Mean time to happen, including both the base weight and its modifiers. For MTTH-events this is the number of months after which there is a 50% chance that it triggers. For triggered-only events triggered by event pulses it determines how likely that event is to happen on that pulse. empty One of these two is required.
triggered only To specify the trigger of 'triggered only' events. empty
trigger Trigger conditions of the event.
  • None
optional
dlc If the event is only available with a DLC enabled - according to {{expansion}}. empty 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 be collapsed.

(Please use collapsed content on country pages.)

empty optional
after Any effects after selecting an option. empty optional

Usage

{{Event
|version = 
|event_id = 
|event_name = 
|event_text = <!-- optional, but desired -->
|fire_only_once =
|dlc = <!-- optional -->
|trigger = 
|mtth    = <!-- for Mtth events -->
|triggered only = <!-- for triggered only events -->
|immediate = <!-- optional for immediate effects -->
|options = <!-- options use {{option}} template -->
}}

Note: Please use either “mtth”-parameter or “triggered only”-parameter.

Examples

MTTH event

The following code

{{event
|version = 1.28
|event_id = flavor_tur.3374
|event_name = Mimar Sinan's Great Constructions
|event_text = Mimar Sinan planned and oversaw the construction of countless mosques, aqueducts, bathhouses, bridges, palaces, caravanserais and schools during his half-a-century long career. His masterpieces were the Selimiye and Suleymaniye Mosques in Adrianople and Constantinople respectively.
|fire_only_once = yes
|trigger = The country:
* is {{flag|Ottomans}}.
*owns Constantinople (151).
The year is between 1519 and 1560.
|mtth = 100 months
|options =
{{option
|option_text = Appoint him royal architect
|effect = {{flag|Ottomans}} get the modifier ''“Mimar Sinan”'' until the death of the current ruler, giving the following effects:
*{{icon|construction cost|24px}} {{green|−10%}} construction cost,
*{{icon|development cost|24px}} {{green|−10%}} development cost.
}}
{{option
|option_text = Enlist his services for a short time
|effect = {{flag|Ottomans}} gain {{icon|adm|24px}} {{green|+50}} administrative power.
}}
}}

will display:

id

Msg event.pngMimar Sinan's Great Constructions


Mimar Sinan planned and oversaw the construction of countless mosques, aqueducts, bathhouses, bridges, palaces, caravanserais and schools during his half-a-century long career. His masterpieces were the Selimiye and Suleymaniye Mosques in Adrianople and Constantinople respectively.


 
This event happens only once during a campaign.
Trigger conditions

The country:

The year is between 1519 and 1560.

Mean time to happen

100 months


Event button 547.png
Appoint him royal architect

Flag of Ottomans Ottomans get the modifier “Mimar Sinan” until the death of the current ruler, giving the following effects:

  • Construction cost.png −10% construction cost,
  • Development cost.png −10% development cost.
Event button 547.png
Enlist his services for a short time

Flag of Ottomans Ottomans gain Administrative power.png +50 administrative power.

Triggered only event

The following code

{{event
|version = 1.8
|event_id = ideagroups.100
|event_name = Loss of Stability
|event_text = This strengthening of the privileges of the nobles is severely upsetting the burghers and merchants. This is creating turmoil in our realm, and may prove disastrous in the long run.
|trigger = *has the [[idea group]]: Aristocratic ideas.
*has a [[stability]] of at least 0.
|triggered only = *the five year pulse
'''Base weight: 1'''
|options = {{option
|option_text = Well, they are just peasants.
|effect = *{{icon|stability}} {{red|–1}} Stability
}}
}}

will display:

id

Msg event.pngLoss of Stability


This strengthening of the privileges of the nobles is severely upsetting the burghers and merchants. This is creating turmoil in our realm, and may prove disastrous in the long run.


 
Trigger conditions Is triggered only by
  • the five year pulse

Base weight: 1


Event button 547.png
Well, they are just peasants.
  • Icon stability.png –1 Stability

Event with conditional options

The following code

{{Event
|version = 1.13
|event_id = flavor_azt.2
|event_name = Reactions to Pyramid Project
|event_text = Much as we suspected not all of the cities under our control have welcomed the chance to put all of their resources at our disposal, and it seems clear that we will have to carry a larger part of the costs than we had hoped.
|trigger = This event has not fired before.
|triggered only = the event [[#The Great Pyramid of Tenochtitlan|The Great Pyramid of Tenochtitlan]] − option “All our subjects must contribute to the Pyramid!”.
|option conditions=yes
|options ={{option
|trigger = Aztec has at least 2 provinces with the modifier ''“Contributing to the Great Temple”''
|option_text = Ok.
|effect = ''The great contributions we have received have resulted in an impressive addition to the Pyramid.''<br>
{{flag|Aztec}}:
*loses {{icon|adm|24px}}{{red|25}} Administrative power
*loses {{icon|dip|24px}}{{red|25}} Diplomatic power
*gains {{icon|prestige|24px}}{{green|10}} Prestige
*gains {{icon|small legitimacy|24px}}{{green|25}} Legitimacy
Mexico (852) gets the modifier ''“Great Temple of Tenochtitlan”'' for the rest of the campaign with the following effect:
*{{icon|prestige|24px}}{{green|+1}} Yearly prestige
Every Aztec province with the modifier ''“Contributing to the Great Temple”'' loses it.
}}
{{option
|trigger = Aztec has exactly 1 province with the modifier ''“Contributing to the Great Temple”''
|option_text = Ok.
|effect = ''The contributions from our provinces have paid for part of the new Pyramid.''<br>
{{flag|Aztec}}:
*loses {{icon|adm|24px}}{{red|35}} Administrative power
*loses {{icon|dip|24px}}{{red|35}} Diplomatic power
*gains {{icon|prestige|24px}}{{green|5}} Prestige
*gains {{icon|small legitimacy|24px}}{{green|5}} Legitimacy
Mexico (852) gets the modifier ''“Great Temple of Tenochtitlan”'' for the rest of the campaign with the following effect:
*{{icon|prestige|24px}}{{green|+1}} Yearly prestige
Every Aztec province with the modifier ''“Contributing to the Great Temple”'' loses it.
}}
{{option
|trigger = Aztec does ''not'' have a province with the modifier ''“Contributing to the Great Temple”''
|option_text = Ok.
|effect = ''The Pyramid is effectively paid for by only the central government and other city states in its immediate surroundings.''<br>
{{flag|Aztec}} country:
*loses {{icon|adm|24px}}{{red|75}} Administrative power
*loses {{icon|dip|24px}}{{red|75}} Diplomatic power
Mexico (852) gets the modifier ''“Great Temple of Tenochtitlan”'' for the rest of the campaign with the following effect:
*{{icon|prestige|24px}}{{green|+1}} Yearly prestige
|end
}}
}}

will display:

id

Msg event.pngReactions to Pyramid Project


Much as we suspected not all of the cities under our control have welcomed the chance to put all of their resources at our disposal, and it seems clear that we will have to carry a larger part of the costs than we had hoped.


 
Trigger conditions

This event has not fired before.

Is triggered only by

the event The Great Pyramid of Tenochtitlan − option “All our subjects must contribute to the Pyramid!”.


Option conditions

Event trigger.pngEnabled if: Aztec has at least 2 provinces with the modifier “Contributing to the Great Temple”

Event button 547.png
Ok.

The great contributions we have received have resulted in an impressive addition to the Pyramid.
Flag of Aztec Aztec:

  • loses Administrative power.png25 Administrative power
  • loses Diplomatic power.png25 Diplomatic power
  • gains Prestige.png10 Prestige
  • gains Icon legitimacy monarchy.png25 Legitimacy

Mexico (852) gets the modifier “Great Temple of Tenochtitlan” for the rest of the campaign with the following effect:

  • Prestige.png+1 Yearly prestige

Every Aztec province with the modifier “Contributing to the Great Temple” loses it.


Event trigger.pngEnabled if: Aztec has exactly 1 province with the modifier “Contributing to the Great Temple”

Event button 547.png
Ok.

The contributions from our provinces have paid for part of the new Pyramid.
Flag of Aztec Aztec:

  • loses Administrative power.png35 Administrative power
  • loses Diplomatic power.png35 Diplomatic power
  • gains Prestige.png5 Prestige
  • gains Icon legitimacy monarchy.png5 Legitimacy

Mexico (852) gets the modifier “Great Temple of Tenochtitlan” for the rest of the campaign with the following effect:

  • Prestige.png+1 Yearly prestige

Every Aztec province with the modifier “Contributing to the Great Temple” loses it.


Event trigger.pngEnabled if: Aztec does not have a province with the modifier “Contributing to the Great Temple”

Event button 547.png
Ok.

The Pyramid is effectively paid for by only the central government and other city states in its immediate surroundings.
Flag of Aztec Aztec country:

  • loses Administrative power.png75 Administrative power
  • loses Diplomatic power.png75 Diplomatic power

Mexico (852) gets the modifier “Great Temple of Tenochtitlan” for the rest of the campaign with the following effect:

  • Prestige.png+1 Yearly prestige