No edit summary |
(Added the Documentation subpage template.) |
||
Line 1: | Line 1: | ||
<noinclude>{{Documentation subpage}}</noinclude> |
|||
{{ |
{{T|Dialogue}} facilitates the writing of dialogue in a standard format. The template can handle most standard formats of writing dialogue, and can be indented, bulleted or numbered. '''This template ''cannot'' be <code>subst:</code>'d'''. |
||
This template uses the [[w:Help:Lua|Lua templating language]], and more information can be found [[w:c:dev:Global_Lua_Modules/Dialogue|on the Global Lua Module page]]. '''For a traditional wikitext version of this template, see [[w:c:templates:Template:Dialogue/wikitext|Dialogue on Templates Wiki]]'''. |
This template uses the [[w:Help:Lua|Lua templating language]], and more information can be found [[w:c:dev:Global_Lua_Modules/Dialogue|on the Global Lua Module page]]. '''For a traditional wikitext version of this template, see [[w:c:templates:Template:Dialogue/wikitext|Dialogue on Templates Wiki]]'''. |
||
==Syntax== |
== Syntax == |
||
This is how to write the template in [[w:Help:wikitext|wikitext]] onto your article: |
This is how to write the template in [[w:Help:wikitext|wikitext]] onto your article: |
||
<pre>{{ |
<pre>{{Dialogue |
||
|short=full |
|short=full |
||
|short=full |
|short=full |
||
Line 20: | Line 21: | ||
These parameters are explained more fully below. |
These parameters are explained more fully below. |
||
==Parameters== |
== Parameters == |
||
'''Named parameters specify name shortcuts. They are all optional.''' They are placed at the top of the template call, like this: |
'''Named parameters specify name shortcuts. They are all optional.''' They are placed at the top of the template call, like this: |
||
<pre>{{ |
<pre>{{Dialogue |
||
|short=full |
|short=full |
||
|short=full |
|short=full |
||
Line 53: | Line 54: | ||
To write a dialogue description/source, use <code>cite =</code> |
To write a dialogue description/source, use <code>cite =</code> |
||
==Examples== |
== Examples == |
||
Here is an example of a full template usage: |
Here is an example of a full template usage: |
||
<pre>{{ |
<pre>{{Dialogue |
||
|harry=Harry Enfield |
|harry=Harry Enfield |
||
|bryan=Bryan Adams |
|bryan=Bryan Adams |
||
Line 74: | Line 75: | ||
The above would generate: |
The above would generate: |
||
{{Dialogue |
|||
{{dialogue |
|||
|harry=Harry Enfield |
|harry=Harry Enfield |
||
|bryan=Bryan Adams |
|bryan=Bryan Adams |
||
Line 92: | Line 93: | ||
The below code demonstrates examples of extended use: |
The below code demonstrates examples of extended use: |
||
<pre>{{ |
<pre>{{Dialogue |
||
|george=Georgie Boy |
|george=Georgie Boy |
||
|rachel=Rachel |
|rachel=Rachel |
||
Line 110: | Line 111: | ||
The above would generate: |
The above would generate: |
||
{{Dialogue |
|||
{{dialogue |
|||
|george=Georgie Boy |
|george=Georgie Boy |
||
|rachel=Rachel |
|rachel=Rachel |
||
Line 126: | Line 127: | ||
}} |
}} |
||
===Notes=== |
=== Notes === |
||
You can number, bullet or indent your dialogue: |
You can number, bullet or indent your dialogue: |
||
<pre>:{{ |
<pre>:{{Dialogue|Me|Hello|You|Howdido!}}</pre> |
||
:{{ |
:{{Dialogue|Me|Hello|You|Howdido!}} |
||
<pre>#{{ |
<pre>#{{Dialogue|Me|Hello|You|Howdido!}} |
||
#{{ |
#{{Dialogue|Them|Good afternoon|Us|What a load of rubbish!}}</pre> |
||
#{{ |
#{{Dialogue|Me|Hello|You|Howdido!}} |
||
#{{ |
#{{Dialogue|Them|Good afternoon|Us|What a load of rubbish!}} |
||
<pre>*{{ |
<pre>*{{Dialogue |
||
|angel=Fortitude |
|angel=Fortitude |
||
|angel|I am an angel!|Crowd|We don't believe you!}} |
|angel|I am an angel!|Crowd|We don't believe you!}} |
||
*{{ |
* {{Dialogue |
||
|angel=Fortitude |
|angel=Fortitude |
||
|angel|But I'm being quite serious!|Crowd|Too bad for you then!}}</pre> |
|angel|But I'm being quite serious!|Crowd|Too bad for you then!}}</pre> |
||
*{{ |
* {{Dialogue |
||
|angel=Fortitude |
|angel=Fortitude |
||
|angel|I am an angel!|Crowd|We don't believe you!}} |
|angel|I am an angel!|Crowd|We don't believe you!}} |
||
*{{ |
* {{Dialogue |
||
|angel=Fortitude |
|angel=Fortitude |
||
|angel|But I'm being quite serious!|Crowd|Too bad for you then!}} |
|angel|But I'm being quite serious!|Crowd|Too bad for you then!}} |
||
Line 156: | Line 156: | ||
You will get the odd spacing error (e.g. "Speech<code><nowiki><space></nowiki></code>") if you lay out your dialogue on multiple lines. |
You will get the odd spacing error (e.g. "Speech<code><nowiki><space></nowiki></code>") if you lay out your dialogue on multiple lines. |
||
<includeonly>[[Category:Quote templates]]</includeonly |
<includeonly>[[Category:Quote templates]]</includeonly> |
Latest revision as of 20:30, 23 August 2022

It contains usage information, categories, interlanguage links and other content that is not part of the original template page.
{{Dialogue}}
facilitates the writing of dialogue in a standard format. The template can handle most standard formats of writing dialogue, and can be indented, bulleted or numbered. This template cannot be subst:
'd.
This template uses the Lua templating language, and more information can be found on the Global Lua Module page. For a traditional wikitext version of this template, see Dialogue on Templates Wiki.
Syntax[edit source]
This is how to write the template in wikitext onto your article:
{{Dialogue |short=full |short=full |short=full ... |Character|Speech |Character|Speech |Character|Speech ... |cite = dialogue description }}
These parameters are explained more fully below.
Parameters[edit source]
Named parameters specify name shortcuts. They are all optional. They are placed at the top of the template call, like this:
{{Dialogue |short=full |short=full |short=full ...
Name shortcuts apply to your main dialogue text. If you use a shortcut specified here for a character name, then the full name will be replaced for it.
Named parameters of the form "mood1
", "mood2
", "mood3
", etc., up to "mood10
", specify moods for the corresponding line number (e.g. "mood1
" specifies line 1). They are placed in a line like this:
... |Character|Speech|mood1=angry |Character|Speech|mood2=quiet |Character|Speech|mood3=ecstatic ...
Positional parameters form the text of the dialogue (i.e. any line not containing an "=
" will be construed as part of the dialogue.
Parameter 1
(required)- Character name speaking
Parameter 2
(optional)- Line to speak
Parameter 3
(optional)- Next character
Parameter 4
(optional)- Next line
Parameter 5
(optional)- Next character
Parameter 6
(optional)- Next line
Parameter 7
(optional)- so on...
Note: if any character is called "action
" then that line will be construed as an action line. It still counts as a line nonetheless.
To write a dialogue description/source, use cite =
Examples[edit source]
Here is an example of a full template usage:
{{Dialogue |harry=Harry Enfield |bryan=Bryan Adams |harry|Hello! |mood1=happy |bryan|Oh hello there |mood2=surprised |harry|How are you? |mood3=inquisitive |bryan|Quite fine thank you. |mood4=reserved |harry|Oh that's spiffing. |mood5=spiffed |bryan|It is, isn't it?! |mood6=multo-spiffed |harry|Quite so. |mood7=bored |bryan|Well, I'm off! |mood8=joyous |harry|Ta-ta! |mood9=relieved |bryan|Au revoir! |mood10=sarcastic }}
The above would generate:
Lua error in package.lua at line 80: module 'Dev:Dialogue' not found.
The below code demonstrates examples of extended use:
{{Dialogue |george=Georgie Boy |rachel=Rachel |action|Enter: George and Rachel |george|Good morrow dearest Rachel!|mood2=happy |action|Rachel turns to see him |rachel|Oh, George, it's you! |george|... |rachel|Why won't you say anything?!|mood6=worried |action|Enter: Guards |Guards|We are announcing George's arrest! |rachel|Oh my!|mood9=horrified |action|George is dragged away. }}
The above would generate:
Lua error in package.lua at line 80: module 'Dev:Dialogue' not found.
Notes[edit source]
You can number, bullet or indent your dialogue:
:{{Dialogue|Me|Hello|You|Howdido!}}
Lua error in package.lua at line 80: module 'Dev:Dialogue' not found.
#{{Dialogue|Me|Hello|You|Howdido!}} #{{Dialogue|Them|Good afternoon|Us|What a load of rubbish!}}
Lua error in package.lua at line 80: module 'Dev:Dialogue' not found.
Lua error in package.lua at line 80: module 'Dev:Dialogue' not found.
*{{Dialogue |angel=Fortitude |angel|I am an angel!|Crowd|We don't believe you!}} * {{Dialogue |angel=Fortitude |angel|But I'm being quite serious!|Crowd|Too bad for you then!}}
Lua error in package.lua at line 80: module 'Dev:Dialogue' not found.
Lua error in package.lua at line 80: module 'Dev:Dialogue' not found.
You will get the odd spacing error (e.g. "Speech<space>
") if you lay out your dialogue on multiple lines.