Jump to content

Template:VoiceLineCite/doc: Difference between revisions

From Deadlock Wiki
Gammaton32 (talk | contribs)
No edit summary
Sur (talk | contribs)
m no_pageref_file
 
(3 intermediate revisions by one other user not shown)
Line 4: Line 4:
  <nowiki>{{VoiceLineCite|name=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.
There's an optional parameter to change the possessive suffix and one to add extra context to the line.


==Example usages==
==Example usages==
Line 20: Line 20:


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




Line 37: Line 45:
],
],
             "type": "string",
             "type": "string",
"description": "The name of the character who the voice line belongs",
"description": "The name of the character to whom the voice line belongs",
"required": true
"required": true
},
},
         "suffix": {
         "suffix": {
             "type": "string",
             "type": "string",
             "description": "Optional suffix change for characters whose name ends with 's'",
             "description": "Possessive suffix change for characters whose name ends with 's'",
             "required": false
             "required": false
         },
         },
Line 59: Line 67:
"description": "The transcription of the voice line (without quotation marks)",
"description": "The transcription of the voice line (without quotation marks)",
             "required": true
             "required": true
}
},
        "no_pageref_file": {
            "type": "string",
            "description": "Tells [[Template:PageRef]] to not use the icon file. Note that passing ''false'' does not work, the parameter must then be ommitted.",
            "required": false,
            "example": "true"
        }
},
},
"format": "inline",
"format": "inline",
Line 67: Line 81:
"file",
"file",
         "context",
         "context",
"transcription"
"transcription",
        "no_pageref_file"
]
]
}
}
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>
</templatedata><noinclude>[[Category:Template documentation]]</noinclude>

Latest revision as of 17:42, 22 December 2024

Usage[edit source]

This template can be used to reference in-game voice lines.

{{VoiceLineCite|name=hero_name|file=file_name.extension|transcription=transcription}}

There's an optional parameter to change the possessive suffix and one to add extra context to the line.

Example usages[edit source]

Example:

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

Result:

Lash's in-game voice line (killed Wraith) - "Backed the wrong horse, Wraith. Like always."


Example where the png icon for Amber Hand doesn't exist:

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

Result:

Amber Hand's in-game voice line - "Backed the wrong horse, Wraith. Like always."


This can be handled by passing the parameter no_pageref_file=true.

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

Result:

Amber Hand's in-game voice line - "Backed the wrong horse, Wraith. Like always."


Example of suffix change:

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

Result:

Abrams' in-game voice line - "Don't worry, I'm on the case."

No description.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
namename 1

The name of the character to whom the voice line belongs

Stringrequired
suffixsuffix

Possessive suffix change for characters whose name ends with 's'

Stringoptional
filefile

The name of the uploaded voice-line sound file (must include the file extension eg. .mp3)

Stringrequired
contextcontext

Additional context to the line

Stringoptional
transcriptiontranscription

The transcription of the voice line (without quotation marks)

Stringrequired
no_pageref_fileno_pageref_file

Tells [[Template:PageRef]] to not use the icon file. Note that passing ''false'' does not work, the parameter must then be ommitted.

Example
true
Stringoptional