Code generator guide
cshake's Wiki code generator is one of the most helpful tools that Wiki editors have for keeping ship, commodity and equipment pages up to date, but it is unfortunately not quite automatic as the output code requires a bit of manual editing, proofreading and verification before it can be added to the Wiki. To help you through this process, there are a few checklists and usage instructions below for each of the most common types below, but the most important guideline of all is to hit the preview button and compare the page you are editing with another page of the same type: If they look about the same, you should be good to go to hit the "Save page" button.
Another important tip is the "Show changes" button, which can help you if you're unsure about what you are changing or removing on a page after importing generated code from the code generator.
After an update on the 25th of April 2015, the Wiki will also show a special "Generate code" button on most ship, base and weapon pages to simplify page updating. Clicking this button copies generated code for that page into the editing field, and then compares it with the current page revision to make it easy to see if any content (such as reviews or images) needs to be copied over before adding wikilinks and clicking save. The script will do as best as it can to copy images and ship reviews where and when appropriate, but do double-check to see if there's anything special (such as an image outside the ship/base template) that's been added manually that should be copied over.
Code generator checklists
ID pages
- Find the ID page that you wish to update on the Wiki.
- Find the entry for that page in the code generator, and copy the generated Wiki code into the editor. Make sure that you replace all code that is there from before.
- Add [[wikilinks]] where appropriate, such as for factions and ship names.
- Click “Show preview”. Does the page look like it should? Compare it with another ID page.
- There should for example be no dashes after each bullet point on lists on the ID page.
- If everything’s looking good by now, add a short summary stating that you have updated the page, and click "Save page".
- Done!
Ship pages
Battleship Heavy Turrets and Secondary Turrets have been swapped around in the code generator due to a change since v4.86; swap these manually for now. If you see a battleship that has more heavies than secondaries somewhere, this is probably the cause. The code generator is also frequently wrong about ship classes, particularly so for Light Fighters and some transports, so please double-check these with the previous revision of the page before clicking "Save page". - Space (talk) 05:30, 30 March 2015 (EDT) |
The code generator frequently guesses wrong on the Ship Class field, so verify this with the previous revision of the page when using the code generator. - Space (talk) 12:18, 22 May 2015 (CEST) |
- Find the ship page that you wish to update on the Wiki.
- Find the entry for that page in the code generator, and copy the generated Wiki code into the editor. Make sure that you replace all code that is there from before.
- Click the “show changes” button, and look for any red text with a minus sign in front of it on the left hand side to see if you’ve removed any reviews. If so, copy these over to the editor window under the ==Handling== title.
- Add [[wikilinks]] where appropriate, such as for factions and base names.
- Click “Show preview”. Does the page look like it should? Compare it with another ship page.
- Does the ship image show up like it should? If not, check what the image name was in the previous revision of the page ("| image = filename" inside the {{Ship Infobox}} template, again on the left hand side of the view you get after clicking “Show changes”) and copy it over.
- If everything’s looking good by now, add a short summary stating that you have updated the page, and click "Save page".
- Done!
Commodity pages
- Find the commodity page that you wish to update on the Wiki.
- Find the entry for that page in the code generator, and copy the generated Wiki code into the editor. Make sure that you replace all code that is there from before.
- Add [[wikilinks]] where appropriate, such as for factions and base names.
- Click “Show preview”. Does the page look like it should? Compare it with another commodity page.
- If everything’s looking good by now, add a short summary stating that you have updated the page, and click "Save page".
- Done!
Equipment pages
- Find the equipment page that you wish to update on the Wiki.
- Find the entry for that page in the code generator, and copy the generated Wiki code into the editor. Make sure that you replace all code that is there from before.
- Add [[wikilinks]] where appropriate, such as for factions and ship names.
- Click “Show preview”. Does the page look like it should? Compare it with another equipment page.
- Does the equipment image show up like it should? If not, check what the image name was in the previous revision of the page ("| image = filename" inside the {{Weapon/gun}} template, again on the left hand side of the view you get after clicking “Show changes”) and copy it over.
- If everything’s looking good by now, add a short summary stating that you have updated the page, and click "Save page".
- Done!
Other pages
- Find the page that you wish to update on the Wiki.
- Find the entry for that page in the code generator, and copy the generated Wiki code into the editor. Make sure that you replace all code that is there from before.
- Add [[wikilinks]] where appropriate, such as for factions and ship names.
- Click “Show preview”. Does the page look like it should? Compare it with another page of the same type.
- If you are updating a base: does the base image show up like it should? If not, check what the image name was in the previous revision of the page ("| image = filename" inside the {{Base Infobox}} template, again on the left hand side of the view you get after clicking “Show changes”) and copy it over.
- If everything’s looking good by now, add a short summary stating that you have updated the page, and click "Save page".
- Done!
Rules and guidelines |
What is a Wiki? • The Discovery Wiki • Editing rules • Style guide |
Getting started |
The Basics • Editing and creating pages • Wiki markup guide • Code generator guide • Uploading images |
Common templates |
Ships • Factions • Bases • Planets • Systems • Reviews • Version • Commodities |
Other useful pages and tools |
General wiki discussion • To-do list • Outdated pages • Wanted pages • Incomplete pages • Active editors • FLStat • Freelancer Companion |