Status indicators

From Create Your Own Story

(Difference between revisions)
(I corrected it majorly and made it much more comprehendible.)
Line 1: Line 1:
 +
The genie looks more serious, "This spell is more complicated than the others, so be ready for some slight difficulty. It always helps to have some expertise in the dark art of coding before doing this, but it isn't necessary. Do you understand?
 +
 +
You think for a second, "I guess."
 +
The genie nods. "A page with a status indicator looks very similar to any other page, but with an added line of code."  He summons an image:
The genie nods. "A page with a status indicator looks very similar to any other page, but with an added line of code."  He summons an image:
Line 42: Line 46:
<tr>
<tr>
<td bgcolor="#OOFOO" valign="top" width="8%"> Health
<td bgcolor="#OOFOO" valign="top" width="8%"> Health
-
</td><td bgcolor="#DDFDD" valign="top" width="8%"> #
+
</td><td bgcolor="#DDFDD" valign="top" width="8%"> {{{Health}}}
</td><td bgcolor="#GGFGG" valign="top" width="84%" rowspan="3"> Equipment:
</td><td bgcolor="#GGFGG" valign="top" width="84%" rowspan="3"> Equipment:
<p><i>Equipment</i>
<p><i>Equipment</i>
Line 53: Line 57:
<tr>
<tr>
<td bgcolor="#OOFOO" valign="top"> Level
<td bgcolor="#OOFOO" valign="top"> Level
-
</td><td bgcolor="#DDFDD" valign="top"> #
+
</td><td bgcolor="#DDFDD" valign="top"> {{{Level}}}
</td></tr></table>
</td></tr></table>
</nowiki>
</nowiki>
</pre>
</pre>
-
"Although this may look complicated I can show you how to manipulate the parts that really matter." The rest leave the same unless you are REALLY good at coding.
+
"Although this may look complicated, it's a lot simpler than it may seem. First, you need a foundation for the spell."
-
Use the format as above to create a new template using double braces ( { ). This is how it will look like: <pre><nowiki>{{Sample Template}}</nowiki></pre> {{Sample Template}}. Rename it and create the template page.
+
<br>To make a status indicator, you first need a template. The template allows you to copy the status indicator to all of your pages. To create a template, create a page called "Template:TemplateName", replacing TemplateName with a name of your choice. It should preferably be the name of your story. Then you need to outline the code you want to be in the template.
 +
<br>The genie sighs, "Now here is the tricky part. I have seen many a traveller come to his demise falling for this trap. But, if you follow my every word, you should be just fine. Unless you are an expert in the magic we call 'coding', then copy the example in the box above. Even if you happen to excel at this mystical madness, I would still suggest listening to what I have to say if this is your first time dealing with templates. Even I have trouble conjuring them sometimes. Oh, the stories I could tell!"
-
Use the numbers as references in these lines of code:
+
He moves closer, "Now if you want to make this spell your own, listen here." He recites a dark-sounding incantation.
-
<br><td bgcolor="#LLCLL"[1]valign="top" width="100%" colspan="3"> <b>Status</b>[2]<br><<td bgcolor="#OOFOO"[1] valign="top" width="8%"> Health[3]<br></td><td bgcolor="#DDFDD"[1] valign="top" width="8%"> # [4]<br></td><td bgcolor="#GGFGG"[1] valign="top" width="84%" rowspan="3"> Equipment:[5]<p><i>Equipment</i>[6]<br><td bgcolor="#OOFOO"[1] valign="top"> MP[7]<br></td><td bgcolor="#DDFDD"[1] valign="top"># [8]<br><td bgcolor="#OOFOO"[1] valign="top"> Level[9]<br></td><td bgcolor="#DDFDD"[1] valign="top"> #[10]
+
-
<br>
+
<br><nowiki><table width="100%"></nowiki>
-
<br>
+
<br><nowiki><tr></nowiki>
-
Notes
+
<br><nowiki><td bgcolor="#LLCLL" valign="top" width="100%" colspan="3"> <b>[1]Status</b></nowiki>
-
<br>[1] This is a color. Use the Hex triples, or values beginning with a "#" from [http://en.wikipedia.org/wiki/List_of_colors]
+
<br><nowiki></td></tr></nowiki>
-
<br>[2] This will be the title of your status bar.
+
<br><nowiki><tr></nowiki>
-
<br>[3] This will be the name of the first row.
+
<br><nowiki><td bgcolor="#OOFOO" valign="top" width="8%"> [2]Health</nowiki>
-
<br>[4] This will be the value of the first row.
+
<br><nowiki></td><td bgcolor="#DDFDD" valign="top" width="8%"> {{{Health}}}</nowiki>
-
<br>[5] This will be the name of the remainding space
+
<br><nowiki></td><td bgcolor="#GGFGG" valign="top" width="84%" rowspan="3"> [3]Equipment:</nowiki>
-
<br>[7] This will be the value of the remainding space.
+
<br><nowiki><p><i>Equipment</i></nowiki>
-
<br>[8] This will be the value of the second row.
+
<br><nowiki></p></nowiki>
-
<br>[9] This will be the name of the third row.
+
<br><nowiki></td></tr></nowiki>
-
<br>[10] This will be the value of the third row.
+
<br><nowiki><tr></nowiki>
 +
<br><nowiki><td bgcolor="#OOFOO" valign="top"> [4]MP</nowiki>
 +
<br><nowiki></td><td bgcolor="#DDFDD" valign="top"> {{{MP}}}</nowiki>
 +
<br><nowiki></td></tr></nowiki>
 +
<br><nowiki><tr></nowiki>
 +
<br><nowiki><td bgcolor="#OOFOO" valign="top"> [5]Level</nowiki>
 +
<br><nowiki></td><td bgcolor="#DDFDD" valign="top"> {{{Level}}}</nowiki>
 +
<br><nowiki></td></tr></table></nowiki>
 +
 
 +
<br>Use the numbers in square brackets in the text above to refer to the list below.
 +
 
 +
<br>1. The title of the status indicator (is generally just "status").
 +
<br>2. The heading of the first row.
 +
<br>3. The title of the textbox (this box is best used for a list of things and is generally used for an inventory, list of items, or equipment).
 +
<br>4. The heading of the second row.
 +
<br>5. The heading of the third row.
 +
 
 +
<br>Don't forget to change the text in the triple braces to match their rows. It will become very important soon. Remember - unless you know what you're doing, '''don't''' change ''anything'' that's not in the list.
 +
 
 +
<br>The genie appears relived, "Phew. The rest should be relatively easy. Now to summon your template!" He mutters a short phrase.
 +
 
 +
<br>To put your template on a page, type your template name surrounded by double braces, like this:
 +
 
 +
<nowiki>{{TemplateName}}</nowiki>
 +
 
 +
<br>"But what use is a blank status indicator?!", he adds.
 +
 
 +
<br>This is why the triple braces needed to match the stat names. Add values to your status indicator with this syntax:
 +
 
 +
<nowiki>{{Status|Equipment=''Torch, Sword''|Health=100|MP=50|Level=15}}</nowiki>
 +
 
 +
<br>It should look something like this:
 +
 
 +
<nowiki>{{TemplateName|Textbox=''Item1, Item2''|Stat1=x|Stat2=y|Stat3=z}}</nowiki>
 +
 
 +
<br>Each stat should be separated by a vertical bar. The italics aren't necessary but they do help distinguish between the headers and actual values.
<br>
<br>
<br>
<br>
-
"Ready for your next leasson?"
+
"Ready for your next lesson?"
"That's a lot to take in, but I think I get it so far," you say.
"That's a lot to take in, but I think I get it so far," you say.

Revision as of 18:19, 31 July 2022

The genie looks more serious, "This spell is more complicated than the others, so be ready for some slight difficulty. It always helps to have some expertise in the dark art of coding before doing this, but it isn't necessary. Do you understand?

You think for a second, "I guess."

The genie nods. "A page with a status indicator looks very similar to any other page, but with an added line of code." He summons an image:

Page text here


Do you:
*[[Adventure/Option 1]]
*[[Adventure/Option 2]]
*[[Adventure/Option 3]]

{{Status|Equipment=''Equipment''|Health=#|MP=#|Level=#}}


[[Category: name of story you're working on]]

"On a page, the syntax will look like this:"


Page text here


Do you:

Status
Health # Equipment:

Equipment

MP #
Level #



Category: name of story you're working on

The genie continues, "This is what a status indicator looks like without the magic."

<table width="100%">
<tr>
<td bgcolor="#LLCLL" valign="top" width="100%" colspan="3"> <b>Status</b>
</td></tr>
<tr>
<td bgcolor="#OOFOO" valign="top" width="8%"> Health
</td><td bgcolor="#DDFDD" valign="top" width="8%"> {{{Health}}}
</td><td bgcolor="#GGFGG" valign="top" width="84%" rowspan="3"> Equipment:
<p><i>Equipment</i>
</p>
</td></tr>
<tr>
<td bgcolor="#OOFOO" valign="top"> MP
</td><td bgcolor="#DDFDD" valign="top"> {{{MP}}}
</td></tr>
<tr>
<td bgcolor="#OOFOO" valign="top"> Level
</td><td bgcolor="#DDFDD" valign="top"> {{{Level}}}
</td></tr></table>

"Although this may look complicated, it's a lot simpler than it may seem. First, you need a foundation for the spell."


To make a status indicator, you first need a template. The template allows you to copy the status indicator to all of your pages. To create a template, create a page called "Template:TemplateName", replacing TemplateName with a name of your choice. It should preferably be the name of your story. Then you need to outline the code you want to be in the template.


The genie sighs, "Now here is the tricky part. I have seen many a traveller come to his demise falling for this trap. But, if you follow my every word, you should be just fine. Unless you are an expert in the magic we call 'coding', then copy the example in the box above. Even if you happen to excel at this mystical madness, I would still suggest listening to what I have to say if this is your first time dealing with templates. Even I have trouble conjuring them sometimes. Oh, the stories I could tell!"

He moves closer, "Now if you want to make this spell your own, listen here." He recites a dark-sounding incantation.


<table width="100%">
<tr>
<td bgcolor="#LLCLL" valign="top" width="100%" colspan="3"> <b>[1]Status</b>
</td></tr>
<tr>
<td bgcolor="#OOFOO" valign="top" width="8%"> [2]Health
</td><td bgcolor="#DDFDD" valign="top" width="8%"> {{{Health}}}
</td><td bgcolor="#GGFGG" valign="top" width="84%" rowspan="3"> [3]Equipment:
<p><i>Equipment</i>
</p>
</td></tr>
<tr>
<td bgcolor="#OOFOO" valign="top"> [4]MP
</td><td bgcolor="#DDFDD" valign="top"> {{{MP}}}
</td></tr>
<tr>
<td bgcolor="#OOFOO" valign="top"> [5]Level
</td><td bgcolor="#DDFDD" valign="top"> {{{Level}}}
</td></tr></table>


Use the numbers in square brackets in the text above to refer to the list below.


1. The title of the status indicator (is generally just "status").
2. The heading of the first row.
3. The title of the textbox (this box is best used for a list of things and is generally used for an inventory, list of items, or equipment).
4. The heading of the second row.
5. The heading of the third row.


Don't forget to change the text in the triple braces to match their rows. It will become very important soon. Remember - unless you know what you're doing, don't change anything that's not in the list.


The genie appears relived, "Phew. The rest should be relatively easy. Now to summon your template!" He mutters a short phrase.


To put your template on a page, type your template name surrounded by double braces, like this:

{{TemplateName}}


"But what use is a blank status indicator?!", he adds.


This is why the triple braces needed to match the stat names. Add values to your status indicator with this syntax:

{{Status|Equipment=''Torch, Sword''|Health=100|MP=50|Level=15}}


It should look something like this:

{{TemplateName|Textbox=''Item1, Item2''|Stat1=x|Stat2=y|Stat3=z}}


Each stat should be separated by a vertical bar. The italics aren't necessary but they do help distinguish between the headers and actual values.



"Ready for your next lesson?"

"That's a lot to take in, but I think I get it so far," you say.


Personal tools