ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Flag/doc: Difference between revisions

From ModEnc
Jump to navigation Jump to search
Doc to introduce this template.
 
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:


This template includes [[:Category:INI Flags]] automatically.
This template includes [[:Category:INI Flags]] automatically.
 
{|
{{Flag
|
{{!}}name=
<pre>
{{!}}files={{Categ{{!}}ini{{=}}''ini-name''}}, ...
{{Flag
{{!}}values={{values{{!}}''value-type''}}
|name=
{{!}}special=
|files={{Categ|ini{{=}}''ini-name''}}, ...
{{!}}default=
|values={{values|''value-type''}}
{{!}}extver=
|special=
{{!}}types={{Categ{{!}}''section-name''}}, ...
|default=
{{!}}ra2obsolete=
|extver=
{{!}}tsobsolete=
|types={{Categ|''section-name''}}, ...
{{!}}rponly=
|ra2obsolete=
{{!}}aresflag=
|tsobsolete=
{{!}}hpflag=
|rponly=
{{!}}''games''
|aresflag=
}}
|hpflag=
 
|''games''
}}
</pre>
|}
Copy-paste the code above and fill out the parameters as follows:
Copy-paste the code above and fill out the parameters as follows:


; <code>name</code> : The exact name of the flag. Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
{| class="wikitable"
; <code>files</code> : Which file the flag can be used in. [[Template:Categ]], with <nowiki>{{{ini}}}</nowiki> set to the correct ''ini-name'', should be used for consistency. Defaults to <code><nowiki>{{Categ|ini=rules}}</nowiki></code>.
! <code>name</code>
; <code>values</code> : Possible [[Help:Values|values]] the flag accepts. [[Template:Values]] should be used for consistency.
| The exact name of the flag. Defaults to <code><nowiki>{{PAGENAME}}</nowiki></code>.
; <code>special</code> : Special values, if any. For example, &minus;1{{fnl|1}} is a special value for {{f|Ammo|link}}. This parameter is optional{{fnl|2}}.
|-
; <code>default</code> : The default value for the flag. This parameter is optional{{fnl|2}}.
! <code>files</code>
; <code>extver</code> : What version of the appropriate EXE extension (Ares or HyperPatch) is required before this flag can be used. This parameter should only be used if <code>rponly</code>, <code>aresflag</code> or <code>hpflag</code> is set to yes.
| Which file the flag can be used in. [[Template:Categ]], with <nowiki>{{{ini}}}</nowiki> set to the correct ''ini-name'', should be used for consistency. Defaults to <code><nowiki>{{Categ|ini=rules}}</nowiki></code>.
; <code>types</code> : The sections the flag pertains to. [[Template:Categ]] should be used for consistency.
|-
; <code>''games''</code> : Which games the flag is parsed in. To select a game, add a parameter in the form of <code>''code''=yes</code>. For example, <code>yr=yes</code> indicates that the flag is parsed in {{yr}}.
! <code>values</code>
; <code>ra2obsolete</code> : If this flag is obsolete in {{ra2}} and {{yr}}, then add this to include the Obsolete banner.
| Possible [[Help:Values|values]] the flag accepts. [[Template:Values]] should be used for consistency.
; <code>tsobsolete</code> : Add this one instead of 'ra2obsolete' if the flag is obsolete in {{ts}} as well as {{ra2}} and {{yr}}
|-
; <code>rponly</code> : If this is a flag introduced in the RockPatch, add this.
! <code>special</code>
; <code>aresflag</code> : If this is a flag introduced in [[Ares]], add this.
| Special values, if any. For example, &minus;1{{fnl|1}} is a special value for {{f|Ammo|link}}. This parameter is optional{{fnl|2}}.
; <code>hpflag</code> : If this flag is introduced by [[HyperPatch]], add this.
|-
! <code>default</code>
| The default value for the flag. This parameter is optional{{fnl|2}}.
|-
! <code>extver</code>
| What version of the appropriate EXE extension (Ares or HyperPatch) is required before this flag can be used. This parameter should only be used if <code>rponly</code>, <code>aresflag</code> or <code>hpflag</code> is set to yes.
|-
! <code>types</code>
| The sections the flag pertains to. [[Template:Categ]] should be used for consistency.
|-
! <code>''games''</code>
| Which games the flag is parsed in. To select a game, add a parameter in the form of <code>''code''=yes</code>. For example, <code>yr=yes</code> indicates that the flag is parsed in {{yr}}.
|-
! <code>ra2obsolete</code>
| If this flag is obsolete in {{ra2}} and {{yr}}, then add this to include the Obsolete banner.
|-
! <code>tsobsolete</code>
| Add this one instead of 'ra2obsolete' if the flag is obsolete in {{ts}} as well as {{ra2}} and {{yr}}.
|-
! <code>rponly</code>
| If this is a flag introduced in the RockPatch, add this.
|-
! <code>aresflag</code>
| If this is a flag introduced in [[Ares]], add this.
|-
! <code>hpflag</code>
| If this flag is introduced by [[HyperPatch]], add this.
|}


