filter_adjacent in resistance tag not working
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
-
- Code Contributor
- Posts: 201
- Joined: October 6th, 2017, 12:57 pm
Re: filter_adjacent in resistance tag not working
I'm not asking for the number of units counted but if it's normal for you that all [filter_adjacent] in the same ability must meet the conditions, because if no conditions overlap like [filter_adjacent]race=elf and [filter_adjacent]race=human then the ability has no chance of working
- lhybrideur
- Posts: 454
- Joined: July 9th, 2019, 1:46 pm
Re: filter_adjacent in resistance tag not working
you should use
or
then, shouldn't you?
Because filters are "added" (&) iirc.
Code: Select all
[filter_adjacent]
race=human,elf
[/filter_adjacent]
Code: Select all
[filter_adjacent]
race=human
[or]
race=elf
[/or]
[/filter_adjacent]
Because filters are "added" (&) iirc.
-
- Code Contributor
- Posts: 201
- Joined: October 6th, 2017, 12:57 pm
Re: filter_adjacent in resistance tag not working
If filter_adjacent are 'added', then what is the point of being able to put several in the same ability?lhybrideur wrote: ↑June 10th, 2025, 11:13 am you should useorCode: Select all
[filter_adjacent] race=human,elf [/filter_adjacent]
then, shouldn't you?Code: Select all
[filter_adjacent] race=human [or] race=elf [/or] [/filter_adjacent]
Because filters are "added" (&) iirc.
Re: filter_adjacent in resistance tag not working
Isn't it just a general rule that listing multiple filters (of any type) is equivalent to combining them withnewfrenchy83 wrote: ↑June 10th, 2025, 11:58 am If filter_adjacent are 'added', then what is the point of being able to put several in the same ability?
[and]
?See the example in Writing complex filters: "...a simple rule: [and] tags are not needed when they contain one single criterion or a single block..."
Of course, not every combination of filters will actually make sense. Some combinations of filters will simply match nothing.
-
- Code Contributor
- Posts: 201
- Joined: October 6th, 2017, 12:57 pm
Re: filter_adjacent in resistance tag not working
Do you think this makes sense in this specific case?
Re: filter_adjacent in resistance tag not working
Wouldn't it be confusing to make a different rule just for one specific case that works differently from the way filters work everywhere else?
Re: filter_adjacent in resistance tag not working
The wiki edits are confusing...
[filter_adjacent] in an ability is definitely not from 1.19.10. It's much, much older. This was added in two places and only one was converted to a note that might be explaining a bugfix?
I don't really understand what
What is the point of putting multiple [filter_adjacent] in an ability? Presumably no point other than it can be done so the engine has to do something.
[filter_adjacent] in an ability is definitely not from 1.19.10. It's much, much older. This was added in two places and only one was converted to a note that might be explaining a bugfix?
I don't really understand what
might mean. It repeats [filter_adjacent] in the paragraph about [filter_adjacent] which is confusing. What other units is it talking about? Invalidated means the filter does not match? "the direction and number conditions" are the additional attributes [filter_adjacent] accepts over a SUF?if a unit does not match [filter_adjacent] it is not invalidated if the other units match the standard filters as well as the direction and number conditions
What is the point of putting multiple [filter_adjacent] in an ability? Presumably no point other than it can be done so the engine has to do something.
"If gameplay requires it, they can be made to live on Venus." -- scott
-
- Code Contributor
- Posts: 201
- Joined: October 6th, 2017, 12:57 pm
Re: filter_adjacent in resistance tag not working
This relates to my question, what is the point of having several [filter_adjacent] if they all have to match for the ability to be active, if the correspondence is necessary for only one of them, I would understand but there it is useless
Re: filter_adjacent in resistance tag not working
Why you are talking about multiple? The example that fails only uses one.
-
- Code Contributor
- Posts: 201
- Joined: October 6th, 2017, 12:57 pm
Re: filter_adjacent in resistance tag not working
Soliton confirmed that [filter_adjacent] was supported before 1.19.10 too.
-
- Code Contributor
- Posts: 201
- Joined: October 6th, 2017, 12:57 pm
Re: filter_adjacent in resistance tag not working
That contradicts what you said before. If it is so completely bugged then it was never supported at all.
-
- Code Contributor
- Posts: 201
- Joined: October 6th, 2017, 12:57 pm
Re: filter_adjacent in resistance tag not working
Last page you gave me impression [filter_adjacent] is completely broken before {{DevFeature1.19|10}}. But in https://wiki.wesnoth.org/index.php?titl ... ldid=74392 you said it still worked before as well by removing the dev feature marker.