Template:Event/doc
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 | If multiple descriptions exist, the conditions required for the first flavor description. | empty | optional, but desired |
event_text | Ingame description text of the event. If multiple descriptions exist then the only first one. | empty | optional, but desired |
mtth | For the base weight and its modifiers of MTTH-events. | empty | One of theses two is required. |
triggered only | To specify the trigger of 'triggered only'-events. | empty | |
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 be collapsed. (Please use collapsed content on country pages.) |
empty | optional |
Usage
{{Event | version = | event_id = | event_name = | event_text = <!-- optional, but desired --> | 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.8 |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. |trigger = *Event has not yet occurred. *The year is between 1519 and 1560. *owns Constantinople (151). *The advisor ‘Mimar Sinan’ does ''not'' exist. |mtth = 1000 months |options = {{option |option_text = Appoint him royal architect |effect = *the modifier “Mimar Sinan” until the death of the current ruler, giving the following effect: ** {{green|−15.0%}} Build cost }} {{option |option_text = Enlist his services for a short time |effect = * {{green|+40}} Administrative power }} }}
will display:
Mimar Sinan's Great Constructions
![]() |
Please help with verifying or updating this infobox. It was last verified for version 1.8. |
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.
Trigger conditions
|
Mean time to happen
1000 months |
Appoint him royal architect
Enlist his services for a short time
|
Triggered only event
The following code
{{event |version = 1.8 |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 = * {{red|–1}} Stability }} }}
will display:
Loss of Stability
![]() |
Please help with verifying or updating this infobox. It was last verified for version 1.8. |
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
Base weight: 1 |
Well, they are just peasants.
|
Event with conditional options
The following code
{{Event |version = 1.13 |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 = If Aztec has at least 2 provinces with the modifier ''“Contributing to the Great Temple”'', then: |option_text = Ok. |effect = ''The great contributions we have received have resulted in an impressive addition to the Pyramid.''<br> Aztec: *loses {{red|25}} Administrative power *loses {{red|25}} Diplomatic power *gains {{green|10}} Prestige *gains {{green|25}} Legitimacy Mexico (852) gets the modifier ''“Great Temple of Tenochtitlan”'' for the rest of the campaign with the following effect: * {{green|+1}} Yearly prestige Every Aztec province with the modifier ''“Contributing to the Great Temple”'' loses it. }} {{option |trigger = If Aztec has exactly 1 province with the modifier ''“Contributing to the Great Temple”'', then: |option_text = Ok. |effect = ''The contributions from our provinces have paid for part of the new Pyramid.''<br> Aztec: *loses {{red|35}} Administrative power *loses {{red|35}} Diplomatic power *gains {{green|5}} Prestige *gains {{green|5}} Legitimacy Mexico (852) gets the modifier ''“Great Temple of Tenochtitlan”'' for the rest of the campaign with the following effect: * {{green|+1}} Yearly prestige Every Aztec province with the modifier ''“Contributing to the Great Temple”'' loses it. }} {{option |trigger = If Aztec does ''not'' have a province with the modifier ''“Contributing to the Great Temple”'', then: |option_text = Ok. |effect = ''The Pyramid is effectively paid for by only the central government and other city states in its immediate surroundings.''<br> Aztec country: *loses {{red|75}} Administrative power *loses {{red|75}} Diplomatic power Mexico (852) gets the modifier ''“Great Temple of Tenochtitlan”'' for the rest of the campaign with the following effect: * {{green|+1}} Yearly prestige |end }} }}
will display:
Reactions to Pyramid Project
![]() |
Please help with verifying or updating this infobox. It was last verified for version 1.13. |
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
Ok. The great contributions we have received have resulted in an impressive addition to the Pyramid.
Mexico (852) gets the modifier “Great Temple of Tenochtitlan” for the rest of the campaign with the following effect:
Every Aztec province with the modifier “Contributing to the Great Temple” loses it.
Ok. The contributions from our provinces have paid for part of the new Pyramid.
Mexico (852) gets the modifier “Great Temple of Tenochtitlan” for the rest of the campaign with the following effect:
Every Aztec province with the modifier “Contributing to the Great Temple” loses it.
Ok. The Pyramid is effectively paid for by only the central government and other city states in its immediate surroundings.
Mexico (852) gets the modifier “Great Temple of Tenochtitlan” for the rest of the campaign with the following effect:
|