Difference between revisions of "StyleGuide"
From GRFSpecs
Jump to navigationJump to search (VarAction2) |
Planetmaker (talk | contribs) m (→Links: typo) |
||
(13 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
Pages in the NewGRF specs wiki should try to follow a common style. Headings are as follows: |
Pages in the NewGRF specs wiki should try to follow a common style. Headings are as follows: |
||
+ | Note: section headings are indicated by == otherwise they have the same size as the page title |
||
⚫ | |||
+ | |||
+ | == Links == |
||
+ | * Use the "ttwiki:" prefix for interwiki links to [[ttwiki:Main_Page|TT-Wiki]]. |
||
+ | * Use the "ottdwiki:" prefix for interwiki links to [[ottdwiki:Main_Page|OpenTTD-Wiki]]. |
||
+ | |||
⚫ | |||
<pre> |
<pre> |
||
− | =Introduction= |
+ | ==Introduction== |
+ | One to three sentences for summary. |
||
− | =Properties= |
+ | ==Properties== |
{| |
{| |
||
− | ! |
+ | !Property !!Version !![[GRFActionsDetailed|Size]] !! Description |
|- |
|- |
||
− | |01 || ||B || |
+ | |01 || ||B ||Short summary 1 |
|- |
|- |
||
− | |02 || ||W || |
+ | |02 || ||W ||Short summary 2 |
|- |
|- |
||
− | |03 || ||D || |
+ | |03 || ||D ||Short summary 3 |
|- |
|- |
||
− | |04 || ||B/B* || |
+ | |04 || ||B/B* ||Short summary 4 |
|} |
|} |
||
− | =Description= |
+ | ==Description== |
+ | ===Property 1 name (01)=== |
||
+ | Detailed Description |
||
+ | ===Property 2 name (02)=== |
||
⚫ | |||
+ | Detailed description |
||
+ | |||
+ | ===Property N name (0xN)=== |
||
+ | Detailed description |
||
+ | |||
⚫ | |||
+ | General example for the action, not specific to the a single property. Lines are ALL indented by a single space at least |
||
+ | -1 * 0 00 00 \b3 01 \b*2 // \b<number of props to change> \b*<vehicle ID> |
||
+ | 09 \w192 // value for speed (192 km/h) |
||
+ | 0B \w3800 // value for power (3800 hp) |
||
+ | 12 FD // use new graphics |
||
</pre> |
</pre> |
||
− | + | == VarAction2 pages == |
|
<pre> |
<pre> |
||
− | =Introduction= |
+ | ==Introduction== |
+ | One to three sentences for summary. |
||
− | =Variables= |
+ | ==Variables== |
+ | {| |
||
+ | !Variable !!Version !![[GRFActionsDetailed|Size]] !! Description |
||
+ | |- |
||
+ | |01 || ||B ||Short summary 1 |
||
+ | |- |
||
+ | |02 || ||W ||Short summary 2 |
||
+ | |- |
||
+ | |03 || ||D ||Short summary 3 |
||
+ | |- |
||
+ | |04 || ||B/B* ||Short summary 4 |
||
+ | |} |
||
− | =Description= |
+ | ==Description== |
+ | ===Variable 1 name (01)=== |
||
+ | Detailed Description |
||
+ | ===Variable 2 name (02)=== |
||
⚫ | |||
+ | Detailed description |
||
+ | |||
+ | ===Variable N name (0xN)=== |
||
+ | Detailed description |
||
+ | |||
⚫ | |||
+ | General example for the action, not specific to the a single variable. |
||
</pre> |
</pre> |
||
− | + | == Other pages == |
|
<pre> |
<pre> |
||
− | =Introduction= |
+ | ==Introduction== |
+ | One to three sentences for summary. |
||
− | =Syntax= |
+ | ==Syntax== |
+ | Formal syntax definition, including a table with summaries for the variable parts of it. |
||
− | =Description= |
+ | ==Description== |
+ | Detailed description. |
||
− | =Example= |
+ | ==Example== |
+ | General example for the action. |
||
</pre> |
</pre> |
||
+ | |||
+ | == See also == <!-- TTWiki links to be removed when this wiki develops an extended StyleGuide --> |
||
+ | *[[ttwiki:LocalStyleGuide | TTWiki LocalStyleGuide (from TTDPatch Wiki)]] |
||
+ | *[[ttwiki:Manual of Style | TTWiki Manual of Style]] |
Latest revision as of 22:11, 22 July 2011
Pages in the NewGRF specs wiki should try to follow a common style. Headings are as follows:
Note: section headings are indicated by == otherwise they have the same size as the page title
Links
- Use the "ttwiki:" prefix for interwiki links to TT-Wiki.
- Use the "ottdwiki:" prefix for interwiki links to OpenTTD-Wiki.
Action0 pages
==Introduction== One to three sentences for summary. ==Properties== {| !Property !!Version !![[GRFActionsDetailed|Size]] !! Description |- |01 || ||B ||Short summary 1 |- |02 || ||W ||Short summary 2 |- |03 || ||D ||Short summary 3 |- |04 || ||B/B* ||Short summary 4 |} ==Description== ===Property 1 name (01)=== Detailed Description ===Property 2 name (02)=== Detailed description ===Property N name (0xN)=== Detailed description ==Example== General example for the action, not specific to the a single property. Lines are ALL indented by a single space at least -1 * 0 00 00 \b3 01 \b*2 // \b<number of props to change> \b*<vehicle ID> 09 \w192 // value for speed (192 km/h) 0B \w3800 // value for power (3800 hp) 12 FD // use new graphics
VarAction2 pages
==Introduction== One to three sentences for summary. ==Variables== {| !Variable !!Version !![[GRFActionsDetailed|Size]] !! Description |- |01 || ||B ||Short summary 1 |- |02 || ||W ||Short summary 2 |- |03 || ||D ||Short summary 3 |- |04 || ||B/B* ||Short summary 4 |} ==Description== ===Variable 1 name (01)=== Detailed Description ===Variable 2 name (02)=== Detailed description ===Variable N name (0xN)=== Detailed description ==Example== General example for the action, not specific to the a single variable.
Other pages
==Introduction== One to three sentences for summary. ==Syntax== Formal syntax definition, including a table with summaries for the variable parts of it. ==Description== Detailed description. ==Example== General example for the action.