User:Shardis/Useful Wiki Code Snippets
This page contains various bits of wiki code for editing certain types of lotro-wiki pages and categories.
These code blocks is based on:
- established boilerplates (Help and Boilerplates)
- consensus established by multiple experienced editors.
I came up with these code blocks to make sure my edits fit with other content to provide a consistent experience.
Long-term Editing
Add at top of pages that I am editing over more than brief period to try limit mixing edits. Remove if taking extended break from editing the page.
<noinclude>{{Stub/Construction|[[User talk:Shardis]]}}</noinclude>
Obsolete Pages
For pages about content that is no longer active in-game but want to keep around for various reasons. Examples include quests/deeds that might still show in quest/deed log but are no longer available for new characters. Also includes items (frequently quest rewards) that can no longer be acquired in-game. See Category talk:Obsolete for guidelines on marking a page as obsolete.
Code to add at top of page:
{{Obsolete | patchlink = <!-- Optional: Wikilink to the patch or expansion that rendered the content obsolete --> | type = <!-- Optional: Anything here will display as is, defaults to "page" if parameter is omitted. Note: "quest" or "item" or "NPC Image" affects categorization --> | see_also = <!-- Optional: Anything here will display as-is on a line just below the standard text. --> }}
Add at top of any info box on page:
| nocat = Yes
Examples currently using as part of Moria Revamp update:
- Moria revamp I - The Great Delving, The Silvertine Lodes, Durin’s Way, Zirakzigil, The Waterworks, big quest arcs (Riddles & Mirrors)
{{Obsolete|patchlink=[[Update 7: Shades of the Past - May 14, 2012|Update 7]]|type=quest|see_also=This quest is replaced by [[<new quest>]].}}
- Moria revamp II - Zelem-melek, The Redhorn Lodes, The Flaming Deeps, Nud-melek, The Dimrill Dale, The Foundations of Stone
{{Obsolete|patchlink=[[Update_9,_Against_the_Shadow_-_December_17,_2012|Update 9]]|type=quest|see_also=This quest is replaced by [[<new quest>]].}}
Disambiguation header
Pages which would have the same name need disambiguation so you can find the page you actually want. See Template:Other for full details.
- Each of the pages should be renamed with disambiguation detail in parenthesis after the name.
- Next the guideline here is:
- for 3 or fewer pages, use disambiguation header at the top of each page to crosslink to the other pages
- for 4 or more pages, create a disambiguation page that links to each of the specialized pages
For the disambiguation header, use the following (drop any parameters don't need):
{{Other|<brief text for current page>|<brief text for 2nd page>|<name of 2nd page>|<brief text for 3rd page>|<name of 3rd page>}}
Quest Item pages
This boilerplate is a stripped down version of the Item boilerplate for quest items and quest starter items. If desired, can still use the larger Item boilerplate instead. The icon field can be blank (especially for landscape items that you cant pick up) or icon image. If icon image, it should be generic icon if matching one exists.
See Category:Quest Item Icons for existing icons.
<onlyinclude>{{Item Tooltip | mode={{{mode|}}} | arg={{{arg|}}} | amount={{{amount|}}} | name = {{subst:PAGENAME}} | icon = blank or <generic or specific>-icon | disambigpage = {{subst:FULLPAGENAME}} | quality = | unique = | indestructible = | consumed = | bind = | barter = | first-category = Quest Items or Quest Starter Items | second-category = | third-category = | fourth-category = | fifth-category = | noeffect = | nomp = | bquest = [[Quest:<quest>|]] | flavor = }}</onlyinclude> == Quest Information == This item is involved in the following quest(s): * [Lvl] [[Quest:<quest>|]] OR This item starts the quest [Lvl] [[Quest:<quest>|]]. == Location == Can be found at [[<Location>]] in [[<Region>]]. {{Tooltip Coords|<region>|S|W}}
Category:<location> Quests pages
Use the following boilerplate for category pages listing quests that start at particular location. Intended for transclusion on the related <location> page.
Examples - Category:Amon Raith Quests, Category:Esteldín Forecourt Quests, Category:Oatbarton Quests, Category:Durin's Threshold Quests, Category:The Orc-watch Quests
== All Quests at [[<location>]] == '''All quests starting at <location>:''' <onlyinclude>===== Starting ===== * [Lvl] [[Quest:<name>|]] - ''Solo Only / Small Fellowship / Fellowship / Repeatable / Vector to [[<location> or another Category Quests page]]'' * [Lvl] [[Quest:<name>|]] - ''[[:Category:Landscape Quests|Landscape]]''</onlyinclude> <br> [[Category:<parent area> Quests]]
Category:<location> NPCs pages
Use the following boilerplate for category pages listing NPCs at particular location. Intended for transclusion on the related <location> page. If the location has relatively few NPCs, the multilpe tables can be consolidated into a single table.
Examples - Category:Adso's Camp NPCs, Category:Dolven-view NPCs, Category:Durin's Threshold NPCs
race-gender image examples - HumanM.png / HobbitM.png / ElfF.png / Dwarf.png
== All NPCs within [[<location>]] == <onlyinclude>=== Supplies & Services === {| class="altRowsMed" width="500" ! width="200" | NPC !! width="200" | Function !! Coords |- | [[File:<race-gender image>]] [[<NPC page>]] || [[<role>]] || {{Tooltip Coords|<map>|<NS>|<EW>}} |} === Others === {| class="altRowsMed" width="500" ! width="200" | NPC !! width="200" | Function !! Coords |- | [[File:<race-gender image>]] [[<NPC page>]] || ''Quest'' || {{Tooltip Coords|<map>|<NS>|<EW>}} |} </onlyinclude> <br> [[Category:<parent area> NPCs]]
Category:<area> Quests pages
Use the following boilerplate for pages listing quests within a sub-area of a map. Similar to Category:<location> Quests pages but intended for broader areas that include specific locations within with their own Quests pages and lists of quests not bound to any specific location.
Examples - Category:Greenway Quests, Category:Esteldín Quests, Category:Bullroarer's Sward Quests
{{toc-right}} == All Quests within [[<area>]] == '''All quests starting within <area>, unbound to any landmark:''' <onlyinclude>===== Starting ===== * [Lvl] [[Quest:<name>|]] - ''Solo Only / Small Fellowship / Fellowship / Repeatable / Vector to [[<location> or another Category Quests page]]'' * [Lvl] [[Quest:<name>|]] - ''[[:Category:Landscape Quests|Landscape]]''</onlyinclude> ''All quests starting at the specified locations:'' === [[location]] === {{:Category:<location> Quests}} <br> [[Category:<parent region> Quests]]
Category:<quest chain> Quests page (Moria Quest Chains)
Use the following boilerplate for Moria quest chains (though can be applied to quest chains in general). Given Turbine's shift away from traditional quest chains towards quest arcs with multiple entry points and many branching chains and optional quests, this boilerplate is intended to just list the bare minimum core quests of the chain and use the associated [[:<area> Quests]] page to show all branches/optionals.
Examples - Category:Anarchy Reigns Quests, Category:In His Memory Quests
<One of following (if needed):> * ''Prerequisites: completed the quest-chain "[[:Category:<quest chain> Quests|]]".'' * ''Prerequisites: completed quest "[[Quest:<quest>|]]".'' * ''Prerequisites: Accepted the quest [[Quest:<quest>|]] from the quest-chain "[[:Category:<quest chain> Quests|]]".'' '''<quest chain name>''' or '''unnamed quest chain''' # [lvl] [[Quest:<quest>|]] - ''Solo Only / Small Fellowship / Fellowship / Repeatable / Vector to [[<location> or another Category Quests page]]'' * ''See [[:<area> Quests]] for all optional quests that involve this quest-chain.'' <if any optional quests exist> <One or more of following (if needed):> * ''This quest-chain is prerequisite for the quest-chain "[[:Category:<quest chain> Quests|]]" <or quest "[[Quest:<quest>|]]">.'' * ''The quest "[[Quest:<quest>|]]" is prerequisite for the quest-chain "[[:Category:<quest chain> Quests|]]" <or quest "[[Quest:<quest>|]]">.'' * ''Accepting the quest "[[Quest:<quest>|]]" is prerequisite for the quest-chain "[[:Category:<quest chain> Quests|]]" <or quest "[[Quest:<quest>|]]">.'' <noinclude>[[Category:Moria Quest Chains]]</noinclude>
Moria area quest pages
The following 3 boilerplates are based on region boilerplate for older regions. For each of major areas of Moria (The Great Delving, Durin's Way, etc.), there is intended to be 3 crosslinked pages:
- wiki page showing dependency relationships between quests
- category page showing quests within a particular quest log heading
- category page showing quests broken down by geographic area and landmarks/settlements within the area
<area> Quests page
Use the following boilerplate as part of a 3-page Quests arrangement. This particular page focuses on showing the dependency relationships between quests. This code is specialized for Moria areas but can be modified for general regions as well.
Examples - The Great Delving Quests
<noinclude> [[Category:<area> Quests|*]] {{Toc-right}} ==[[<area>]]== * This page shows the dependencies between quests within <area>. * For quests which have "'''Moria: <area>'''" as their "'''''quest group'''''", see [[:Category:Moria: <area> Quests]]. * For just a listing of quests which have a '''''starting location''''' geographically within <area>, see [[:Category:<area> Quests]]. </noinclude> ===[[<landmark>]] (lvl)=== # [lvl] [[Quest:<quest>|]] - ''Solo Only / Small Fellowship / Fellowship / Repeatable / Vector to [[<location> or another Category Quests page]]'' # [lvl] [[Quest:<quest>|]] - ''[[:Category:Landscape Quests|Landscape]]''
Category:Moria: <area> Quests page
Use the following boilerplate as part of a 3-page Quests arrangement. The category is intended to match all quests that fall under a particular heading in the quest log. This code focuses on providing a category heading linking to the other 2 pages. It is specialized for Moria areas but can be modified for general regions as well.
Examples - Category:Moria: The Great Delving Quests, Category:Moria: Redhorn Lodes Quests
== [[<area>]] == * This category contains quests which have "'''Moria: <area>'''" as their "'''''quest group'''''". The quest-group is read in the [[Quest Log]]. * For a display of the dependencies between quests within <area>, see [[:<area> Quests]]. * For just a listing of quests which have a '''''starting location''''' geographically within <area>, see [[:Category:<area> Quests]]. <br> [[Category:<area> Quests|*]]
Category:<area> Quests page
Use the following boilerplate as part of a 3-page Quests arrangement. The category is intended to break quests down by geographic location rather than quest log. This code focuses on providing a category heading linking to the other 2 pages and a table of quest pages for landmarks/settlements within the area. It is specialized for Moria areas but can be modified for general regions as well.
Examples - Category:The Great Delving Quests
== [[<area>]] == * This category contains quests based on geography, which have a '''''starting location''''' within <area> broken down by [[settlement]] and [[landmark]]. * Levels indicate the main levels; class, faction, festival, and odd quests are not included. * For quests which have "'''Moria: <area>'''" as their "'''''quest group'''''", see [[:Category:Moria: <area> Quests]]. * For a display of the dependencies between quests within <area>, see [[:<area> Quests]]. See the listed sub-categories for locations, levels, and notes. See also [[:Category:Moria Quest Chains|Moria Quest Chains]]. === Quests per Area, Ordered per Level Range === {| class="altRowsMed" width="80%" ! width="200" | Area !! width="60" | Levels !! width="60" | <!-- links --> !! Notes |- | [[<landmark or settlement>]] || align="center" | <lvl - lvl> || align="center" | [[:Category:<landmark or settlement> Quests|Quests]] || <notes> |} <br> [[Category:Moria Quests|<area> Quests]] [[Category:<area>|Quests]]