Template:VoiceLineCite/doc: Difference between revisions

updated
updated with quotes link
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Usage==
==Usage==
This template can be used to reference in-game voice lines.
This template can be used to reference in-game voice lines. The template can link to either a "quotes" page or a voice line file.
 
<nowiki>{{VoiceLineCite|name=hero_name|quotes=Hero/Quotes|transcription=transcription}}</nowiki>


  <nowiki>{{VoiceLineCite|name=hero_name|file=file_name.extension|transcription=transcription}}</nowiki>
  <nowiki>{{VoiceLineCite|name=hero_name|file=file_name.extension|transcription=transcription}}</nowiki>
Line 7: Line 9:


==Example usages==
==Example usages==
Example:
Example using quotes link:
<nowiki>{{VoiceLineCite|name=Lash|quotes=Lash/Quotes#Hero-Specific Voice Lines|context=(killed Wraith)|transcription=Backed the wrong horse, Wraith. Like always.}}</nowiki>
Result:
 
{{VoiceLineCite|name=Lash|quotes=Lash/Quotes#Hero-Specific Voice Lines|context=(killed Wraith)|transcription=Backed the wrong horse, Wraith. Like always.}}
 
 
Example using file link:
  <nowiki>{{VoiceLineCite|name=Lash|file=Lash kill wraith 02.mp3|context=(killed Wraith)|transcription=Backed 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:
Line 14: Line 23:




Example where the png icon for Amber Hand doesn't exist:
To remove the icon file (note: in most common cases of pages without icons, this is already handled as exceptions by the template itself):
  <nowiki>{{VoiceLineCite|name=Amber Hand|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}</nowiki>
  <nowiki>{{VoiceLineCite|name=Lash|no_pageref_file=true|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}</nowiki>
 
Result:
 
{{VoiceLineCite|name=Lash|no_pageref_file=true|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:
Result:


{{VoiceLineCite|name=Amber Hand|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}
{{VoiceLineCite|name=Abrams|suffix='|file=Abrams select 01.mp3|transcription=Don't worry, I'm on the case.}}




This can be handled by passing the parameter ''no_pageref_file=true''.
Example of alt name:
  <nowiki>{{VoiceLineCite|name=Amber Hand|no_pageref_file=true|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}</nowiki>
  <nowiki>{{VoiceLineCite|name=Lash|alt_name=Jacob|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}</nowiki>


Result:
Result:


{{VoiceLineCite|name=Amber Hand|no_pageref_file=true||file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}
{{VoiceLineCite|name=Lash|alt_name=Jacob|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}




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


Result:
Result:


{{VoiceLineCite|name=Abrams|suffix='|file=Abrams select 01.mp3|transcription=Don't worry, I'm on the case.}}
{{VoiceLineCite|name=Lash|alt_link=Abrams|file=Lash kill wraith 02.mp3|transcription=Backed the wrong horse, Wraith. Like always.}}
 


<templatedata>
<templatedata>
Line 63: Line 81:
             "required": false
             "required": false
         },
         },
        "quotes": {
            "type": "string",
"description": "Link to a character ''quotes'' page, preferably including the section header of the relevant quote (use this or ''file'', not both)",
"required": false
},
"file": {
"file": {
             "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) (use this or ''quotes'', not both)",
"required": true
"required": false
},  
},  
         "context": {
         "context": {
Line 91: Line 114:
         "alt_link",
         "alt_link",
         "suffix",
         "suffix",
        "quotes",
"file",
"file",
         "context",
         "context",