Cosmoteer Wiki:Contributing How-Tos: Tips and Tricks
This page contains various guides, tutorials, and tips and tricks that will help you to contribute to this wiki.
Should I Contribute?
Yes, absolutely! Wikis like this are built upon the contributions of people like you. Anything you can add is greatly appreciated, be it creating new pages, adding images and animations, correcting spelling and grammar, or even adding a single sentence. Everything helps.
Don't worry about perfection - other editors can make corrections if necessary. Just get creating! Make sure to look at other pages to get an idea of how they are styled and formatted, and for a sprinkle of inspiration.
Remember, if you need assistance we are always here to help. The best method is to send a message in the #wiki
channel of the official Discord server, as this keeps it available for others to learn from too. Otherwise, you can try messaging an active user.
Page editing
Ways To Edit
Presently we have two ways to edit the wiki: VisualEditor, and the Source Editor.
- VisualEditor allows you to edit pages visually, just like using your favorite word processor (e.g. Microsoft Word). Though relatively feature-rich, it is still very much a work-in-progress and may be prone to issues from time to time. For most users it will be perfectly fine, however more advanced users should likely use the source editor instead.
- Source Editor allows you to edit pages directly at the source level. The full range of wiki features is available here, and though intimidating at first glance for new users, is quite easy to use.
Creating A Page
Creating a page is primarily done in two ways:
- Clicking A Red Link: Red links lead to pages that do not yet exist and need to be created. If you see a red link and think you can contribute something (Even if it's just a single sentence!), then go for it
- Search: If you search for a page that doesn't exist, the wiki will prompt you to create it.
Moving/Renaming Pages
There are several reasons why you may want to move a page. Maybe you made a typo in the name when creating the page, or maybe the name of a ship part has changed in a new update. This is where the Move feature comes into play.
To access it, click the Armor was renamed to 'Light Armor' in a future update. The correct response here is to Move the current Armor article to be called 'Light Armour'. Leaving a redirect behind is the perfect choice here as it means any links to 'Armor' would continue to function, and anyone who searches for 'Armor' would be automatically sent to where they need to go.
in the page's toolbar, then click . On this screen, you can type the new name for the article, enter the reason for moving it, and finally choose whether to 'Leave a redirect behind'. A 'redirect' is a special page that will forward the user to another automatically when accessed. As a theoretical example, imagineMore advanced users may wish to consult the following additional documentation:
New title → contains 2 inputs:
- Left dropdown → page's namespace. DangerDo not change it unless you know what you are doing.
- Right input → this will be the address for the page. By default, it contains the path of a page on which you've pressed the Move button.TipThe path is separated by slashes
/
. Each part is a separate page.ExampleIf you had a pageCoolBuff
located underModding
page, its path would be:Modding/CoolBuff
To move it, for example, under theBuffs
page, which itself is under theModding
page, you will rewrite the path like this:Modding/Buffs/CoolBuff
To move the page to the main namespace (allowing you to access athttps//cosmoteer.wiki.gg/wiki/CoolBuff
), rewrite the path like this:CoolBuff
Note that this is not recommended due to possible name conflicts and other cons that such pages have (described in creating a page section).
Reason → Describe the reason for moving the page, e.g. moving under the correct page
.
Leave a redirect behind → whether to replace the old page with a redirect.
Move subpages → whether to also move any subpages that the current page has.
Watch source page and target page → whether to watch both the redirect page (if Leave a redirect behind option is enabled) and the new page to your watchlist, allowing you to receive notifications about their changes. After the page has been moved, a page will open with 2 links: to the redirect page (if Leave a redirect behind option was enabled) and the new page.
If you don't do it, the links will lead to the redirect page first, then to the actual page. If the page were to be moved again, it would have more redirects, thus having a slower load time.
Designing Pages
Links
Links are one of the key features of wikis. They provide a means to link pages together, allowing each navigation from one topic to the next.
There are two different types of links: Internal Links, which are used to link to other pages on the wiki, and External Links, used to link to other websites.
Internal Links
In VisualEditor, internal links can be created by highlighting the text you want to become a link, and then pressing the
button on the toolbar (Represented by two linked chains). You can also highlight the text and press on your keyboard. This will open a popup menu where you can type the name of the page you want to link to, and select it.In Source Editor, internal links are created by typing the name of the page you want to link to, and then wrapping the name in double square brackets. For example, a link to the Ships page would be made with the following syntax: Ships
. We can also choose alternate text to be displayed, like with this cool link. Even though the text reads "Cool link", it still links to the ships page. The syntax for that link is as follows: [[Ships|cool link]]
.
External Links
In VisualEditor, follow the steps above as if making an internal link, but instead switch to the "External site" tab on the pop-up menu. Here you can paste an external link, and it will be applied to the highlighted text.
In Source Editor, the syntax is very similar to internal links, but using only a singular pair of square brackets instead. Inside the square brackets, put the URL you want to link to, leave a space, and then type the text that you want the link to be attached to. For example, this link to the Official Cosmoteer site uses the following syntax: [https://cosmoteer.net/ Official Cosmoteer site]
Link Usage
In general, we try to link as many pages together as this creates the best viewing experience, however for the best reading experience we must not link every instance of a word or topic on the page.
Imagine each wiki page as being divided into three key 'sections': The infobox, the initial description paragraph, and then the main bulk text of the page. For each of these three sections, link the first occurence of a word or topic. As an example, ships would be linked the first time it is mentioned in the infobox, the first time it's mentioned in the initial paragraph, and finally the first time it's mentioned in the main body of the article. After that, no more links to ships are made.
Infoboxes
You may have noticed on many pages that there is a box on the right-hand side containing key pieces of information. This is known as an infobox, and you can view a list of all the ones available to use here.
To add an Infobox to your page, add it as a template in the VisualEditor, or type out the syntax manually in the Source Editor. It is highly recommended to use VisualEditor unless you are familiar with the template, as it will guide you through all the available fields and help you fill it out directly.
Inline Icons
Using Inline Icons
Inline icons are a way of inserting small icons into the middle of your sentence, like this. They're particularly useful for showing in-game interface elements when you're talking about them, but the sky is the limit.
The most common inline icons on the wiki are resource icons, which you'll find almost everywhere. For example, when talking about Steel, we can use an inline icon so it looks this Steel instead. These inline icons can added in the VisualEditor by inserting the Resource
template, or by typing the following syntax in the Source Editor: {{Resource|Steel}}
. Steel can intuitively be replaced with the name of any resource featured in the game, but for a full list - or further help - consult the template page.
Other inline icons can be used by adding the InlineIcon
template in the VisualEditor, or with the following syntax in the Source Editor: {{InlineIcon|Wiki--visual-editor--hamburger-menu--white.svg}}
. The image name can be changed to any icon you wish, with the example code above producing this icon. For a full list of icons, check the icons category. For extra controls over how the icon displays, consult the parameters documented on the template page.
Uploading Inline Icons
As the wiki grows, you should be able to find all the icons you need already uploaded. If you can't find it in the icons category, you may have to upload it yourself.
First, upload the image using the Upload file page.
Wiki--source-editor--add-image-icon--white.svg
.
This helps to understand where the image comes from and not have name conflicts, also preventing names like image13-final-final.png
.
--white
or --red
to the end of its name (see the example above) to distinguish between identical icons with different colors.Once the image is done uploading, edit the page and add the Icons
category to it. This will add the image to a category for all inline icons, so it can be found and used by other contributors as well.
Copy the image filename (for example, File:Widgets menu down.png
), open a page where you want to use it, locate a place where you want to insert it and add a new image in that place. The method differs if you use Visual/Source editor:
▶ Using Source Editor Press the «add image» button on the toolbar which will open a popup. Fill out the fields:
- Filename → specify the image filename (e.g.
File:Widgets menu down.png
). - Size → specify the desired size.
- Format → pick
none
.
▶ Using VisualEditor On the toolbar, click on
→ .Type the image filename into the search field. Then select your image and press
.Go to the Advanced tab and fill out the fields:
- Image type → pick
Basic
. - Image size → pick
Custom
and fill out the desired dimensions. Note that the image proportions will be kept the same, automatically changing the other size component while you edit.
This will create a template that looks like this:[[File:Widgets menu down.png|22x22px]]
You must do it manually using the Source Editor.
Renaming Uploaded Files
A file cannot be renamed directly, but you can move the page itself that contains the file.
See the section about moving a page.
Templates
What Are Templates?
Templates are predefined 'blocks' of content that can be used repeatedly on pages. Instead of having to design elements from scratch every time, we can just add a template where everything is done already. This makes editing pages quick and easy and makes it effortless for you to include these elements in your articles. Moreover, any style changes to the template will additionally update on all pages that use them. If you're familiar with CSS then you know just how important this is.
As you've scrolled down this page you've probably noticed the various colored note boxes which we call 'Callouts'. These are from a template. Rather than individually programming each one, we just add the template and then fill in the message we want to be inside. If you've browsed other pages on the wiki, then you've probably noticed the Infoboxes mentioned previously. These are templates too.
The Main Templates category contains a list of templates we use a lot on the wiki, and the Templates category contains a list of every single template available.
Using Templates
The simple part of using templates is inserting them into an article. The complex bit depends on whether you're using the VisualEditor or Source Editor.
Most users should use VisualEditor to add templates since it will walk you through the various options and settings they contain to work properly.
VisualEditor
To add a template in VisualEditor, go to the editor toolbar and click
→ . This will open a box that lets you search for the template you want to use.After selecting the template, the menu will display a list of all the options and parameters that can go inside. Depending on the template some of these options might be required, whilst others can be left blank. Do not worry as the editor will warn you if you leave a required field blank. Once you've finished, click the
and you're done!If you wish to paste something that has a markup, copy it from the source editor.
Source Editor
In the Source Editor, templates are added by typing their name in double curly brackets, such as {{Callout}}
.
Parameters are then included by prefacing them with a pipe (|) symbol. As an example, the warning Callout above has the following code:
{{Callout
|Warning
|As mentioned, most users should use VisualEditor to add templates since it walks you through the available options and parameters
}}
This template contains two parameters (Technically more, but that's irrelevant for this example). The first parameter is the type of Callout, in this case Warning
. The second parameter contains the displayed message text. Easy to use when described like this, but unless you know what parameters to use and in what order, then you're going to have a hard time. This is why VisualEditor is recommended for most users.
Editing Added Templates
Templates can be edited after adding in both VisualEditor and Source Editor.
In VisualEditor, you will see a representation of the template as you edit the page. Double-clicking it, or single-clicking and selecting "Edit", will open up the template editor again and allow you to change the contents.
In Source Editor, simply edit, and, or remove content from within the template syntax brackets
Creating New Templates
Though all users can create templates, we highly advise against it unless you have a good reason for doing so. Templates should be useful, high quality, and not duplicate existing template functionality. Please ask in the #wiki channel of the Cosmoteer Discord server before creating new templates.
As the creation of templates should only be performed by experienced users, we will not be providing a guide here. However, for reference, you may wish to consult the official MediaWiki article regarding templates.
List of templates
All existing templates can be viewed on Special:AllPages page by setting the Namespace to Template
: link.
Main templates (that are used as a major part of certain pages) can be found in a separate, curated category of main templates. These are probably all the templates you're looking for when creating and editing articles.
Below are some of the useful, non-main templates:
Template | Category | Description |
---|---|---|
Template:Br | ⚙️ Markup | Adds a line break. Useful when you want to put the text immediately on the next line: or on a second line, like that:
This is useful because the wiki removes single or double linebreaks, |
Template:CollapseText | ⚙️ Markup | Same as Collapse template, but for text: Hello
World
|
Template:Tooltip | ⚙️ Markup | Adds a tooltip to the text. |
Template:AttentionNeeded | ⚙️ Markup | Adds a small label that can be used to emphasize that something needs attention (like when a description of something might be wrong) (this needs some attention!)[1] and a citation with a provided description, which can be seen in the footnotes. |
Template:TOC | ⚙️ Markup | Allows to customize the page's TOC using a template. Info When used, always forced a TOC onto the page at the specified position. |
Template:Spaces | ⚙️ Markup | Adds an un-breakable space to your text. Can add multiple spaces, or even different types of un-breakable space. Might be useful in big tables, when wrapping of a particular text might be undesirable. |
Template:Button | ⚙️ Markup | Adds a which you can use | (not a real button, it only looks like a button),
Template:Effect | ⚙️ Markup | A simple template to highlight positive [+50%] and negative [-100%] effects, for example in the case of % increases or decreases. |
Template:ColoredText | ⚙️ Markup | An easy way to give your text a color. |
Template:ColorLabel | ⚙️ Markup | Adds a little rectangle filled with specified color and the color code label. Optionally can have a custom name. Supports and valid CSS color, including active CSS variables. |
Template:Callout | 🏳️🌈 Banners | Adds a colorful callout. Tip This is an example of what can be added. |
Template:WorkInProgress | 🏳️🌈 Banners | Adds a banner, that describes the page or some section inside it as «work-in-progress». Work in Progress
This page is currently WORK IN PROGRESS. Some things may not be up-to-date or documented at all. Feel free to contribute and don't worry about perfection - other editors can make corrections if necessary. Just get creating! This section is currently work-in-progress. Some things may not be up-to-date or documented at all. Feel free to contribute to make it better! |
Template:Stub | 🏳️🌈 Banners | A banner for placing on empty pages (so you don't leave the links that lead to them red), or empty sections (instead of writing «wip»/«tbd»). Stub This page is currently empty. Feel free to start it, and don't worry about perfection - other editors can make corrections if necessary. Just get creating! This section is currently empty. Feel free to start it! |
Template:Resource | 🖼️ Images | Allows you to add icons of resources with the their namesHyperiuminside text. |
Template:InlineIcon | 🖼️ Images | Allows you to add images as icons inside text, give them labelsor even turn them into links: Steel
For resources it's recommended to use a special Resource template. |
Template:Collapse | 🖼️ Images | Adds a block with expand/collapse button and a title. Inside that block is an image of your choice. |
Template:NearbyPagesToc | 🫂 Aggregation | Navigate
Navigate
Adds a block that shows either the immediate subpages (subpages with a depth of 1) or the sibling pages (pages on the same level and within the same parent page) of a page. This is usually useful when you want to navigate to different categories of pages from a general parent page (e.g. from a page that describes «components» in general to individual «component» categories) or to navigate between pages of a similar nature (e.g. individual buff component pages) without returning back to the parent page each time you want to explore further. By default, the current page is used as starting point, but it can be customized, along with the title and the resulting sorting order ( |
Template:GameSourceCodeReference | 💘 Reference | Adds a reference to the game's source code.
Code location (what's this?):
Cosmoteer.Ships.Parts.Logic |
Template:GameSourceCodeReferenceMultiple | 💘 Reference | Adds multiple references to the game's source code in the same template. Code locations (what's this?): • |
Template:GameRulesFileReference | 💘 Reference | Adds a reference to a .rules file/node inside of it:
.rules file/node location: &~/Part/Components/EmpAbsorber/AbsorbsResourceDrain |
Other templates Here are other templates that might come in handy in some cases.
Template | Category | Description |
---|---|---|
Template:ParentPagePath | Other | Look ups the parent page. By default, the current page is used, but a custom page path can be specified. Here it is, used: |
Template:WrapCssVariableIfNeeded | Other | Checks if the given string looks like a CSS variable. If so, wraps it in «var()» syntax, making it possible to use as CSS color value. |
Tables
Tables, rows and columns
You can add a table by pressing the Table button.
Moving table columns is best done in the visual editor (else you'll have to move each cell one by one), by clicking on the column and clicking the little arrow that will appear at the top of that column. A drop-down menu with other possibilities with appear.
Images
Full info: https://www.mediawiki.org/wiki/Help:Images/en
Feel free to contribute to make it better!
Floating
Images can have floating enabled, which will make the content wrap around them (e.g. text).
The image to the left has its floating enabled. It's uses this code:
[[File:ShipContestFeb202314DillientBlueprint.png|left|thumb|100x100px]]
Notice the left
parameter — it tells the image to align to the left. Other possible values are center
, right
or none
.
If we were to add another image, it would go below the first one. Same is true for other images.
If you wish to stack images horizontally, add noclear
class name to the image you want to stack, and it will!
[[File:ShipContestFeb202314DillientBlueprint.png|left|thumb|100x100px|class=noclear]]
To the left, you can see one image stacking on another.
Finally, to force the wrapping text to stop wrapping and go below the images (e.g., next section), use {{Clear}}. It will force all the text after itself to go below any floating images.
Like this.
If you were to add any floating images after the {{Clear}}, they will enable the wrapping back again.
Gallery
This very useful template found in the Insert menu can take the whole width of the page, and does so by default.
To avoid this, in the Options tab's "CSS styles" field, when inserting or editing it, add width: fit-content;
.
Categories
What is a category?
TBD
Creating a category
To create a category, you need to create a page with the same name as you want your category to have within the categories namespace.
To do so, copy and paste this link to the search bar:
https://cosmoteer.wiki.gg/wiki/Category:Category_name
Replace Category_name
with the name for your category and press Enter.
This will open a non-existing page, which you can create (assuming the category doesn't exist already).
Give your category a description and save the page.
Any page you add to your new category will appear on the category page.
Adding a category to a page
▶ Using VisualEditor
Press in the editor toolbar → .
Add your category under the Categories, then press
▶ Using source editor
Place this template at the end of your page: [[Category:Category name]]
, where Category name
is your category name.
List of categories
All existing categories can be viewed by going onto Special:AllPages page and setting the Namespace to Category
: link.
Adding a category link to a page
Use this syntax: [[:Category:Category name]]
- ↑ this needs some attention!: here goes the description.
Other languages
Currently, there are no other languages present.
To be able to add new languages, we first need 20 articles translated to that language. Only then we can request a new language wiki variant.
If you are up to it, start from here: translation guidlines by wiki.gg
Please, don't be shy and also notify the /wiki Cosmoteer Discord channel about what you are doing - see if other people can contribute too!