CINXE.COM

[event] name=sighted behavior - Page 3 - The Battle for Wesnoth Forums

<!DOCTYPE html> <html dir="ltr" lang="en-gb"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>[event] name=sighted behavior - Page 3 - The Battle for Wesnoth Forums</title> <link rel="alternate" type="application/atom+xml" title="Feed - The Battle for Wesnoth Forums" href="/app.php/feed?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <link rel="alternate" type="application/atom+xml" title="Feed - News" href="/app.php/feed/news?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <link rel="alternate" type="application/atom+xml" title="Feed - All forums" href="/app.php/feed/forums?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <link rel="alternate" type="application/atom+xml" title="Feed - New Topics" href="/app.php/feed/topics?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <link rel="alternate" type="application/atom+xml" title="Feed - Forum - WML Workshop" href="/app.php/feed/forum/21?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <link rel="alternate" type="application/atom+xml" title="Feed - Topic - [event] name=sighted behavior" href="/app.php/feed/topic/27224?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <link rel="canonical" href="https://forums.wesnoth.org/viewtopic.php?t=27224&amp;start=30"> <!-- phpBB style name: prosilver Special Edition Based on style: prosilver (this is the default phpBB3 style) Original author: Tom Beddard ( http://www.subBlue.com/ ) Modified by: phpBB Limited ( https://www.phpbb.com/ ) --> <link href="./styles/prosilver/theme/normalize.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/base.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/utilities.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/common.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/links.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/content.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/buttons.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/cp.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/forms.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/icons.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/colours.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/responsive.css?assets_version=264" rel="stylesheet"> <link href="./assets/css/font-awesome.min.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver_se/theme/stylesheet.css?assets_version=264" rel="stylesheet"> <link href="./styles/prosilver/theme/en/stylesheet.css?assets_version=264" rel="stylesheet"> <link href="./assets/cookieconsent/cookieconsent.min.css?assets_version=264" rel="stylesheet"> <!--[if lte IE 9]> <link href="./styles/prosilver/theme/tweaks.css?assets_version=264" rel="stylesheet"> <![endif]--> <link rel="apple-touch-icon" type="image/png" href="https://www.wesnoth.org/wesmere/img/apple-touch-icon.png" sizes="180x180" /> <link rel="icon" type="image/png" href="https://www.wesnoth.org/wesmere/img/favicon-32.png" sizes="32x32" /> <link rel="icon" type="image/png" href="https://www.wesnoth.org/wesmere/img/favicon-16.png" sizes="16x16" /> <meta name="theme-color" content="#0f1421" /> <link href="https://www.wesnoth.org/wesmere/css/forums-1.2.0.css" rel="stylesheet" type="text/css" /> <style> /* * phpBB overrides */ #page-header > .headerbar { display: none!important; } body { padding-top: 0; } /*.search-header { margin-top: 0; margin-right: 0; box-shadow: 0 0 2px #0075B0; }*/ </style> </head> <body id="phpbb" class="nojs notouch section-viewtopic ltr "> <div id="wesmere-embed"> <div id="nav" role="banner"> <div class="centerbox"> <div id="logo"> <a href="https://www.wesnoth.org/" aria-label="Wesnoth logo"></a> </div> <ul id="navlinks" role="navigation"> <li><a href="https://www.wesnoth.org/">Home</a></li> <li><a href="https://forums.wesnoth.org/viewforum.php?f=62">News</a></li> <li><a href="https://wiki.wesnoth.org/Play">Play</a></li> <li><a href="https://wiki.wesnoth.org/Create">Create</a></li> <li><a href="https://forums.wesnoth.org/">Forums</a></li> <li><a href="https://wiki.wesnoth.org/Project">About</a></li> </ul> <div id="sitesearch" role="search"> <form method="get" action="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <input id="searchbox" class="has-advanced-search" type="search" name="keywords" placeholder="Search" title="Search these forums [Alt+Shift+f]" accesskey="f" /> <span id="searchbox-controls"> <button id="search-go" class="search-button" type="submit" title="Search"> <i class="fa fa-fw fa-search search-icon" aria-hidden="true"></i> <span class="sr-label">Search</span> </button> <a id="search-opts" class="search-button" href="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Advanced search"> <i class="fa fa-fw fa-cog advsearch-icon" aria-hidden="true"></i> <span class="sr-label">Advanced search</span> </a> </span> </form> </div> <div class="reset"></div> </div> </div> </div> <div id="content"> <div id="wrap" class="wrap"> <a id="top" class="top-anchor" accesskey="t"></a> <div id="page-header"> <div class="headerbar" role="banner"> <div class="inner"> <div id="site-description" class="site-description"> <a id="logo" class="logo" href="./index.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Forums"> <span class="site_logo"></span> </a> <h1>The Battle for Wesnoth Forums</h1> <p>The official forums for The Battle for Wesnoth.</p> <p class="skiplink"><a href="#start_here">Skip to content</a></p> </div> <div id="search-box" class="search-box search-header" role="search"> <form action="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" method="get" id="search"> <fieldset> <input name="keywords" id="keywords" type="search" maxlength="128" title="Search for keywords" class="inputbox search tiny" size="20" value="" placeholder="Search…" /> <button class="button button-search" type="submit" title="Search"> <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">Search</span> </button> <a href="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="button button-search-end" title="Advanced search"> <i class="icon fa-cog fa-fw" aria-hidden="true"></i><span class="sr-only">Advanced search</span> </a> <input type="hidden" name="sid" value="0efa6c6860d70c9f7037bbead6a9c3f2" /> </fieldset> </form> </div> </div> </div> <div class="navbar" role="navigation"> <div class="inner"> <ul id="nav-main" class="nav-main linklist" role="menubar"> <li id="quick-links" class="quick-links dropdown-container responsive-menu" data-skip-responsive="true"> <a href="#" class="dropdown-trigger"> <i class="icon fa-bars fa-fw" aria-hidden="true"></i><span>Quick links</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <ul class="dropdown-contents" role="menu"> <li class="separator"></li> <li> <a href="./search.php?search_id=unanswered&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" role="menuitem"> <i class="icon fa-file-o fa-fw icon-gray" aria-hidden="true"></i><span>Unanswered topics</span> </a> </li> <li> <a href="./search.php?search_id=active_topics&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" role="menuitem"> <i class="icon fa-file-o fa-fw icon-blue" aria-hidden="true"></i><span>Active topics</span> </a> </li> <li class="separator"></li> <li> <a href="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" role="menuitem"> <i class="icon fa-search fa-fw" aria-hidden="true"></i><span>Search</span> </a> </li> <li class="separator"></li> </ul> </div> </li> <li data-skip-responsive="true"> <a href="/app.php/help/faq?sid=0efa6c6860d70c9f7037bbead6a9c3f2" rel="help" title="Frequently Asked Questions" role="menuitem"> <i class="icon fa-question-circle fa-fw" aria-hidden="true"></i><span>FAQ</span> </a> </li> <li data-last-responsive="true"> <a href="https://forums.wesnoth.org/viewtopic.php?t=24277&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" rel="help" title="View the Community Guidelines" role="menuitem"> <i class="icon fa-book fa-fw" aria-hidden="true"></i><span>Community Guidelines</span> </a> </li> <li class="rightside" data-skip-responsive="true"> <a href="./ucp.php?mode=login&amp;redirect=viewtopic.php%3Ff%3D21%26hilit%3Dshroud%26p%3D389087%26t%3D27224&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Login" accesskey="x" role="menuitem"> <i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>Login</span> </a> </li> <li class="rightside" data-skip-responsive="true"> <a href="./ucp.php?mode=register&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" role="menuitem"> <i class="icon fa-pencil-square-o fa-fw" aria-hidden="true"></i><span>Register</span> </a> </li> </ul> <ul id="nav-breadcrumbs" class="nav-breadcrumbs linklist navlinks" role="menubar"> <li class="breadcrumbs" itemscope itemtype="https://schema.org/BreadcrumbList"> <span class="crumb" itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope><a itemprop="item" href="./index.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" accesskey="h" data-navbar-reference="index"><i class="icon fa-home fa-fw"></i><span itemprop="name">Forums</span></a><meta itemprop="position" content="1" /></span> <span class="crumb" itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope data-forum-id="26"><a itemprop="item" href="./viewforum.php?f=26&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2"><span itemprop="name">Development</span></a><meta itemprop="position" content="2" /></span> <span class="crumb" itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope data-forum-id="21"><a itemprop="item" href="./viewforum.php?f=21&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2"><span itemprop="name">WML Workshop</span></a><meta itemprop="position" content="3" /></span> </li> <li class="rightside responsive-search"> <a href="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="View the advanced search options" role="menuitem"> <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">Search</span> </a> </li> </ul> </div> </div> </div> <a id="start_here" class="anchor"></a> <div id="page-body" class="page-body" role="main"> <h2 class="topic-title"><a href="./viewtopic.php?t=27224&amp;start=30&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">[event] name=sighted behavior</a></h2> <!-- NOTE: remove the style="display: none" when you want to have the forum description on the topic body --> <div style="display: none !important;">The place to post your <acronym title="Wesnoth Markup Language">WML</acronym> questions and answers.<br /></div> <p> <strong>Moderator:</strong> <a style="color:#008000;" href="./memberlist.php?mode=group&amp;g=6643&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">Forum Moderators</a> </p> <div class="rules"> <div class="inner"> <strong>Forum rules</strong><br /> <ul><li>Please use <strong class="text-strong">[</strong><strong class="text-strong">code</strong><strong class="text-strong">]</strong> <a href="http://forums.wesnoth.org/faq.php?mode=bbcode" class="postlink">BBCode</a> tags in your posts for embedding WML snippets.</li> <li>To keep your code readable so that others can easily help you, make sure to <strong class="text-strong">indent</strong> it following <a class="postlink" href="//wiki.wesnoth.org/ConventionsWML#Indentation">our conventions</a>.</li></ul> </div> </div> <div class="action-bar bar-top"> <a href="./posting.php?mode=reply&amp;t=27224&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="button" title="Post a reply"> <span>Post Reply</span> <i class="icon fa-reply fa-fw" aria-hidden="true"></i> </a> <div class="search-box" role="search"> <form method="get" id="topic-search" action="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <fieldset> <input class="inputbox search tiny" type="search" name="keywords" id="search_keywords" size="20" placeholder="Search this topic…" /> <button class="button button-search" type="submit" title="Search"> <i class="icon fa-search fa-fw" aria-hidden="true"></i><span class="sr-only">Search</span> </button> <a href="./search.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="button button-search-end" title="Advanced search"> <i class="icon fa-cog fa-fw" aria-hidden="true"></i><span class="sr-only">Advanced search</span> </a> <input type="hidden" name="t" value="27224" /> <input type="hidden" name="sf" value="msgonly" /> <input type="hidden" name="sid" value="0efa6c6860d70c9f7037bbead6a9c3f2" /> </fieldset> </form> </div> <div class="pagination"> 43 posts <ul> <li class="arrow previous"><a class="button button-icon-only" href="./viewtopic.php?t=27224&amp;hilit=shroud&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2&amp;start=15" rel="prev" role="button"><i class="icon fa-chevron-left fa-fw" aria-hidden="true"></i><span class="sr-only">Previous</span></a></li> <li><a class="button" href="./viewtopic.php?t=27224&amp;hilit=shroud&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" role="button">1</a></li> <li><a class="button" href="./viewtopic.php?t=27224&amp;hilit=shroud&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2&amp;start=15" role="button">2</a></li> <li class="active"><span>3</span></li> </ul> </div> </div> <div id="p388463" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile388463"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=111298_1253162852.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a> </dt> <dd class="profile-rank">Code Contributor</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=111298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">291</a></dd> <dd class="profile-joined"><strong>Joined:</strong> January 12th, 2009, 10:21 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Santa Cruz, CA</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact solsword"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact solsword</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.cs.hmc.edu/~pmawhorter" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content388463"> <h3 class="first"> <a href="./viewtopic.php?p=388463&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388463">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388463&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388463&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388463" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a></strong> &raquo; </span><time datetime="2009-10-07T01:45:00+00:00">October 7th, 2009, 1:45 am</time> </p> <div class="content"><blockquote><div><cite>Sapient wrote:</cite>Regarding point#1, I'd like to see your code just to be sure.</div></blockquote> If by this you're referring to your suggestion of excluding hexes already searched, didn't we just establish that that would actually be *slower* than the alternative in most cases? This was because the exclusion relies on running another location filter with a radius, which isn't implemented in O(1) time, while the filter for matching (which we know fails on all spaces checked so far) is going to be O(1) in most cases (like my example of [filter][not][/not][/filter], or any simple terrain filter). If I've got something wrong here, please correct me. If I'm missing something else that you brought up, could you take the time to point it out in my code (which I think is nearly identical to Anonymissus'):<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define FIND_NEARBY FILTER X Y LIMIT # Does a search for a nearby location that matches the given filter. # Basically just looks for such a location with increasing radius until it # finds at least one. This is sadly inefficient, but implementing BFS in # WML is... difficult. Once LIMIT is reached, the entire map is searched. # This macro creates the 'nearby_locations' and 'nearby_distance' # variables, which can be used to access a list of locations found and the # distance to those locations, respectively. They should eventually be # cleared, which can be accomplished using the CLEANUP_SEARCH macro. [clear_variable] name=nearby_locations [/clear_variable] [set_variable] name=nearby_distance value=0 [/set_variable] [while] [not] [variable] name=nearby_locations.length greater_than=0 [/variable] [/not] [and] [variable] name=nearby_distance less_than={LIMIT} [/variable] [/and] [do] {DEBUG "Searching depth $nearby_distance around ({X}, {Y})..."} [store_locations] variable=nearby_locations {FILTER} [and] x,y={X},{Y} radius=$nearby_distance [/and] [/store_locations] {DEBUG "...found $nearby_locations.length locations."} [set_variable] name=nearby_distance add=1 [/set_variable] [/do] [/while] [if] [variable] name=nearby_locations.length equals=0 [/variable] [then] [store_locations] variable=nearby_locations {FILTER} [/store_locations] [/then] [/if] #enddef </code></pre></div> <blockquote><div><cite>Sapient wrote:</cite> <blockquote><div><cite>Anonymissimus wrote:</cite> This approach does not take into account the case that the unit that's to be spotted is a specific one - according to reference wml, filter_vision only accepts a side key, not an id or better, SUF. And: I'd <em class="text-italics">need</em> to filter on the vision of the viewed side (If this is possible at all - ais aren't <span class="posthilit">shroud</span>-aware...), because filtering on the viewing side's (=the player) vision doesn't take into account the case that the move is made and after that the <span class="posthilit">shroud</span> update reveals unit(s) to be spotted (with delay <span class="posthilit">shroud</span> on). </div></blockquote> Regarding point#2, the filter_vision goes inside a Standard Unit Filter, so you already have a Standard Unit Filter available to you right there. Perhaps you are confused because you were trying to put it in the [event][filter] instead of the [store_unit][filter]. Or maybe you are confused because you are forgetting that a unit such as a scout shares its "view" with its entire side. </div></blockquote> The only problem that I can see here is that if you're trying to be *really* accurate in emulating sighted events, you only want to fire your faux-sighted event for units spotted by the moving unit. Of course, the existing code for the faux-sighted event fails on this count in several ways as well. Considering the following examples:<br> <br> 1. You want to fire an event when the first Spearman is sighted. However, the player has one Spearman on their team. According to the wiki, a real name=sighted event ignores the already-known spearman, because name=sighted only fires when *new* units come into view. Anonymissus' code fails here if, for example, you move another unit next to the spearman. There's no point at which <span class="posthilit">shroud</span> gets removed, but the faux-sighted fires anyways. Sapient's version (just using [filter_vision] across all units, as I understand it) fails here whenever any unit gets moved. To work around this, you could make your filter more specific than "Spearman", but I'm not sure that that will *always* be the case. Of course, you could just revise the definition of "sighted" somehow.<br> <br> 2. You move a unit such that as it moves, it reveals an enemy unit, but once it is done moving, it isn't within range of that unit. In this case, Sapient's code works, but Anonymissus' code fails.<br> <br> Note that in most cases, I suspect Sapient's version (filtering vision over all units) will be faster than Anonymissus' (and it accurately takes into account unit move costs which is great). However, if there are *a lot* of units on the map, it could be slower.<br> <br> <blockquote><div><cite>Sapient wrote:</cite> <blockquote><div><cite>Anonymissimus wrote:</cite> I think I've tried that, too...probably worth another thought. But again, I want to have a SUF for the unit(s) to be spotted.</div></blockquote> Regarding point #3, perhaps you are forgetting that Standard Location Filter can contain a [filter] for units. Or perhaps you are forgetting that once a location with a desired unit is known, it is trivial to store the unit at that location.<br> <br> I'll try to post up some code later if this doesn't make sense.</div></blockquote> On point 3, I agree with Sapient. It seems like the store_unit would run a *lot* slower than store_location, because the store_unit has to evaluate the location filter for each unit (unless it caches filter results?).</div> <div id="sig388463" class="signature"><a href="http://www.wesnoth.org/forum/viewtopic.php?f=8&amp;t=23754" class="postlink">The Knights of the Silver Spire</a> campaign.<br> <br> <a href="http://www.cs.hmc.edu/~pmawhorter" class="postlink">http://www.cs.hmc.edu/~pmawhorter</a> - my website.<br> <br> Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can <a class="postlink" href="//wiki.wesnoth.org/TeamColoring">do it yourself</a>. If you just happen to like magenta, no hard feelings?</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388476" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile388476"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=102298_1403831693.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Sapient</a> </dt> <dd class="profile-rank">Inactive Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=102298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">4453</a></dd> <dd class="profile-joined"><strong>Joined:</strong> November 26th, 2005, 7:41 am</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Sapient"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Sapient</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.wesnoth.org/wiki/User:Sapient" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content388476"> <h3 > <a href="./viewtopic.php?p=388476&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388476">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388476&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388476&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388476" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Sapient</a></strong> &raquo; </span><time datetime="2009-10-07T05:08:12+00:00">October 7th, 2009, 5:08 am</time> </p> <div class="content"><blockquote><div><cite>solsword wrote:</cite><blockquote><div><cite>Sapient wrote:</cite>Regarding point#1, I'd like to see your code just to be sure.</div></blockquote> If by this you're referring to your suggestion of excluding hexes already searched, didn't we just establish that that would actually be *slower* than the alternative in most cases? This was because the exclusion relies on running another location filter with a radius, which isn't implemented in O(1) time, while the filter for matching (which we know fails on all spaces checked so far) is going to be O(1) in most cases (like my example of [filter][not][/not][/filter], or any simple terrain filter). If I've got something wrong here, please correct me. If I'm missing something else that you brought up, could you take the time to point it out in my code (which I think is nearly identical to Anonymissus'):<br> </div></blockquote> I still disagree somewhat with silene's Big-O analysis and I think the [not]x,y,radius=a,b,c[/not] would be beneficial in the general case where {FILTER} is unknown, since it allows us to eliminate the re-processing of arbitrarily complex filters.<br> <br> See the <a href="http://wesnoth.debian.net/%23wesnoth-dev-2009-09-30.log" class="postlink">developer irclog from 2009-09-30</a> for an in-depth discussion: <div style="margin:20px;margin-top:5px"><div class="quotetitle" style="vertical-align:middle;display:inline-block"><strong>irclog:</strong> <input class="button1" style="font-size:0.8em" type="button" value="Show" onclick="if (this.parentNode.parentNode.getElementsByTagName('div')[1].style.display != '') { this.parentNode.parentNode.getElementsByTagName('div')[1].style.display = ''; this.value = 'Hide'; this.innerText = ''; } else { this.parentNode.parentNode.getElementsByTagName('div')[1].style.display = 'none'; this.value = 'Show'; this.innerText = ''; }"></div><div class="quotecontent" style="display:none">00:05 &lt;Sapient&gt; I am trying to figure out how silene calculated O((n^2+t)*log(n)) for terrain_filter::get_locations()<br> 00:05 &lt;Sapient&gt; <a href="http://www.wesnoth.org/forum/viewtopic.php?p=387344#p387344" class="postlink">http://www.wesnoth.org/forum/viewtopic. ... 44#p387344</a><br> 00:05 &lt;Shadow_Master&gt; due to a lack of proper book training, I have no clue about algorithm complexity stuff <img class="smilies" src="./images/smilies/icon_razz.gif" width="15" height="15" alt=":P" title="Razz"><br> 00:06 &lt;Sapient&gt; there are a couple of obvious inefficiencies, like the converting sets into vectors, and the way empty filter containing [not] is handled using set difference instead of a negation of the universal set<br> 00:07 &lt;Sapient&gt; but that first issue would be difficult to fix without making a lot of code use sets of location instead of vectors of location<br> 00:08 &lt;Sapient&gt; and the second issue seemed like premature optimization since creating a collection of all x,y wasn't likely to be a bottleneck<br> 00:09 &lt;Sapient&gt; but I do think my overall approach was a very sensible one with respect to efficienc<br> 00:11 &lt;Sapient&gt; so I was surprised to be ranked so poorly on the O-notation<br> 00:11 &lt;Sapient&gt; Crab seems like a scholar so maybe he could tell me <img class="smilies" src="./images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br> 00:12 * Crab_ has to read the whole post before that <img class="smilies" src="./images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br> 00:12 * Crab_ is reading..<br> 00:20 &lt;Sapient&gt; in the case of getlocations (x,y,radius=a,b,c), the algorithm should only test the filter upon x,y (O(1)) and then grow the result by a quantity of c, without further computations required<br> 00:23 &lt;Crab_&gt; growing the result by radius C is not that simple<br> 00:24 &lt;Crab_&gt; see get_tiles_radius in src/pathutils.cpp <br> 00:24 &lt;Sapient&gt; yeah, I wasn't sure if he was including get_tiles_radius as part of the computational complexity<br> 00:24 &lt;Crab_&gt; it means testing O(c^2) hexes, and each test is logarithmic.<br> 00:25 &lt;Sapient&gt; I agree that get_tiles_radius does look more complex than optimal<br> 00:25 &lt;Crab_&gt; yes, since the topology of the map is well-known, it can be simpler..<br> 00:29 &lt;Sapient&gt; but no terrain filter is being applied upon those c^2 hexes, so if the terrain filter is considered the only expensive operation then the big-O of get_tiles_radius is irrelevant<br> 00:30 &lt;Sapient&gt; it also uses a caching mechanism to prevent redundant filtering when [filter_radius] is involved<br> 00:30 &lt;Crab_&gt; yes, if that radius is the last operation (no further terrain filters on result) it should be not relevant to terrain_filter's complexity.<br> 00:34 &lt;Crab_&gt; but, why we consider 'terrain filter' to be the only expensive operation ?<br> 00:35 &lt;Crab_&gt; shouldn't we try to count O() of operations on location sets instead ?<br> 00:39 &lt;Sapient&gt; sure, but map sizes are limited so there will always be an upper bound on location set operation<br> 00:39 &lt;Sapient&gt; whereas the complexity of a location filter SLF is hypothetically infinite<br> 00:40 &lt;Crab_&gt; it depends on what you consider the 'input' to slf - e.g. '1 MAP' or 'N*M locations'<br> 00:42 &lt;Crab_&gt; and, for example, if we switch the implementation to terrain_filter to use something else from std::vector and std::set for it's operations - for example, if we use a content-addressable-table representing the entire map, the complexity will change.<br> 00:43 &lt;Crab_&gt; since, for example, then it'd be possible to check "is the hex present in table?" in O(1), instead of O(log(n)) for std::set.<br> 00:46 &lt;Sapient&gt; I'm definitely in favor of improving the efficiency of our location operations, where reasonable to do so, even though it's only a hypothetical bottleneck at this point<br> 00:46 &lt;Crab_&gt; are SLFs really a bottleneck now ?<br> 00:47 &lt;Sapient&gt; I haven't measured performance myself in Wesnoth, but Mordante did tell me that terrain filtering should be considered expensive<br> 00:48 &lt;Crab_&gt; I've seen this only once, in a very specific circumstances (ai 'avoid' aspect with a long SLF, multiplied by the number of times ai recalculates it's move maps - it's done after each move/attack ) )<br> 00:48 &lt;Sapient&gt; slowness was based on observed issues with TerrainWML<br> 00:49 &lt;Crab_&gt; was it profiled ?<br> 00:50 &lt;mordante&gt; mog did some profiling and optimizations<br> 00:50 &lt;mordante&gt; but there are just a lot of rules to parse<br> 00:50 &lt;Crab_&gt; sometimes profiling wields unexpected bottlenecks... I.e. I once spotted that 5-10% ai turn tume was spent just getting 'is the unit slowed now?' status thing (which, at that time, required std::string constructions and std::map lookups)<br> 00:51 &lt;Crab_&gt; mordante: is there any graphs/results of that profiling posted ?<br> 00:51 &lt;Sapient&gt; SLF can contain SUF, and SUF can contain [filter_wml] which writes the entire unit into a config for comparison<br> 00:51 &lt;mordante&gt; no<br> 00:52 &lt;Crab_&gt; than doing that graphs on some often-used and suspected-for-inefficiency SLFs is a good thing to start.<br> 00:53 &lt;mordante&gt; don't expect me to look into it any time soon, have enough to do with the gui <img class="smilies" src="./images/smilies/icon_wink.gif" width="15" height="15" alt=";-)" title="Wink"><br> 00:53 &lt;Crab_&gt; I can do it and post the graphs, if someone posts me the WML snippets to be tested<br> 00:54 &lt;Sapient&gt; TerrainWML doesn't use SLF, it uses terrain pattern matching strings, which are also used by SLF<br> 00:55 &lt;Crab_&gt; Sapient: then, we can try to take that getlocations (x,y,radius=a,b,c) thing and see what contributes to its run time.<br> 00:55 &lt;Sapient&gt; Mordante advised me that parsing the terrain pattern matching strings should be considered a fairly expensive operation, and to cache the result for reuse<br> 00:56 &lt;mordante&gt; the wildcard matching is expensive at least that was the bottleneck<br> 00:58 &lt;Sapient&gt; so it seemed wise to treat SLF as arbitrarily complex and eliminate unnecessary calls to matches_filter_internal<br> 00:59 &lt;Sapient&gt; although in practice, I've never experienced slowness due to SLF processing<br> 00:59 &lt;Sapient&gt; with the AI changes it might be the first time<br> 00:59 &lt;Crab_&gt; Sapient: yes, a viable approach. but, then, you should measure complexity in number of SLF calls<br> 01:00 &lt;Shadow_Master&gt; I haven't noticed SLF to be slow in event filters<br> 01:00 &lt;Shadow_Master&gt; (... or maybe I just have too much processor power)<br> 01:01 &lt;Crab_&gt; Sapient: no, it was just a very specific combination of several different things - like unnecessarily very long SLF (related to map specifics), unnecessarily large number of evaluations per turn (related to ai implementation issues)<br> 01:03 &lt;Crab_&gt; I fixes some of those things since then, so that particular slowness disappeared<br> 01:04 &lt;Sapient&gt; ah, ok<br> 01:04 &lt;Crab_&gt; wesbot: log 38101<br> 01:04 &lt;wesbot&gt; crab * r38101 : changes to targeting phase to discard avoided locations earlier<br> 01:04 &lt;wesbot&gt; URL: <a href="http://svn.gna.org/viewcvs/wesnoth?view=rev&amp;rev=38101" class="postlink">http://svn.gna.org/viewcvs/wesnoth?view=rev&amp;rev=38101</a></div></div> <blockquote><div><cite>solsword wrote:</cite><blockquote><div><cite>Sapient wrote:</cite> Regarding point#2, the filter_vision goes inside a Standard Unit Filter, so you already have a Standard Unit Filter available to you right there. Perhaps you are confused because you were trying to put it in the [event][filter] instead of the [store_unit][filter]. Or maybe you are confused because you are forgetting that a unit such as a scout shares its "view" with its entire side. </div></blockquote> The only problem that I can see here is that if you're trying to be *really* accurate in emulating sighted events, you only want to fire your faux-sighted event for units spotted by the moving unit. Of course, the existing code for the faux-sighted event fails on this count in several ways as well. Considering the following examples:<br> <br> 1. You want to fire an event when the first Spearman is sighted. However, the player has one Spearman on their team. According to the wiki, a real name=sighted event ignores the already-known spearman, because name=sighted only fires when *new* units come into view. Anonymissus' code fails here if, for example, you move another unit next to the spearman. There's no point at which <span class="posthilit">shroud</span> gets removed, but the faux-sighted fires anyways. Sapient's version (just using [filter_vision] across all units, as I understand it) fails here whenever any unit gets moved. To work around this, you could make your filter more specific than "Spearman", but I'm not sure that that will *always* be the case. Of course, you could just revise the definition of "sighted" somehow. </div></blockquote> Ok, I wasn't aware that the sighted event supports that behavior you are describing.<br> In any case, in the (rare) event that you needed such behavior, you could set a flag on all the already-visible spearmen (such as unit.variables.already_seen) and then add a [filter_wml] against it. I think that situation would be rare enough that it'd be hard to justify adding its complexity to the main macro.<br> <blockquote><div><cite>solsword wrote:</cite> store_unit has to evaluate the location filter for each unit (unless it caches filter results?).</div></blockquote> When considering units, store_unit (or any standard unit filter) does not cache anything from one unit to the next one. (Except maybe visibility information for adjacent units, but I wouldn't worry about that.)</div> <div id="sig388476" class="signature"><a href="http://www.wesnoth.org/wiki/User:Sapient" class="postlink">http://www.wesnoth.org/wiki/User:Sapient</a><em class="text-italics">... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."</em></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388494" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile388494"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=111298_1253162852.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a> </dt> <dd class="profile-rank">Code Contributor</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=111298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">291</a></dd> <dd class="profile-joined"><strong>Joined:</strong> January 12th, 2009, 10:21 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Santa Cruz, CA</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact solsword"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact solsword</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.cs.hmc.edu/~pmawhorter" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content388494"> <h3 > <a href="./viewtopic.php?p=388494&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388494">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388494&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388494&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388494" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a></strong> &raquo; </span><time datetime="2009-10-07T08:28:00+00:00">October 7th, 2009, 8:28 am</time> </p> <div class="content"><blockquote><div><cite>Sapient wrote:</cite>I still disagree somewhat with silene's Big-O analysis and I think the [not]x,y,radius=a,b,c[/not] would be beneficial in the general case where {FILTER} is unknown, since it allows us to eliminate the re-processing of arbitrarily complex filters.</div></blockquote> Eh. I'm betting that the {FILTER} is fast, I guess. I think this one could go either way, though. In the cases that I've actually used this, {FILTER} either includes presence or absence of a unit from the filtered space (which should be faster than either a [not]find_in or a whole new [not][filter_location] with a radius) or the terrain of the space. Given the comments from IRC below, maybe that terrain filter is slow enough (it's *V*, so basically pretty bad in terms of wildcards) that doing the [not] with a radius or find_in is worth it... In any case, I think the [not]find_in approach is better than the [not]radius approach: [not]find_in is O(n) where n is the number of tiles searched so far, but we know that there will be n hits (one per tile) and approximately 1.5*n misses (one per new tile) which is going to be cheaper than re-constructing a tileset for radius r-1 for each of the n tiles in filter + the 1.5*n tiles outside of it (assuming, as I think people have been indicating, that the [not] clause with a radius results in the construction of that radius for each tile considered by the outer clause). Now, if the [not] radius clause were O(1), then it would always beat whatever {FILTER} was and you'd want to use that.<br> <blockquote><div><cite>Sapient wrote:</cite>Ok, I wasn't aware that the sighted event supports that behavior you are describing.<br> In any case, in the (rare) event that you needed such behavior, you could set a flag on all the already-visible spearmen (such as unit.variables.already_seen) and then add a [filter_wml] against it. I think that situation would be rare enough that it'd be hard to justify adding its complexity to the main macro.</div></blockquote> Based on the wiki description, I think it does... but of course that could well be wrong. However, you're right that it's almost never needed... but that's one of the reasons that I still use name=sighted for that half of the macro. As far as I can tell, name=sighted works fine for the case of units spotted when <span class="posthilit">shroud</span> gets removed (which makes sense, since it seems easy to program that way). And all other cases are covered by the simpler of the two moveto events. Of course, even the simpler of the moveto events suffers the problem that I described (triggering on the already-visible spearman), and like you, I don't feel the need to correct for it. Just thought I'd point it out while we're considering the guts of name=sighted.<br> <blockquote><div><cite>Sapient wrote:</cite>When considering units, store_unit (or any standard unit filter) does not cache anything from one unit to the next one. (Except maybe visibility information for adjacent units, but I wouldn't worry about that.)</div></blockquote> ...yeah, I really didn't think that it did. One of these days I'll get around to contributing to the Wesnoth codebase and get in the habit of looking these things up instead of making wild guesses or silly qualifications.</div> <div id="sig388494" class="signature"><a href="http://www.wesnoth.org/forum/viewtopic.php?f=8&amp;t=23754" class="postlink">The Knights of the Silver Spire</a> campaign.<br> <br> <a href="http://www.cs.hmc.edu/~pmawhorter" class="postlink">http://www.cs.hmc.edu/~pmawhorter</a> - my website.<br> <br> Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can <a class="postlink" href="//wiki.wesnoth.org/TeamColoring">do it yourself</a>. If you just happen to like magenta, no hard feelings?</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388510" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile388510"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a> </dt> <dd class="profile-rank">Inactive Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=110036&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">2461</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 15th, 2008, 8:46 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Germany</dd> </dl> <div class="postbody"> <div id="post_content388510"> <h3 > <a href="./viewtopic.php?p=388510&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388510">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388510&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388510&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388510" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a></strong> &raquo; </span><time datetime="2009-10-07T11:49:13+00:00">October 7th, 2009, 11:49 am</time> </p> <div class="content">...I'm definitely not claiming to have understood all of this super high level discussion so far <img class="smilies" src="./images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br> <br> This <blockquote><div><cite>Sapient wrote:</cite>Regarding point #3, perhaps you are forgetting that Standard Location Filter can contain a [filter] for units. Or perhaps you are forgetting that once a location with a desired unit is known, it is trivial to store the unit at that location.<br> <br> I'll try to post up some code later if this doesn't make sense.</div></blockquote> at least makes perfectly sense. I have a solution in mind and I'll try it. I think I'm still using store_unit because in an earlier version I needed the unit variable anyway since I didn't use [primary_unit] for the event to be fired.<br> <blockquote><div><cite>solsword wrote:</cite>The only problem that I can see here is that if you're trying to be *really* accurate in emulating sighted events, you only want to fire your faux-sighted event for units spotted by the moving unit. Of course, the existing code for the faux-sighted event fails on this count in several ways as well. Considering the following examples:<br> <br> 1. You want to fire an event when the first Spearman is sighted. However, the player has one Spearman on their team. According to the wiki, a real name=sighted event ignores the already-known spearman, because name=sighted only fires when *new* units come into view. Anonymissus' code fails here if, for example, you move another unit next to the spearman. There's no point at which <span class="posthilit">shroud</span> gets removed, but the faux-sighted fires anyways. Sapient's version (just using [filter_vision] across all units, as I understand it) fails here whenever any unit gets moved. To work around this, you could make your filter more specific than "Spearman", but I'm not sure that that will *always* be the case. Of course, you could just revise the definition of "sighted" somehow.</div></blockquote> FILTER=(<br> side=2<br> type=Spearman)<br> then. That's "revise the definition of "sighted" somehow", yes.<br> <blockquote class="uncited"><div>2. You move a unit such that as it moves, it reveals an enemy unit, but once it is done moving, it isn't within range of that unit. In this case, Sapient's code works, but Anonymissus' code fails.</div></blockquote> If I understand you, you are wrong. The calculation of the visibility area is based on max_moves of the player's unit that has just moved.<br> Where is "Sapient's code" btw ? [ironic][event]name=sighted[filter]id=Sapient's code seems buggy...[/ironic]<br> <br> Let me try again to explain why filter_vision is (unfortunately) no option for case #2 (the player=viewing side=side 1) moves; example:<br> 1. Delay <span class="posthilit">shroud</span> is on.<br> 2. The unit to be spotted has id=A.<br> 3. A unit of the player (id=B) moves in such a way that when the move ends, A <em class="text-italics">would</em> be in B's visibility area, but, because of delay <span class="posthilit">shroud</span>, A is still not visible. Let's say A is three hexes away from B now, and B has max_moves=4 and movement costs 1 for all terrain types, for example.<br> 4. The move has ended; since the event is a name=moveto, the event fires. [filter_vision]side=1 whether A is visible now won't return A since it's still invisible, [fire_event] for the child event won't be called.<br> (I don't understand what the term "filter on the vision of all units" shall mean btw, what is "all units", all on the map ? That doesn't make sense to me.)<br> 5. The player chooses "update <span class="posthilit">shroud</span> now", or disables "delay <span class="posthilit">shroud</span>", leading to <span class="posthilit">shroud</span> update. A becomes visible. [event] name=sighted is supposed to fire exactly now, but the replacement event still doesn't since it's based on name=moveto!<br> 6. The replacement event would, or could, fire the next time that side 1 moves a unit now, but that's too late for me.<br> ---------------------------------------------<br> -In step 4, it might also be possible to [filter_vision]side=2 whether B is visible for side 2. But let's say A has max_moves=1. Thus B is (probably) invisible for side 2, [fire_event], again, isn't called.<br> -Let's say that in step 3, the unit that would come into B's visibility area as the result of B's move isn't A, but unit C (id=C, side=2) instead. [filter_vision]side=2 might now call [fire_event] (if B is visible from C's=side 2's point of view now), but the unit to be spotted is A, not C. That's why I'd want to [filter_vision]id=A which is impossible according to reference wml.<br> But, since side 2's units can have completely different max_moves/movement costs/visibility areas, [filter_vision]side=2 is probably a bad idea at all.<br> -Let's say that delay <span class="posthilit">shroud</span> had been off (leave out step 1), and the <span class="posthilit">shroud</span> is updated before the moveto event is called. (Is that correct ? The order might also be vice versa...) YES, then [filter]id=A[filter_vision]side=1 returns A.<br> <br> However, I know that, from the game engine's point of view, (visibility area of B)=(visibility area of all other side 1 units)=(visibility area of side 1), Sapient. So by saying "B's visibility area" I generally mean that area that side 1 could see if fog was on, delay <span class="posthilit">shroud</span> off and B the only unit of side 1 - the movement area of B with respect to B's movement_costs and B's max_moves (and impassable terrain types...).</div> <div id="sig388510" class="signature">projects (BfW 1.12):<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=22618" class="postlink">A Simple Campaign</a>: <span style="font-size:85%;line-height:116%">campaign draft for wml starters</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=19&amp;t=33366" class="postlink">Plan Your Advancements</a>: <span style="font-size:85%;line-height:116%">mp mod</span><br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=26800" class="postlink">The Earth's Gut</a>: <span style="font-size:85%;line-height:116%">sp campaign</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=15&amp;t=32347" class="postlink">Settlers of Wesnoth</a>: <span style="font-size:85%;line-height:116%">mp scenario</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=58&amp;t=28320" class="postlink">Wesnoth Lua Pack</a>: <span style="font-size:85%;line-height:116%">lua tags and utils</span><br> updated to 1.8 and handed over: <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=27848" class="postlink">A Gryphon's Tale</a>: <span style="font-size:85%;line-height:116%">sp campaign</span></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388545" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile388545"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=111298_1253162852.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a> </dt> <dd class="profile-rank">Code Contributor</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=111298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">291</a></dd> <dd class="profile-joined"><strong>Joined:</strong> January 12th, 2009, 10:21 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Santa Cruz, CA</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact solsword"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact solsword</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.cs.hmc.edu/~pmawhorter" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content388545"> <h3 > <a href="./viewtopic.php?p=388545&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388545">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388545&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388545&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388545" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a></strong> &raquo; </span><time datetime="2009-10-07T16:50:25+00:00">October 7th, 2009, 4:50 pm</time> </p> <div class="content"><blockquote><div><cite>Anonymissimus wrote:</cite> at least makes perfectly sense. I have a solution in mind and I'll try it. I think I'm still using store_unit because in an earlier version I needed the unit variable anyway since I didn't use [primary_unit] for the event to be fired.</div></blockquote> Yeah, what Sapient said was that even though/if you need the unit, it's faster to do a location filter with an SUF inside it and then [store_unit] using the x and y returned by the filter rather than vice versa. Using the SLF inside the SUF re-evaluates the SLF once for each unit on the map (and on all recall lists), although that of course depends on the order of things. But at best, it evaluates the SLF once for each unit matching the SUF. Putting the SUF inside the SLF, you have the SUF evaluated once for each hex found in the SLF, but since the SUF is fast, while the SLF is slow, this in general gives better performance. I guess if you had a *really* complex SUF, it might be better to do it the other way, but I don't think that that's ever going to come up (since almost any key you put in an SUF makes it pretty fast). Maybe if all you had in there was a [filter_wml]... But in that case you're still betting that running the SLF for *every* unit on the map, and then the SUF only on matching units, is faster than running the SUF on every hex of the SLF (heck, probably only on every unit within the SLF, since I don't think you can construct an SUF that takes a long time before noticing that *there's no unit* on the space that it's trying to filter and returning pretty quickly. If you did, it probably wouldn't be a useful SUF anyways).<br> <blockquote><div><cite>Anonymissimus wrote:</cite>If I understand you, you are wrong. The calculation of the visibility area is based on max_moves of the player's unit that has just moved.<br> Where is "Sapient's code" btw ? [ironic][event]name=sighted[filter]id=Sapient's code seems buggy...[/ironic]</div></blockquote> "Sapient's code" is hypothetical... he suggested using [filter_vision] (implicitly over all units in the map, run alongside whatever other filter you specify) instead of your movement-based search. And you're right that delay_shroud will screw that up big-time. I had forgotten about that. Still, your code is vulnerable to the problem that I brought up (#2). I just fiddled with it and realized that the problem never occurs unless some terrain is involved. Since you ignore terrain except for impassibility, the problem is a lot less severe... but it could still happen. Consider this picture:<br> <div class="inline-attachment"> <dl class="thumbnail"> <dt><a href="./download/file.php?id=34962&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2&amp;mode=view"><img src="./download/file.php?id=34962&amp;t=1&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="postimage" alt="An example of a move that&#039;s problematic for the moveto replacement for name=sighted." title="badmove.jpg (51.67 KiB) Viewed 4284 times" /></a></dt> <dd> An example of a move that's problematic for the moveto replacement for name=sighted.</dd> </dl> </div> If a unit with 4 moves moves from the dirt patch highlighted in the north to the village highlighted in the south, they get to see the mushroom forest hex along the way (because it's within their max_moves of a point that they passed). Actually, I haven't checked this, but since the player could force that vision by stopping the unit mid-move and continuing, it's a bug if the engine doesn't expose that space for a continuous move. In any case, since the now-visible space isn't within movement range from either the source or the destination, it's never checked in your name=sighted version.<br> <br> Note that this example comes up reasonably often in underground scenarios, especially when flying units are involved. If you take terrain into account, it also comes up all the time in other maps, when a unit like a horseman moves past a fork in a road through forest or something like that.<br> <br> So basically, neither version works in both cases. There might be a way to patch Sapient's version by adding an end-of-turn filter or something like that, to catch any units that fell through the cracks of delay_shroud, but it would be odd to have the vision event fire at the end of turn instead of when the unit was revealed (if the player updated <span class="posthilit">shroud</span> mid-turn). It might even cause bugs, or at least cause the player to waste some movement without knowing about a new objective or something like that.<br> <br> Again, I don't see any problem with continuing to use name=sighted events for this part of the job, because as far as I can tell, they work fine (I have done some basic experiments, but not anything super-intense).</div> <div id="sig388545" class="signature"><a href="http://www.wesnoth.org/forum/viewtopic.php?f=8&amp;t=23754" class="postlink">The Knights of the Silver Spire</a> campaign.<br> <br> <a href="http://www.cs.hmc.edu/~pmawhorter" class="postlink">http://www.cs.hmc.edu/~pmawhorter</a> - my website.<br> <br> Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can <a class="postlink" href="//wiki.wesnoth.org/TeamColoring">do it yourself</a>. If you just happen to like magenta, no hard feelings?</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388546" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile388546"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=102298_1403831693.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Sapient</a> </dt> <dd class="profile-rank">Inactive Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=102298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">4453</a></dd> <dd class="profile-joined"><strong>Joined:</strong> November 26th, 2005, 7:41 am</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Sapient"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Sapient</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.wesnoth.org/wiki/User:Sapient" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content388546"> <h3 > <a href="./viewtopic.php?p=388546&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388546">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388546&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388546&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388546" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Sapient</a></strong> &raquo; </span><time datetime="2009-10-07T17:10:08+00:00">October 7th, 2009, 5:10 pm</time> </p> <div class="content">Also, Delay <span class="posthilit">Shroud</span> and Update <span class="posthilit">Shroud</span> instructions don't even appear in the replay/savefile, which means that relying on this behavior to trigger the sighted event can cause replay/savegame corruption and also OOS in MP.<br> <br> (That's a C++ bug that you really can't workaround easily though).<br> <br> I guess there's no way to truly resolve this problem without adding Delay <span class="posthilit">Shroud</span> and Update <span class="posthilit">Shroud</span> instructions to the replay, then teaching the replay_controller about it... but I'm not sure how many lines of code it would require. I'm not actively working on this area of the code right now.</div> <div id="sig388546" class="signature"><a href="http://www.wesnoth.org/wiki/User:Sapient" class="postlink">http://www.wesnoth.org/wiki/User:Sapient</a><em class="text-italics">... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."</em></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388547" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile388547"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=111298_1253162852.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a> </dt> <dd class="profile-rank">Code Contributor</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=111298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">291</a></dd> <dd class="profile-joined"><strong>Joined:</strong> January 12th, 2009, 10:21 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Santa Cruz, CA</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact solsword"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact solsword</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.cs.hmc.edu/~pmawhorter" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content388547"> <h3 > <a href="./viewtopic.php?p=388547&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388547">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388547&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388547&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388547" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a></strong> &raquo; </span><time datetime="2009-10-07T17:23:22+00:00">October 7th, 2009, 5:23 pm</time> </p> <div class="content">Could the moveto event trigger be delayed until <span class="posthilit">shroud</span> updates? After all, the effect of delay <span class="posthilit">shroud</span> is to allow the player to explore *possible* moves without making *real* moves, giving them the ability to take things back. Of course, this might mess with some existing campaigns... the same issue I mentioned above where you move a unit onto a trigger, but then don't realize until the end of your turn.<br> <br> Of course, you could store these potential moves in the order that they are made and then replay them one-by-one, stopping (and thus undoing further moves) when any event fires. This replay would occur any time that <span class="posthilit">shroud</span> updates (such as when you attack a unit). The downside is that this would take potentially quite a bit of code... but it does make Sapient's version of the moveto replacement for sighted work, and it gives players even more freedom when delay_shroud is turned on (i.e. they won't trigger events).</div> <div id="sig388547" class="signature"><a href="http://www.wesnoth.org/forum/viewtopic.php?f=8&amp;t=23754" class="postlink">The Knights of the Silver Spire</a> campaign.<br> <br> <a href="http://www.cs.hmc.edu/~pmawhorter" class="postlink">http://www.cs.hmc.edu/~pmawhorter</a> - my website.<br> <br> Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can <a class="postlink" href="//wiki.wesnoth.org/TeamColoring">do it yourself</a>. If you just happen to like magenta, no hard feelings?</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388552" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile388552"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=100598&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #8621FF;" class="username-coloured">Soliton</a> </dt> <dd class="profile-rank">Site Administrator</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=100598&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">1719</a></dd> <dd class="profile-joined"><strong>Joined:</strong> April 5th, 2005, 3:25 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> #wesnoth-mp</dd> </dl> <div class="postbody"> <div id="post_content388552"> <h3 > <a href="./viewtopic.php?p=388552&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388552">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388552&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388552&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388552" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=100598&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #8621FF;" class="username-coloured">Soliton</a></strong> &raquo; </span><time datetime="2009-10-07T17:30:32+00:00">October 7th, 2009, 5:30 pm</time> </p> <div class="content"><blockquote><div><cite>Sapient wrote:</cite>I guess there's no way to truly resolve this problem without adding Delay <span class="posthilit">Shroud</span> and Update <span class="posthilit">Shroud</span> instructions to the replay, then teaching the replay_controller about it... </div></blockquote>Probably easier and more robust to not implicitly fire sighted events when replaying and instead record an explicit fire_event command in the replay. There is a somewhat similar issue with ai turn events that will not fire in replays at all since there is no ai involved and thus should also be recorded explicitly in the replay.</div> <div id="sig388552" class="signature">"If gameplay requires it, they can be made to live on Venus." -- scott</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388578" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile388578"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a> </dt> <dd class="profile-rank">Inactive Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=110036&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">2461</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 15th, 2008, 8:46 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Germany</dd> </dl> <div class="postbody"> <div id="post_content388578"> <h3 > <a href="./viewtopic.php?p=388578&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388578">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388578&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388578&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388578" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a></strong> &raquo; </span><time datetime="2009-10-07T20:25:29+00:00">October 7th, 2009, 8:25 pm</time> </p> <div class="content"><blockquote><div><cite>solsword wrote:</cite>Yeah, what Sapient said was that even though/if you need the unit, it's faster to do a location filter with an SUF inside it and then [store_unit] using the x and y returned by the filter rather than vice versa. Using the SLF inside the SUF re-evaluates the SLF once for each unit on the map (and on all recall lists), although that of course depends on the order of things. But at best, it evaluates the SLF once for each unit matching the SUF. Putting the SUF inside the SLF, you have the SUF evaluated once for each hex found in the SLF, but since the SUF is fast, while the SLF is slow, this in general gives better performance.</div></blockquote> Delay is now only roughly 20ms, and seems to work as good as the other version. Thx.<br> <blockquote class="uncited"><div>If a unit with 4 moves moves from the dirt patch highlighted in the north to the village highlighted in the south, they get to see the mushroom forest hex along the way (because it's within their max_moves of a point that they passed). Actually, I haven't checked this, but since the player could force that vision by stopping the unit mid-move and continuing, it's a bug if the engine doesn't expose that space for a continuous move. In any case, since the now-visible space isn't within movement range from either the source or the destination, it's never checked in your name=sighted version.</div></blockquote> Ah, understood the issue. Yes, that case isn't covered by the moveto replacement, and the game engine behaves the way you think. But still, the problem that name=sighted doesn't fire reliably is too important for me. As I said somewhere above - I've played a scenario that was broken because of a lacking name=sighted event execution. Afaik, sighted events have <em class="text-italics">never</em> been working reliably since I've discovered wesnoth in 1.4.x. There are two in HttT The lost general...<br> <blockquote><div><cite>Sapient wrote:</cite>Also, Delay <span class="posthilit">Shroud</span> and Update <span class="posthilit">Shroud</span> instructions don't even appear in the replay/savefile, which means that relying on this behavior to trigger the sighted event can cause replay/savegame corruption and also OOS in MP.</div></blockquote> Could be the reason why such a lot of my replays are corrupt although it is said to have been fixed in 1.5.x - even if there aren't any sighted events in that scenarios.<br> <br> I've made a small test for the [not]find_in=$already_searched_locations and [not]radius=$previous_radius approaches that may improve the FIND_NEARBY algorythm. Sad to say, I can't messure any sensible speed improvement...</div> <div id="sig388578" class="signature">projects (BfW 1.12):<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=22618" class="postlink">A Simple Campaign</a>: <span style="font-size:85%;line-height:116%">campaign draft for wml starters</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=19&amp;t=33366" class="postlink">Plan Your Advancements</a>: <span style="font-size:85%;line-height:116%">mp mod</span><br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=26800" class="postlink">The Earth's Gut</a>: <span style="font-size:85%;line-height:116%">sp campaign</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=15&amp;t=32347" class="postlink">Settlers of Wesnoth</a>: <span style="font-size:85%;line-height:116%">mp scenario</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=58&amp;t=28320" class="postlink">Wesnoth Lua Pack</a>: <span style="font-size:85%;line-height:116%">lua tags and utils</span><br> updated to 1.8 and handed over: <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=27848" class="postlink">A Gryphon's Tale</a>: <span style="font-size:85%;line-height:116%">sp campaign</span></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388626" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile388626"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=111298_1253162852.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a> </dt> <dd class="profile-rank">Code Contributor</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=111298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">291</a></dd> <dd class="profile-joined"><strong>Joined:</strong> January 12th, 2009, 10:21 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Santa Cruz, CA</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact solsword"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact solsword</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.cs.hmc.edu/~pmawhorter" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content388626"> <h3 > <a href="./viewtopic.php?p=388626&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388626">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388626&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388626&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388626" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=111298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #BB8888;" class="username-coloured">solsword</a></strong> &raquo; </span><time datetime="2009-10-08T04:09:55+00:00">October 8th, 2009, 4:09 am</time> </p> <div class="content"><blockquote><div><cite>Anonymissimus wrote:</cite> Ah, understood the issue. Yes, that case isn't covered by the moveto replacement, and the game engine behaves the way you think. But still, the problem that name=sighted doesn't fire reliably is too important for me. As I said somewhere above - I've played a scenario that was broken because of a lacking name=sighted event execution. Afaik, sighted events have <em class="text-italics">never</em> been working reliably since I've discovered wesnoth in 1.4.x. There are two in HttT The lost general... </div></blockquote> I remain skeptical (of sighted being more broken than we know it is). We know that sighted events don't fire during enemy turns, which is a bug. However, the simpler of the two moveto events is a workaround for that. As far as I've ever heard, not firing on enemy turns might well be the only bug in the behavior of sighted. A quick look at the code supports this theory a bit:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code> /** * Returns true if some <span class="posthilit">shroud</span> is cleared. * seen_units will return new units that have been seen by this unit. * If known_units is NULL, seen_units can be NULL and will not be changed. */ bool clear_shroud_unit(const map_location &amp;loc, int side, const std::set&lt;map_location&gt;* known_units = NULL, std::set&lt;map_location&gt;* seen_units = NULL, std::set&lt;map_location&gt;* petrified_units = NULL) </code></pre></div> and then what seems to be the function for updating <span class="posthilit">shroud</span> when coming out of delay <span class="posthilit">shroud</span>:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>void apply_shroud_changes(undo_list &amp;undos, int side) { team &amp;tm = (*resources::teams)[side - 1]; // No need to do this if the team isn't using fog or <span class="posthilit">shroud</span>. if (!tm.uses_shroud() &amp;&amp; !tm.uses_fog()) return; game_display &amp;disp = *resources::screen; unit_map &amp;units = *resources::units; /* This function works thusly: 1. run through the list of undo_actions 2. for each one, play back the unit's move 3. for each location along the route, clear any "shrouded" hexes that the unit can see and record sighted events 4. render <span class="posthilit">shroud</span>/fog cleared. 5. pump all events 6. call clear_shroud to update the fog of war for each unit 7. fix up associated display stuff (done in a similar way to turn_info::undo()) */ </code></pre></div> Unless there's some other edge case that I haven't tested or thought of, I think it's reasonable to assume that [event] name=sighted works for all cases when <span class="posthilit">shroud</span> is being removed (i.e. all sighted events triggered during your turn) and the simple moveto event covers all other cases.<br> <br> Thanks a lot for testing the times, though. It's one thing to debate about how these things work in theory, and another to hear concrete evidence about how they work in practice. Based on the 20ms time, I'm doing something else wrong with my macros that use search that cause a perceptible slowdown.</div> <div id="sig388626" class="signature"><a href="http://www.wesnoth.org/forum/viewtopic.php?f=8&amp;t=23754" class="postlink">The Knights of the Silver Spire</a> campaign.<br> <br> <a href="http://www.cs.hmc.edu/~pmawhorter" class="postlink">http://www.cs.hmc.edu/~pmawhorter</a> - my website.<br> <br> Teamcolors for everyone! PM me for a teamcolored version of your sprite, or you can <a class="postlink" href="//wiki.wesnoth.org/TeamColoring">do it yourself</a>. If you just happen to like magenta, no hard feelings?</div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p388656" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile388656"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a> </dt> <dd class="profile-rank">Inactive Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=110036&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">2461</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 15th, 2008, 8:46 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Germany</dd> </dl> <div class="postbody"> <div id="post_content388656"> <h3 > <a href="./viewtopic.php?p=388656&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388656">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=388656&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=388656&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p388656" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a></strong> &raquo; </span><time datetime="2009-10-08T09:11:06+00:00">October 8th, 2009, 9:11 am</time> </p> <div class="content"><blockquote class="uncited"><div>Thanks a lot for testing the times, though. It's one thing to debate about how these things work in theory, and another to hear concrete evidence about how they work in practice. Based on the 20ms time, I'm doing something else wrong with my macros that use search that cause a perceptible slowdown.</div></blockquote> I was referring to case #2 of the moveto replacement, not the FIND_NEARBY algorithm. The code (not copied, just written out of memory) <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>[store_locations] [filter] {FILTER} [filter] [and] x=$x1 y=$y1 radius=... [/and] variable=... [/store_locations] </code></pre></div> used to calculate whether the unit to be spotted has become visible works a lot faster than the version starting with [store_unit] - as Sapient had suggested.<br> <br> --------------------------------------------------<br> Although my beginner C++ knowledge allows me to understand parts of that code <img class="smilies" src="./images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink">, I'd never dare to assume something from it because it "looks ok". You've quoted the starts of some method definitions, their existance alone doesn't mean anything, and the description only says what these methods are supposed to do. I'd need to trigger a faulty sighted event and then debug through that code in an IDE, comparing the values of every variable to what I think it should be, than I might be able to say anything. But I don't even have a clue about "subversion" or what you developers are using there to access the source...<br> <br> /edit<br> Tried to reproduce the bug with the lacking name=sighted event using the same savegame - without success. That is, the event always fired the way it should. But I know for sure that the bug had happened during playing. It's just that there must've been some special circumstances I don't know of - if the bug name=sighted not firing in case #2 is deterministic at all...<br> /edit2<br> Could repeat it a few times now. But finding out the exact circumstances takes too much time since I'm not going to use name=sighted anyway. Delay <span class="posthilit">shroud</span> update is involved for sure, probably undo and probably more than one unit revealed at once.<br> /ahem, OK<br> Here's one way how to fool a name=sighted event in case #2. Seems to work always this way on 1.6.4. Attached is a savegame from the campaign Brave Wings, unfortunately you'll probably need to download that first.<br> 1. Load the savegame<br> 2. Activate "delay <span class="posthilit">shroud</span> update". Note that you can select "update <span class="posthilit">shroud</span> now" without revealing any units at this point.<br> 3. Move the Armageddon Drake on 26,4 to 27,5. I have debug-created this drake on this position, without moving any units in the scenario before.<br> 4. Select "update <span class="posthilit">shroud</span> now" or deactive "delay <span class="posthilit">shroud</span> update." The enemy leader is revealed which should fire an activation code for his side but doesn't. <img class="smilies" src="./images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br> Note that the event did fire on other trials, displayed some messages and such.</div> <dl class="attachbox"> <dt> Attachments </dt> <dd> <dl class="file"> <dt><img src="./images/upload_icons/zip.gif" alt="" /> <a class="postlink" href="./download/file.php?id=34971&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">BW-Hidden_Cave_sighted_test.gz</a></dt> <dd>(50.81 KiB) Downloaded 328 times</dd> </dl> </dd> </dl> <div id="sig388656" class="signature">projects (BfW 1.12):<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=22618" class="postlink">A Simple Campaign</a>: <span style="font-size:85%;line-height:116%">campaign draft for wml starters</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=19&amp;t=33366" class="postlink">Plan Your Advancements</a>: <span style="font-size:85%;line-height:116%">mp mod</span><br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=26800" class="postlink">The Earth's Gut</a>: <span style="font-size:85%;line-height:116%">sp campaign</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=15&amp;t=32347" class="postlink">Settlers of Wesnoth</a>: <span style="font-size:85%;line-height:116%">mp scenario</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=58&amp;t=28320" class="postlink">Wesnoth Lua Pack</a>: <span style="font-size:85%;line-height:116%">lua tags and utils</span><br> updated to 1.8 and handed over: <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=27848" class="postlink">A Gryphon's Tale</a>: <span style="font-size:85%;line-height:116%">sp campaign</span></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p389067" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile389067"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="avatar"><img class="avatar" src="./download/file.php?avatar=102298_1403831693.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Sapient</a> </dt> <dd class="profile-rank">Inactive Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=102298&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">4453</a></dd> <dd class="profile-joined"><strong>Joined:</strong> November 26th, 2005, 7:41 am</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Sapient"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Sapient</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://www.wesnoth.org/wiki/User:Sapient" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content389067"> <h3 > <a href="./viewtopic.php?p=389067&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p389067">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=389067&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=389067&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p389067" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=102298&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Sapient</a></strong> &raquo; </span><time datetime="2009-10-12T02:38:00+00:00">October 12th, 2009, 2:38 am</time> </p> <div class="content">There are other, more insidious bugs with the "sighted" event... do a search for it on the bug tracker if you're curious. For one thing, there is a fake unit involved when the game is doing the animation for moving a unit. The sighted event can be fired while this fake unit is on the gamemap and any modifications to it will therefore be lost when the fake unit is replaced with the real unit.<br> <blockquote><div><cite>Soliton wrote:</cite><blockquote><div><cite>Sapient wrote:</cite>I guess there's no way to truly resolve this problem without adding Delay <span class="posthilit">Shroud</span> and Update <span class="posthilit">Shroud</span> instructions to the replay, then teaching the replay_controller about it... </div></blockquote>Probably easier and more robust to not implicitly fire sighted events when replaying and instead record an explicit fire_event command in the replay. There is a somewhat similar issue with ai turn events that will not fire in replays at all since there is no ai involved and thus should also be recorded explicitly in the replay.</div></blockquote> No, I'm afraid that approach wouldn't account for [filter_vision]. And if we go down that road, of documenting in the replay every time a unit goes in or out of vision for a particular side, then eventually we would have to add a record for every location as well because zookeeper is also requesting a way to filter visibility of locations. Maybe there's a way to improve on it a bit by eliminating records intelligently, but I think it's the wrong approach.</div> <div id="sig389067" class="signature"><a href="http://www.wesnoth.org/wiki/User:Sapient" class="postlink">http://www.wesnoth.org/wiki/User:Sapient</a><em class="text-italics">... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."</em></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div id="p389087" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile389087"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a> </dt> <dd class="profile-rank">Inactive Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=110036&amp;sr=posts&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2">2461</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 15th, 2008, 8:46 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Germany</dd> </dl> <div class="postbody"> <div id="post_content389087"> <h3 > <a href="./viewtopic.php?p=389087&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p389087">Re: [event] name=sighted behavior</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&amp;p=389087&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Reply with quote" class="button button-icon-only"> <i class="icon fa-quote-left fa-fw" aria-hidden="true"></i><span class="sr-only">Quote</span> </a> </li> </ul> <p class="author"> <a class="unread" href="./viewtopic.php?p=389087&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2#p389087" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./memberlist.php?mode=viewprofile&amp;u=110036&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" style="color: #AA4444;" class="username-coloured">Anonymissimus</a></strong> &raquo; </span><time datetime="2009-10-12T11:04:30+00:00">October 12th, 2009, 11:04 am</time> </p> <div class="content"><blockquote><div><cite>solsword wrote:</cite>Yeah, what Sapient said was that even though/if you need the unit, it's faster to do a location filter with an SUF inside it and then [store_unit] using the x and y returned by the filter rather than vice versa. Using the SLF inside the SUF re-evaluates the SLF once for each unit on the map (and on all recall lists), although that of course depends on the order of things. But at best, it evaluates the SLF once for each unit matching the SUF. Putting the SUF inside the SLF, you have the SUF evaluated once for each hex found in the SLF, but since the SUF is fast, while the SLF is slow, this in general gives better performance. I guess if you had a *really* complex SUF, it might be better to do it the other way, but I don't think that that's ever going to come up (since almost any key you put in an SUF makes it pretty fast).</div></blockquote> I have the impression that [store_unit][filter][filter_location] checks the filters [filter] and [filter_location] individually, while logically only unit locations with units on it that match the previous unit filter need to be checked. That's what I had in mind when writing that code, and it somewhat surprises me that [store_locations][filter] works a lot better, while complexity of the filters is the same. Mostly, the unit filter is quite restrictive (id=...), so doesn't the location filter only need to be executed once ?<br> Keeping the thread alive. <img class="smilies" src="./images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br> <br> /edit<br> Just seen <a href="http://gna.org/bugs/?11286" class="postlink">http://gna.org/bugs/?11286</a>. I must note that the last time I've played that campaign (sceptre of fire) on 1.6.4 the sighted event for the galleon also didn't fire. (I think it hardly ever fired in that campaign.) Fortunately, I could remove the Galleon by attacking it to be able to move onto that hex. <img class="smilies" src="./images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br> Since a lot of the problems seem to be caused by delay <span class="posthilit">shroud</span>: Could my suggestion to simply ignore delay <span class="posthilit">shroud</span> for this aspect be accepted, if sighted events become working again then ? That means, a sighted event then fires whenever the unit to be spotted comes or would come into visibility range, <span class="posthilit">shroud</span> is forced to update and the event executed.</div> <div id="sig389087" class="signature">projects (BfW 1.12):<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=22618" class="postlink">A Simple Campaign</a>: <span style="font-size:85%;line-height:116%">campaign draft for wml starters</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=19&amp;t=33366" class="postlink">Plan Your Advancements</a>: <span style="font-size:85%;line-height:116%">mp mod</span><br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=26800" class="postlink">The Earth's Gut</a>: <span style="font-size:85%;line-height:116%">sp campaign</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=15&amp;t=32347" class="postlink">Settlers of Wesnoth</a>: <span style="font-size:85%;line-height:116%">mp scenario</span> • <a href="http://forums.wesnoth.org/viewtopic.php?f=58&amp;t=28320" class="postlink">Wesnoth Lua Pack</a>: <span style="font-size:85%;line-height:116%">lua tags and utils</span><br> updated to 1.8 and handed over: <a href="http://forums.wesnoth.org/viewtopic.php?f=8&amp;t=27848" class="postlink">A Gryphon's Tale</a>: <span style="font-size:85%;line-height:116%">sp campaign</span></div> </div> </div> <div class="back2top"> <a href="#top" class="top" title="Top"> <i class="icon fa-chevron-circle-up fa-fw icon-gray" aria-hidden="true"></i> <span class="sr-only">Top</span> </a> </div> </div> </div> <div class="action-bar bar-bottom"> <a href="./posting.php?mode=reply&amp;t=27224&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="button" title="Post a reply"> <span>Post Reply</span> <i class="icon fa-reply fa-fw" aria-hidden="true"></i> </a> <form method="post" action="./viewtopic.php?t=27224&amp;start=30&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2"> <div class="dropdown-container dropdown-container-left dropdown-button-control sort-tools"> <span title="Display and sorting options" class="button button-secondary dropdown-trigger dropdown-select"> <i class="icon fa-sort-amount-asc fa-fw" aria-hidden="true"></i> <span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span> </span> <div class="dropdown hidden"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents"> <fieldset class="display-options"> <label>Display: <select name="st" id="st"><option value="0" selected="selected">All posts</option><option value="1">1 day</option><option value="7">7 days</option><option value="14">2 weeks</option><option value="30">1 month</option><option value="90">3 months</option><option value="180">6 months</option><option value="365">1 year</option></select></label> <label>Sort by: <select name="sk" id="sk"><option value="a">Author</option><option value="t" selected="selected">Post time</option><option value="s">Subject</option></select></label> <label>Direction: <select name="sd" id="sd"><option value="a" selected="selected">Ascending</option><option value="d">Descending</option></select></label> <hr class="dashed" /> <input type="submit" class="button2" name="sort" value="Go" /> </fieldset> </div> </div> </div> </form> <div class="pagination"> 43 posts <ul> <li class="arrow previous"><a class="button button-icon-only" href="./viewtopic.php?t=27224&amp;hilit=shroud&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2&amp;start=15" rel="prev" role="button"><i class="icon fa-chevron-left fa-fw" aria-hidden="true"></i><span class="sr-only">Previous</span></a></li> <li><a class="button" href="./viewtopic.php?t=27224&amp;hilit=shroud&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" role="button">1</a></li> <li><a class="button" href="./viewtopic.php?t=27224&amp;hilit=shroud&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2&amp;start=15" role="button">2</a></li> <li class="active"><span>3</span></li> </ul> </div> </div> <div class="action-bar actions-jump"> <p class="jumpbox-return"> <a href="./viewforum.php?f=21&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="left-box arrow-left" accesskey="r"> <i class="icon fa-angle-left fa-fw icon-black" aria-hidden="true"></i><span>Return to “WML Workshop”</span> </a> </p> <div class="jumpbox dropdown-container dropdown-container-right dropdown-up dropdown-left dropdown-button-control" id="jumpbox"> <span title="Jump to" class="button button-secondary dropdown-trigger dropdown-select"> <span>Jump to</span> <span class="caret"><i class="icon fa-sort-down fa-fw" aria-hidden="true"></i></span> </span> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <ul class="dropdown-contents"> <li><a href="./viewforum.php?f=64&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-cat-link"> <span> Announcements</span></a></li> <li><a href="./viewforum.php?f=62&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; News</span></a></li> <li><a href="./viewforum.php?f=25&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-cat-link"> <span> General</span></a></li> <li><a href="./viewforum.php?f=6&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Users’ Forum</span></a></li> <li><a href="./viewforum.php?f=70&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Tournaments</span></a></li> <li><a href="./viewforum.php?f=5&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Release Announcements, Compiling &amp; Installation</span></a></li> <li><a href="./viewforum.php?f=4&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Technical Support</span></a></li> <li><a href="./viewforum.php?f=67&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; iOS Support</span></a></li> <li><a href="./viewforum.php?f=3&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Strategies &amp; Tips</span></a></li> <li><a href="./viewforum.php?f=37&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Gameplay Feedback</span></a></li> <li><a href="./viewforum.php?f=22&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Mainline Campaign Feedback</span></a></li> <li><a href="./viewforum.php?f=46&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Tutorial</span></a></li> <li><a href="./viewforum.php?f=40&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; A Tale of Two Brothers</span></a></li> <li><a href="./viewforum.php?f=41&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; An Orcish Incursion</span></a></li> <li><a href="./viewforum.php?f=42&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; The South Guard</span></a></li> <li><a href="./viewforum.php?f=39&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Heir to the Throne</span></a></li> <li><a href="./viewforum.php?f=43&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Liberty</span></a></li> <li><a href="./viewforum.php?f=51&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Legend of Wesmere (single player)</span></a></li> <li><a href="./viewforum.php?f=56&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Legend of Wesmere (multiplayer)</span></a></li> <li><a href="./viewforum.php?f=49&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Eastern Invasion</span></a></li> <li><a href="./viewforum.php?f=55&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; The Hammer of Thursagan</span></a></li> <li><a href="./viewforum.php?f=54&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Descent into Darkness</span></a></li> <li><a href="./viewforum.php?f=52&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Delfador’s Memoirs</span></a></li> <li><a href="./viewforum.php?f=45&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Dead Water</span></a></li> <li><a href="./viewforum.php?f=65&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Secrets of the Ancients</span></a></li> <li><a href="./viewforum.php?f=48&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Sceptre of Fire</span></a></li> <li><a href="./viewforum.php?f=53&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Son of the Black Eye</span></a></li> <li><a href="./viewforum.php?f=44&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; The Rise of Wesnoth</span></a></li> <li><a href="./viewforum.php?f=47&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Northern Rebirth</span></a></li> <li><a href="./viewforum.php?f=50&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Under the Burning Suns</span></a></li> <li><a href="./viewforum.php?f=71&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Winds of Fate</span></a></li> <li><a href="./viewforum.php?f=31&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Add-on Feedback</span></a></li> <li><a href="./viewforum.php?f=17&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Website</span></a></li> <li><a href="./viewforum.php?f=26&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-cat-link"> <span> Development</span></a></li> <li><a href="./viewforum.php?f=9&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Art Contributions</span></a></li> <li><a href="./viewforum.php?f=23&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Art Workshop</span></a></li> <li><a href="./viewforum.php?f=32&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Writers’ Forum</span></a></li> <li><a href="./viewforum.php?f=21&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; WML Workshop</span></a></li> <li><a href="./viewforum.php?f=58&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Lua Labs</span></a></li> <li><a href="./viewforum.php?f=19&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Faction &amp; Era Development</span></a></li> <li><a href="./viewforum.php?f=15&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Multiplayer Development</span></a></li> <li><a href="./viewforum.php?f=8&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Scenario &amp; Campaign Development</span></a></li> <li><a href="./viewforum.php?f=38&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Mainline Campaign Development</span></a></li> <li><a href="./viewforum.php?f=68&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; UMC Replays</span></a></li> <li><a href="./viewforum.php?f=14&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Music &amp; Sound Development</span></a></li> <li><a href="./viewforum.php?f=7&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Translations &amp; Internationalization</span></a></li> <li><a href="./viewforum.php?f=60&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Translation Stats</span></a></li> <li><a href="./viewforum.php?f=12&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Ideas</span></a></li> <li><a href="./viewforum.php?f=10&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Coder’s Corner</span></a></li> <li><a href="./viewforum.php?f=2&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Developers’ Discussions</span></a></li> <li><a href="./viewforum.php?f=73&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Wesnoth Organizational Updates</span></a></li> <li><a href="./viewforum.php?f=18&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Art Development</span></a></li> <li><a href="./viewforum.php?f=28&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-cat-link"> <span> Miscellaneous</span></a></li> <li><a href="./viewforum.php?f=13&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Game Development</span></a></li> <li><a href="./viewforum.php?f=11&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Off-Topic</span></a></li> <li><a href="./viewforum.php?f=61&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Forum Games</span></a></li> </ul> </div> </div> </div> </div> <div id="page-footer" class="page-footer" role="contentinfo"> <div class="navbar" role="navigation"> <div class="inner"> <ul id="nav-footer" class="nav-footer linklist" role="menubar"> <li class="breadcrumbs"> <span class="crumb"><a href="./index.php?sid=0efa6c6860d70c9f7037bbead6a9c3f2" data-navbar-reference="index"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span>Forums</span></a></span> </li> <li class="rightside">All times are <span title="UTC">UTC</span></li> <li class="rightside"> <a href="./ucp.php?mode=delete_cookies&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" data-ajax="true" data-refresh="true" role="menuitem"> <i class="icon fa-trash fa-fw" aria-hidden="true"></i><span>Delete cookies</span> </a> </li> </ul> </div> </div> <div id="darkenwrapper" class="darkenwrapper" data-ajax-error-title="AJAX error" data-ajax-error-text="Something went wrong when processing your request." data-ajax-error-text-abort="User aborted request." data-ajax-error-text-timeout="Your request timed out; please try again." data-ajax-error-text-parsererror="Something went wrong with the request and the server returned an invalid reply."> <div id="darken" class="darken">&nbsp;</div> </div> <div id="phpbb_alert" class="phpbb_alert" data-l-err="Error" data-l-timeout-processing-req="Request timed out."> <a href="#" class="alert_close"> <i class="icon fa-times-circle fa-fw" aria-hidden="true"></i> </a> <h3 class="alert_title">&nbsp;</h3><p class="alert_text"></p> </div> <div id="phpbb_confirm" class="phpbb_alert"> <a href="#" class="alert_close"> <i class="icon fa-times-circle fa-fw" aria-hidden="true"></i> </a> <div class="alert_text"></div> </div> </div> </div> <div class="copyright"> <p class="footer-row"> <span class="footer-copyright">Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited</span> </p> <p class="footer-row" role="menu"> <a class="footer-link" href="./ucp.php?mode=privacy&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Privacy" role="menuitem"> <span class="footer-link-text">Privacy</span> </a> | <a class="footer-link" href="./ucp.php?mode=terms&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" title="Terms" role="menuitem"> <span class="footer-link-text">Terms</span> </a> </p> </div> <div> <a id="bottom" class="anchor" accesskey="z"></a> </div> <script src="./assets/javascript/jquery-3.6.0.min.js?assets_version=264"></script> <script src="./assets/javascript/core.js?assets_version=264"></script> <script type="text/javascript"> var CodeboxExpandText = "Expand"; var CodeboxCollapseText = "Collapse"; </script> <script src="./assets/cookieconsent/cookieconsent.min.js?assets_version=264"></script> <script> if (typeof window.cookieconsent === "object") { window.addEventListener("load", function(){ window.cookieconsent.initialise({ "palette": { "popup": { "background": "#0F538A" }, "button": { "background": "#E5E5E5" } }, "theme": "classic", "content": { "message": "This\u0020website\u0020uses\u0020cookies\u0020to\u0020ensure\u0020you\u0020get\u0020the\u0020best\u0020experience\u0020on\u0020our\u0020website.", "dismiss": "Got\u0020it\u0021", "link": "Learn\u0020more", "href": "./ucp.php?mode=privacy&amp;sid=0efa6c6860d70c9f7037bbead6a9c3f2" } }); }); } </script> </div> <!-- #content --> <script src="./styles/prosilver/template/forum_fn.js?assets_version=264"></script> <script src="./styles/prosilver/template/ajax.js?assets_version=264"></script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10