Template:A8box/doc

A8Box is a first-level template of the Pro Kit Box modular system. It is the most variable of the first-level box templates and can be fully customized.

Usage
A8Box is meant to be used "on the fly" to display boxes that do not have their own predefined template yet.

Example
gives:

A8box vs. predefined templates
Instead of using A8box, it is generally recommended to create a new predefined template which can be used by other editors everywhere on. See Asphalt Wiki:New A8box for a how-to guide.

As soon as a predefined template with the name of the box exists, all data provided with A8box will be overriden.
 * This keeps the appearance of Pro Kit Boxes consistent within.
 * Furthermore, it saves edit work, as pages with A8box don't have to be re-edited after a box has got its own template.

Example:

A user added a box named "Champion Kit Box" to an article. Although the box should show the icon of the Finish Line Box and completely different text, the data of the already existing Champion Kit Box template is displayed instead. Pass-through parameters like  are left untouched because they can vary from page to page and are not part of the template itself:

Parameters
All parameters except  are optional.

Main

 * Text. The display name of the box. Unnamed parameter: no parameter name, no equal sign, just the name of the box exactly as shown in the game.
 * Required. If the box name is omitted, the template displays nothing.
 * If a predefined template with this name already exists (cf. Category:Pro kit box templates), its data overrides the A8box values and is displayed instead.


 * Text. Filename of the box image:  (no , no width or path, just the image name)
 * If omitted, a placeholder is displayed.


 * Date. Last date the official box info was checked or updated. See date for accepted formats.


 * Number. The Price of the box without currency. Leave empty for boxes without price.


 * Currency constant as listed in currency: a8tokens, a8credits, a8fusion, ...


 * Number. The number of items in the box.
 * If omitted, the price er item will not be calculated and displayed.


 * Text. Description of the box exactly as given in the game, e. g.: Grants 4 random cards!


 * Template. The drop rates of the box. For parameters, see a8boxinfo.
 * Don't change the style parameter, it is passed through.


 * Text. If there is an article about the box, provide the article name without.
 * If  is specified, but the article does not exist, a red link is displayed.


 * 1 or yes if the box cannot be obtained any more.

Championship and R&D boxes
Special event boxes do not have predefined templates. Instead, half-custom templates are used with the following additional parameters ("A8Box" can be omitted in this case, as the half-custom templates already exist):


 * Text. Only for Championship boxes which have their display name preceded by the vehicle name.
 * Only displayed if  or.
 * Example or  gives:


 * Number. R&D boxes only. Used to distinguish the different types of R&D Basic and Advanced Kit Box.
 * Only displayed if  or.
 * Example: or  gives:


 * Text. R&D boxes only. Used to provide the test numbers the box is granted for.
 * Only displayed if.
 * Example: or  gives:

Availability

 * 1 or yes for an of the availability parameters if the box can be obtained from the respective occasion.
 * Unused parameters an be deleted to keep the source code short.
 * Only displayed if  (and if , but the use of A8box for infoboxes is not recommended).
 * Activating several parameters generates a comma-separated list for.
 * Exception: The  parameter accepts free text and is passed through as-is. The text should be enclosed in brackets as it is added to the list without comma.
 * Example: gives:

Display style

 * Text (unnamed parameter). Suffix added to the box name to build plural forms.
 * Only displayed if  or omitted.
 * Example: or  gives:


 * Text. Not overwritten if predefined template exists.
 * Only displayed if  or.
 * Example: gives:
 * Number. R&D boxes only.


 * Number. R&D boxes only.

Adding future currencies
Currency can easily be expanded for currencies of other Asphalt versions or future events. For example, if an Asphalt 8 event introduces the currency "Newcoins", you can add it as follows:

Create a new color definition
Go to the Color template and add a new color definition with the same name as your new currency (a8newcoins in our example) by following the instructions in the "Adding new colors" section.

Upload a new currency icon
The filename should ideally be A8newcoins.png or something similar.

Edits in this template
Copy and insert the following line below the  comment in the template: INSERT NEW CURRENCIES BELOW THIS LINE --> | a8newcoins =


 * Name of the currency in lower case. Any upper case combinations will be detected automatically.
 * Filename of the currency icon you have uploaded.
 * Height of the currency icon. Can be left unchanged in most cases.
 * Make sure to edit only the digits between x and px.
 * Caption of the icon that is displayed if the mouse pointer moves over it.
 * Vertical alignment. Can be left unchanged in most cases.
 * Sometimes,  fits better.
 * Pagename the icon links to if clicked.
 * Usually, currencies other than Credits and Tokens don't have their own pages. In this case, the whole parameter can be omitted.

New first-level template
To make it easier for others to use the new currency, a new first-level template named "A8NewCoins" can be created by copying the following line into a new template:

US$

Users can now type  which behaves exactly like  or other currency templates.

Parameters:


 * Name of the currency. Everything else has to be left unchanged.