Difference between revisions of "Template:Transient infobox"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:transient id|{{{id|{{#if:{{{jp title|}}}|{{#masterdata:Card|{{{jp title|}}}|id:name.title}}|0}}}}}}}{{#ifexpr:{{#var:transient id|}}<2|{{#vardefine:transient id|}}}}{{#if:{{#var:transient id|}}|{{
<includeonly><!--
#if:{{{en title|}}}|{{#vardefine:transient en title|{{{en title|}}}}}}}{{
ID provided
-->{{#vardefine:transient id|{{{id|}}}}}<!--
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
Lookup against existing SMW subobjects
-->{{#if:{{#var:transient id|}}|| {{#vardefine:transient 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)
-->{{#if:{{#var:transient id|}}|| {{#vardefine:transient id|{{Transient title to ID|{{{jp title|}}}|mode=ext}} }} }}<!--
Null if ID = 0
-->{{#ifeq:{{#var:transient id|}}|0|{{#vardefine:transient id|}}}}<!--
Proxy through extended template
-->{{#if:{{#var:transient id|}}|{{#vardefine:transient en title|{{{en title|}}}}}{{
#if:{{{en name|}}}|{{#vardefine:transient en name|{{{en name|}}}}}}}{{
#if:{{{en name|}}}|{{#vardefine:transient en name|{{{en name|}}}}}}}{{
#if:{{{charge skill name|}}}|{{#vardefine:transient en jingi|{{{charge skill name|}}}}}}}{{
#if:{{{charge skill name|}}}|{{#vardefine:transient en jingi|{{{charge skill name|}}}}}}}{{
Line 6: Line 19:
#if:{{{artwork|}}}|{{#vardefine:transient artwork|{{{artwork|}}}}}}}{{
#if:{{{artwork|}}}|{{#vardefine:transient artwork|{{{artwork|}}}}}}}{{
#if:{{{icon|}}}|{{#vardefine:transient icon|{{{icon|}}}}}}}{{
#if:{{{icon|}}}|{{#vardefine:transient icon|{{{icon|}}}}}}}{{
#if:{{{variant|}}}|{{#vardefine:transient variant|{{{variant|}}}}}}}{{
#if:{{{acquisition|}}}|{{#vardefine:transient acquisition|{{{acquisition|}}}}}}}{{
#masterdata:Card|{{#var:transient id}}|{{#var:transient template options|no-research
#if:{{{availability|}}}|{{#vardefine:transient availability|{{{availability|}}}}}}}{{
}}}}{{#vardefine:transient template options|}}|Invalid invocation.}}</includeonly><noinclude>
#if:{{{variant|}}}|{{#vardefine:transient variant|{{{variant|}}}}}}}{{#vardefine:transient jp en research file|{{{en research file||}}}}}{{
== Description ==
#masterdata:Card|{{#var:transient id}}|{{#var:transient template options|<!--{{#if:{{{en research file|}}}||no-research=true}}-->}}
This templates is a proxy for the [[Template:Transient extended infobox]] extended template.
}}{{#vardefine:transient template options|}}|Guru mediation: error mapping Transient title "{{{jp title|}}}" to an ID. To avoid this error in the future, please pass an ID to the infobox template.


== Usage ==
{{#var:transient id|}}
<pre>{{Transient infobox
| id =
| en name =
| jp title =
| en title =
| artwork =
| icon =
| variant =
| availability =
| acquisition =
| charge skill name =
| charge skill description =
}}</pre>


=== Parameters ===
{{#var:transient tmp subobj|}}
 
}}</includeonly><noinclude>
; id : The ID of the unit. Rarely expected for use by others. Please do not pass this argument.
== Description ==
; jp title : Japanese title. Absolutely required (if id is not provided) to match in-game for the forwarding to the extended template to work.
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:
; en title: English title. Optional, but recommended to translate a title.
<pre>
; en name: English name. Optional, but recommended to translate a name.
{{#vardefine:transient en name|Gullinbursti}}
; artwork : Filename of the artwork on the wiki. Automatically adds <code>.png</code> as the file extension. Used for templates outside of the Transient's page.
{{#vardefine:transient jp name|グリンブルスティ}}
; icon : Filename of the icon on the wiki. Automatically adds <code>.png</code> as the file extension. Used for templates outside of the Transient's page.
{{#vardefine:transient element|英雄}}
; variant : Variant of the transient. Defaults to ''Standard''. Required for variants, as the extended template cannot deduce it.
{{#vardefine:transient weapon|打撃}}
; availability : Availability of the transient. See [[Property:Has availability]] for a list of allowed values. If set to ''Unobtainable'', many parameters will automatically be omitted. Required for variants, as the extended template cannot deduce it.
{{#vardefine:transient illustrator|WAKU+LW}}
; acquisition : Method of acquisition of the transient. Required for variants, as the extended template cannot deduce it.
{{#vardefine:transient voice actor|日野聡}}
; charge skill name : English name of the charge skill. Optional, as it's a value for passing an English charge skill name.
{{#vardefine:transient availability|}}
; charge skill description : English description of the charge skill. Optional, but recommended to translate a description.
{{#vardefine:transient acquisition|}}
{{#vardefine:transient artwork|}}
{{#vardefine:transient icon|}}
{{#masterdata:CardPartial|utageFilename}}
</pre>
Where either you can either specify artwork (filename on wiki) or utageFilename (asset used in-game). An icon is optional but recommended.


== Examples ==
If a unit is in-game and the ID is unable to be found, you can simply invoke this template by: <pre>
 
<pre>{{Transient infobox
| jp name = モリタカ
| en name = Moritaka
| jp title = 孝の八犬士
| en title =
| acquisition = Gacha
| artwork = Moritaka 3star full
| icon = Moritaka 01 icon
| skin artwork =
| rarity = 3
| cost = 8
| energy = 水
| weapon type = 斬撃
| hp = 403
| hp growth = 103.074
| atk = 198
| atk growth = 54.129
| base skill 1 = 獣の末裔
| base skill 2 = 切り払いの名手
| base skill 3 = 霊玉の八犬士
| base skill 4 =
| charge skill name = Frozen Ice Blade
| charge skill description = Slash Damage + Inflict Purge on Enemy
| charge skill pattern = Weapon Spread Slash
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}</pre>
{{Transient infobox
{{Transient infobox
| jp name = モリタカ
| en title =
| en name = Moritaka
| en name =
| jp title = 孝の八犬士
| charge skill name =
| en title =  
| charge skill description =
| acquisition = Gacha
| artwork =
| artwork = Moritaka 3star full
| icon =
| icon = Moritaka 01 icon
| acquisition =
| skin artwork =
| availability =
| rarity = 3
| variant =
| cost = 8
| en research file =
| energy = 水
| weapon type = 斬撃
| hp = 403
| hp growth = 103.074
| atk = 198
| atk growth = 54.129
| base skill 1 = 獣の末裔
| base skill 2 = 切り払いの名手
| base skill 3 = 霊玉の八犬士
| base skill 4 =  
| charge skill name = Frozen Ice Blade
| charge skill description = Slash Damage + Inflict Purge on Enemy
| charge skill pattern = Weapon Spread Slash
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}
}}
</pre>


<pre>{{Transient infobox
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.
| jp name = モリタカ
| en name = Moritaka
| jp title = 武士は恋を知る
| en title =
| acquisition = Valentine's Gacha
| artwork = Moritaka Valentine 5star full
| icon = Moritaka 03 icon
| skin artwork = Moritaka 2 Valentine 5star full
| rarity = 5
| cost = 24
| energy = 火
| weapon type = 斬撃
| variant = Valentine
| availability = Limited
| hp = 1599
| hp growth = 84.497
| atk = 850
| atk growth = 65.217
| base skill 1 = 恋焦がれる者
| base skill 2 = 獣の末裔
| base skill 3 = 霊玉の八犬士
| base skill 4 =
| charge skill name = Frozen Ice Blade?
| charge skill description = Magic Damage + Cast CP Up on all Nearby Allies
| charge skill pattern = Weapon Spread Magic
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}</pre>
{{Transient infobox
| jp name = モリタカ
| en name = Moritaka
| jp title = 武士は恋を知る
| en title =
| acquisition = Valentine's Gacha
| artwork = Moritaka Valentine 5star full
| icon = Moritaka 03 icon
| skin artwork = Moritaka 2 Valentine 5star full
| rarity = 5
| cost = 24
| energy = 火
| weapon type = 斬撃
| variant = Valentine
| availability = Limited
| hp = 1599
| hp growth = 84.497
| atk = 850
| atk growth = 65.217
| base skill 1 = 恋焦がれる者
| base skill 2 = 獣の末裔
| base skill 3 = 霊玉の八犬士
| base skill 4 =
| charge skill name = Frozen Ice Blade?
| charge skill description = Magic Damage + Cast CP Up on all Nearby Allies
| charge skill pattern = Weapon Spread Magic
| illustrator = 樹下次郎
| scenario writer =
| voice actor = 山口勝平
}}
 
<pre>{{Transient infobox
| jp name =
| en name = Tetsuya
| jp title =
| en title =
| acquisition = Unobtainable
| artwork = Tetsuya 3star full
| icon = Tetsuya 01 icon
| skin artwork =
| rarity =
| cost =
| energy = 冥
| weapon type = 斬撃
| availability = Unobtainable
| hp =
| hp growth =
| atk =
| atk growth =
| base skill 1 =
| base skill 2 =
| base skill 3 =
| base skill 4 =
| charge skill name =
| charge skill description =
| charge skill
| illustrator = naop
| scenario writer =
| voice actor =
}}</pre>
{{Transient infobox
| jp name =
| en name = Tetsuya
| jp title =
| en title =
| acquisition = Unobtainable
| artwork = Tetsuya 3star full
| icon = Tetsuya 01 icon
| skin artwork =
| rarity =
| cost =
| energy = 冥
| weapon type = 斬撃
| availability =
| hp =
| hp growth =
| atk =
| atk growth =
| base skill 1 =
| base skill 2 =
| base skill 3 =
| base skill 4 =
| charge skill name =
| charge skill description =
| charge skill
| illustrator = naop
| scenario writer =
| voice actor =
}}


[[Category:Infobox templates]][[Category:Subobject templates]]
[[Category:Infobox templates]][[Category:Subobject templates]][[Category:Deprecated templates]]
</noinclude>
</noinclude>

Latest revision as of 06:21, 15 October 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
| en title =
| en name =
| charge skill name =
| charge skill description =
| artwork =
| icon =
| acquisition =
| availability =
| variant =
| en research file =
}}

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.