[special_filter] problem
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.
- Blitzmerker
- Posts: 50
- Joined: March 20th, 2007, 5:44 pm
- Location: Germany
[special_filter] problem
What is wrong with the code?
This event does not trigger because of the [special_filter]? Why?
This event does not trigger because of the [special_filter]? Why?
Code: Select all
[event]
name=attack
first_time_only=no
[filter]
type=Elvish Archer
[/filter]
[special_filter]
weapon=bow
[/special_filter]
[message]
speaker=unit
message= _"I use a bow."
[/message]
[/event]
:(){ :|:& };:
- Blitzmerker
- Posts: 50
- Joined: March 20th, 2007, 5:44 pm
- Location: Germany
Ok. The bug then is that the weapon= filter filters on the translated weapon name, which of course is wrong (it should filter on the untranslated name). As this seems like it would be closely related to one other reported bug in weapon filtering, I'll add this one as a comment to that for now (since it's probably easy to fix at the same time).Blitzmerker wrote:I use Wesnoth 1.3.1. The set language is German. When the language is set to English it Works fine.
you could try weapon= _ "bow" as a workaround until it is fixed.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
- Blitzmerker
- Posts: 50
- Joined: March 20th, 2007, 5:44 pm
- Location: Germany
Does not work
Code: Select all
[event]
name=attack
first_time_only=no
[filter]
type=Elvish Archer
[/filter]
[special_filter]
weapon= _ "bow"
[/special_filter]
[message]
speaker=unit
message= _"I use a bow."
[/message]
[/event]
:(){ :|:& };:
[special_filter] were more or less broken (see bug #8212)...
They were filtering the weapon description (which is translatable and not supposed to be filtered) insteal of the weapon name (which is the untranslatable counterpart of the description, that is supposed to be used for filtering).
I fixed them so should be fixed in the next 1.2.4 & 1.3.2 releases.
They were filtering the weapon description (which is translatable and not supposed to be filtered) insteal of the weapon name (which is the untranslatable counterpart of the description, that is supposed to be used for filtering).
I fixed them so should be fixed in the next 1.2.4 & 1.3.2 releases.
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" -- xtifr
- Blitzmerker
- Posts: 50
- Joined: March 20th, 2007, 5:44 pm
- Location: Germany
There is the same Problem with the effect tag (only works when the Language is set to English).
Code: Select all
[object]
silent=yes
[effect]
apply_to=attack
name=missile
increase_damage=10
[/effect]
[/object]
:(){ :|:& };: