Difference between revisions of "Template:Transient infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
Line 2: Line 2:
ID provided
ID provided
-->{{#vardefine:transient id|{{{id|}}}}}<!--
-->{{#vardefine:transient id|{{{id|}}}}}<!--
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
Lookup against existing SMW subobjects
Lookup against existing SMW subobjects
-->{{#if:{{#var:transient id|}}|| {{Transient title to ID|{{{jp title|}}}|mode=smw}} }}<!--
-->{{#if:{{#var:transient id|}}|| {{#vardefine:transsient id|{{Transient title to ID|{{{jp title|}}}|mode=smw}} }} }}<!--
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
Lookup against the Housamo MediaWiki extension (lately ineffective)
Lookup against the Housamo MediaWiki extension (lately ineffective)
-->{{#if:{{#var:transient id|}}|| {{Transient title to ID|{{{jp title|}}}|mode=ext}} }}<!--
-->{{#if:{{#var:transient id|}}|| {{#vardefine:transient id|{{Transient title to ID|{{{jp title|}}}|mode=ext}} }} }}<!--
Null if ID = 0
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--

Revision as of 23:12, 28 March 2019

Description

This templates is a proxy for the Template:Transient 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:

{{#vardefine:transient en name|Gullinbursti}}
{{#vardefine:transient jp name|グリンブルスティ}}
{{#vardefine:transient element|英雄}}
{{#vardefine:transient weapon|打撃}}
{{#vardefine:transient illustrator|WAKU+LW}}
{{#vardefine:transient voice actor|日野聡}}
{{#vardefine:transient availability|}}
{{#vardefine:transient acquisition|}}
{{#vardefine:transient artwork|}}
{{#vardefine:transient icon|}}
{{#masterdata:CardPartial|utageFilename}}

Where either you can either specify artwork (filename on wiki) or utageFilename (asset used in-game). An icon is optional but recommended.

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

{{Transient infobox
| jp title = Title
| en name = English Name
| artwork = Wiki Filename
| icon = Wiki Filename
}}

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