Difference between revisions of "StandardSideFilter"
From The Battle for Wesnoth Wiki
(document team_name=) |
|||
Line 5: | Line 5: | ||
* '''side''': filter matches only if side number is contained in a comma-separated list. Note that as opposed to the usual inline side= key in wml action tags, which defaults to 1, the side= key in a SSF defaults to all sides (similarly, the id= key in SUFs defaults to all ids) | * '''side''': filter matches only if side number is contained in a comma-separated list. Note that as opposed to the usual inline side= key in wml action tags, which defaults to 1, the side= key in a SSF defaults to all sides (similarly, the id= key in SUFs defaults to all ids) | ||
* '''[has_unit]''': filter matches only if side controls a unit matched by this [[StandardUnitFilter]] note: Does not check for recall list units. | * '''[has_unit]''': filter matches only if side controls a unit matched by this [[StandardUnitFilter]] note: Does not check for recall list units. | ||
+ | * '''team_name''': Filter matches only if this passed team_name is contained in the currently filtered side's team_name string. Note that a side can be allied/on the same team like 2 (more...) other sides which can be enemies at the same time. (achieved by defining a side via [side]team_name=1,2 etc.) | ||
Also, [and], [or], and [not] subfilters are supported. | Also, [and], [or], and [not] subfilters are supported. | ||
− | Interaction of SSF and side= in tags like [ | + | Interaction of SSF and side= in tags like [remove_shroud] : |
In case that inline side= and [filter_side] are given, inline side= is ignored and [filter_side]side= gets priority: | In case that inline side= and [filter_side] are given, inline side= is ignored and [filter_side]side= gets priority: | ||
selects side 4 and 5: | selects side 4 and 5: | ||
− | [ | + | [remove_shroud] |
side=2 | side=2 | ||
[filter_side] | [filter_side] | ||
side=4,5 | side=4,5 | ||
[/filter_side] | [/filter_side] | ||
− | [ | + | [remove_shroud] |
Revision as of 21:27, 11 May 2011
From FilterWML, this is the standard way of filtering on sides. The following attributes and sub-tags are permitted:
- side: filter matches only if side number is contained in a comma-separated list. Note that as opposed to the usual inline side= key in wml action tags, which defaults to 1, the side= key in a SSF defaults to all sides (similarly, the id= key in SUFs defaults to all ids)
- [has_unit]: filter matches only if side controls a unit matched by this StandardUnitFilter note: Does not check for recall list units.
- team_name: Filter matches only if this passed team_name is contained in the currently filtered side's team_name string. Note that a side can be allied/on the same team like 2 (more...) other sides which can be enemies at the same time. (achieved by defining a side via [side]team_name=1,2 etc.)
Also, [and], [or], and [not] subfilters are supported.
Interaction of SSF and side= in tags like [remove_shroud] :
In case that inline side= and [filter_side] are given, inline side= is ignored and [filter_side]side= gets priority:
selects side 4 and 5:
[remove_shroud] side=2 [filter_side] side=4,5 [/filter_side] [remove_shroud]