User:GrampaSwood/Help:References
|
References are a core part of documenting information. On the Team Fortress Wiki, references are typically used for reference trivia, information taken from source code (leaked code or Source SDK code), or information taken from a map's VScript files. This help article will help users with using references on the Team Fortress Wiki.
Contents
General information
References are created using the <ref> tags, and they are stored in a "References" section at the very bottom of the article (above the navigational templates). References should be placed after punctuation. An example of a reference taken from Sandman:
After slowing an enemy, it disappears much more quickly - only 4 seconds<ref>src/game/shared/tf/tf_weapon_bat.ccp:L799</ref>
Resulting in:
- After slowing an enemy, it disappears much more quickly - only 4 seconds[1]
- ↑ src/game/shared/tf/tf_weapon_bat.ccp:L799
Named references
References can also be used multiple times throughout an article without having to type them again by naming them:
<ref name="ball timer">src/game/shared/tf/tf_weapon_bat.ccp:L799</ref>
Later on, simply typing <ref name="ball_timer"/>
automatically places the reference:
- When the ball disappears after 4[1]-10 seconds [...]
- ↑ src/game/shared/tf/tf_weapon_bat.ccp:L799
When to use references
References are typically used to provide a source for the previous statement. The following statements typically have a reference attached:
- Bugs
- Does not include bugs which are considered to offer a gameplay advantage when performed, as a video showing it off would show readers exactly how to perform the bug.
- Reference trivia (see trivia reference, unless it is a trivia through consensus).
- Statements based on source code (both SDK code and leaked code) or VScript code (see SDK code reference, leaked content reference, and VScript reference).
Reference types
SDK code reference
Source code references from the Software Development Kit (SDK) should always start at the "src" folder to distinguish them from VScript and leak references. Optionally, a link to the GitHub repository with the specific line of code. Example: src/game/shared/tf/tf_gamerules.cpp:L7488
Leaked content reference
Recreations, links, or uploading any kind of leaked material is strictly forbidden and will be removed immediately. Instead, references should be used. These references are almost always file paths.
For non-code files, such as textures or photoshop files: tf_materialSrc\materialsrc\backpack\player\items\all_class\taunt_flip_large.psd
. For code references, exclusively a file path should be used. No links or snippets. Example: game\shared\tf\tf_weapon_wrench.cpp:L31
VScript reference
For VScript, at the top of the reference section should be {{VScript refnote}}
. References work identical to leaked code references, plain filepaths.
Trivia references
A reference with an image archived on archive.org of the creator confirming the reference. If a trivia is reached through consensus, it is marked with the {{Consensus trivia}}
template and does not require a reference.
Reference section
Reference sections should be the header, titled "References", and <references/>
. For simplicity, {{Refsection}}
can be substituted to automatically create a section.