Difference between revisions of "Template:VN:Dialogue"

From Tokyo Afterschool Summoners
Jump to navigation Jump to search
(Commented out subobject creation)
 
(38 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#vardefine:portrait|
<includeonly>{{#vardefine:portrait|{{#ifexist:File:{{{character}}}_{{#if:{{{variant|}}}|_{{{variant}}}_|}}expression_{{{face|neutral}}}.png
  {{#ifexist:File:{{{character}}}_{{#if:{{{variant|}}}|_{{{variant}}}_|}}expression_{{{face|neutral}}}.png
| File:{{{character}}}{{#if:{{{variant|}}}|_{{{variant}}}_|}}_expression_{{{face|neutral}}}.png|}}
  | {{{character}}}{{#if:{{{variant|}}}|_{{{variant}}}_|}}_expression_{{{face|neutral}}}.png
}}{{#vardefine:name title|{{#if:{{{character|}}}|<b>{{{character}}}</b>: |}}{{#ifeq:{{{face|neutral}}}|neutral||<i>({{{face|neutral}}} face)</i><br/>}}
  |}}
}}{{#if:{{#var:transientnumber}}|[[Category:Invalid VN Dialogue invocation]]|<!--subobjects removed because they're kinda unused {{#subobject:dialogue{{#vardefineecho:dialoguenumber|{{#expr:{{#var:dialoguenumber|-1}}+1}}}}
}}{{#vardefine:name title|
<b>{{{character}}}</b>: {{#ifeq:{{{face|neutral}}}|neutral||<i>({{{face|neutral}}} face)</i><br/>}}
}}{{#if: {{NAMESPACE}} | <!-- don't create subobj within namespace --> |
[[Category:Translation]]{{#subobject:dialogue{{#vardefineecho:dialoguenumber|{{#expr:{{#var:dialoguenumber|-1}}+1}}}}
| Has game context = Dialogue
| Has game context = Dialogue
| Has character = {{{character|}}}
| Has character = {{{character|}}}
| Has lowercase character = {{lc:{{{character|}}}}}
| Has rarity = {{{rarity|}}}
| Has rarity = {{{rarity|}}}
| Is variant = {{{variant|}}}
| Is variant = {{{variant|}}}
| Has expression = {{{face|neutral}}}
| Has expression = {{{face|neutral}}}
| Has dialogue = {{{dialogue}}}
| Has dialogue = {{{dialogue|}}}
| Has lowercase dialogue = {{lc:{{{dialogue|}}}}}
| Has portrait = {{#var:portrait}}
| Has portrait = {{#var:portrait}}
|}}}}<!-- end subobject
}}-->{{VN:Dialogue:Table|frameless={{{frameless|}}}|dialogue={{{dialogue|}}} }}[[Category:Translation]]}}</includeonly><noinclude>
-->{| class={{#if:{{{frameless|}}}||"wikitable"}} style="min-width:35em;"
{{Documentation}}</noinclude>
| {{#if:{{#var:portrait|}}|<div style="float:left;padding:10px">[[File:{{#var:portrait}}{{!}}70px]]</div>|{{#var:name title}}}}
{{{dialogue}}}
|}
 
{{#ask:[[Has game context::Transient]]
[[Has lowercase English name::{{lc:{{{character|}}}}}]]
{{#if:{{{rarity|}}}|[[Has rarity::{{{rarity}}}]]}}
{{#if:{{{variant|}}}|[[Has variant::{{{variant}}}]]}}
|?=Transient icon subobject
|?Has English name
|?Has icon
}}
</includeonly><noinclude>
== Description ==
This templates creates an infobox for VN dialogue, as well as a VN dialogue subobject using the following properties:
 
* Has character
* Is variant
* Has expression
* Has dialogue
* Has portrait
== Usage ==
<pre>{{VN:Dialogue
}}</pre>
=== Parameters ===
; character : Character speaking.
; variant : Variant (if any) of the character speaking.
; face : Expression (if any) of the character speaking.
; dialogue : What the character is speaking.
== Examples ==
<pre>{{VN:Dialogue
| character = Leib
| dialogue = Yare yare.
}}</pre>{{VN:Dialogue
| character = Leib
| dialogue = Yare yare.
}}
<pre>{{VN:Dialogue
| character = Gouryou
| dialogue = Checkmate.
}}</pre>{{VN:Dialogue
| character = Gouryou
| dialogue = Checkmate.
}}
 
[[Category:Infobox templates]][[Category:Subobject templates]]
</noinclude>

Latest revision as of 04:50, 19 November 2020

Template documentation[view] [edit] [history] [purge]

Description

This templates creates an infobox for VN dialogue, as well as a VN dialogue subobject using the following properties:

  • Has character
  • Is variant
  • Has expression
  • Has dialogue
  • Has portrait

Usage

{{VN:Dialogue
}}

Parameters

character
Character speaking.
variant
Variant (if any) of the character speaking.
face
Expression (if any) of the character speaking.
dialogue
What the character is speaking.

Examples

{{VN:Dialogue
| character = Leib
| dialogue = Yare yare.
}}
Leib expression neutral.png

Yare yare.

{{VN:Dialogue
| character = Gabriel
| face = cheerful
| dialogue = Her words shit the atmosphere in the room like magic. The earlier tension vanishes as if it was never there to begin with.
}}
Gabriel expression cheerful.png

Her words shit the atmosphere in the room like magic. The earlier tension vanishes as if it was never there to begin with.