Module:Questreq/data/doc

How to update this page
First off, why is this now a module? This is now a module because with Lua we can perform the task at hand many times more efficiently. So what's different?
 * Each quest is only listed once, unlike before where if a quest was a requirement for another quest, you would also have to add its required quests. It made the page huge and filled with redundancy.
 * Everything was done at once. This is mostly because of the above point. Now, we use recursion to list subrequirements.
 * Only 1 parameter, links are tidied automatically

Getting started
So how do you update this template? First off, it's not a template. The Template:Questreq is just going to be a wrapper template so that everything is neater. The actual code for creating the list is hosted at Module:Questreq. You do not edit this page to add new quests. To add a new quest, you need to find Module:Questreq/data.

Why is the quest list on a different page? It's cleaner. If the main module has a problem that needs editing, it'll be more helpful to have significant changes split off from quest additions.

So how do you add a new quest? This is really easy actually, though someone without coding experience might find it confusing. I'll try to dumb it down as much as possible and take it step by step.


 * 1) Find Module:Questreq/data and open the editor

Syntax

 * 1) Add a new line and start it with a tab character 	 (you can copy that blue colored character there or copy it in the editor when you're adding)
 * 2) After the tab character, add the quest name surrounded with quote marks (") and surround that with square brackets. So if the quest was called "A Strange Spaniard", we would add   after the tab character.
 * 3) After that quest name, add this:
 * 4) At this point, our whole line is:
 * It is important that every quest follow this format
 * 1) If there are no required quests or miniquests for the quest you just added, then it is finished, and you can press save, but if there are, continue following these steps:
 * 2) For every quest that is required for what you are adding, edit the list (the stuff surrounded by  ) with the quest names
 * 3) Every quest name needs to be surrounded by quote marks (") and all of this strings need to be followed by a comma  except for the last one
 * 4) * Let's say the quests required are "Assembling the Spear" and "Regicide"
 * 5) Every quest when added to the list needs to follow the exact same casing. If there are any differences, then the list will not work properly. You can check the line the quest required is on to see what casing to use.
 * 6) So we want to edit   to include those quests. Following the instructions above, we would come out with
 * 7) * Final product is:
 * 8) * It is extremely important to remember that you cannot use a quote mark in the quest name without escaping it, because the quote is the delimiter of the string. Escaping means you add a backslash (\) before the quote. So if another quest was called "A "Strange" Spaniard", it would be included in the list as.
 * 1) * It is extremely important to remember that you cannot use a quote mark in the quest name without escaping it, because the quote is the delimiter of the string. Escaping means you add a backslash (\) before the quote. So if another quest was called "A "Strange" Spaniard", it would be included in the list as.

For examples, see the code below. You could also simply copy an existing line and then modify the contents of the quotes as required.

If you're afraid of screwing up or forget what's important, here's what absolutely needs to be remembered for names:
 * Surrounded by quotes
 * Exact casing
 * Strict consistency in name
 * Commas to separate

Sub-requirements
So what do I about quests required for the quests required for the quest I just added? Nothing, you do nothing. If you entered the name correctly into the list, then it will automatically make the sublists and the subsublists. In other words, only add quests that are direct requirements to the quest being added.

Special requirements
Do we need to have "(quest)" for some pages? Yes, you should use the exact page name of the quest and be consistent. If the quest name is ambiguous with another thing (e.g. Swain's Whistle/Swain's Whistle (quest)) and there is legitimate reason for another page to be more important than the quest page, then the disambiguated name should be used. Consider beginning a discussion on the forums to determine the most important topic of that name.

Troubleshooting
What is a script error? A script error means something went wrong. If you understand Lua, you can take a chance yourself, or you can post a message to Module talk:Questreq or RTS:A/RTS:UH.

By default, you will be prevented from saving a change to these pages if your edit has a syntax error. You may need to start from scratch and follow the instructions more obediently. If you think you did as described perfectly and still can't save, then post a message to Module talk:Questreq or RTS:A/RTS:UH.

If something isn't displaying correctly, that's not good. Post a message to Module talk:Questreq or RTS:A/RTS:UH.