Hi Gamepedia users and contributors! Please complete this survey to help us learn how to better meet your needs in the future. We have one for editors and readers. This should only take about 7 minutes!

Template:Champion data

From 100% Orange Juice Wiki
Jump to: navigation, search

This template contains various independently retrievable data items about [[{{{disp_name|{{{1}}}}}}]] in the form of parameter values of a variable template of choice, in a standardized fashion. It is a member of a family of templates, those with names starting with "Data" in Category:Champion data templates.

Template:Clr

Champion pages[edit source]

Parameters[edit source]

Parameter Value Description
1 {{{1}}} Necessary: Used for identification.
disp_name Name of the item
Only necessary if the value differs from {{{1}}}.
fullname Full name
ms Movement speed of the champion
range Attack range of the champion
as_base The shortened decimal form of base attack speed found in game
as_lvl Attack speed per level (do not include the % symbol)
dam_base Base attack damage
dam_lvl Attack damage per level
arm_base Base armor
arm_lvl Armor per level
mr_base Base magic resistance
mr_lvl Magic resistance per level
hp_base Base health
hp_lvl Health per level
mp_base Base resource bar (100 for fury, heat; 200/400 for energy)
mp_lvl Resource bar per level (0 for fury, heat, or energy)
hp5_base Base health regen per 5 seconds
hp5_lvl Health regen per 5 seconds per level
mp5_base Base resource bar regen per 5 seconds (0 for fury or heat, 50 for energy)
mp5_lvl Resource bar regen per 5 seconds per level (0 for fury, heat, or energy)
resource Content of secondary bar, usually a primary resource for abilities, but not vice versa. Also not a champion's resource, which refers to any resource (secondary, etc.). E.g. Mordekaiser has "shield" in resource bar, but his primary resource is "health".
image Champion square; ChampionSquare.png
title Champion title
herotype Official primary champion role as recommended by Riot
alttype Alternate or complementary role
rangetype Classification of autoattack range type
date Release date (YYYY-MM-DD)
patch Released with patch
changes Last changed with patch
attack Official attack rating out of 10
health Official health rating
spells Official spells rating
difficulty Official difficulty rating
ip IP cost
rp RP cost
Skill images Use ; to separate multiple values!
skill_i I Skill
skill_q Q Skill
skill_w W Skill
skill_e E Skill
skill_r R Skill

Throughout the family of templates, fixed names are used for the parameters. (The parameter names are kept short to reduce counts for the post expand include size and the template argument size in cases where these are applicable.) However, not necessarily all parameters have been given a value: some parameters may not be applicable, while for some other parameters the value may just have not been specified yet. The table shows all parameters, and for each the value, if specified.

Derived data[edit source]

Retrieval of data items[edit source]

{{data {{{1}}}|pst2|as_base}}, using parameter selection template Template:Pst2, gives the parameter as_base, etc.

For retrieval of more data items it is more efficient to prepare a template for that, to be used as follows:

{{data {{{1}}}|template name|..|..|..|..}}

so that this data template needs to be called only once.[1] The default template is Template:Champion data, producing this page.

The four parameters are optional, they are passed on to the prepared template as parameters 2-5.

A parameter being undefined or empty typically means the same, see below. {{data ..|pst2|..}} gives the empty string and the text "{{{..}}}", respectively. Therefore an application checking the parameter has to check both. Checking whether a result is equal to e.g. the text "{{{popinc}}}" cannot be done directly with #ifeq in a template which itself has also a parameter with that name, because if that is defined, there would be a comparison with the value instead of the text itself. Instead, it can be checked whether the first character of the result is "{", e.g.: {{#ifeq:{{padleft:|1|{{data {{{continent}}}|pst2|popinc}}}}|{|..|..}}.

Efficiency[edit source]

In this template system each template contains various properties of a single entity, as opposed to the other common system, where a template contains one property (e.g. population or area) of many entities. Although that other system can be convenient if updates of a property for all these entities become available together, in the case of large-scale use of data on one page that other system can be problematic due to its inefficiency. This is because of the following:

  • There are often more entities than properties, and page counts (or in the case of #switch, average page counts) are proportional to the number of data items in the data template (if they are stored in a linear way, not in a tree, and not stored as unnamed parameters).
  • In the case of large-scale use of data on one page there are usually one or more tables, where an entity forms a row and a property a column, because there are often more entities than properties, and because this way the sorting feature allows sorting entities based on a property. In this template system this allows producing a row with only one call of the data template, making the count not grow faster than proportional to the average number of data items stored per data template, times the number of entities in the table.

The include part of the data template of an entity does not contain a long list of its sub-entities or their properties, because that would make this method inefficient too.

  1. See the first two rows of the first table in m:Help:Array#Summary of counts for template limits.

Until here the documentation is automatically generated by Template:Champion data.

Template:Wikipedia