Beyond the Classic Editor:Advanced Wiki Editing

Habitica's wiki is an ever-changing set of articles to help all players find updated information quickly and easily. Wiki editors have the goal of explaining and presenting information as clearly as possible. There are many tools available to wiki editors other than what's available in the classic editor, and this is a guide to provide navigation and instructions on those tools.
To talk about the tools, it is easier to present them grouped with the events for which wiki editors need to provide updated information, such as new quests, new features, Mystery Items, backgrounds, and Grand Galas.
==Spoilers==
By using many of these tools, you will be able to preview upcoming content. Beware of spoilers if you do not want the surprise of new content to be ruined for you!
Wiki editors should not add any content (articles or pictures) about upcoming features to the wiki prior to their official release in the game.
There are three main reasons for this:
*The content may change before its official release.
*Documenting new features early has in the past spoiled the surprise for readers, so we are careful to be respectful of their playing experience.
*Features may take some time to release, but coders may upload partially completed code changes for their own testing purposes.
A feature is not considered released until it appears in a Bailey announcement. For events with multiple parts (for example, The Abominable Stressbeast had several phases that were released over the course of several weeks), only reveal the publicly announced part.
==Shortcuts==
Subsequent sections give detailed information on finding code in the GitHub repository. This is a table of shortcuts to the code. Each shortcut is also available in the section in which it is explained.
The GitHub links below are all for the release branch, because it is more closely tied to available website content than the develop branch is. However, the release branch should only be used to get information - pull requests and other programming activities should always go through the develop branch.
Quest Text 	Quest Rewards 	Quest Pictures
Grand Galas Gear Text 	NPC Images (Including Gala) 	Hatching Potion Images (Including Magic)
Event Gear Pictures (Including Mystery Items)	Enchanted Armoire Gear Pictures 	
Backgrounds 	Images from Bailey Announcements	All Text/Descriptions
Pull Requests 	Commits 	Issues
Animated Images 	 	
==General Notes==
===Broad v. Slim Armor===
There are two versions of armor: broad (e.g., broad_armor_special_spring2015Healer.png) and slim (e.g., slim_armor_special_spring2015Healer.png). Only the broad version needs to be uploaded to the wiki (the Equipment Table Creator uses the broad version, and the two versions are similar enough that they don't need to both be uploaded).
===Special Pages===
The list of special pages is an invaluable tool that can help you with many aspects of your wiki work. If you are looking for things to improve on the wiki, or if you don't know how to go about a certain task, chances are that one of the special pages can help you. Among (many!) other things, the pages it links to can show you
*all broken redirects (Special:BrokenRedirects).
*all uncategorized files (Special:UncategorizedFiles), pages (Special:UncategorizedPages) or templates (Special:UncategorizedTemplates).
*all the pages on the Habitia wiki (Special:AllPages). This can be filtered by namespace, so you can have it list all pages in The Keep, all mainspace pages, etc.
*the category tree (Special:CategoryTree).
*the Gallery of new files (Special:NewFiles).
*the most recent changes that were made on the wiki (Special:RecentChanges).
*some Habitica wiki statistics, including the latest database dumps (Special:Statistics).
*a random page on the wiki (Special:Random; automatically opens a random page).
*the pages with the most revisions (Special:MostRevisions).
*all pages that mention a certain page (Special:WhatLinksHere; this also works for categories and templates).
===WikiBlame===
WikiBlame is a helpful tool for determining which edits contributed a certain piece of content. It is often useful for determining who made a particularly positive or perhaps low-quality contribution, to aid in sending friendly messages of appreciation or notes of advice. To use WikiBlame, simply click on "from URL" and paste the URL of the page you want to investigate into the pop-up window. If you want to write everything by hand, put "habitica" as Language, "fandom" as Project, "com" as Domain, and the page title (for example "Guidance for Scribes") as Page. For additional info, see the WikiBlame manual linked at the bottom of the page.
==Quests==
===Previewing Quests===
All new quest ideas are logged on the Quests Trello. There are columns for Equipment Quests, Pet Quests, and future quest types which are in development. Storytellers submit ideas for questlines and rewards on these Trello cards.
Additionally, the pixel art for these quests is logged on the Pixel Art Trello. Relating to quests, there are columns for Pet Quests, Boss Quests, and Promotional Art
===New Quests===
Once a quest has been finalized and is ready for implementation in the game, the quest aspects (pixel art, text, rewards) are coded into the Habitica game. All active code can be seen in the GitHub repository, develop branch. It is safe to look at the code and copy parts of it for use in wiki articles.
Remember, DO NOT DOCUMENT UNRELEASED CONTENT.  Sometimes a quest will appear in GitHub for testing purposes, but has not yet been completed or finalized; quests have been known to change between the initial testing phase and the final released version or are sometimes uploaded with incomplete graphic sets. It can also confuse people to see Wiki content describing items and quests that are not yet available.
====Finding Quest Text====
The actual text of the quest can be found starting at this path: website/common/locales/ (i.e., click the website folder, then click the common folder, then click the locales folder). Here you'll find translations for different languages. For this example, we'll choose en for English. Then choose questsContent.json. (Shortcut: Quest Text)
You can either click History to see the latest changes, or you can use the search function and enter a keyword from the quest name.
Each quest has identifiers found in the code. We'll use The Jelly Regent quest as an example with the keyword "Slime".
Wiki Term 	Code Identifier 	Example
Quest Name 	"questSlimeText" 	"The Jelly Regent"
Description 	"questSlimeNotes" 	"As you work on your tasks, you notice you are moving slower and slower. \"It's like walking through molasses,\" @Leephon grumbles. \"No, like walking through jelly!\" @starsystemic says. \"That slimy Jelly Regent has slathered his stuff all over Habitica. It's gumming up the works. Everybody is slowing down.\" You look around. The streets are slowly filling with clear, colorful ooze, and Habiticans are struggling to get anything done. As others flee the area, you grab a mop and prepare for battle!"
Boss Name 	"questSlimeBoss" 	"Jelly Regent"
On Completion	"questSlimeCompletion" 	"With a final jab, you trap the Jelly Regent in an over-sized donut, rushed in by @Overomega, @LordDarkly, and @Shaner, the quick-thinking leaders of the pastry club. As everyone is patting you on the back, you feel someone slip something into your pocket. It’s the reward for your sweet success: three Marshmallow Slime eggs."
Egg Name 	"questSlimeDropSlimeEgg"	"Marshmallow Slime (Egg)"
Unlocks 	"questSlimeUnlockText" 	"Unlocks purchasable slime eggs in the Market"
====Finding Rewards====
To find the dropped rewards for the quests, follow this path: website/common/script/content/, then choose quests.js. You can click History to see the latest changes in the code or you can search for the quest keyword. (Shortcut: Quest Rewards)
For example, for The Jelly Regent, search for the keyword slime. Under drop, we find the following pieces of information:
 items: [
 {
 type: 'eggs',
 key: 'Slime',
 text: t('questSlimeDropSlimeEgg')
 }, {
 type: 'eggs',
 key: 'Slime',
 text: t('questSlimeDropSlimeEgg')
 }, {
 type: 'eggs',
 key: 'Slime',
 text: t('questSlimeDropSlimeEgg')
 }
 ],
This indicates that three slime eggs are dropped as quest rewards.
 gp: 31,
This indicates that the quest rewards 31 GP upon completion.
 exp: 200,
This indicates that the quest rewards 200 XP upon completion.
====Finding Promotional Art====
Some of the quests have more expansive promotional art. This can be found on the Pixel Art Trello on the column "Promotional Art". Clicking the card will open the page where you can see attachments loaded. These can be downloaded to your computer, then uploaded to the wiki for use in the quest articles.
====Finding Quest Pictures====
Each quest has pixel art for the boss, quest scroll, egg or hatching potion, pets, and mounts. These can be found by going to this path: /HabitRPG/habitica-images/tree/main/quests. (Shortcut: Quest Pictures)
The boss pictures and quest scrolls can be found in the folders bosses and scrolls. Items for collection quests are found in the items folder.
The eggs, hatching potions, pets, and mounts can be found in /main/stable.
For any picture file, click it to open the picture. Then download to your computer and upload to the wiki for use in the quest articles.
====Finding Trello Cards====
If a Trello card has been archived, it is not normally visible on the Habitica Quests Trello board. Archived cards can be accessed by opening the menu in the top right band, then selecting More > Archived Items. The list can also be searched using keywords in the card's title or content to find a specific card faster.
====Assembling Mount Pictures====
Each mount is created from two images: one for the head and one for the body. Only the head is displayed in the Stable in the game to save space. The heads and bodies are joined when a mount is used in your avatar.
The naming convention for the files in GitHub indicates body or head, mount type, and color:Mount_Body_Name-Style.png and Mount_Head_Name-Style.pngFor example, Mount_Body_Octopus-Zombie.png and Mount_Head_Octopus-Zombie.png
Download both the body and the head to your computer.
To assemble the mounts for use in the wiki, use any photo editor. GIMP is a popular freeware editor. SumoPaint is another free online photo editor.
In the photo editor, use the selection to open as layers, starting with the body picture first. Then using open as layers, select the head picture. It should overlay on the body picture, leaving a transparent background.
Save or export this assembled picture as a PNG file to preserve the transparency. The file name convention to use is Mount_Octopus-Zombie.png. Note that the first punctuation mark is an underscore and the second is a hyphen - use this convention for any new files you upload.
====Checklist for New Pet and Hatching Potion Quests====
Each time a new pet or hatching potion quest is released, several wiki updates need to be made. This is a list of the edits that typically need to be made when a new pet or hatching potion quest is released:
*Image Uploads:
**Pet in all colors
**Mount in all colors (must be assembled as described above)
**Egg or Hatching Potion
**Quest scroll
**Boss
**Promotional art, if any
*Create new quest page. If the quest is a pet quest, use the Pet Quest template. The template page describes how to use the template and where to find the requisite information. There is no template for Hatching Potion quests, so for those you have to copypaste the code of the most recent Hatching Potion quest page, paste it into the newly created page, and edit all relevant information before publishing it. Tip: Click on "Show Preview" before saving your changes, that should help you catch any potential errors.
*Add new page to Index
*Add new quest info to:
**Quest Table Creator templates (follow the instructions at the top of the template pages):
***Template:Quest Table All
***Template:Quest Table Easy, Template:Quest Table Medium, or Template:Quest Table Hard
**Pets
**Mounts
**Eggs or Hatching Potions
**Boss
**Art Credits
**Script Credits
**Habitican Cameos
**Places in Habitica, if applicable
==Backgrounds==
Each month three new backgrounds are released. The background images are filed in the following path: /HabitRPG/habitica-images/tree/main/backgrounds. The background files are listed in alphabetical order with the addition dates in the far right column. (Shortcut: Background Images) (Note that this repository was created at the end of December 2021, so you will not find any earlier dates listed. However, all earlier images are still located in this repository.)
The background description text is filed in the following path: website/common/locales/en/backgrounds.json. (Shortcut: Background Text)
Make sure to update both the Backgrounds and Art Credits pages.
==Testing==
A Sandbox is a page that can be used to practice editing, to learn the formatting, and to put together drafts without necessarily publishing it to the main page. If you are someone who learns by doing, having a sandbox where you can try out code, formatting, and design can be very useful. For a step-by-step guide on creating your user sandbox, see Guidance for Scribes.
==Templates==
Templates are wiki pages that include reusable snippets of code or text. These can be inserted into any page. The benefit of templates is they only have to be edited once in order to change the wording or code on any page where they are placed.
*:Category:Templates: A list of templates in the base category.
*:Category:Habitica Templates: A list of subcategory templates that are specific to the Habitica wiki.
*General wiki templates: A list of templates that came with the wiki.
*Template Help: Basic and more advanced usage, customization, and creation of templates.
Templates are created with the preface Template: followed by the page name, for example: Template:Example. You can edit them like any normal wiki page.
They are inserted into a wiki page using beginning double brackets, the template name, then closing double brackets. {{Example}}
===Testing Templates===
To create a trial template, you can use your sandbox that was discussed earlier. Use the syntax /Sandbox/Template:Example Name and publish it.
To use the trial template in a trial wiki page in your sandbox, insert it using {{User:YourUserName/Sandbox/Template:Example Name}}
==Grand Galas==
Grand Galas are the Habitica seasonal events that happen quarterly. They typically involve special class gear and items.
===Finding Equipment Pictures===
The Grand Gala class gear pixel art can be found in the GitHub repository starting on the path: /HabitRPG/habitica-images/tree/main/gear/events. Then in one of the four season folders: /fall, /spring, /summer, or /winter. (Shortcut: Grand Galas Gear Pictures)
Each class will have up to five pieces of seasonal gear. The file names will include the identifiers for the gear, class, and year.
broad_armor_special_spring2015Healer.png 	armor, Spring 2015, Healer
headAccessory_special_spring2015Rogue.png	headaccessory, Spring 2015, Rogue
head_special_spring2015Mage.png 	head, Spring 2015, Mage
shield_special_spring2015Warrior.png 	shield, Spring 2015, Warrior
weapon_special_springHealer.png 	weapon, Spring 2015, Healer
===Finding Text===
Each piece of special class gear has a name, caption, cost, and boost to the player's stats. The name and caption can be found in the code at this path: 
habitica/website/common/locales/en/gear.json 
(Shortcut: Grand Galas Gear Text) 
Each piece of gear will have a placeholder such as armorSpecialSpring2015RogueText which is the name of the item. The placeholder such as armorSpecialSpring2015RogueNotes will be the caption.
To find the cost and stats boost, go to the path: website/common/script/content/gear/sets/special/index.js. You can use "History" to select the commit that shows the event that was added. Then you will need to search for the event and year (in a web browser it is easiest to do this using the Ctrl+F (Command+F) keyboard shortcut).
The code is grouped by gear type, then class. For instance, weapon is first in the code with the information for all four classes listed. This line:
weaponSpecialSpring2015RogueNotes', {str: 8}),
value: 80,
str: 8, 
show that the Rogue weapon gives an 8 increase to Strength and costs 80 gold.
While this line:
weaponSpecialSpring2015MageNotes', {int: 15, per: 7}),
value: 160,
int:15,
per:7, 
shows that the Mage weapon gives both an increase to Intelligence by 15 and to Perception by 7 and costs 160 gold.
Of special note is that the Mage has a two handed weapon (no shield item will be shown in the list), and the Rogue's off-hand weapon is considered a shield and may be grouped with the shields. 
===Assembling Class Gear Template===
Class gear explanatory templates are used on the Grand Galas pages to summarize the gear and its benefits. The template pages are typically named using the class gear set name and can include the class (for example: Mage Magicians Bunny or Emerald Mermages).
===NPC Images===
Starting in September 2017, NPC images except for Bailey, Justin, and Matt consist of a tiled background and top layer.
These images can be found in the appropriate gala folder at this path: habitica/website/client/src/assets/images/npc/. (Shortcut: Gala Images)
To assembe these images using Gimp 2:
* Open both the background image, and the npc image.
* On the background image, choose Filters => Map => tile.
* Set the following options:
** Unlink the sizing (Click the chain next sizes),
** Enter the width the same size as the npc image. (The easiest way to determine is to choose Filters => Map => tile on the npc image and copy the same width information across.)
** Leave Height as is.
** Create New Image ticked.
* On the Npc image select all and copy. (Ctrl-A, Ctrl-C)
* On the new tiled image, choose Edit => Paste as => New Layer. (If you paste, it will centre the image instead of aligning it left with the new background image.)
* On the new tiled image, choose Export As.
* Name the image as YYYY_GALANAME_npcimagename.png, e.g.: 2018_SpringFling_seasonal_shop_opened_npc.png
Images for Bailey and Matt can be found in: /HabitRPG/habitica-images/tree/main/npc. (Shortcut: NPC Images)
===Other Grand Gala Elements===
*Achievements: If the Grand Gala has an associated achievement, such as Agricultural Friends during Spring Fling, the achievement badges can be found in: /HabitRPG/habitica-images/tree/main/achievements (Shortcut: Achievement Images)
*Misc: If there is a special buff (such as Shiny Seed during Spring Fling) or card (such as New Year's Card), these images will be placed in: /HabitRPG/habitica-images/tree/main/misc (Shortcut: Misc Images)
*Seasonal Shop: If there are new items for sale in the Seasonal Shop, they're listed in: HabitRPG/habitica-images/tree/main/gear/events (please selecte the appropriate sub-folder like /winter) (Shortcut: Fall Festival Gear Images / Shortcut: Winter Wonderland Gear Images / Shortcut Spring Fling Gear Images / Shortcut: Summer Splash Gear Images)
*Customizations: Hair and skin customizations are stored in: /HabitRPG/habitica-images/tree/main/customize, under their appropriate folder: beards, chairs, flowers, hair, shirts, or skin. (Shortcut: Customization Images)
==Mystery Items==
Subscribers receive monthly Mystery Items. Each Mystery Item will have the month and year in its file name.
* Path: /HabitRPG/habitica-images/tree/main/gear/events (Shortcut: Mystery Items)
Sometimes there is promotional pixel art for the Mystery Items, such as an avatar wearing the gear. Each file will have the prefix "promo_mystery", followed by the month and year.
* Path: https://habitica-assets.s3.amazonaws.com/mobileApp/images/promo_mystery_YYYYMM.png (Example: )
The name and captions for the Mystery Items are found in the code. You can click History to see the latest changes in the code or you can search for "Mystery", "year", "month". For example, the Mystery Item files for April 2015 can be searched using "Mystery201504".
* Path: website/common/locales/en/gear.json (Shortcut: Mystery Item text)
==Enchanted Armoire==
New equipment is released monthly for the Enchanted Armoire. The individual images have descriptive titles (rather than dates released), so the easiest way to find the latest additions is to look at the latest commit (in the right-hand corner above the right column). (Please keep in mind that this repository was created mid-December 2021, so you will not find any earlier dates listed. However, all earlier images are still located in this repository.)
* Path: /HabitRPG/habitica-images/tree/main/gear/armoire (Shortcut: Enchanted Armoire Gear)
The Enchanted Armoire table is built using the Template:Enchanted Armoire Table Code which gives instructions on running the table creator.
==Animated Images==
Animated images, such as some of the Kickstarter rewards and Mysterious Time Travelers backgrounds are typically stored in .gif format in the following location:
* Path: habitica/website/client/src/assets/images/animated/ (Shortcut: Animated image directory)
==Features==
Since Habitica is an open source program, many programmers contribute by adding requested features and fixing bugs. They start by setting up a local install of Habitica on their computers for development and testing. Wiki editors will need to understand how the new features work so they can describe them accurately to readers.
===New Features===
When programmers are making some changes and are happy with their code so far, they will make a permanent store of those changes by creating a "commit" on their local computer. When the entire set of changes to fix a bug or build a feature has been finished (that might be one commit or many), they will submit all of the commit(s) to be reviewed in a "pull request" to GitHub. This makes the commits visible in GitHub. In theory, the names given to the commits and to the pull request should accurately describe what is in them, so you can often find a specific code change like that. For example, one of the commits might be called "feat(customize): Spring Colors" by SabreCat.
====Pull Requests====
The list of latest pull requests can be found at GitHub and clicking "Pull Requests" in the right-hand column. There should be a number indicating how many are available to view, usually around 40. All of the pull requests, their statuses, and how many comments are attached are listed. Shortcut: Pull Requests
====Commits====
The list of latest commits can be found at GitHub by clicking on "commits" towards the top of the page, below the green "Code" button. There should be a number indicating how many are available to view (around 24,000 as of September 2022).  Shortcut: Commits
The commits are grouped by date and each has a brief description. Clicking the commit will show you more information about the function of the feature (supplied by the programmer) plus which files were changed.
===Bugs===
Bugs or software glitches are also tracked in the GitHub repository. Users will open an issue by clicking "Issues" in the right-hand column. This will give a listing of open issues. A user can click the green "New Issue" button to log the software problem they encountered. The issues pages for the various clients can be found here:
* Web client issues
* Android client issues
* iOS client issues
Programmers and developers read, comment, and work on these issues.
==Finding Information for Credits==
There are several ways to find information for Art Credits, Script Credits and in-page credits.
* Where possible, the Hall of Heroes on Habitica is a great source. Note that the name used in the Hall for the work may not be exactly the same as the file name on GitHub and the Wiki, and that sometimes people share credits, so make sure you do a find on the entire page.
* The Whats New or Bailey announcement for the item will usually have a list of creators. Note that this may take some additional work to determine which person did what, but by a process of elimination, you can often work out the remaining items.
* You can often find creator information on the Habitica Trello pages for pixel art and quests. Note that the Wiki credits creators by Habitica name, not Trello name, so you may have some detective work to do here too.
==Wiki Help==
There are many ways to present useful content in the wiki and there are guides with examples to help editors.
* Help:Designing your wikia is a page listing features that would be available for our Habitica wiki. Each link gives examples for coding and usage. The forum is also a great place for asking coding questions. Knowledgeable editors will usually reply quickly with answers.
* MediaWiki offers even more extensive help. Using the Search bar can help you quickly find user examples and discussion about tools or features you're trying to find.
===Most Common Tools===
The following links are provided for the most commonly used tools. You can view the code, see examples, and copy and paste the code to add to the page you are editing.
*Tabber which is used to add multiple tabs to a section of content, which can be toggled without having to reload the page.
*Tables help organize your pages to display data, facts, and other information.
*Infoboxes are like fact sheets, or sidebars in magazine articles, designed to present a summary of the topic of the page.
*Collapsing is a feature to collapse any element and is used to help conserve space on the page or to hide spoiler content.
*Table of Contents can be displayed in many ways, depending on the page's intent.
*Redirects are used to forward the user to a new page.
===Wiki Toolbar===
If you have a wiki account, you can utilize the toolbar that is at the bottom of your screen to use shortcuts and other tools to do various functions. You can find more info on the toolbar on the Community Central Help:Toolbar page.
For a list of available toolbar tools see the Community Central page Help:Toolbar/List of available tools.
zh:超越经典编辑器：高级Wiki编辑
Category:Contributing
Category:Pages with files missing alt tags