Template talk:EventBox
From Dragon Mania Legends (DML) Wiki
The EventBox is fairly complex and is made up of over 30 parameters which become more complex over time and whose number grows. This means that reading it thoroughly might become tedious. As such, provided you do not have the patience for it, we recommend picking an appropriate event from these groups and then use it as the basis for creating a similar event. Since some parameters are not used by all events, those needed for the type of page chosen are already selected and this article can be referenced for the documentation of said parameters. |
The EventBox is a powerful template that is able to automatize a certain percentage of an event page. The more generic an event is, the larger the automatizing is. For example, in the vast majority of cases, Clan Events and Hatching Events are fully automatized (meaning that a simple placement of this template, without any additional information, is enough to generate the contents for those events). Aside from manually-written information needed to generate content, the EventBox uses other variables and templates to determine the type, color, starting date and ending date of an event.
To get a general grasp of how templates work, visit MediaWiki Templates and the Manual of Style. The EventBox is fully explained in a way that anyone, regardless of their knowledge of wiki software, will be able to use. If you want to make a suggestion or find the instructions are unclear or insufficient, feel free to contact the staff who maintain the template (namely Star Warden and Soukupmi).
Creating a template on any page is done by adding the name of the template between double braces: {{EventBox}}. If the event is 100% generic, that line is enough to generate its contents. If additional information is needed, additional parameters must be filled in.
Note that, in this article, the term "regular events" is used to represent those events that occur regularly, on a weekly basis, in which Trainers compete against other Trainers while the term "profile" is used to represent those elements that display the representative images of an event, namely Banner, Milestone, Leaderboard, Faction, Promotion and Calendar.
Parameters
Parameters are built-in segments that produce different content depending on their given value. When using any other word in the template which is not defined as a parameter on the position of a parameter, the template will simply ignore it.
To use any parameter, add it before the last double braces, making sure to add a | before each parameter. To assign a value to the parameter, add the equal sign after it and add the value after the sign. If the EventBox only needs one parameter (as is generally the case with regular events that offer Dragons as prizes) then the entire line of code will stay on the same line. If two or more parameters are needed, then the beginning, ending, and each parameter will be on a separate line. See the examples.
Note that some parameters only respond to certain values while other parameters respond to any value. "Built-in Values" represent those values to which the parameter will respond and must be manually inserted while "Default Values" represent the contents the parameter will generate if no value is attributed to it. The former will not be functional unless it is given a value, while the latter will be functional regardless if a value is given or not (unless they are overridden by other parameters).
The position of the parameters inside the template, when creating articles, must be strictly respected as per below.
special
|
The parameter completely cancels the profile of the event. Starting with the 30th of August 2018, each event now has at least one representative image, either generic or custom made, thus this parameter has fallen out of use.
specific
|
Calendar Events: This parameter responds only to the built-in value for and any other values will be ignored. When used, it will eliminate the line of text related to the VIP Status under the Notes section of the event.
generic
|
There are several generic leaderboards that are used for the vast majority of regular events. These can be found here. Some types of events have their own generic leaderboard (such as Hatching Events, Gem Spending Events and Clan Events). Other events make use, more often than not, of a particular generic leaderboard:
- VIP Events = Leaderboard 1
- Gold Collecting Events and Gold Spending Events = Leaderboard 2
- VIP Food Gathering Events = Leaderboard 3
- Hatching Events with a Dragon as the main prize = Leaderboard 4
- Feeding Events and Food Gathering Events = Leaderboard 5
The parameter responds only to the built-in values. In those cases in which the automatically assigned generic is not applicable, add one of the values to display the correct generic.
table
|
In those cases in which an event has any of the built-in generic prizes and the generic parameter is also not able to retrieve matching data, this parameter must be used to either negate the leaderboard or negate the milestone along with the leaderboard. Depending on what is excluded, the prizes must be manually added through the use of {{Milestones}}
or/and {{Leaderboard}}
. Note that milestone negation is not possible without the inclusion of the leaderboard, because the milestone is generated ahead of the leaderboard. So, even if it happens that a milestone is generic (but a leaderboard is not) both must still be negated.
The parameter responds only to the built-in values. 1 is used to negate both the milestone and the leaderboard while 2 is used only for the leaderboard.
These events have manually added milestones or/and leaderboards and thus can be used as the basis for new events:
- Dinnertime! (15/11/20), Crowded Nursery (18/02/26), Golden Opportunity (18/04/06), Golden Opportunity (18/09/21)
- Good as Gold (16/09/02), Back-2-School Rush (17/09/19), Fearsome Feasters (17/11/23)
- Golden Gatherer (17/07/28), Golden Gatherer (17/09/11), Golden Gatherer (17/09/29), Golden Gatherer (17/10/06)
- Farming Fanatic (17/10/06), Farming Fanatic (18/07/02), Farming Fanatic (18/07/23), Farming Fanatic (18/08/10)
- Clan Siege (18/12/31), The Great Dragon Race (18/11/12)
picture
|
Add the name of the image while omitting File: and its extension, which will override the profile, and add the image in place of it. Same as with specific, this parameter has fallen out of use.
banner
|
Add the name of the image while omitting File: and its extension. Same as with specific and picture, this parameter has fallen out of use.
milestone
|
Uses the same mechanics as banner, but adapted for the milestone. Has generally fallen out of use, but it can still be used when the event is presented with a non-generic milestone of an event that has already occurred in the past.
leaderboard
|
Uses the same mechanics as banner, but adapted for the leaderboard.
calendar
|
Uses the same mechanics as banner, but adapted for the calendar.
chain
|
Uses the same mechanics as banner, but adapted for the chain depiction.
faction
|
Uses the same mechanics as banner, but adapted for the faction image.
map
|
Uses the same mechanics as banner, but adapted for the map.
ad
{{Exists}}
|
Normally, {{Exists}}
checks against either the title of the page or the value of prize to retrieve a matching ad. The name of the file must either follow this pattern: File:NameEvent (yy.mm.dd) Promotion.jpg, File:Name Dragon Event.jpg or this pattern: File:Name Dragon Promotion (NameEvent).jpg. In those cases in which a pattern is not found, the advertisement must be manually inserted. Add the name of the image while omitting File: and its extension, as in Chemistry Dragon & Duskwing Dragon Promotion (Weekend Events) for example.
started
{{GetDate}}
|
The starting date is automatically generated through the use of {{GetDate}}
which extracts the date from the title of the event, thus this parameter is used to override that date. As there are few cases when date overriding is needed, the usage of this parameter is scarce.
ended
|
Normally, the ending date is automatically generated through the use of {{#time}}
and additional coding inside the template. However, this is only applicable when the event has a generic duration. A certain number of days are added to the starting date in order to retrieve the ending date. Events that have a built-in generic duration are the following:
- Solo = 10 days
- Relay = 7 days
- Clan (except the Weekend Dragon Race), Hatching, Arcade, Gem Spending = 4 days
- Feeding, Food Gathering, Gold Collecting, Gold Spending, Weekend Dragon Race = 3 days
In those cases in which the ending date is not a standard one, this parameter must be used.
duration
|
The duration is, usually, generated when it matches a generic event title or a certain type of event. The following events have a built-in generic duration:
- Solo = 10 Days (9 Days & 16 Hours before the 1st of August 2017)
- Relay = 7 Days
- Clan (except the Weekend Dragon Race), Arcade = 4 days
- Hatching, Gem Spending = 3 Days & 16 Hours
- When the ended parameter is used, the duration becomes 2 Days & 16 Hours
- Weekend Dragon Race = 3 Days
- Feeding, Food Gathering, Gold Collecting, Gold Spending = 2 Days & 16 Hours
- When the ended parameter is used, the duration becomes 3 Days & 16 Hours
In those cases for which the built-in duration does not match the real one, insert the duration using the following format: Digit(s) Days & Digit(s) Hours (as in the above examples).
type
|
Events with generic titles will have their type automatically generated. When a title is not generic, the type will have to be added in manually. All the types can be found here. Add the name of the type as it is written there.
The following are considered generic titles:
- Boss Challenge = Relay
- Crowded Nursery = Hatching
- Dinnertime! = Feeding
- Farming Fanatic = Food Gathering
- Golden Gatherer = Gold Collecting
- Golden Opportunity = Gold Spending
- Weekend Dragon Race, Clan Siege, The Great Dragon Race, Feel the Fury, Settle the Score, Winner Takes All = Clan
vip
|
While this parameter works by using any value, it will react only to the built-in value when generating the necessary images, thus the addition of |vip=VIP
will suffice. As such, the usage of VIP as the standard value is compulsory, regarding if an image is needed to be generated or not.
Since all Gem Spending Events are VIP Events, as of the 1st of September 2018 this parameter is automatically generated and no longer needs to be added.
description
|
It is used only when an event does not have a generic, built-in description. When a unique description exists, write it exactly as it is written in the game. The following events have a default generic description:
Event | Description |
---|---|
Arcade | Arcade Events are events in which participants gift various objects to their Dragons in order to move higher on the leaderboard and earn progress rewards. |
Calendar | Log in every day to get these rewards! |
Castle | Castle Events are events in which participants must open a multitude of different chests in order to advance through rooms and earn the final prize. |
Clan Siege | Clan Siege is an event in which participating Clans complete various tasks to earn Spellbooks needed for sprites. The sprites are then summoned for use, allowing the Clan Dragon to attack the opposing Clan's base. |
Chain Breeding | During the event, you can get the awesome |prize=NameDragon by using its parents in the Breeding Den!
|
Feeding | Feed your Dragons by using as much Food as you can. |
Food Gathering | Collect as much Food as you can from any source. |
Gem Spending | Spend as many Gems as you can to win awesome rewards! |
Gold Collecting | Gather as much Gold as you can from any source. All sources count, except for selling. |
Gold Spending | Spend as much Gold as you can for a chance to earn special rewards. |
Hatching | Hatch as many dragons as you can. Rarer dragons give you a higher score! |
Relay | Beat all the celestial Bosses to complete rounds! |
Solo | Solo Events are events in which participants race against the clock and complete various tasks in order to win numerous prizes. |
The Great Dragon Race Weekend Dragon Race |
The Great Dragon Race is an event in which participating Clans complete various tasks to earn items needed for dishes they then prepare and feed to the Clan Dragon, allowing it to move forward on the race track. |
element
|
Update 2.5 removed the restriction on specific Elements, allowing all Dragons to be fed, thus this parameter has fallen out of use.
prize
|
Add the name of the Dragon while omitting the additional "Dragon" from the name. This parameter is to be used only if the Dragon is the main reward of the event. In the case of regular events, it is is the prize for placing in the highest spots of the leaderboard at the end of the event. For other events it is the prize given for completing the event.
reward
|
Apart from Clan Events and the majority of Hatching Events, all other events almost always offer Dragons as their main prize. Since the prizes for Hatching Events are automatically generated, this parameter is only used when either a generic prize is not applicable or when a Dragon is not the main prize of the event (thus the prize parameter is not to be used). The parameter is also applicable to any other event that does not offer Dragons as a prize, such as the aforementioned Clan Events, to override the generic default.
dragon
|
As with prize, add the name of the Dragon while omitting the additional "Dragon" from the name. This parameter is used only with Gem Spending Events.
pieces
|
The amount of Dragon Pieces will be displayed inside the EventBox next to the icon of the main Dragon prize and an additional line of text will be displayed under the Notes section of the event. However, if a Dragon is not the main prize or if there are no pieces to collect for it, the value that needs to be added is the collective amount of matching Dragon Pieces that are given for absolutely any Dragon in that event.
mvp
|
Used only when the prize is not the generic one that belongs to the highest Clan League. When this is the case, write the number in digits, making sure to separate thousands through the use of commas.
section
|
This parameter works in conjuncture with the type parameter, thus it is able to determine the name of the sections an event uses. Add the numbers of sections in digits. It does not need to be used for Solo Events if they have 10 tiers or for Castle Events if they have 6 levels. If the tier/level count is lower or higher than that number, then the parameter must be used.
hero
|
Add the name of the Dragon while omitting the additional "Dragon" from the name.
ticket
|
Add only the last part of the ticket's name, namely the one that comes after the dash.
badge
|
Add the name of the badge while omitting the additional "Badge" from the name. The first letter of each word in the name of the badge must be capitalized.
badge2
|
Add the name of the badge while omitting the additional "Badge" from the name. The first letter of each word in the name of the badge must be capitalized.
note
|
It is usually used when the requirement for obtaining the badges is not met in one event, but rather within the course of two or more different events.
exclusive
|
Using the parameter will add a line in the EventBox, indicating the event is exclusive and it will also categorize the page under Exclusive Events. If the event is exclusive by country or by operating system, simply enclose its Wikipedia article inside the {{wp}}
template: {{wp|AddValueHere}}
. Make sure the link to its Wikipedia article is correct and it is not a redirect. If the event is exclusive to two or more groups, separate the last two with an ampersand (&) and the first with commas.
occasion
|
Using the parameter will add a line in the EventBox, indicating the occasion of the event. If the occasion has a Wikipedia article, make sure to link to it by enclosing the occasion inside the {{wp}}
template: {{wp|AddOccasionHere}}
. Make sure the link to its Wikipedia article is correct and it is not a redirect.
Try to shorten the name of the occasion if it is longer than 25 characters (including spaces), by adding a pipe after the occasion and then adding a shorter, but still intelligible name (check the third example above).
text
|
Some observations that can be made include whether this type of event took place in the game for the very first or the very last time, or if the event was not available in a particular region because of a concurrent and exclusive event for that region, or any other factual and objective notes. Make sure to follow the writing style as specified in the Manual of Style.
Examples
Note to always use the Show preview function before saving an event. You can also experiment with this template by using the powerful template-expanding function. This function also allows modification of the template on the spot in order to produce varied results. The context title can be the name of the event you want to create since the EventBox makes use of the name of the page to generate its contents.
First
For complete generic events, add {{EventBox}}
as the sole element of that article and then save the page, as in this article.
Second
For near-generic events, in which only the prize Dragon needs to be manually added in, add the |prize= parameter between the opening and the closing of the template and fill it in with the simple name of the Dragon, on a single line: {{EventBox|prize=Mentor}}
, as in this article.
Third
When more than one parameter needs to be used, add the template and each parameter on a separate line:
{{EventBox |type=Feeding |prize=Mentor }}
Fourth
Provided you have to use the reward parameter, the addition of the <center>
and <br>
tag will most likely be necessary, as in this article.
{{EventBox|reward=<center>Prize 1<br>Prize 2<br>Prize 3</center>}}
Fifth
If a Feeding Event exclusive to New Zealand, with a non-generic name, unique leaderboard and the Go Green Dragon as the main prize, is occurring in the game and it celebrates Earth Day as its special occasion, then:
{{EventBox |table=2 |type=Feeding |prize=Go Green |exclusive={{wp|New Zealanda}} |occasion={{wp|Earth Day}} }}
The generic milestone is automatically generated here, right after the EventBox, after which the leaderboard must be added in automatically, through the use of {{leaderboard}}
.
==Leaderboard Prizes== {{leaderboard |Positions; ex: 1-10 |Prizes (left empty if the main prize is a Dragon) |Positions |Prizes; ex: {{i|Gold}} 5,000,000 {{i|Food}} 200,000 {{i|Gems}} 2 |Positions |Prizes |Positions |Prizes |Positions |Prizes |Positions |Prizes |Positions |Prizes |egg=Go Green }}
Note the addition of
which is a non-breaking space used here to separate the prizes in the table so that they are easier to follow. There is no default amount of said space that must be added, simply preview and add/remove until the alignment is right. The addition of |egg=
is only used when the prize for the top positions is a Dragon. Otherwise, remove that line and insert the prize after the second | inside the template.
Sixth
A 5-day Gem Spending Event, that started on the 1st of October 2018, has a generic title, but a non-generic milestone or/and leaderboard, and has the Darkfire Dragon as the main prize and the Warden Dragon as the milestone prize.
{{EventBox |table=1 |ended=6 June 2018 |duration=5 Days |type=Gem Spending |prize=Darkfire |dragon=Warden }}
The milestone and leaderboard must be manually added here, right after the EventBox, through the use of {{milestones}}
and {{leaderboard}}
.
==Progress Rewards== {{milestones|Score; ex: 100,000|Icon of prize; ex: Gems|Amount|Score|Icon|Amount|Score|{{i|Dragon Egg|i|40}}|[[Warden Dragon|Warden Dragon]]}}
Note that this template and its parameters must all be on the same line, otherwise its formatting is broken. Also note for the last milestone, that the amount will be replaced by the name of the Dragon. If a Dragon is not the last milestone reward, add the amount instead. While for the first two milestones it is sufficient to only add in their name, the {{i}}
template must be used for the last milestone. See its usage here.
==Leaderboard Prizes== {{leaderboard |Positions | |Positions |Prizes |Positions |Prizes |Positions |Prizes |Positions |Prizes |Positions |Prizes |Positions |Prizes |egg=Darkfire }}