Beyond the Classic Editor:Advanced Wiki Editing

HabitRPG'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 instruction on those tools.

To talk about the tools, it's 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, 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!  Also wiki editors should not add any content (articles or pictures) about upcoming features to the wiki prior to the official release in the game. Doing so could spoil the surprise for readers so we are careful to be respectful of their playing experience.

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 stages. 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, its aspects (pixel art, text, rewards) are coded into the HabitRPG 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.

Finding Quest Text
The actual text of the quest can be found in the `common` directory, then in the `locales` sub-directory. Here you'll find translations for different languages. For this example, we'll choose `en` for English. Then choose `content.json`

You can either click `History` to see the latest changes, or you can use the search function and enter a keyword in 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".

Finding Rewards
To find the dropped rewards for the quests, start with the `common` directory, then choose `scripts` sub-directory, and `content.coffee`. You can see the recent commits, and choose "Slime Quest". The code lines highlighted in green deal with the quest we want.

Here you can see the boss` HP and strength, the gem cost of the quest scroll, and what drops upon completion. In the section labeled `drops`, there are three sllime eggs, 31 gold, and 200 XP as rewards.

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, pets, and mounts. These can be found by starting in common > img > sprites > spritesmith.

The boss pictures and the quest scrolls can be found in the `quests` folder.

The eggs, pets, and mounts can be found in the `stable` folder.

For any picture file, click it to open the picture, Then download to your computer, then upload to the wiki for use in the quest articles.

Assembling Mount Pictures
Each mount has two parts: a head and a 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.

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.

You will need to download both the body and the head to your computer. 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.

Then you will need to save or export this assembled picture as a PNG file to preserve the transparency.

Mystery Items
Subscribers receive monthly Mystery Items. These are filed in habitrpg > common > img > sprites > spritesmith > gear .> events. Each Mystery Item will have the month and year in its file name.

To see promotional pixel art for the Mystery Items, such as an avatar wearing the gear, go to spritesmith > promo. Each file will have the prefilx `promo_mystery`, followed by the month and year.

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. Below are the steps to create your sandbox.

1. '''Go to your user page. '''You can do this by clicking on your user icon at the top right of any wiki page. You may have to click twice, if the first click opens up the menu.

2. Add /Sandbox to the end of your URL. Click on the URL box in your browser, deselect the text, and type in /Sandbox at the very end of. Go to this page.

3. Since you have not yet created your sandbox, you will have the option to do so here. Right next to the page title, click the Create button.

4. If it opens up in the visual editor, select the option to open the source editor. You can find this option by clicking on the drop-down menu next to the Cancel and Publish buttons, and selecting Source Editor.

5. Paste the following code into the text box: 6. Below this pasted text, you can begin to practice editing. One idea to begin with is to add a table of contents and links to useful templates and code that you often need to look up.

7. Whenever you are finished​ editing in the so​urce editor, click Apply Changes on the bottom right of the frame.

8. Click on Publish to save your page.

9. To find your Sandbox easily, add a link to it on your profile page. You can do so by pasting the following code into the source editor of your user page (found by clicking on your user icon, selecting Edit Profile under the Profile tab, and selecting the Source Editor option), replacing "Username" with your own username: My Sandbox 10. Voila! You now have a Sandbox of your own! Experiment with it as you please!

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.

Templates are created with the preface `Template:` followed by the page name. You can edit them like any normal wiki page. `Template:Example`.

They are inserted into a wiki page using beginning double brackets, the template name, then closing double brackets.

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

Infoboxes
Infoboxes are templates that can be used for images to prevent wrapping of caption text, as shown to the right. Using the code below in the Source mode editor, it will yield a straight line of text.

You can also make more informative infoboxes, such as snowballs, result shown to the right and the code below.

Grand Galas
Grand Galas are the HabitRPG seasonal events that happen quarterly. They typically involve special class gear and items.

Finding Pictures
The Grand Gala class gear pixel art can be found in the GitHub repository starting in common > img > sprites > spritesmith >  gear > events >  then the season: fall, winter, spring, or summer.

Each class will have up to five pieces of seasonal gear. The file names will include the identifiers for the gear, class, and year.

Finding Text
Each piece of special class gear has a name, caption, cost, and boost to the player's stats. These can be found in the code.

The name and caption can be found in common >  locales > en > gear.json. 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 common > script > content.coffee. 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 (it's easiest to do this using the CTL F on your keyboard).

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. The line weaponSpecialSpring2015RogueNotes', {str: 8}), value: 80, str: 8 shows that the Rogue weapon gives an 8 increase to Strength and costs 80 gold. 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.

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.

Features
Since HabitRPG is an open source program, many programmers contribute by adding requested features and fixing bugs. They start by setting up a local install of HabitRPG 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 a 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, on the second page of commits, you will see one 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.

Commits
The list of latest commits can be found at GitHub and clicking `Commits` in the row with the red, yellow, and blue bars. There should be a number indicating how many are available to view, somewhere around 9000.

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
GitHub/HabitRPG/Issues

Testing Code
Beta (Alys' article about branches)

MediaWiki
Other tools Examples

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 here.

For a list of available toolbar tools see this page.