Does [filter_vision] check for whether the unit is stealthed
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.
Does [filter_vision] check for whether the unit is stealthed
I can't really find it. I've read before in the wiki that it just checked for whether the sides could see the hex the unit was on, but now I'm reading something different. I'm confused.
I'm just... a guy...
I'm back for now, I might get started on some work again.
I'm back for now, I might get started on some work again.
Re: Does [filter_vision] check for whether the unit is steal
The documentation seems a bit wrong... as I recall, filter_vision works for units, not locations.
And if a unit is stealthed, obviously it is not visible to enemies.
I guess it has been changed since I wrote the feature because then it says "in Wesnoth 1.6.4 visible=yes filters for units (visible or invisible) in visible locations. Filtering for unit (in)visibility requires visible=no." I have read that sentence about ten times and it still doesn't make much sense to me, though.
The source code is pretty straightforward at least:
So for each viewing side, if the unit's location is not obscured by fog and the unit is not hiding, then it is considered "visible"
And if a unit is stealthed, obviously it is not visible to enemies.
I guess it has been changed since I wrote the feature because then it says "in Wesnoth 1.6.4 visible=yes filters for units (visible or invisible) in visible locations. Filtering for unit (in)visibility requires visible=no." I have read that sentence about ten times and it still doesn't make much sense to me, though.
The source code is pretty straightforward at least:
Code: Select all
if (visible != not_fogged && not_hiding) {
return false;
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: Does [filter_vision] check for whether the unit is steal
There is a filter_vision in SLF since 1.11.0-svn. IIRC it was a patch by Brilliand which I appllied. He made the documentation. This doesn't apply for the thread of course, since there is no release out there yet with the feature.
Seems there is redundant documentation for filter_vision; on this page it's explained better I think: http://wiki.wesnoth.org/FilterWML#Filtering_Vision
Seems there is redundant documentation for filter_vision; on this page it's explained better I think: http://wiki.wesnoth.org/FilterWML#Filtering_Vision
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: Does [filter_vision] check for whether the unit is steal
Thanks guys.
I'm just... a guy...
I'm back for now, I might get started on some work again.
I'm back for now, I might get started on some work again.
- Elvish_Hunter
- Posts: 1576
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: Does [filter_vision] check for whether the unit is steal
Indeed, as Anonymissimus said, [filter_vision] for locations will be available from 1.11.0. Some time ago, I updated in trunk the scenario Searching for the Runecrafter from SoF. Here there is the new code, so you can see how it will work in the new versions:A Guy wrote:it just checked for whether the sides could see the hex the unit was on
How to simulate a sighted location event
Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)