Help:Editing

From Valve Developer Community

(Redirected from Help with Editing)
Table of contents

Creating a new page

To create a new page you just need to modify the url in your address bar to go where you'd like. If you want to create a page called "Amazing New Tutorial", use the address http://developer.valvesoftware.com/wiki/Amazing_New_Tutorial. Then edit the page and save it. The page is now created.

Alternately, modify an (appropriate) existing page to include a wikilink to the new page (for the example, [[Amazing New Tutorial]]), then click the link to bring you to its edit page.

Editing existing pages

When you select Edit on a page that is unlocked, you will be taken to a new page, where the top will be the page as it is currently, and the bottom will be a text box with simple editing features. You can make whatever changes you like, add a quick summary of your changes (useful if you're fixing an obscure spelling error), and then save it. And that's it! Your changed page is now the "official" page — that is, until someone else edits it. You can use various edit buttons to insert Wiki markup code to format the article.

The editing buttons

Image:mediawiki_editbuttons.png

Each button, when pressed, will paste a small example of the usage of a pace of special formatting. If you have text selected, pressing a button will format the text instead of pasting in sample code. For example, to make some text bold, simply select some text in the edit window and press the bold button (the first button on the editing bar).

Bold text

Syntax: '''Bold text'''

Bold text is very simple. Put in three (3) single apostrophes before the section of text you wish to bold, and three (3) after.

If you want to make text bold, then the required code would be:

    If you want to '''make text bold'''

Italicized text

Syntax: ''Italic text''

Italics are just as easy as bold text. Put in two (2) single apostrophes before the section of text you wish to bold, and two (2) after.

If you want to make text italicized, then the code would run as so:

    If you want to ''make text italicized''

Cite code

Syntax: <code>inline code text</code>

Open a <code> tag before your text and close it after your text with </code>.

If you want to cite a piece of code, then the code would run as so:

    If you want to cite a <code>piece on code</code>

If you want to cite an entire block of code, do not use <code> tags, instead add an extra space character to the beginning of each line of code. Empty lines where there should be breaks in the code must also begin with a space character.

For example:

int a;

// comment

a = 10;
Image:note.png Note: HTML <pre> tags can also be used, but should be avoided unless absolutely necessary.

Internal links

Syntax: [[Link title]]

If you want to link to another page that is in this particular wiki database, you simply need the title of the page. To link to the Main Page, you simple use "Main_Page". Simple!

So to link to Main_Page, I would need the following code:

    So to link to [[Main_Page]]

You can also change the text of the link, without affecting what it links to. This is useful if you have to adjust for grammar.

So to link to A Page that is in the manner of being Main, you need the following code:

    So to link to [[Main_Page|A Page that is in the manner of being Main]]

External links

Syntax: [http://www.example.com link title]

External links are used to link to web pages that are not in this wiki.

To link to a site like Steampowered.com (http://www.steampowered.com), use the following code:

    To link to a site like [http://www.steampowered.com Steampowered.com]

Headline text

Syntax: ==Headline text==

A headline is often used as an eye-catching title or brief summary of a wiki page. The first time a headline is used in a page, it will be very large. The second time it is used, it is somewhat smaller. All additional headlines will be the same size as the second. You can also vary the number of equals signs (=) to change the size of the headline. This makes it very easy to categorize a page, creating a clean, efficient way to find information. Additionally, with multiple headlines, the wiki engine will eventually add a title box to the beginning of the page, allowing a viewer to instantly click down to the subject they want.

So to get nice big beautiful text like this

Use the following code:

    ===So to get nice big beautiful text like this===

Embedded pictures

Syntax: [[Image:Example.jpg]]

Embedded pictures are pictures that have been uploaded to the wiki and are now directly hosted by it. Special:Upload is where you can go to upload your pictures. MAKE SURE THEY ARE NOT COPYRIGHTED.

So to show this little picture of a smiley face Image:Test.gif, use the following code:

    So to show this silly little picture of a smiley face [[Image:Test.gif]]

Signature

Syntax: --~~~~

Inserts your user name and a time stamp once. This is mainly used to "sign" your posts when inserting comments on Talk (discussion) pages. -- Since anyone can add to or edit pages in the Valve Developer Community, signatures should not be used on standard articles in most cases.

Horizontal lines

Syntax: ----

Horizontal lines are usually only used at the end of a large section of a single page. Use them sparingly, as too many make a page look ugly. To separate


text this easily, just use the following code:

    To separate
    ----
    text this easily


Other, unlisted formatting tools

Categorizing your pages

Syntax: [[Category:Category Name]]

If you want your page to show up in the automatically generated category tables like on the Special:Categories page, you will need to add a tag (or two, or three, or however many apply) to the end of your page. Code examples:

[[Category:Level Design]]
[[Category:Tutorials]]

Ignore Wiki formatting

Syntax: <nowiki>Insert non-formatted text here</nowiki>

This is rarely used, except in the making of a Help with Editing page, where you need to show what a tag is like, but you can't write it out, because the wiki will then think it is formatted text. To get around that, you put a <nowiki> tag and a </nowiki> tag around the entire tag.

<code>Insert text here</code>

<nowiki><code>Insert formula here</code></nowiki>

"Code" boxes

To make those pretty little code boxes used throughout this guide, just make a new paragraph with a space character before the first character and a line break above and below. Be careful though, text that is inside a code box will not wrap. So if you happen to copy in Shakespeare's entire works, the formatted page is going to be about 600 pixels tall and about 60 billion wide.

So if you want a pretty code box kinda like this...

Insert a space at the beginning of the paragraph.

Bullet points

Bullet points are useful for listing multiple items that all fall into a simple category.

  • Thing 1
  • Thing 2
  • Thing 3

A bulleted list like the previous one can be made using the following code:

* Thing 1
* Thing 2
* Thing 3

Indenting

Not indented

Indented once
Indented Twice
Etc.

You can indent lines easily by just using the colon (:) character at the beginning of a line. Like the following:

:I am indented once.
::I am indented twice.

Which displays as:

I am indented once.
I am indented twice.

Redirects

To redirect a page to another, use the following syntax:

#REDIRECT [[new_page]]

Anyone visiting the page will be redirected automatically. Example: Game Cache File

You can go back to a Redirect and edit it by clicking the link underneath the new page's title.

Tables

Tables are exceedingly complex, and cannot be described here in sufficient detail. Please use the Wikimedia Help:Table page to assist you in creating them. They are just as versatile as their HTML counterparts.

Templates

Templates are an easy and fast way to apply a uniform structure to pages and frequently quoted pieces of information. This is especially useful for marking articles as being eligible for Speedy Deletion, which can be done by adding them to the top of pages in accordance with the Wikipedia Deletion Policy.

There are currently several available templates for use:

All templates (http://developer.valvesoftware.com/w/index.php?title=Special%3AAllpages&from=&namespace=10) (Contains two pages at the time of writing, so click on Next page to see the rest.)

Formatting guidelines

There are no hard rules for specific formatting, other than keeping HTML at a bare minimum. There are some generally accepted styles you can use, though:

Italics

  • Should in general follow standard English usage -- italics are meant for slight emphasis. Italics should not be used for full sentences, as that is not minor emphasis and actually makes the emphasis unintelligible.
  • Newly defined words in a sentence. For example: "Levels are created with a series of blocks, called brushes, which can be created in all manner of sizes. Brushes are the basic components of levels". After the first italicized instance, the word is no longer italicized.
  • Parameters in a command-line that are to be replaced by the user: hl2.exe +map mapname -dev
  • Can be combined with "<" and ">" for parameters with longer names: hl2.exe -game <game directory>
  • Other standard uses in English can be found at Wikipedia:Italic_type.

<code> tags

  • Are fine to use, as there is no other wiki markup equivalent.
  • Command-line statements: c:\program files\valve\steam\
  • Variables in code or text files: $staticprop or m_nCounter
  • In-game console commands: mat_wireframe 1
  • Filenames: bspzip.exe
  • Entity names: info_player_start
  • Other in-game or Hammer data, such as texture names, input and output names, etc.

Bolding

  • Strong emphasis: "Note: Using this command can cause your hard drive to explode." Like italics, over-use of bolding renders the emphasis unintelligible.
  • Menu commands and other program UI: "First, go to the File menu and choose Map Properties to bring up the Object Properties dialog box. Click the Skybox Texture Name field."
  • If the word is a wiki link, you do not usually need to bold it.

Entity-specific templates

Entity articles follow a strict guideline which can be seen at the Entity_Article_Template page. To simplify the creation of these articles, preformatted templates for certain keyvalues, inputs, outputs, or whole pages have been added to the VDC wiki.

Image:note.png Note: Only the commonly used templates are listed here. For game-specific templates, see the last sections.

Keyvalues

Inputs

Outputs

Counter-Strike Source Templates

Team Fortress 2 Templates

See also

Wikipedia has excellent resources on text formatting available here. The information is referential of the Wikipedia site, but is applicable to all MediaWiki powered sites, including the Valve Developer Community.