Template:Event/doc: Difference between revisions

From [N8]
Jump to navigation Jump to search
Created page with "<includeonly>{{template doc page transcluded}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude> <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -..."
 
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 101: Line 101:


== Examples ==
== Examples ==
=== MTTH event ===
The following code
<pre>
<pre>
{{Event
{{Event
| version = 1.6
|version = Post-launch
| event_id = anomaly.5025
|event_id = Mission.21
| event_name = Baldarak Science Academy
|event_name = Penetration Testing
| event_text = [Root.Owner.GetSpeciesNamePlural]! I have been asked to approach you on behalf of the Baldarak Science Academy. Although we Dathnak don't possess much in the way of technology, we are certainly capable of higher reasoning!<br/><br/>A few of our think tanks have spent the last several years studying theoretical physics, and we would like to share their findings. Perhaps the data will be of some use to you in the empire building activities you solids are so fond of.
|event_text = {{MissionDesc|TerranOfficer|Terran Officer: Feel like hacking our systems? What I mean is, we'd like to test the terran web's security system and we need someone to attempt to hack our systems to do so. We'll pay you for your efforts, just try not to get caught. The paperwork would be a headache. To start, see if you can falsify some trade orders.}}
| trigger =  
|trigger =  
* Country flag ''new_baldarak_settled'' is set
* Successfully hack Earth's Supply Depot.
* Country flag ''baldarak_science_academy'' is not set
|mtth    = <!-- for Mtth events -->
* Country flag ''new_baldarak_contact_lost'' is not set
|triggered only = <!-- for triggered events only -->
| mtth = * 320 months
|difficulty = * {{red|Hard}}
| immediate = * Set country flag ''baldarak_science_academy''
|shiptype = * Ship: All
| options =
|steps = * Steps: 4
{{Option
|immediate = <!-- optional for immediate effects -->
| option_text = Most kind.
|options =  
| effect = * {{reward|phy|res3}}
{{option
|option_text = Rewards
|effect = * {{green|Experience: 250 • Intel: 100 • Money: $1,500 • Reputation: 1,000}}
* {{green|Mod: Random Mod}}
}}
}}
}}
}}
</pre>
</pre>
will display:
{{Event|nocat=yes
| version = 1.6
| event_id = anomaly.5025
| event_name = Baldarak Science Academy
| event_text = [Root.Owner.GetSpeciesNamePlural]! I have been asked to approach you on behalf of the Baldarak Science Academy. Although we Dathnak don't possess much in the way of technology, we are certainly capable of higher reasoning!<br/><br/>A few of our think tanks have spent the last several years studying theoretical physics, and we would like to share their findings. Perhaps the data will be of some use to you in the empire building activities you solids are so fond of.
| trigger =
* Country flag ''new_baldarak_settled'' is set
* Country flag ''baldarak_science_academy'' is not set
* Country flag ''new_baldarak_contact_lost'' is not set
| mtth = * 320 months
| immediate = * Set country flag ''baldarak_science_academy''
| options =
{{Option
| option_text = Most kind.
| effect = * {{reward|phy|res3}}
}}
}}
=== Triggered only event ===
The following code
<pre>
{{Event
{{Event
| version = 1.6
|version = Post-launch
| event_id = progress.2
|event_id = Mission.21
| event_name = The Discovery of Alien Life
|event_name = Penetration Testing
| event_text = The [Root.GetName] has made a startling find on [From.GetName] - the [From.GetPlanetMoon] is teeming with alien life! For the first time in history, we have encountered life forms that did not originate on [Root.Owner.Capital.GetName].<br/><br/>This amazing discovery has silenced those who believed we were alone in the universe. Although none of the alien creatures found on [From.GetName] are sentient, it is likely only a matter of time before we encounter beings that are...
|event_text = {{MissionDesc|TerranOfficer|Terran Officer: Feel like hacking our systems? What I mean is, we'd like to test the terran web's security system and we need someone to attempt to hack our systems to do so. We'll pay you for your efforts, just try not to get caught. The paperwork would be a headache. To start, see if you can falsify some trade orders.}}
| trigger =
|trigger =  
* The following country flag are ''not'' set: {{MultiColumn|
* Successfully hack Earth's Supply Depot.
** ''first_alien_life''
|mtth    = <!-- for Mtth events -->
** ''Story1''
|triggered only = <!-- for triggered events only -->
** ''Story2''
|difficulty = * {{red|Hard}}
** ''Story3''
|shiptype = * Ship: All
** ''Story4''
|steps = * Steps: 4
** ''Story5''
|immediate = <!-- optional for immediate effects -->
** ''Story6''
|options =  
** ''Story7''
{{option
** ''Story8''
|option_text = Rewards
|2}}
|effect = * {{green|Experience: 250 • Intel: 100 • Money: $1,500 • Reputation: 1,000}}
* Planet is habitable ''and'' unowned
* {{green|Mod: Random Mod}}
| triggered only = * On survey
| immediate = * Set country flag ''first_alien_life''
| options =
{{Option
| option_text = We may not be alone out here.
| effect =
* {{reward|soc|res1}}
* Get country event if planet has a {{icon|tile blocker|21px}} ''Dangerous Wildlife'' tile blocker
** {{icon|yes}} Present: [[Story events#story.3|''"Contact Report: Planetary Animalia"'']] in 30 days
** {{icon|no}} Present: [[Story events#story.1|''"Contact Report: Simple Forms of Life"'']] in 30 days
}}
}}
</pre>
will display:
 
{{Event|nocat=yes
| version = 1.6
| event_id = progress.2
| event_name = The Discovery of Alien Life
| event_text = The [Root.GetName] has made a startling find on [From.GetName] - the [From.GetPlanetMoon] is teeming with alien life! For the first time in history, we have encountered life forms that did not originate on [Root.Owner.Capital.GetName].<br/><br/>This amazing discovery has silenced those who believed we were alone in the universe. Although none of the alien creatures found on [From.GetName] are sentient, it is likely only a matter of time before we encounter beings that are...
| trigger =
* The following country flag are ''not'' set: {{MultiColumn|
** ''first_alien_life''
** ''Story1''
** ''Story2''
** ''Story3''
** ''Story4''
** ''Story5''
** ''Story6''
** ''Story7''
** ''Story8''
|2}}
* Planet is habitable ''and'' unowned
| triggered only = * On survey
| immediate = * Set country flag ''first_alien_life''
| options =
{{Option
| option_text = We may not be alone out here.
| effect =
* {{reward|soc|res1}}
* Get country event if planet has a {{icon|tile blocker|21px}} ''Dangerous Wildlife'' tile blocker
** {{icon|yes}} Present: [[Story events#story.3|''"Contact Report: Planetary Animalia"'']] in 30 days
** {{icon|no}} Present: [[Story events#story.1|''"Contact Report: Simple Forms of Life"'']] in 30 days
}}
}}
 
=== Event with conditional options and after effects ===
The following code
<pre>
{{Event
| version = 1.4
| event_id = akx.9005
| event_name = The Horizon Signal: <span style="color:orange">THE WORM</span>
| event_text = Science Officer [Root.GetLeaderName] reports that the signal was unexpectedly easy to decipher... but their team has spent considerable time confirming that it's not a hoax. It is a repeating, half-coherent message in the [Root.Owner.GetAdj] language - something like a poem. It repeats the phrases <span style="color:orange">GRAVITY IS DESIRE</span> and <span style="color:orange">TIME IS SIGHT</span>. It encodes co-ordinates near the black hole. And it ends with a dedication {{green|by name}} to the Science Officer - who adds dispassionately that they have confirmed that the signal has been radiating into interstellar space since before their birth. In fact, the signal may predate our civilization.
| triggered only = Event ''"The Horizon Signal: <span style="color:orange">GRAVITY IS DESIRE</span>"''<!-- akx.9001 --> option ''"Fascinating! Send the vessel to those co-ordinates."''
| immediate =
* Fleet is temporarily locked in place.
* Fleet leader is temporarily exiled.
| after =
* Fleet owner:
** Gain between {{icon|physics}} 600 and 3000 monthly physics research, scaled by ???
** Trigger event ''"The Horizon Signal: <span style="color: orange">REPRISE</span>"''<!-- akx.9010 --> in a random amount of time (about 320 days)
* Fleet is deleted.
| option conditions = yes
| options =
{{Option
| option_text = Darkness; light; darkness.
| trigger = the fleet's owner has {{icon|spiritualist}} Spiritualist or {{icon|fanatic spiritualist}} Fanatic Spiritualist ethics
}}
{{Option
| option_text = We learn, and we go on.
| trigger = the fleet's owner has {{icon|materialist}} Materialist or {{icon|fanatic materialist}} Fanatic Materialist ethics
}}
{{Option|end
| option_text = They won't be forgotten.
| trigger = the fleet's owner has none of these ethics
}}
}}
</pre>
 
will display:
{{Event|nocat=yes
| version = 1.4
| event_id = akx.9005
| event_name = The Horizon Signal: <span style="color:orange">THE WORM</span>
| event_text = Science Officer [Root.GetLeaderName] reports that the signal was unexpectedly easy to decipher... but their team has spent considerable time confirming that it's not a hoax. It is a repeating, half-coherent message in the [Root.Owner.GetAdj] language - something like a poem. It repeats the phrases <span style="color:orange">GRAVITY IS DESIRE</span> and <span style="color:orange">TIME IS SIGHT</span>. It encodes co-ordinates near the black hole. And it ends with a dedication {{green|by name}} to the Science Officer - who adds dispassionately that they have confirmed that the signal has been radiating into interstellar space since before their birth. In fact, the signal may predate our civilization.
| triggered only = Event ''"The Horizon Signal: <span style="color:orange">GRAVITY IS DESIRE</span>"''<!-- akx.9001 --> option ''"Fascinating! Send the vessel to those co-ordinates."''
| immediate =
* Fleet is temporarily locked in place.
* Fleet leader is temporarily exiled.
| after =
* Fleet owner:
** Gain between {{icon|physics}} 600 and 3000 monthly physics research, scaled by ???
** Trigger event ''"The Horizon Signal: <span style="color: orange">REPRISE</span>"''<!-- akx.9010 --> in a random amount of time (about 320 days)
* Fleet is deleted.
| option conditions = yes
| options =
{{Option
| option_text = Darkness; light; darkness.
| trigger = the fleet's owner has {{icon|spiritualist}} Spiritualist or {{icon|fanatic spiritualist}} Fanatic Spiritualist ethics
}}
{{Option
| option_text = We learn, and we go on.
| trigger = the fleet's owner has {{icon|materialist}} Materialist or {{icon|fanatic materialist}} Fanatic Materialist ethics
}}
{{Option|end
| option_text = They won't be forgotten.
| trigger = the fleet's owner has none of these ethics
}}
}}
}}
}}

Latest revision as of 23:57, 6 March 2020

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 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 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
after Effects that happen after selecting any option. empty optional
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

{{Event
|version = Post-launch
|event_id = Mission.21
|event_name = Penetration Testing
|event_text = {{MissionDesc|TerranOfficer|Terran Officer: Feel like hacking our systems? What I mean is, we'd like to test the terran web's security system and we need someone to attempt to hack our systems to do so. We'll pay you for your efforts, just try not to get caught. The paperwork would be a headache. To start, see if you can falsify some trade orders.}}
|trigger = 
* Successfully hack Earth's Supply Depot.
|mtth    = <!-- for Mtth events -->
|triggered only = <!-- for triggered events only -->
|difficulty = * {{red|Hard}}
|shiptype = * Ship: All
|steps = * Steps: 4
|immediate = <!-- optional for immediate effects -->
|options = 
{{option
|option_text = Rewards
|effect = * {{green|Experience: 250 • Intel: 100 • Money: $1,500 • Reputation: 1,000}}
* {{green|Mod: Random Mod}}
}}
}}
id

Penetration Testing

TerranOfficer icon
Terran Officer: Feel like hacking our systems? What I mean is, we'd like to test the terran web's security system and we need someone to attempt to hack our systems to do so. We'll pay you for your efforts, just try not to get caught. The paperwork would be a headache. To start, see if you can falsify some trade orders.

 
Conditions
  • Successfully hack Earth's Supply Depot.
Info
  • Hard
  • Ship: All
  • Steps: 4

Rewards
  • Experience: 250 • Intel: 100 • Money: $1,500 • Reputation: 1,000
  • Mod: Random Mod