===Parameter Codes for ''games''===
===Parameter Codes for ''games''===
{| cellpadding="5" class="table_descrow"
{| cellpadding="5" class="wikitable" style="background-color: FFFFFF00;"
!Code
!Code
!Game
!Game

Latest revision as of 09:16, 23 August 2021

This template generates a standardized flag header.

Usage

A separate flag header should be used for each context the flag is used in. Distinct contexts include files and sections where flag usage differs. For example, Type is used in rules(md).ini for SuperWeaponTypes, sound(md).ini for VocTypes, and eva(md).ini for VoxTypes. This ensures that contextual flag usage is documented with accuracy.

This template includes Category:INI Flags automatically.

{{Flag
|name=
|files={{Categ|ini{{=}}''ini-name''}}, ...
|values={{values|''value-type''}}
|special=
|default=
|extver=
|types={{Categ|''section-name''}}, ...
|ra2obsolete=
|tsobsolete=
|rponly=
|aresflag=
|hpflag=
|''games''
}}

Copy-paste the code above and fill out the parameters as follows:

name The exact name of the flag. Defaults to {{PAGENAME}}.
files Which file the flag can be used in. Template:Categ, with {{{ini}}} set to the correct ini-name, should be used for consistency. Defaults to {{Categ|ini=rules}}.
values Possible values the flag accepts. Template:Values should be used for consistency.
special Special values, if any. For example, −11 is a special value for Ammo. This parameter is optional2.
default The default value for the flag. This parameter is optional2.
extver What version of the appropriate EXE extension (Ares or HyperPatch) is required before this flag can be used. This parameter should only be used if rponly, aresflag or hpflag is set to yes.
types The sections the flag pertains to. Template:Categ should be used for consistency.
games Which games the flag is parsed in. To select a game, add a parameter in the form of code=yes. For example, yr=yes indicates that the flag is parsed in Yuri's Revenge.
ra2obsolete If this flag is obsolete in Red Alert 2 and Yuri's Revenge, then add this to include the Obsolete banner.
tsobsolete Add this one instead of 'ra2obsolete' if the flag is obsolete in Tiberian Sun as well as Red Alert 2 and Yuri's Revenge.
rponly If this is a flag introduced in the RockPatch, add this.
aresflag If this is a flag introduced in Ares, add this.
hpflag If this flag is introduced by HyperPatch, add this.

Parameter Codes for games

Code Game
td Tiberian Dawn
co The Covert Operations
ra Red Alert
cs Counterstrike
am Aftermath
ts Tiberian Sun
fs Firestorm
hp HyperPatch
ra2 Red Alert 2
yr Yuri's Revenge
ares Ares
gen Generals
zh Zero Hour
tw Tiberium Wars
kw Kane's Wrath

Notes

1 For negative numbers, &minus; should be used for the sign instead of a hyphen.

2 If there is no explicit value, do not set this parameter.