FANDOM


ChampionSquare

该模板将了关于 [[{{{article|{{{disp_name}}}}}}]] 的各可获取数据参数按照标准化的模板形式进行获取。其他内含“Data”字段的模板可见Category:资料模板

英雄页面

  • 页面:
    • [[{{{disp_name}}}]]
    • [[{{{1}}}/背景故事|背景故事]]
    • [[{{{1}}}/游戏技巧|游戏技巧]]
    • [[{{{1}}}/皮肤与轶事|皮肤与轶事]]
  • 分类:
    • [[:Category:{{{1}}}|英雄分类]]
    • [[:Category:{{{1}}}皮肤|皮肤]]
    • [[:Category:{{{1}}}载入画面|载入画面]]
    • [[:Category:{{{1}}}配音|配音]]
    • [[:Category:{{{1}}}技能图示|技能图示]]
    • [[:Category:{{{1}}}技能影片|技能影片]]

参数

参数名称备注
1{{{1}}} 模板后半部名称[1]
article条目名称;needs to be specified only if it differs from {{{1}}}; in applications, use [[{{{article|{{{1}}}}}}]] to link to the article (as has been done at the top of this page)
native_name英雄原始名称,建议使用英文原文
disp_name英雄名称建议使用中文
fullname全名
name英雄名称建议使用英文
ms英雄移动速度
range英雄攻击距离
attack_windup英雄攻击前摇
as_base攻击速度基础值
as_lvl每级攻击速度成长值
dam_base基础攻击力
dam_lvl每级成长攻击力
arm_base基础护甲值
arm_lvl每级成长护甲值
mr_base基础法术抗性
mr_lvl每级成长法术抗性
hp_base基础生命值
hp_lvl每级成长生命值
mp_base基础法力值、能量值、热量、怒气等
mp_lvl每级成长法力值、能量值、热量、怒气等
hp5_base基础生命回复(每5秒)
hp5_lvl成长基础回复(每5秒)
mp5_base基础法力值、能量值回复(每5秒)
mp5_lvl成长法力值、能量值回复(每5秒)
resource英雄副血条的类型(法力、能量、怒气等)
image英雄图像;ChampionSquare.png
titlechampion title
herotype官方给出的英雄主要类型
alttype官方给出的英雄次要类型
rangetype攻击距离类型(近战或远程)
date发行日期(yyyy年m月d日)
patch发行时的版本
changes上次更改版本
attack官方之物理攻击值,最大值为10
health官方之防御值,最大值为10
spells官方之技能强度值,最大值为10
difficulty官方之难度值,最大值为10
ip(由于此款游戏分为台服和国服等两服,所以此参数并无用途)
rp(由于此款游戏分为台服和国服等两服,所以此参数并无用途)
ip_tw在台服所花费的权力点
rp_tw在台服所花费的联盟币
ip_cn在国服所花费的金币
rp_cn在国服所花费的点券
skill_iPlaceholderI键技能
skill_qPlaceholderQ键技能
skill_wPlaceholderW键技能
skill_ePlaceholderE键技能
skill_rPlaceholderR键技能

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.

Deprecated

The following parameters are now deprecated on the wiki.

参数名称备注
hp1_base Base health regeneration per 1 second.
mp1_base Base resource bar regeneration per 1 second.
hp1_lvl Health regeneration per 1 second increase per level.
mp1_lvl Resource bar regeneration per 1 second increase per level

Riot provides regeneration values as per 5 seconds.

Derived data

Retrieval of data items

{{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.[2] The default template is Template:Show 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}}}}|{|..|..}}.

Creating new data templates

Template:Data/preload can be used to create new data templates. The wikitext can be copied to the new data template. For parameters which are not applicable, the parameter definition can be deleted. For parameters to be filled in later the parameter definition (specifying the empty string as value) can be left in the wikitext to be filled in later. Do not forget parameter 1.

Efficiency

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. It may seem odd, but a template cannot retrieve its own name (PAGENAME only provides this on the template page itself), and even if it could, a string operation would be needed to remove "Data ". Putting the name of the entity in the data template removes the need to supply it as a parameter when the data template is called (in the cases that it would need this name).
  2. 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.


本页面的内容引自维基百科,在知识共享许可协议下提供(检视原作者)。 Wikipedia-logo-v2-en
除了特别提示,社区内容遵循CC-BY-SA 授权许可。