User:KeybladeSpyMaster/Guide to Talk Bubbles: Difference between revisions

no edit summary
(Will finish later. Still, how's this so far?)
 
No edit summary
Line 74: Line 74:
}}
}}
</pre>
</pre>
Which creates:
{{TalkTextTest2
|image=Sprite_Sora_N_Wisdom.png
|imagesize=80px
|color=#06305B
|color2=#0066FF
|textcolor=#BFBFBF
|textcolor2=#000000
|line=#CC0000
|fonttype=Segoe UI
|name=KeybladeSpyMaster
|sig=I do it for my family, my home, my friends! I do it for her!
|time=''Welcome to Spy Force One.'' - {{{time}}}
|text= {{{text}}}
}}


There's a couple of things left to make it perfect. At the beginning of your template, you will have to add this exactly:
There's a couple of things left to make it perfect. At the beginning of your template, you will have to add this exactly:
Line 107: Line 124:
</pre>
</pre>


If you only want the talk bubble(s) or code, you may stop here.  
Congratulations! You have made your fist talk bubble! To use it, simply type
<pre>
{{KeybladeSpyMaster|time=~~~~~|text=<<text here>>}}
</pre>
where "<code>KeybladeSpyMaster</code>" is the name of the template (from Step 1). To print the timestamp without your username for the time parameter, type five tildes instead of four (<code><nowiki>~~~~~</nowiki></code>).


==Step 4: The Code - Additional Talk Bubbles==
==Step 4: The Code - Additional Talk Bubbles==
Suppose you want more than one talk bubble. I suggest you check out TNE's Emotion guide for more of what you might want to consider when making additional talk bubbles; however, I'll give you the basic code for making more than one. Right after the first set of closing brackets, you simply add
<pre>
|{{#if:{{{text2|}}}|{{TalkTextTest2
</pre>
followed by the rest of the code for your second talk bubble, and then close again with another set of brackets. At the very end, where the very last set of closing brackets appear, be sure there is one set of two closing brackets for each talk bubble you make. Your code now looks like this:
<pre>
<includeonly>{{#if:{{{text|}}}|{{TalkTextTest2
|image=Sprite_Sora_N_Wisdom.png
|imagesize=80px
|color=#06305B
|color2=#0066FF
|textcolor=#BFBFBF
|textcolor2=#000000
|line=#CC0000
|fonttype=Segoe UI
|name=KeybladeSpyMaster
|sig=I do it for my family, my home, my friends! I do it for her!
|time=''Welcome to Spy Force One.'' - {{{time}}}
|text= {{{text}}}
}}|{{#if:{{{text2|}}}|{{TalkTextTest2
|image=Sprite_Sora_N_Valor.png
|imagesize=80px
|color=#06305B
|color2=#BFBFBF
|textcolor=#BFBFBF
|textcolor2=#000000
|line=#CC0000
|fonttype=Segoe UI
|name=KeybladeSpyMaster
|sig=Light!
|time=''Mission Complete.'' - {{{time}}}
|text= {{{text2}}}
}}
}}}}
</includeonly>
</pre>
Notice that in the second bubble, the parameter is now "<code>text2</code>". When you want to use the second bubble, instead of <code>text=</code>, you'll have to use <code>text2=</code>, like this:
<pre>
{{KeybladeSpyMaster|time=~~~~~|text2=<<text here>>}}
</pre>
Congratulations! You now have two talk bubbles! Repeat this step for as many talk bubbles as you want! If you simply want the talk bubbles, you can stop here. In the next step, we'll go into how the code works, so you can get a handle of how wiki markup works, and how to use it elsewhere. Once you get the hang of it, it's amazing what kinds of crazy things you can do!


==Step 5: The Code - Dissecting the Code==
==Step 5: The Code - Dissecting the Code==
You do not have to keep going, if you do not want to. However, I believe that it's better when users try to not only get what they want, but understand how it works; in this case, we'll be going into what the additional code does.
I believe that it's better when users try to not only get what they want, but understand how it works; in this case, we'll be going into what the additional code does.


The first part is a simple <code><nowiki><includeonly></nowiki></code> tag. This tag makes it so that everything between the two tags (the closing tag looks like this: <code><nowiki></includeonly></nowiki></code>) only appears when you use the template, and not on the template page.
The first part is a simple <code><nowiki><includeonly></nowiki></code> tag. This tag makes it so that everything between the two tags (the closing tag looks like this: <code><nowiki></includeonly></nowiki></code>) only appears when you use the template, and not on the template page.


Next is the if statement
Next is the if statement. If-statements work like this:
<pre>
{{#if: parameter | Case A: if yes (if used), do this | Case B: if no (if not used), do this}}
</pre>
 
It basically says that if you use "<code>parameter</code>" (usually appears as <code>{{{parameter}}}</code>), in this case, {{{text}}}, then the first case <code>A:</code> appears. In the talk bubbles, to use parameter <code>{{{text}}}</code>, we type <code>|text=</code>.
 
In the talk bubbles, we added the actual code for the talk bubbles in the area for Case A, which is activated, as I mentioned earlier, when we type <code>|text=</code>.
 
In Case B, we type the next <code>{{#if:</code> statement and repeat the process. Because instead of closing the if-statement, we added another one in Case B, we have the longer line of closing brackets at the very end, to close every if-statement we opened.
 
That's it for now! If you have additional questions or concerns, to be sure to ask me or anyone else on the wiki!