Status indicators
From Create Your Own Story
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.