Cosmoteer Wiki:Contributing How-Tos: Tips and Tricks

From Cosmoteer Wiki
Jump to navigation Jump to search

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 More in the page's toolbar, then click Move. 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, imagine 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.

More advanced users may wish to consult the following additional documentation:

New title → contains 2 inputs:

  • Left dropdown → page's namespace.
    CalloutIconDanger.png
    Danger
    Do 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.
    CalloutIconTip.png
    Tip
    The path is separated by slashes /. Each part is a separate page.
    CalloutIconExample.png
    Example
    If you had a page CoolBuff located under Modding page, its path would be:
    Modding/CoolBuff

    To move it, for example, under the Buffs page, which itself is under the Modding page, you will rewrite the path like this:
    Modding/Buffs/CoolBuff
    To move the page to the main namespace (allowing you to access at https//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.

CalloutIconTip.png
Tip
It's recommended to leave this enabled so that any links leading to this page will lead to a new page instead of a dead end.

Move subpages → whether to also move any subpages that the current page has.

CalloutIconTip.png
Tip
It's recommended to leave this enabled so that subpages do not remain under a page that does not exist anymore.

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.

CalloutIconTip.png
Tip
Now, it's recommended to change the links that were leading to the old page to the new page, since the wiki doesn't change them automatically.


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.

You can see what pages link to the redirect page by going on it and clicking What links here on the left sidebar, under Tools.

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 Link button on the toolbar (Represented by two linked chains). You can also highlight the text and press CTRL + K 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 Category:Infobox templates.

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 Wiki--visual-editor--hamburger-menu--white.svg 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 Icon.pngSteel 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 Wiki--visual-editor--hamburger-menu--white.svg 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.

CalloutIconTip.png
Tip
It is recommended to give the files descriptive names, such as 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.

Note that if your image comes in different colors, it's recommended to add a suffix such as --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 Wiki--source-editor--add-image-icon--white.svg 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 InsertImages and media.

Type the image filename into the search field. Then select your image and press Use this image.

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]]

CalloutIconWarning.png
Warning
If an image was added using the Visual Editor, the image link cannot be changed using the Visual Editor (e.g. when the image filename changes).
You must do it manually using the Source Editor.
CalloutIconTip.png
Tip
It's recommended that the maximum height for an icon does not exceed 18px. On larger icons, the text line height will increase, enlarging the visible vertical gaps between the lines of text.

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 InsertTemplate. 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 Insertand you're done!

CalloutIconWarning.png
Warning
Be aware that when copying text from the Visual Editor to the template menu, the markup used in the Visual Editor will not transfer.
If you wish to paste something that has a markup, copy it from the source editor.

Source Editor

CalloutIconWarning.png
Warning
As mentioned, most users should use VisualEditor to add templates since it walks you through the available options and parameters

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:
like this

or on a second line, like that:

like this.

This is useful because the wiki removes single or double linebreaks,
allowing you to make more compact paragraphs.

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.
CalloutIconNote.png
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 button (not a real button, it only looks like a button),

which you can use inside your text.

Background and text color can be customized.

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.
gold
Greeny-weeny #78F041
var(--color-cosmoBlue)

Template:Callout 🏳️‍🌈 Banners Adds a colorful callout.
CalloutIconTip.png
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».
CalloutIconWarning.png
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!

CalloutIconWarning.pngWork in Progress
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»).
CalloutIconWarning.png
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!

CalloutIconWarning.pngStub
This section is currently empty.

Feel free to start it!

Template:Resource 🖼️ Images Allows you to add icons of resources with the their namesHyperium Icon.pngHyperiuminside text.
Template:InlineIcon 🖼️ Images Allows you to add images as icons Steel Icon.pnginside text, give them labelsSteel Icon.pngor even turn them into links: SteelSteel Icon.png
CalloutIconTip.pngTip
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.
Like this
SmallHyperdriveIcon.png
Template:NearbyPagesToc 🫂 Aggregation

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 (ascending by default).

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?):

Cosmoteer.Ships.Parts.Logic
Cosmoteer.Ships.Parts.Logic.PartTimer

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:
Modding/Components/Buffs page parent page is Modding/Components

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.
Otherwise (if a string is not a css variable), returns it «as is».

--some-css-var will become var(--some-css-var)
red will stay the same: red

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

CalloutIconWarning.pngWork in Progress
This section is currently work-in-progress. Some things may be missing.

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

ShipContestFeb202314DillientBlueprint.png

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.


ShipContestFeb202314DillientBlueprint.png
ShipContestFeb202314DillientBlueprint.png

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.


ShipContestFeb202314DillientBlueprint.png

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.

CalloutIconNote.pngInfo
The {{Clear}} template is used in this section — go inspect it to see how it works!


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 Wiki--visual-editor--hamburger-menu--white.svg in the editor toolbar → Categories.

Add your category under the Categories, then press Apply changes.
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.

CalloutIconTip.png
Tip
There is a separate, curated category of useful templates.

Adding a category link to a page

Use this syntax: [[:Category:Category name]]

  1. 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!

Documenting a new game version

CalloutIconWarning.pngWork in Progress
This section is currently work-in-progress. Some things may be missing.

Feel free to contribute to make it better!

Game updates are a huge and fun part of the Cosmoteer experience due to the excitement of new content and changes. For many, the wiki is a 'first port of call' to learn about the new content, so the sooner the wiki is updated, the better.

This section describes what a contributor should do when a new game version releases, and said contributor wishes to document the new release on the wiki.

First, go to the /wiki Cosmoteer Discord channel and notify the members that you are documenting the new release.
Make sure that someone hasn't already taken doing that.

Once you've done that, an actual work can begin.

Create a new page, using the new version number as its address. For instance, the version 0.26.0 should reside at https://cosmoteer.wiki.gg/wiki/0.26.0.
If the page already exists, you can go straight to editing.

The layout should follow the style guidlines laid out in the style guide. For examples on the layout you can take a look at existing version, such as 0.26.0 (major), 0.25.2 (minor), 0.25.1b (hotfix) 0.25.2a (bugfix).

New Ships Checklist

Updates frequently add new ships, and these additions need to be added in a few locations.

  • Create a page for the ship.
    • Follow the same template and layout as other ship pages
    • Use the exterior image provided within the game files
    • Capture the interior and blueprint images in-game in Creative mode. Larger ships will need you to drop the output dimension resolution to get the output images to be within the 10MB file size limit present on the wiki. Make sure to note the needed resolution percentage in the file summary when you upload it, as this will help others respond to updates.