Template:VoiceLineCite/doc: Difference between revisions

Sur (talk | contribs)
m example added that shows it works if icon doesnt exist
No edit summary
Line 2: Line 2:
This template can be used to reference in-game voice lines.
This template can be used to reference in-game voice lines.


  <nowiki>{{VoiceLineCite|1=hero_name|file=file_name.extension|transcription=transcription}}</nowiki>
  <nowiki>{{VoiceLineCite|name=hero_name|file=file_name.extension|transcription=transcription}}</nowiki>
 
There's an optional parameter to change the quote suffix and one to add extra context to the line.


==Example usages==
==Example usages==
Example:
Example:
  <nowiki>{{VoiceLineCite|1=Lash|file=Lash kill wraith 02.mp3|transcription=Back the wrong horse, Wraith. Like always.}}</nowiki>
  <nowiki>{{VoiceLineCite|name=Lash|file=Lash kill wraith 02.mp3|context=(killed Wraith)|transcription=Backed the wrong horse, Wraith. Like always.}}</nowiki>
Result:
Result:


{{VoiceLineCite|1=Lash|file=Lash kill wraith 02.mp3|transcription=Back the wrong horse, Wraith. Like always.}}
{{VoiceLineCite|name=Lash|file=Lash kill wraith 02.mp3|context=(killed Wraith)|transcription=Backed the wrong horse, Wraith. Like always.}}




Example where the png icon for Amber Hand doesn't exist:
Example where the png icon for Amber Hand doesn't exist:
  <nowiki>{{VoiceLineCite|1=Amber Hand|file=Lash kill wraith 02.mp3|transcription=Back the wrong horse, Wraith. Like always.}}</nowiki>
  <nowiki>{{VoiceLineCite|name=Amber Hand|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}</nowiki>


Result:
Result:


{{VoiceLineCite|1=Amber Hand|file=Lash kill wraith 02.mp3|transcription=Back the wrong horse, Wraith. Like always.}}
{{VoiceLineCite|name=Amber Hand|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}
 
 
Example of suffix change:
<nowiki>{{VoiceLineCite|name=Abrams|suffix='|file=Abrams select 01.mp3|transcription=Don't worry, I'm on the case.}}</nowiki>


Result:
{{VoiceLineCite|name=Abrams|suffix='|file=Abrams select 01.mp3|transcription=Don't worry, I'm on the case.}}


<templatedata>
<templatedata>
{
{
"params": {
"params": {
"hero": {
"name": {
"aliases": [
"aliases": [
"1"
"1"
],
],
"description": "The name of the hero who the voice line belongs",
            "type": "string",
"description": "The name of the character who the voice line belongs",
"required": true
"required": true
},
},
        "suffix": {
            "type": "string",
            "description": "Optional suffix change for characters whose name ends with 's'",
            "required": false
        },
"file": {
"file": {
"aliases": [
"2"
],
             "type": "string",
             "type": "string",
"description": "The name of the uploaded voice-line sound file (must include the file extension eg. .mp3)",
"description": "The name of the uploaded voice-line sound file (must include the file extension eg. .mp3)",
"required": true
"required": true
},
},
        "context": {
            "type": "string",
            "description": "Additional context to the line",
            "required": false
        },
"transcription": {
"transcription": {
"aliases": [
            "type": "string",
"3"
],
"description": "The transcription of the voice line (without quotation marks)",
"description": "The transcription of the voice line (without quotation marks)",
             "required": true
             "required": true
Line 47: Line 62:
},
},
"format": "inline",
"format": "inline",
"paramOrder": [
    "paramOrder": [
"hero",
"name",
        "suffix",
"file",
"file",
        "context",
"transcription"
"transcription"
]
]
}
}
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>