ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.
Template:Flag: Difference between revisions
Jump to navigation
Jump to search
m Yes, software. I totally wanted to revert all of Nighthawk's revisions since fucking MAY instead of just the ones from yesterday. *rolleyes* |
Nighthawk200 (talk | contribs) Now, again, it's the _unused_ RP2 part of the template that I replaced. Also, gallery picture and flag changed. |
||
Line 11: | Line 11: | ||
|[[Image:Game_ra2_{{#switch:{{{ra2}}}|yes|true|1=yes|no}}.png|Red Alert 2]] | |[[Image:Game_ra2_{{#switch:{{{ra2}}}|yes|true|1=yes|no}}.png|Red Alert 2]] | ||
|[[Image:Game_yr_{{#switch:{{{yr}}}|yes|true|1=yes|no}}.png|Yuri's Revenge]] | |[[Image:Game_yr_{{#switch:{{{yr}}}|yes|true|1=yes|no}}.png|Yuri's Revenge]] | ||
|[[Image: | |[[Image:Game_ares_{{#switch:{{{ares}}}|yes|true|1=yes|no}}.png|Ares]] | ||
|[[Image:Game_gen_{{#switch:{{{gen}}}|yes|true|1=yes|no}}.png|Generals]] | |[[Image:Game_gen_{{#switch:{{{gen}}}|yes|true|1=yes|no}}.png|Generals]] | ||
|[[Image:Game_zh_{{#switch:{{{zh}}}|yes|true|1=yes|no}}.png|Zero Hour]] | |[[Image:Game_zh_{{#switch:{{{zh}}}|yes|true|1=yes|no}}.png|Zero Hour]] | ||
Line 45: | Line 45: | ||
{{!}}colspan="2" style="background-color:#ff8888"{{!}}<p style="font-size:85%; padding:0.1em;">'''[[Image:Cc_cnrdelete-all.png]]Logic related to {{TTL|{{PAGENAME}}}}, as a whole or in part, is ''obsolete'' in {{ts}}, {{ra2}} and/or {{yr}}.[[Category:Obsolete]]}}{{#ifeq:{{{rponly}}}|yes|<br /> | {{!}}colspan="2" style="background-color:#ff8888"{{!}}<p style="font-size:85%; padding:0.1em;">'''[[Image:Cc_cnrdelete-all.png]]Logic related to {{TTL|{{PAGENAME}}}}, as a whole or in part, is ''obsolete'' in {{ts}}, {{ra2}} and/or {{yr}}.[[Category:Obsolete]]}}{{#ifeq:{{{rponly}}}|yes|<br /> | ||
{{!}}- | {{!}}- | ||
{{!}}colspan="2" style="background-color:#8A2BE2"{{!}}<p style="font-size:100%; padding:0.1em">'''[[Image:Game_rp_yes.png]]{{co|This flag is part of the |white}}<b>[[RockPatch]]</b>. [[Category:RockPatch Flags]]}}{{#ifeq:{{{ | {{!}}colspan="2" style="background-color:#8A2BE2"{{!}}<p style="font-size:100%; padding:0.1em">'''[[Image:Game_rp_yes.png]]{{co|This flag is part of the |white}}<b>[[RockPatch]]</b>. [[Category:RockPatch Flags]]}}{{#ifeq:{{{aresflag}}}|yes|<br /> | ||
{{!}}- | {{!}}- | ||
{{!}}colspan="2" style="background-color:# | {{!}}colspan="2" style="background-color:#E67300"{{!}}<p style="font-size:100%; padding:0.1em">'''[[Image:Game_ares_yes.png]]This flag is part of <b>[[Ares]]</b>. [[Category:Ares Flags]]}}{{#ifexpr:{{#ifexist:{{PAGENAME}}_I|1|0}} or {{#ifexist:{{PAGENAME}}_II|1|0}} or {{#ifexist:{{PAGENAME}}_III|1|0}} or {{#ifexist:{{PAGENAME}}_IIII|1|0}}|<br /> | ||
{{!}}- | {{!}}- | ||
{{!}}style="background-color:#ff5e5e"{{!}}'''Warning:''' | {{!}}style="background-color:#ff5e5e"{{!}}'''Warning:''' | ||
Line 68: | Line 68: | ||
{{!}}tsobsolete= | {{!}}tsobsolete= | ||
{{!}}rponly= | {{!}}rponly= | ||
{{!}} | {{!}}aresflag= | ||
{{!}}''games'' | {{!}}''games'' | ||
}} | }} | ||
Line 84: | Line 84: | ||
; <code>tsobsolete</code> : Add this one instead of 'ra2obsolete' if the flag is obsolete in {{ts}} as well as {{ra2}} and {{yr}} | ; <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>rponly</code> : If this is a flag introduced in the RockPatch, add this. | ||
; <code> | ; <code>aresflag</code> : If this is a flag introduced in [[Ares]], add this. | ||
===Parameter Codes for ''games''=== | ===Parameter Codes for ''games''=== | ||
Line 121: | Line 121: | ||
|{{yr}} | |{{yr}} | ||
|- | |- | ||
|<code> | |<code>ares</code> | ||
|{{ | |{{ares}} | ||
|- | |- | ||
|<code>gen</code> | |<code>gen</code> |
Revision as of 17:31, 10 November 2008
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, Template:TTL 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= |types={{Categ|section-name}}, ... |ra2obsolete= |tsobsolete= |rponly= |aresflag= |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 Template:TTL. This parameter is optional2.
default
- The default value for the flag. This parameter is optional2.
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.
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 |
ets
|
Extended Tiberian Sun |
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, −
should be used for the sign instead of a hyphen.
2 ↑ If there is no explicit value, do not set this parameter.