Difference between revisions of "Template:AR Equipment infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(Created page with "<includeonly><!-- ID provided -->{{#vardefine:ar equipment id|{{{id|}}}}}<!-- Null if ID = 0 -->{{#ifeq:{{#var:ar equipment id|}}|0|{{#vardefine:ar equipment id|}}}}<!-- Looku...")
 
 
Line 5: Line 5:
-->{{#ifeq:{{#var:ar equipment id|}}|0|{{#vardefine:ar equipment id|}}}}<!--
-->{{#ifeq:{{#var:ar equipment id|}}|0|{{#vardefine:ar equipment id|}}}}<!--
Lookup against existing SMW subobjects
Lookup against existing SMW subobjects
-->{{#if:{{#var:ar equipment id|}}|| {{#vardefine:ar equipment id|{{AR Equipment name to ID|{{{jp title|}}}|mode=smw}} }} }}<!--
-->{{#if:{{#var:ar equipment id|}}|| {{#vardefine:ar equipment id|{{AR Equipment name to ID|{{{name|}}}|mode=smw}} }} }}<!--
Null if ID = 0
Null if ID = 0
-->{{#ifeq:{{#var:ar equipment id|}}|0|{{#vardefine:ar equipment id|}}}}<!--
-->{{#ifeq:{{#var:ar equipment id|}}|0|{{#vardefine:ar equipment id|}}}}<!--
Lookup against the Housamo MediaWiki extension (lately ineffective)
Lookup against the Housamo MediaWiki extension (lately ineffective)
-->{{#if:{{#var:ar equipment id|}}|| {{#vardefine:ar equipment id|{{AR Equipment name to ID|{{{jp title|}}}|mode=ext}} }} }}<!--
-->{{#if:{{#var:ar equipment id|}}|| {{#vardefine:ar equipment id|{{AR Equipment name to ID|{{{name|}}}|mode=ext}} }} }}<!--
Null if ID = 0
Null if ID = 0
-->{{#ifeq:{{#var:ar equipment id|}}|0|{{#vardefine:ar equipment id|}}}}<!--
-->{{#ifeq:{{#var:ar equipment id|}}|0|{{#vardefine:ar equipment id|}}}}<!--
Line 18: Line 18:
#if:{{{en note|}}}|{{#vardefine:ar equipment jp en note|{{{en note||}}}}}}}{{
#if:{{{en note|}}}|{{#vardefine:ar equipment jp en note|{{{en note||}}}}}}}{{
#masterdata:Equip|{{#var:ar equipment id}}
#masterdata:Equip|{{#var:ar equipment id}}
}}{{#vardefine:ar equipment template options|}}|Guru mediation: error mapping Transient title "{{{name|}}}" to an ID. To avoid this error in the future, please pass an ID to the infobox template.
}}{{#vardefine:ar equipment template options|}}|Guru mediation: error mapping AR Equipment "{{{name|}}}" to an ID. To avoid this error in the future, please pass an ID to the infobox template.


{{#var:ar equipment id|}}
{{#var:ar equipment id|}}

Latest revision as of 21:23, 28 May 2019

Description

This templates is a proxy for the Template:AR Equipment extended infobox extended template to avoid manually adding internal ID's to units by matching up titles to units. If you absolutely have to create an infobox for a unit that's not in game, please use:


If a unit is in-game and the ID is unable to be found, you can simply invoke this template by:

{{AR Equipment infobox
| name = JP Name
| en name = English Name
}}

If just a Japanese name is provided (without an ID), the template will attempt to check if the name has already been defined on the wiki, then attempts to map the name string to an ID. If this fails, an error message is thrown.