[engine] alternate meta-condition behavior
Moderator: Forum Moderators
Forum rules
Before posting a new idea, you must read the following:
Before posting a new idea, you must read the following:
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: [engine] alternate meta-condition behavior
As it currently stands that syntax would result in the
[any_of]
tag being taken as ActionWMl rather than a filter; but if wrapped in a [filter]
tag I suppose it could work. Not fond of the extra indentation level though. Maybe take any direct keys in [any_of]
as belonging to an implicit [filter]
child? I dunno.Re: [engine] alternate meta-condition behavior
I don't see how allowing [any_of] inside [event] is ambiguous. [event] takes ActionWML children but [any_of] as discussed above would be ConditionWML, so we're free to invent a new meaning in that context.
I don't understand the suggestion about an implicit
I don't understand the suggestion about an implicit
[filter]
. I assume in practice a [any_of] would always have at least two [filter_*] children, otherwise the [any_of] would be redundant. For "id=foo or side=2 or canrecruit=yes" I'd use [any_of] with three [filter]s inside it, one key=value in each [filter].- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: [engine] alternate meta-condition behavior
It can be made unambiguous, but currently the ActionWML engine only ignores tags that begin with "filter", so it would try to execute the
Basically that means extending event syntax, not filter syntax; filter syntax is what goes inside the filter tags.
[any_of]
. You could of course add additional exceptions in the ActionWML engine if you wanted to, and I guess that could even allow you to do things like this:Code: Select all
[any_of]
[filter]
ability=thing
[/filter]
[filter_second]
ability=thing
[/filter_second]
[/any_of]
Re: [engine] alternate meta-condition behavior
And that syntax doesn't have an easy equivalent in current 1.14, does it? Best I can think of is to use two events:
Code: Select all
[event]
name=foo
[filter]
ability=thing
[/filter]
[fire_event]
name=bar
[/fire_event]
[/event]
[event]
name=foo
[filter_second]
ability=thing
[/filter_second]
[fire_event]
name=bar
[/fire_event]
[/event]
Re: [engine] alternate meta-condition behavior
That could be done with [filter_condition], meta condition tags and [have_unit].
- Celtic_Minstrel
- Developer
- Posts: 2207
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: [engine] alternate meta-condition behavior
Which definitely smells of a hack though...