Template:Event/doc

From Crusader Kings II Wiki
< Template:Event
Revision as of 20:18, 7 July 2019 by SolSys (talk | contribs) (→‎Parameter)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
This is the documentation page for Template:Event.
When it is viewed directly, links using variables may appear broken; do not replace these with hardcoded page names or URLs.


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


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
  • Event has not yet occurred.
  • The year is between 1519 and 1560.
  • owns Constantinople (151).
  • The advisor ‘Mimar Sinan’ does not exist.
Mean time to happen

1000 months


Event button.png
Appoint him royal architect
  • the modifier “Mimar Sinan” until the death of the current ruler, giving the following effect:
    • −15.0% Build cost
Event button.png
Enlist his services for a short time
  • +40 Administrative power

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


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
  • has the idea group: Aristocratic ideas.
  • has a stability of at least 0.
Is triggered only by
  • the five year pulse

Base weight: 1


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

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


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.png Enabled if: If Aztec has at least 2 provinces with the modifier “Contributing to the Great Temple”, then:

Event button.png
Ok.

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

  • loses 25 Administrative power
  • loses 25 Diplomatic power
  • gains 10 Prestige
  • gains 25 Legitimacy

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

  • +1 Yearly prestige

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


Event trigger.png Enabled if: If Aztec has exactly 1 province with the modifier “Contributing to the Great Temple”, then:

Event button.png
Ok.

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

  • loses 35 Administrative power
  • loses 35 Diplomatic power
  • gains 5 Prestige
  • gains 5 Legitimacy

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

  • +1 Yearly prestige

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


Event trigger.png Enabled if: If Aztec does not have a province with the modifier “Contributing to the Great Temple”, then:

Event button.png
Ok.

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

  • loses 75 Administrative power
  • loses 75 Diplomatic power

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

  • +1 Yearly prestige