Module:Missionreq/data
How to update this page
First off, why is this a module? This is a module because with Lua we can perform the task at hand many times more efficiently.
Getting started
So how do you update this template? First off, it's not a template. The Template:Missionreq is just going to be a wrapper template so that everything is neater. The actual code for creating the list is hosted at Module:Missionreq. You do not edit this page to add new missions. To add a new mission, you need to find Module:Missionreq/data.
Why is the mission 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 mission additions.
So how do you add a new mission? 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.
- Find Module:Missionreq/data and open the editor
- Find where to place a mission in alphabetical order (remember that articles—the, a, an—are not included for ordering, so "The Mission Name" begins with "Mission" and not "The")
Syntax
- 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)
- After the tab character, add the mission name surrounded with quote marks (") and surround that with square brackets. So if the mission was called "Galactic Treasure", we would add
["Galactic Treasure"]after the tab character. - After that mission name, add this:
= {}, - At this point, our whole line is:
-
["Galactic Treasure"] = {}, - It is important that every mission follow this format
-
- If there are no required mission for the mission you just added, then it is finished, and you can press save, but if there are, continue following these steps:
- For every mission that is required for what you are adding, edit the list (the stuff surrounded by
{}) with the mission names - Every mission 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
- Let's say the missions required are "Ship Permit" and "Travel Permit"
- Every mission 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 mission required is on to see what casing to use.
- So we want to edit
{}to include those missions. Following the instructions above, we would come out with{"Ship Permit", "Travel Permit"}- Final product is:
["Galactic Treasure"] = {"Ship Permit", "Travel Permit"},
- Final product is:
- It is extremely important to remember that you cannot use a quote mark in the mission 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 mission was called "Carter's "Greatest" Discovery", it would be included in the list as
"Carter's \"Greatest\" Discovery".
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 missions required for the missions required for the mission 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 missions that are direct requirements to the mission being added.
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 Banri in the Discord Server.
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 Banri.
--
-- Part of [[Template:Missionreq]]'s implementation
-- For information on how to update this page, please see [[Module talk:Missionreq]]
--
local missions = {
["Allegiances"] = {},
["And then there was Eris"] = {},
["The Best Listener"] = {},
["Bring on the chaos"] = {},
["Canister Run"] = {},
["Can't we all just get along?"] = {},
["Cease Fire Day"] = {},
["Codename: Blink"] = {},
["Defender of the Weak"] = {},
["Disrupted Trade Lines"] = {},
["A Display of Commitment"] = {},
["Expedited Martian Deliveries"] = {},
["Expedited Terran Deliveries"] = {},
["Exporting Stones"] = {},
["A Friendly Boost"] = {},
["For mining, of course"] = {},
["Garbage Man"] = {},
["Gas Leak"] = {},
["Hungry Juppies"] = {},
["In the Name of Peace"] = {},
["In the Service of N8"] = {},
["Increased Damage"] = {},
["Instigator"] = {},
["Intel Blitz"] = {},
["JayCo - A Brief History Part 1"] = {},
["JayCo - A Brief History Part 2"] = {"JayCo - A Brief History Part 1"},
["JayCo - A Brief History Part 3"] = {"JayCo - A Brief History Part 2"},
["JayCo - A Brief History Part 4"] = {"JayCo - A Brief History Part 3"},
["JayCo - A Brief History Part 5"] = {"JayCo - A Brief History Part 4"},
["JayCo - A Brief History Part 6"] = {"JayCo - A Brief History Part 5"},
["JayCo - A Brief History Part 7"] = {"JayCo - A Brief History Part 6"},
["JayCo - A Brief History Part 8"] = {"JayCo - A Brief History Part 7"},
["JayCo - A Brief History Part 9"] = {"JayCo - A Brief History Part 8"},
["JayCo - A Brief History Part 10"] = {"JayCo - A Brief History Part 9"},
["Jupiter Mist"] = {},
["The Jupiter Run"] = {},
["The Long Haul"] = {},
["Love is for Sissies"] = {},
["Main Drain"] = {},
["Mars Attacks"] = {},
["Mars Attacks...Again"] = {},
["Offloading Water"] = {},
["One of Nine"] = {},
["The Order of Nine"] = {},
["Parched Martians"] = {},
["Peace Day"] = {},
["Penetration Testing"] = {},
["Pesky Pirates"] = {},
["Pirate Hunter"] = {},
["Pirate Meatbags"] = {},
["Pirate Problems"] = {},
["Pirate Unrest"] = {},
["The Pirate Menace"] = {},
["Poor Infected Martians"] = {},
["Prepare for the Worst"] = {},
["A Push for Peace"] = {},
["Reckers: A Single Item"] = {},
["Reckers: An Introduction"] = {},
["Reckers: An Odd Component"] = {},
["Reckers: Making Preparations"] = {},
["Reckers: Some Assembly Required"] = {},
["Reckers: Tungsten"] = {},
["Special Delivery"] = {},
["Supplies to Eris"] = {},
["Terran Intelligence"] = {},
["Terran Interfence"] = {},
["The Terran Campaign"] = {},
["A Totally Legit Mission from Earth"] = {},
["A Totally Legit Mission from Jupiter"] = {},
["A Totally Legit Mission from Mars"] = {},
["An Unfortunate Task"] = {},
["A Virus for the Virus"] = {},
["Water to Eris"] = {},
["The Wait is Over"] = {},
}
return missions