CINXE.COM
Wesnoth Lua Pack: Development Thread - 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>Wesnoth Lua Pack: Development Thread - 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=ea46fef75f01d1025dbbe360a8229053"> <link rel="alternate" type="application/atom+xml" title="Feed - News" href="/app.php/feed/news?sid=ea46fef75f01d1025dbbe360a8229053"> <link rel="alternate" type="application/atom+xml" title="Feed - All forums" href="/app.php/feed/forums?sid=ea46fef75f01d1025dbbe360a8229053"> <link rel="alternate" type="application/atom+xml" title="Feed - New Topics" href="/app.php/feed/topics?sid=ea46fef75f01d1025dbbe360a8229053"> <link rel="alternate" type="application/atom+xml" title="Feed - Forum - Lua Labs" href="/app.php/feed/forum/58?sid=ea46fef75f01d1025dbbe360a8229053"> <link rel="alternate" type="application/atom+xml" title="Feed - Topic - Wesnoth Lua Pack: Development Thread" href="/app.php/feed/topic/28320?sid=ea46fef75f01d1025dbbe360a8229053"> <link rel="canonical" href="https://forums.wesnoth.org/viewtopic.php?t=28320"> <!-- 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=ea46fef75f01d1025dbbe360a8229053"> <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=ea46fef75f01d1025dbbe360a8229053" 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=ea46fef75f01d1025dbbe360a8229053" 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=ea46fef75f01d1025dbbe360a8229053" 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=ea46fef75f01d1025dbbe360a8229053" 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="ea46fef75f01d1025dbbe360a8229053" /> </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&sid=ea46fef75f01d1025dbbe360a8229053" 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&sid=ea46fef75f01d1025dbbe360a8229053" 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=ea46fef75f01d1025dbbe360a8229053" 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=ea46fef75f01d1025dbbe360a8229053" 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&sid=ea46fef75f01d1025dbbe360a8229053" 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&redirect=viewtopic.php%3Ff%3D58%26t%3D28320&sid=ea46fef75f01d1025dbbe360a8229053" 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&sid=ea46fef75f01d1025dbbe360a8229053" 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=ea46fef75f01d1025dbbe360a8229053" 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&sid=ea46fef75f01d1025dbbe360a8229053"><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="58"><a itemprop="item" href="./viewforum.php?f=58&sid=ea46fef75f01d1025dbbe360a8229053"><span itemprop="name">Lua Labs</span></a><meta itemprop="position" content="3" /></span> </li> <li class="rightside responsive-search"> <a href="./search.php?sid=ea46fef75f01d1025dbbe360a8229053" 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=28320&sid=ea46fef75f01d1025dbbe360a8229053">Wesnoth Lua Pack: Development Thread</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;">Discussion of Lua and <a class="postlink" href="//wiki.wesnoth.org/LuaWML">LuaWML</a> support, development, and ideas.<br /></div> <p> <strong>Moderator:</strong> <a style="color:#008000;" href="./memberlist.php?mode=group&g=6643&sid=ea46fef75f01d1025dbbe360a8229053">Forum Moderators</a> </p> <div class="action-bar bar-top"> <a href="./posting.php?mode=reply&t=28320&sid=ea46fef75f01d1025dbbe360a8229053" 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=ea46fef75f01d1025dbbe360a8229053"> <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=ea46fef75f01d1025dbbe360a8229053" 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="28320" /> <input type="hidden" name="sf" value="msgonly" /> <input type="hidden" name="sid" value="ea46fef75f01d1025dbbe360a8229053" /> </fieldset> </form> </div> <div class="pagination"> 115 posts <ul> <li class="dropdown-container dropdown-button-control dropdown-page-jump page-jump"> <a class="button button-icon-only dropdown-trigger" href="#" title="Click to jump to page…" role="button"><i class="icon fa-level-down fa-rotate-270" aria-hidden="true"></i><span class="sr-only">Page <strong>1</strong> of <strong>8</strong></span></a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <ul class="dropdown-contents"> <li>Jump to page:</li> <li class="page-jump-form"> <input type="number" name="page-number" min="1" max="999999" title="Enter the page number you wish to go to" class="inputbox tiny" data-per-page="15" data-base-url="./viewtopic.php?t=28320&amp;sid=ea46fef75f01d1025dbbe360a8229053" data-start-name="start" /> <input class="button2" value="Go" type="button" /> </li> </ul> </div> </li> <li class="active"><span>1</span></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=15" role="button">2</a></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=30" role="button">3</a></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=45" role="button">4</a></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=60" role="button">5</a></li> <li class="ellipsis" role="separator"><span>…</span></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=105" role="button">8</a></li> <li class="arrow next"><a class="button button-icon-only" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=15" rel="next" role="button"><i class="icon fa-chevron-right fa-fw" aria-hidden="true"></i><span class="sr-only">Next</span></a></li> </ul> </div> </div> <div id="p400893" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile400893"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="avatar"><img class="avatar" src="./download/file.php?avatar=116646_1243513100.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=116646&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1298</a></dd> <dd class="profile-joined"><strong>Joined:</strong> May 20th, 2009, 7:42 am</dd> </dl> <div class="postbody"> <div id="post_content400893"> <h3 class="first"> <a href="./viewtopic.php?p=400893&sid=ea46fef75f01d1025dbbe360a8229053#p400893">Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=400893&sid=ea46fef75f01d1025dbbe360a8229053" 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=400893&sid=ea46fef75f01d1025dbbe360a8229053#p400893" 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&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a></strong> » </span><time datetime="2009-12-31T07:28:28+00:00">December 31st, 2009, 7:28 am</time> </p> <div class="content"><strong class="text-strong">EDIT: This add-on is available on the 1.16 add-ons server and on the following Github repo: <a href="https://github.com/Elvish-Hunter/Wesnoth_Lua_Pack" class="postlink">https://github.com/Elvish-Hunter/Wesnoth_Lua_Pack</a>.</strong><br> <br> The idea behind the WLP is to collect bits of Lua written by various people that will help supplement the helper library and WML. There are two aspects to WLP:<br> <br> 1. The utilities. These are meant to help people debug WML and Lua. Currently, the only scripts in this category are: utils.extract_side, utils.extract_unit, and utils.extract_cfg. Basically, the first two scripts let you look at the raw data for a unit or side <strong class="text-strong">while running wesnoth</strong> instead of having to wrangle with a save file in another window. The information is displayed in a message window and printed to stderr.txt or the equivalent. The third... is a bit more general-purpose and requires some knowledge of Lua to use. Documentation will be coming shortly, so you can get more details there.<br> <br> 2. The <strong class="text-strong">new tags!</strong> This is a great thing about Lua: you can make new WML tags! For example, instead of a nasty long MODIFY_UNIT macro, you can now use a trim [modify_unit] tag. Or you can use tags that have never-before-seen functionality. The pack currently includes [store_shroud] and [set_shroud], which store and set the shroud of a side, respectively. Hopefully more will be added in the future!<br> <br> If you have Lua that you've written that you think should (or could) be included in this pack, post it here. If you have feedback, that goes in the <a href="http://forum.wesnoth.org/viewtopic.php?f=8&t=28319" class="postlink">Feedback/Request thread</a>.</div> <div class="notice"> Last edited by <a href="./memberlist.php?mode=viewprofile&u=118285&sid=ea46fef75f01d1025dbbe360a8229053" style="color: #DD5500;" class="username-coloured">Elvish_Hunter</a> on November 22nd, 2021, 9:56 pm, edited 2 times in total. <br /><strong>Reason:</strong> <em>Availability of add-on for 1.16</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="p400895" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile400895"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="avatar"><img class="avatar" src="./download/file.php?avatar=116646_1243513100.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=116646&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1298</a></dd> <dd class="profile-joined"><strong>Joined:</strong> May 20th, 2009, 7:42 am</dd> </dl> <div class="postbody"> <div id="post_content400895"> <h3 > <a href="./viewtopic.php?p=400895&sid=ea46fef75f01d1025dbbe360a8229053#p400895">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=400895&sid=ea46fef75f01d1025dbbe360a8229053" 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=400895&sid=ea46fef75f01d1025dbbe360a8229053#p400895" 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&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a></strong> » </span><time datetime="2009-12-31T07:54:47+00:00">December 31st, 2009, 7:54 am</time> </p> <div class="content">silene on the current modify_unit code: <blockquote><div><cite>silene wrote:</cite><blockquote><div><cite>melinath wrote:</cite>I'd like to include this code in a Lua Pack Add-on, if that's all right.</div></blockquote> As it stands, it doesn't do much. You may want to improve it a bit beforehand. For instance, <ul> <li> remove the need for the [variables] subtag, to make the usage of the tag lighter,</li> <li> allow subtags inside [variables], so that in-depth modification of a unit are possible (e.g. [status]poisoned=yes[/status]),</li> <li> allow not only modifying but also adding and removing parts of the unit, e.g. [attacks] (but with which syntax?).</li></ul></div></blockquote> I can't get to upgrading it for the next few days (Plan to spend some time with friends and family) but if anyone wants to give it a stab, feel free!</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="p400903" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile400903"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=864&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1109</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 28th, 2004, 10:02 pm</dd> </dl> <div class="postbody"> <div id="post_content400903"> <h3 > <a href="./viewtopic.php?p=400903&sid=ea46fef75f01d1025dbbe360a8229053#p400903">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=400903&sid=ea46fef75f01d1025dbbe360a8229053" 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=400903&sid=ea46fef75f01d1025dbbe360a8229053#p400903" 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&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a></strong> » </span><time datetime="2009-12-31T10:35:07+00:00">December 31st, 2009, 10:35 am</time> </p> <div class="content"><blockquote><div><cite>melinath wrote:</cite>The idea behind the WLP is to collect bits of Lua written by various people that will help supplement the helper library and WML.</div></blockquote> Nice.<br> <br> Concerning wlp_tags.lua, you should put the local keywords before all the variables (that is, "helper", "T", and "W"). Same thing for the functions. Indeed, your definitions overwrite user definitions (or vice versa, depending on who is last), and the user may as well have decided that "W" was something completely different, for instance a global shortcut to the "wesnoth" table.<br> <br> Similarly, _main.cfg, the "require" part should not be enabled by default, and hence polluting the global environment of any scenario for users who have downloaded the addon. (But due to the comment above, this may just have been an oversight.)<br> <br> By the way, why are you suggesting users to define a textdomain?<br> <blockquote><div><cite>melinath wrote:</cite>If you have Lua that you've written that you think should (or could) be included in this pack, post it here.</div></blockquote> Here are some tags I had posted elsewhere as examples. The [save_map] and [load_map] tags store and restore map data from a WML variable; useful for dealing with dynamically modified yet persistent maps. The [narrate] tags is just a shortcut for the commonly encountered [message] tag with a narrator speaker.<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>local H = wesnoth.require "lua/helper.lua" wesnoth.register_wml_action("save_map", function(cfg) local w, h, b = wesnoth.get_map_size() local t = {} for y = 1 - b, h + b do local r = {} for x = 1 - b, w + b do r[x + b] = wesnoth.get_terrain(x, y) end t[y + b] = table.concat(r, ',') end local s = table.concat(t, '\n') local v = cfg.variable or H.wml_error "save_map missing required variable= attribute." wesnoth.set_variable(v, string.format("border_size=%d\nusage=map\n\n%s", b, s)) end) wesnoth.register_wml_action("load_map", function(cfg) local v = cfg.variable or H.wml_error "load_map missing required variable= attribute." wesnoth.fire("replace_map", { map = wesnoth.get_variable(v), expand = true, shrink = true }) end) wesnoth.register_wml_action("narrate", function(cfg) local content = cfg.__literal content.speaker = "narrator" content.image = content.image or "wesnoth-icon.png" wesnoth.fire("message", content) end) </code></pre></div></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="p400909" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile400909"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="avatar"><img class="avatar" src="./download/file.php?avatar=116646_1243513100.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=116646&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1298</a></dd> <dd class="profile-joined"><strong>Joined:</strong> May 20th, 2009, 7:42 am</dd> </dl> <div class="postbody"> <div id="post_content400909"> <h3 > <a href="./viewtopic.php?p=400909&sid=ea46fef75f01d1025dbbe360a8229053#p400909">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=400909&sid=ea46fef75f01d1025dbbe360a8229053" 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=400909&sid=ea46fef75f01d1025dbbe360a8229053#p400909" 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&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a></strong> » </span><time datetime="2009-12-31T11:29:56+00:00">December 31st, 2009, 11:29 am</time> </p> <div class="content"><blockquote><div><cite>silene wrote:</cite>Concerning wlp_tags.lua, you should put the local keywords before all the variables (that is, "helper", "T", and "W"). Same thing for the functions. Indeed, your definitions overwrite user definitions (or vice versa, depending on who is last), and the user may as well have decided that "W" was something completely different, for instance a global shortcut to the "wesnoth" table.</div></blockquote> Oh... yeah... that would make sense. <img class="smilies" src="./images/smilies/icon_confused.gif" width="15" height="15" alt=":?" title="Confused"> Will be fixed with the next upload. (W and T are taken out since they never actually get used...)<br> <blockquote><div><cite>silene wrote:</cite>Similarly, _main.cfg, the "require" part should not be enabled by default, and hence polluting the global environment of any scenario for users who have downloaded the addon. (But due to the comment above, this may just have been an oversight.)</div></blockquote> The problem is that I do want those things globally available personally, just in case, but I'll try to be more careful about commenting that section out when I upload.<br> <blockquote><div><cite>silene wrote:</cite>By the way, why are you suggesting users to define a textdomain?</div></blockquote> <blockquote><div><cite>LuaWML wrote:</cite>The function fires a [[InterfaceActionsWML#[message]|[message]]] action and passes a WML object containing the usual two fields to it. The second field is initialized by concatenating the function argument with another string. Both strings are prefixed by the _ symbol to mark them as translatable. (Note that _ is just a unary function, not a keyword.) Again, this is made possible by a specific line of the prelude:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>_ = wesnoth.textdomain "wesnoth-tutorial"</code></pre></div></div></blockquote> My understanding of this wiki section was that a textdomain had to be defined in order to have translatable strings used in a Lua script. Since the textdomain depends on the add-on where the script is being used, it seemed to make more sense for the user to define it. Although none of the scripts currently in use require translatable strings, I think this is one area where it's easier to have users add the line when they install the add-on than to make them install it if textdomains ever do become necessary.<br> <blockquote><div><cite>silene wrote:</cite> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>wesnoth.register_wml_action("load_map", function(cfg) local v = cfg.variable or H.wml_error "load_map missing required variable= attribute." wesnoth.fire("replace_map", { map = wesnoth.get_variable(v), expand = true, shrink = true }) end) </code></pre></div></div></blockquote> I'm modifying the code you posted slightly (helper instead of H, since that's how the rest of the scripts are written. Though I guess I could switch it the other way. What is the advantage of H?) With this one, though - it seems to require the replace_map script from LoW. Do you know who I should ask about including that, as well?</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="p400912" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile400912"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=864&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1109</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 28th, 2004, 10:02 pm</dd> </dl> <div class="postbody"> <div id="post_content400912"> <h3 > <a href="./viewtopic.php?p=400912&sid=ea46fef75f01d1025dbbe360a8229053#p400912">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=400912&sid=ea46fef75f01d1025dbbe360a8229053" 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=400912&sid=ea46fef75f01d1025dbbe360a8229053#p400912" 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&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a></strong> » </span><time datetime="2009-12-31T12:28:34+00:00">December 31st, 2009, 12:28 pm</time> </p> <div class="content"><blockquote><div><cite>melinath wrote:</cite><blockquote><div><cite>silene wrote:</cite>By the way, why are you suggesting users to define a textdomain?</div></blockquote> My understanding of this wiki section was that a textdomain had to be defined in order to have translatable strings used in a Lua script. Since the textdomain depends on the add-on where the script is being used, it seemed to make more sense for the user to define it. Although none of the scripts currently in use require translatable strings, I think this is one area where it's easier to have users add the line when they install the add-on than to make them install it if textdomains ever do become necessary.</div></blockquote> I think you are misunderstanding what "_" means (and this may explain why you have a broken ID_MESSAGE macro in Brent). Be it in WML or in Lua, "_" doesn't perform a translation; it only marks the following literal string as translatable, and it indicates where the translation should be searched if needed. The actual translation happens much later, for instance when performing a WML variable substitution or when calling "tostring" in a Lua script. In other words, you don't need to have built a textdomain before manipulating a translatable string.<br> <br> If some scripts of WLP need to have translatable strings, they will use their own local variable "_" that points to a specific textdomain. Indeed, there is no reason for finding translations of WLP strings inside a random add-on. So, it makes sense for a campaign to define its own global "_", but it doesn't make sense for WLP to rely on a global "_" set by someone else.<br> <blockquote><div><cite>melinath wrote:</cite>I'm modifying the code you posted slightly (helper instead of H, since that's how the rest of the scripts are written. Though I guess I could switch it the other way. What is the advantage of H?)</div></blockquote> No advantage except for being shorter. It's just a matter of taste.<br> <blockquote><div><cite>melinath wrote:</cite>With this one, though - it seems to require the replace_map script from LoW. Do you know who I should ask about including that, as well?</div></blockquote> [replace_map] is a standard tag; the LoW script only improves it. But [load_map] doesn't need the improved [replace_map], the standard one is sufficient for it to work.<br> <br> As for duplicating the one from LoW, you don't need to. Just load it (dofile) directly from its standalone file in LoW. Still, to answer your question, the first (non-working) version of [replace_map] is mine, which was then tested, fixed, and committed, by fendrin/fabi.</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="p401070" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile401070"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="avatar"><img class="avatar" src="./download/file.php?avatar=116646_1243513100.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=116646&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1298</a></dd> <dd class="profile-joined"><strong>Joined:</strong> May 20th, 2009, 7:42 am</dd> </dl> <div class="postbody"> <div id="post_content401070"> <h3 > <a href="./viewtopic.php?p=401070&sid=ea46fef75f01d1025dbbe360a8229053#p401070">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=401070&sid=ea46fef75f01d1025dbbe360a8229053" 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=401070&sid=ea46fef75f01d1025dbbe360a8229053#p401070" 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&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a></strong> » </span><time datetime="2010-01-01T11:14:26+00:00">January 1st, 2010, 11:14 am</time> </p> <div class="content"><blockquote><div><cite>silene wrote:</cite>So, it makes sense for a campaign to define its own global "_", but it doesn't make sense for WLP to rely on a global "_" set by someone else.</div></blockquote> So basically if there are translatable strings, they would be set in a specific text domain (possibly wesnoth-WLP) rather than having to be translated in every single campaign where they were used...?<br> <blockquote><div><cite>silene wrote:</cite>[replace_map] is a standard tag</div></blockquote> Ah, so it is... Now I feel silly. <img class="smilies" src="./images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><br> <br> Gah. I've been trying to get the modify_unit script tweaked, but it's not going well. I need to let it sit. Perhaps someone will notice something I'm doing wrong.<br> <br> The problem I'm having is the recursion on attack tags - if you're going to be removing them, you need to be able to filter for them. But for some reason, the filter isn't catching matching attack tags. (Pardon all the extra print tags.)<br> <div style="margin:20px;margin-top:5px"><div class="quotetitle" style="vertical-align:middle;display:inline-block"><strong>Spoiler:</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"><div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>function utils.remove_child(cfg,name) for i = 1, #cfg do local v = cfg[i] if v[1] == name then table.remove(cfg,i) return end end end function utils.filter_wml(f,t,attributes) local attributes = attributes or "all" local n = 0 local indent = " " local function sub_filter(f,t) local n = n+1 local indent = " "..indent print(indent.."recursion "..n.."\n") local attr_match=true local tables = 0 for k,v in pairs(f) do if(type(v)=="table") then tables = tables + 1 else if(string.match(attributes,k) or (attributes=="all")) then if(f[k]~=t[k]) then attr_match=false end end end end print("attr_match :",tostring(attr_match)..'\n') if (attr_match==false) then return false else if(tables==0) then return true end for k,v in pairs(f) do if(type(v)=="table") then for i = 1, #t do if(t[i][1] == v[1]) then local x=sub_filter(v[2],t[i][2]) print('table match: '..tostring(x)..'\n') if (x) then return true end end end end end return false end end return sub_filter(f,t) end local function modify_unit(args) args = args.__parsed local filter = helper.get_child(args, "filter") local mode = args.mode or "replace" args.mode = nil wlp_utils.remove_child(args, "filter") wesnoth.fire("store_unit", { [1] = { "filter", filter }, variable = "LUA_modify_unit", kill = true }) for i = 0, wesnoth.get_variable("LUA_modify_unit.length") - 1 do local function sub_set_vars(t,h,m) for k, v in pairs(t) do if(type(v)=="table") then if(m=="force") then --an attack can have more than one special sub_set_vars(v[2],h..'.'..v[1],"replace") else local i = 0 local w = wesnoth.get_variable(h..'.'..v[1]..'['..i..']') while(type(w)=="table") do --filter it --if it matches, set that variable to nil (for remove) or set the --subvars if(m=="remove") then print(wlp_utils.filter_wml(v[2],w) , v[1] , h..'.'..v[1]..'['..i..']') if (wlp_utils.filter_wml(v[2],w)) then wesnoth.set_variable(h..'.'..v[1]..'['..i..']') end else print(wlp_utils.filter_wml(v[2],w) , v[1] , h..'.'..v[1]..'['..i..']') if (wlp_utils.filter_wml(v[2],w,"name")) then sub_set_vars(v[2],h..'.'..v[1]..'['..i..']',"force") end end i=i+1 w = wesnoth.get_variable(h..'.'..v[1]..'['..i..']') end end else if(m=="remove") then if(v==wesnoth.get_variable(h..'.'..k)) then wesnoth.set_variable(h..'.'..k) end else wesnoth.set_variable(h..'.' ..k, v) end end end end sub_set_vars(args,"LUA_modify_unit[" .. i .. "]",mode) wesnoth.fire("unstore_unit", { variable = "LUA_modify_unit[" .. i .. "]", find_vacant = false }) end wesnoth.set_variable("LUA_modify_unit") end wesnoth.register_wml_action("modify_unit",modify_unit)</code></pre></div></div></div> EDIT:: Okay, seem to have solved replace and remove... though I'm sure there's a lot I can improve on. Add can wait until tomorrow. Here's the code w/ documentation and debugging prints; I'll upload a new version. <div style="margin:20px;margin-top:5px"><div class="quotetitle" style="vertical-align:middle;display:inline-block"><strong>Spoiler:</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"><div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>--! Function removes the first child with a given name. --! melinath function utils.remove_child(cfg,name) for i = 1, #cfg do local v = cfg[i] if v[1] == name then table.remove(cfg,i) return end end end --! Function checks recursively if all values contained in table a are also contained in table b. --! melinath function utils.filter_wml(f,t,indent) print(indent.."Matching...") local function sub_filter(f,t) local indent = indent.." " local attr_match=true local tables = 0 for k,v in pairs(f) do if(type(v)=="table") then tables = tables + 1 else print(indent.."Checking filter attribute: "..k) print(indent.."filter: "..tostring(f[k])) print(indent.."checking: "..tostring(t[k])) if(f[k]~=t[k]) then attr_match=false end print(indent.."Match: "..tostring(f[k]==t[k])) end end if (attr_match==false) then return false else if(tables==0) then return true end for k,v in pairs(f) do if(type(v)=="table") then print(indent.."Entering filter table: "..v[1]) for i = 1, #t do print(indent.."Checking against: "..t[i][1]) print(indent.."Name Match: "..tostring(v[1]==t[i][1])) if(t[i][1] == v[1]) then local x=sub_filter(v[2],t[i][2]) print(indent..'Table match: '..tostring(x)) if (x) then return true end end end end end return false end end return sub_filter(f,t) end modify_unit, found written by silene in http://forum.wesnoth.org/viewtopic.php?p=398927#p398927 -- Essentially the MODIFY UNIT macro, but takes fewer lines of WML. -- modes: replace (default), add or remove. -- Replace: If an attribute exists, replace the value. If a tag is included in [modify_unit], -- replace the relevant values in all tags that match the [filter_wml] tag. -- Add: Overwrite all base-level attributes. Append all new tags. -- Remove: If an attribute exists and matches, set it to nil/empty. If a tag exists and matches, -- remove. -- In remove, removes everything that matches the -- given parameters. -- Example: -- [modify_unit] -- [filter] -- side=1 -- id=Hamel -- [/filter] -- hitpoints=100 -- max_moves=10 -- mode=replace -- [attack] -- [filter_wml] -- name=hi -- [filter_wml] -- number=10 -- name=destruction -- [special] -- [snow] -- id=snow -- [/snow] -- [/special] -- [/attack] -- [/modify_unit] local function modify_unit(args) print("modify_unit running") args = args.__parsed local filter = helper.get_child(args, "filter") local mode = args.mode or "replace" args.mode = nil wlp_utils.remove_child(args, "filter") wesnoth.fire("store_unit", { [1] = { "filter", filter }, variable = "LUA_modify_unit", kill = true }) print(wesnoth.get_variable("LUA_modify_unit.length").." units match the filter") local indent="" for i = 0, wesnoth.get_variable("LUA_modify_unit.length") - 1 do print("Filter match iteration started.") local function sub_replace(t,h,indent,m) local indent=indent.." " print(indent.."sub_replace running") for k, v in pairs(t) do if(type(v)=="table") then print(indent.."found table: "..v[1]) -- if(m=="force") then --an attack can have more than one special -- sub_set_vars(v[2],h..'.'..v[1],"replace") -- else local filter=helper.get_child(v[2],"filter_wml") if(filter~=nil) then print(indent.."found filter on "..v[1]) wlp_utils.remove_child(v[2],"filter_wml") local i = 0 local w = wesnoth.get_variable(h..'.'..v[1]..'['..i..']') while(type(w)=="table") do --filter it --if it matches, set that variable to nil (for remove) or set the --subvars print(indent.."checking table: "..v[1])--wlp_utils.filter_wml(v[2],w) , v[1] , h..'.'..v[1]..'['..i..']') print(indent.."filter:") -- wlp_utils.extract_cfg(filter) print(indent.."haystack:") -- wlp_utils.extract_cfg(w) if (wlp_utils.filter_wml(filter,w,indent)) then sub_replace(v[2],h..'.'..v[1]..'['..i..']',indent) end i=i+1 w = wesnoth.get_variable(h..'.'..v[1]..'['..i..']') end else print(indent.."no filter") sub_replace(v[2],h..'.'..v[1]..'['..i..']',indent) end -- end else print(indent.."setting variable "..h..'.'..k.." = "..tostring(v)) wesnoth.set_variable(h..'.' ..k, v) end end end local function sub_remove(t,h,indent) local indent=indent.." " print(indent.."sub_remove running") for k,v in pairs(t) do if(type(v)=="table") then local i = 0 local w = wesnoth.get_variable(h..'.'..v[1]..'['..i..']') while(type(w)=="table") do --filter it --if it matches, set that variable to nil (for remove) or set the --subvars print(indent.."checking table: "..v[1])--wlp_utils.filter_wml(v[2],w) , v[1] , h..'.'..v[1]..'['..i..']') print(indent.."filter:") -- wlp_utils.extract_cfg(v[2]) print(indent.."haystack:") -- wlp_utils.extract_cfg(w) if (wlp_utils.filter_wml(v[2],w,indent)) then wesnoth.set_variable(h..'.'..v[1]..'['..i..']') print(indent.."removing table "..h..'.'..v[1]..'['..i..']') end i=i+1 w = wesnoth.get_variable(h..'.'..v[1]..'['..i..']') end else print(indent.."checking attribute: "..tostring(k).."\nvalues: "..v.." | "..wesnoth.get_variable(h..'.'..k).."\n") if(v==wesnoth.get_variable(h..'.'..k)) then wesnoth.set_variable(h..'.'..k) end end end end local function sub_add(t,h) print(indent.."sub_add running") end if(mode=="remove") then sub_remove(args,"LUA_modify_unit[" .. i .. "]","") elseif (mode=="add") then sub_add(args,"LUA_modify_unit["..i.."]") else sub_replace(args,"LUA_modify_unit[" .. i .. "]","",mode) end wesnoth.fire("unstore_unit", { variable = "LUA_modify_unit[" .. i .. "]", find_vacant = false }) end wesnoth.set_variable("LUA_modify_unit") end wesnoth.register_wml_action("modify_unit",modify_unit)</code></pre></div></div></div></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="p401405" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile401405"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=864&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1109</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 28th, 2004, 10:02 pm</dd> </dl> <div class="postbody"> <div id="post_content401405"> <h3 > <a href="./viewtopic.php?p=401405&sid=ea46fef75f01d1025dbbe360a8229053#p401405">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=401405&sid=ea46fef75f01d1025dbbe360a8229053" 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=401405&sid=ea46fef75f01d1025dbbe360a8229053#p401405" 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&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a></strong> » </span><time datetime="2010-01-02T21:32:51+00:00">January 2nd, 2010, 9:32 pm</time> </p> <div class="content"><blockquote><div><cite>melinath wrote:</cite><blockquote><div><cite>silene wrote:</cite>So, it makes sense for a campaign to define its own global "_", but it doesn't make sense for WLP to rely on a global "_" set by someone else.</div></blockquote> So basically if there are translatable strings, they would be set in a specific text domain (possibly wesnoth-WLP) rather than having to be translated in every single campaign where they were used...?</div></blockquote> Exactly. And it works both way. For instance, if a custom unit in one of your campaign or era is using a "sword", just change the text domain to "wesnoth-units" before the weapon definition, and the weapon will automatically get a translation in any language.</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="p402096" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile402096"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="avatar"><img class="avatar" src="./download/file.php?avatar=116646_1243513100.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=116646&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1298</a></dd> <dd class="profile-joined"><strong>Joined:</strong> May 20th, 2009, 7:42 am</dd> </dl> <div class="postbody"> <div id="post_content402096"> <h3 > <a href="./viewtopic.php?p=402096&sid=ea46fef75f01d1025dbbe360a8229053#p402096">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402096&sid=ea46fef75f01d1025dbbe360a8229053" 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=402096&sid=ea46fef75f01d1025dbbe360a8229053#p402096" 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&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a></strong> » </span><time datetime="2010-01-06T02:49:44+00:00">January 6th, 2010, 2:49 am</time> </p> <div class="content">mkay. New version posted. Modify_unit now replaces, removes, and adds variables. Documentation coming soon at <a class="postlink" href="//wiki.wesnoth.org/WLPDocs">WLPDocs</a>.<br> <br> EDIT:: Perhaps this thread should be in the Coder's Corner?<br> <br> EDIT EDIT::<br> A good tag to add would be an event tag that correctly handles sighted events.<br> Also, a tag that does a looping message menu more efficiently.</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="p402407" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile402407"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=110036&sid=ea46fef75f01d1025dbbe360a8229053" 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&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">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_content402407"> <h3 > <a href="./viewtopic.php?p=402407&sid=ea46fef75f01d1025dbbe360a8229053#p402407">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402407&sid=ea46fef75f01d1025dbbe360a8229053" 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=402407&sid=ea46fef75f01d1025dbbe360a8229053#p402407" 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&u=110036&sid=ea46fef75f01d1025dbbe360a8229053" style="color: #AA4444;" class="username-coloured">Anonymissimus</a></strong> » </span><time datetime="2010-01-07T14:43:02+00:00">January 7th, 2010, 2:43 pm</time> </p> <div class="content"><blockquote><div><cite>silene wrote:</cite>As for duplicating the one from LoW, you don't need to. Just load it (dofile) directly from its standalone file in LoW.</div></blockquote> Makes the thing where it is used dependent on LoW's files, which are not necessarily installed on Linux systems.<br> <blockquote><div><cite>melinath wrote:</cite>A good tag to add would be an event tag that correctly handles sighted events.</div></blockquote> Yes. But remember that our crowd of developers are not able to implement this functionality correctly in C++...and don't forget to deal with the "delay shroud update" option. Maybe you can write the wml version for the semi-competent replacement that I've posted more easily...<br> Also...the tag you'd need to create is the [event]name=sighted tag, but lua custom tags aren't valid in [scenario]...I don't think that it is possible...other than using the existing moveto and/or sighted events.</div> <div id="sig402407" class="signature">projects (BfW 1.12):<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&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&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&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&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&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&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="p402436" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile402436"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="avatar"><img class="avatar" src="./download/file.php?avatar=116646_1243513100.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=116646&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1298</a></dd> <dd class="profile-joined"><strong>Joined:</strong> May 20th, 2009, 7:42 am</dd> </dl> <div class="postbody"> <div id="post_content402436"> <h3 > <a href="./viewtopic.php?p=402436&sid=ea46fef75f01d1025dbbe360a8229053#p402436">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402436&sid=ea46fef75f01d1025dbbe360a8229053" 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=402436&sid=ea46fef75f01d1025dbbe360a8229053#p402436" 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&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a></strong> » </span><time datetime="2010-01-07T17:17:23+00:00">January 7th, 2010, 5:17 pm</time> </p> <div class="content"><blockquote><div><cite>Anonymissimus wrote:</cite><blockquote><div><cite>melinath wrote:</cite>A good tag to add would be an event tag that correctly handles sighted events.</div></blockquote> Yes. But remember that our crowd of developers are not able to implement this functionality correctly in C++...and don't forget to deal with the "delay shroud update" option. Maybe you can write the wml version for the semi-competent replacement that I've posted more easily...</div></blockquote> semi-component replacement? What do you mean?<br> I was thinking of modifying the moveto event tag to check if a unit becomes visible to enemies after a move, and if so, fire a sighted event. You would have to use global variables to keep track of which units could be seen and which could not... could be a bit of a pain. And I don't know how it would deal with delay shroud.<br> <blockquote><div><cite>Anonymissimus wrote:</cite>Also...the tag you'd need to create is the [event]name=sighted tag, but lua custom tags aren't valid in [scenario]...I don't think that it is possible...other than using the existing moveto and/or sighted events.</div></blockquote> The following section of the wiki seems (to me) to indicate that something like this could be possible. But I've been quite wrong before, so. <blockquote><div><cite>LuaWML wrote:</cite>For instance, if you cannot stand any longer the fact that first_time_only is set to yes by default for the [event] tag, you can redefine it. But we have to be careful not to cause variable substitution, since the engine would perform a second variable substitution afterwards.<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>local old_event_handler old_event_handler = register_wml_action("event", function(cfg) -- Get the plain text from the user. local new_cfg = cfg.__literal -- The expression below is equivalent to cfg.__parsed.first_time_only, -- only faster. It is needed, since the first_time_only attribute may -- reference variables. local first = cfg.first_time_only -- Modify the default behavior of first_time_only. if first == nil then first = false end new_cfg.first_time_only = first -- Call the engine handler. old_event_handler(new_cfg) end )</code></pre></div></div></blockquote></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="p402443" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile402443"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=864&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1109</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 28th, 2004, 10:02 pm</dd> </dl> <div class="postbody"> <div id="post_content402443"> <h3 > <a href="./viewtopic.php?p=402443&sid=ea46fef75f01d1025dbbe360a8229053#p402443">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402443&sid=ea46fef75f01d1025dbbe360a8229053" 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=402443&sid=ea46fef75f01d1025dbbe360a8229053#p402443" 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&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a></strong> » </span><time datetime="2010-01-07T17:39:39+00:00">January 7th, 2010, 5:39 pm</time> </p> <div class="content"><blockquote><div><cite>Anonymissimus wrote:</cite><blockquote><div><cite>melinath wrote:</cite>A good tag to add would be an event tag that correctly handles sighted events.</div></blockquote> Yes. But remember that our crowd of developers are not able to implement this functionality correctly in C++...and don't forget to deal with the "delay shroud update" option.</div></blockquote> Both things are linked: the reason that prevents us from fixing it is precisely the delayed shroud update. If it weren't for this option, the event would have been fixed already.<br> <blockquote><div><cite>Anonymissimus wrote:</cite>Maybe you can write the wml version for the semi-competent replacement that I've posted more easily...</div></blockquote> Not only more easily (perhaps), but also more correctly. One thing you can do in Lua but not in plain WML is to correctly compute distance between units. In particular, I seem to remember your code is assuming that units move at maximum speed whatever the terrain; this assumption is not needed for Lua-based implementation.<br> <blockquote><div><cite>Anonymissimus wrote:</cite>Also...the tag you'd need to create is the [event]name=sighted tag, but lua custom tags aren't valid in [scenario]...I don't think that it is possible...other than using the existing moveto and/or sighted events.</div></blockquote> I don't understand what you mean. New event handlers can be created from other event handlers. And events can be fired from event handlers. So WML in general, and Lua in particular, have no troubles dealing with events.</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="p402471" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile402471"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=110036&sid=ea46fef75f01d1025dbbe360a8229053" 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&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">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_content402471"> <h3 > <a href="./viewtopic.php?p=402471&sid=ea46fef75f01d1025dbbe360a8229053#p402471">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402471&sid=ea46fef75f01d1025dbbe360a8229053" 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=402471&sid=ea46fef75f01d1025dbbe360a8229053#p402471" 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&u=110036&sid=ea46fef75f01d1025dbbe360a8229053" style="color: #AA4444;" class="username-coloured">Anonymissimus</a></strong> » </span><time datetime="2010-01-07T20:47:52+00:00">January 7th, 2010, 8:47 pm</time> </p> <div class="content"><blockquote><div><cite>melinath wrote:</cite> semi-component replacement? What do you mean?<br> I was thinking of modifying the moveto event tag to check if a unit becomes visible to enemies after a move, and if so, fire a sighted event. You would have to use global variables to keep track of which units could be seen and which could not... could be a bit of a pain. And I don't know how it would deal with delay shroud.</div></blockquote> competent, not component<br> It has some disadvantages, see e.g. the assumption mentioned by silene.<br> thread:<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=21&t=27224&p=389087&hilit=shroud&sid=00f164b618fb22c9a56d88c8e3048fc0#p389087" class="postlink">http://forums.wesnoth.org/viewtopic.php ... c0#p389087</a><br> Don't read too much there, it causes headache. The current and tested version of the replacement macro is in my campaign, file sides_and_unit-utils.cfg. It is about what you want to do, replacing sighted with moveto, and all in wml. Be warned, the problem is way more complex than people tend to think... <blockquote class="uncited"><div><blockquote><div><cite>Anonymissimus wrote:</cite>Also...the tag you'd need to create is the [event]name=sighted tag, but lua custom tags aren't valid in [scenario]...I don't think that it is possible...other than using the existing moveto and/or sighted events.</div></blockquote> I don't understand what you mean. New event handlers can be created from other event handlers. And events can be fired from event handlers. So WML in general, and Lua in particular, have no troubles dealing with events.</div></blockquote> Sorry, I was wrong here.<br> But still, lua can't get around the problems with delay shroud, if even C++ can't...</div> <div id="sig402471" class="signature">projects (BfW 1.12):<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&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&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&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&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&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&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="p402525" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile402525"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="avatar"><img class="avatar" src="./download/file.php?avatar=116646_1243513100.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=116646&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1298</a></dd> <dd class="profile-joined"><strong>Joined:</strong> May 20th, 2009, 7:42 am</dd> </dl> <div class="postbody"> <div id="post_content402525"> <h3 > <a href="./viewtopic.php?p=402525&sid=ea46fef75f01d1025dbbe360a8229053#p402525">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402525&sid=ea46fef75f01d1025dbbe360a8229053" 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=402525&sid=ea46fef75f01d1025dbbe360a8229053#p402525" 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&u=116646&sid=ea46fef75f01d1025dbbe360a8229053" class="username">melinath</a></strong> » </span><time datetime="2010-01-08T01:39:54+00:00">January 8th, 2010, 1:39 am</time> </p> <div class="content">Ah, yes, it would help if I read things right. I should be able to make a lua version of your macro that's hopefully faster and will definitely take less WML - and if I can figure out how to reliably test a unit's movement radius (which silene said was possible with Lua) then it'll even eliminate one of the bugs you had. A full fix might be difficult, but this should be doable and better than what we've got now.<br> <br> The one thing I'm a little worried about is that first_time_only=no issue... hum.<br> <br> List of tags I now think might be useful:<br> --fixing "sighted" event<br> --looping message menu<br> --unstore set so that it doesn't plop things on impassable terrain by default.<br> --a tag to store all locations in a unit's movement radius. (with possible option of limiting it to just those places the unit can actually move to.)<br> --a tag that does a looping message menu more efficiently.</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="p402608" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile402608"> <dt class="has-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=110036&sid=ea46fef75f01d1025dbbe360a8229053" 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&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">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_content402608"> <h3 > <a href="./viewtopic.php?p=402608&sid=ea46fef75f01d1025dbbe360a8229053#p402608">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402608&sid=ea46fef75f01d1025dbbe360a8229053" 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=402608&sid=ea46fef75f01d1025dbbe360a8229053#p402608" 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&u=110036&sid=ea46fef75f01d1025dbbe360a8229053" style="color: #AA4444;" class="username-coloured">Anonymissimus</a></strong> » </span><time datetime="2010-01-08T12:03:54+00:00">January 8th, 2010, 12:03 pm</time> </p> <div class="content"><blockquote><div><cite>melinath wrote:</cite>Ah, yes, it would help if I read things right. I should be able to make a lua version of your macro that's hopefully faster and will definitely take less WML - and if I can figure out how to reliably test a unit's movement radius (which silene said was possible with Lua) then it'll even eliminate one of the bugs you had. A full fix might be difficult, but this should be doable and better than what we've got now.</div></blockquote> If you base your code on a moveto event, you need to calculate the visibility area for each of your units (the sum of them...). For that you need to take into account the surrounding terrain hexes and movement costs for these terrains for each of your units. This can probably be better implemented in lua, since it requires a lot of calculations. There was a noticable slowdown in an older version of my macro. The only terrain taken care of there is passable or impassable, but e.g. shallow water does not reduce the visibility area.<br> <br> At some other place you've found out that you can access the current shroud data in lua, is that also possible for fog ? If yes, it is probably better to work with that to check whether unit(s) to be spotted have become visible as the result of the move, instead of this complex and difficult calculation.<br> <br> @silene<br> 1. Ok, lua lets me modify given event handlers. Is it possible to create a<br> [event]name=shroud update<br> with lua, which is fired whenever shroud is updated, in case that delay shroud is on ?<br> 2. In my macro, I've made the restriction that the delay shroud option is simply ignored. That means, if the sighted event would have fired but shouldn't due to delay shroud, delay shroud is ignored, shroud is compulsorily updated and the event fires. Would that make it possible to "fix" the sighted event, if delay shroud is the only reason why it is broken ? It is an acceptible restriction imo since it happens quite seldom. (This also means that an [event]name=shroud update isn't needed since such an event can no longer reveal any unit(s) to be spotted.)<br> But I have the impression that there is more than one bug related to the sighted event like (mostly ?) not firing at all if unit(s) to be spotted have moved, not setting second_unit etc.<br> <br> /edit<br> OK, I'm currently at my first attempt to create a lua version for the sighted replacement. I think that it is possible with find_path to calculate the visibility area exactly as it should be, removing one of the main disadvantages.<br> I'm confused about the old_event_handler code snippet quoted above by melinath; what does old_event_handler(new_cfg) at the bottom do, why is old_event_handler a variable as well as a function, and why is it called old_event_handler ? Is it possible to create new events with that, say, [event]name=spotted ? (But where is then determined when that event is fired ?)<br> And when is the function "function" called ? It seems it is a call to a function and its definition packed into one code piece.<br> In which order would a debug marker step through that code ?<br> <br> /edit<br> I think I got it better now...the assignment to old_event_handler is done at the time the modified event is registered, but the function function is only called later at the time that the event is executed, that's why old_event_handler contains the previous event handler at that time. You should probably separate the definition and the call to the function "function" and insert some comments about the order of execution.</div> <div id="sig402608" class="signature">projects (BfW 1.12):<br> <a href="http://forums.wesnoth.org/viewtopic.php?f=8&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&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&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&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&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&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="p402828" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile402828"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=864&sr=posts&sid=ea46fef75f01d1025dbbe360a8229053">1109</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 28th, 2004, 10:02 pm</dd> </dl> <div class="postbody"> <div id="post_content402828"> <h3 > <a href="./viewtopic.php?p=402828&sid=ea46fef75f01d1025dbbe360a8229053#p402828">Re: Wesnoth Lua Pack: Development Thread</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=402828&sid=ea46fef75f01d1025dbbe360a8229053" 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=402828&sid=ea46fef75f01d1025dbbe360a8229053#p402828" 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&u=864&sid=ea46fef75f01d1025dbbe360a8229053" class="username">silene</a></strong> » </span><time datetime="2010-01-09T09:26:56+00:00">January 9th, 2010, 9:26 am</time> </p> <div class="content"><blockquote><div><cite>Anonymissimus wrote:</cite>1. Ok, lua lets me modify given event handlers. Is it possible to create a<br> [event]name=shroud update<br> with lua, which is fired whenever shroud is updated, in case that delay shroud is on ?</div></blockquote> No, it isn't possible. There is no hint about that from the engine. It could be added to the C++ code, but I don't see the need for it. The only time it would fire is at a time the "sighted" event already fires properly (I believe), so it wouldn't provide any new information.<br> <blockquote><div><cite>Anonymissimus wrote:</cite>But I have the impression that there is more than one bug related to the sighted event like (mostly ?) not firing at all if unit(s) to be spotted have moved, not setting second_unit etc.</div></blockquote> Do you have an example where second_unit is not set? I have taken a glance at the engine and "sighted" is never raised without specifying a second unit, so I'm a bit surprised.<br> <br> As for your first bug, I don't understand it. If a unit that could have been spotted has moved, it was done by WML. So it seems sensible that the "sighted" event is not raised in that case. Oh! perhaps I see what you mean. Are you saying that it is a hindrance that "sighted" events are raised after "moveto" events when shroud updates are delayed, but the other way around when shroud updates are realtime? But then again, it is just yet another unfortunate consequence of the existence of the "delay shroud update" option.<br> <blockquote><div><cite>Anonymissimus wrote:</cite>I think I got it better now...the assignment to old_event_handler is done at the time the modified event is registered, but the function function is only called later at the time that the event is executed, that's why old_event_handler contains the previous event handler at that time.</div></blockquote> You got it right. When the new handler is registered, the previous one is returned and stored; and when the new handler is later executed, the stored handler is executed too.</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&t=28320&sid=ea46fef75f01d1025dbbe360a8229053" 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=28320&sid=ea46fef75f01d1025dbbe360a8229053"> <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"> 115 posts <ul> <li class="dropdown-container dropdown-button-control dropdown-page-jump page-jump"> <a class="button button-icon-only dropdown-trigger" href="#" title="Click to jump to page…" role="button"><i class="icon fa-level-down fa-rotate-270" aria-hidden="true"></i><span class="sr-only">Page <strong>1</strong> of <strong>8</strong></span></a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <ul class="dropdown-contents"> <li>Jump to page:</li> <li class="page-jump-form"> <input type="number" name="page-number" min="1" max="999999" title="Enter the page number you wish to go to" class="inputbox tiny" data-per-page="15" data-base-url="./viewtopic.php?t=28320&amp;sid=ea46fef75f01d1025dbbe360a8229053" data-start-name="start" /> <input class="button2" value="Go" type="button" /> </li> </ul> </div> </li> <li class="active"><span>1</span></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=15" role="button">2</a></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=30" role="button">3</a></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=45" role="button">4</a></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=60" role="button">5</a></li> <li class="ellipsis" role="separator"><span>…</span></li> <li><a class="button" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=105" role="button">8</a></li> <li class="arrow next"><a class="button button-icon-only" href="./viewtopic.php?t=28320&sid=ea46fef75f01d1025dbbe360a8229053&start=15" rel="next" role="button"><i class="icon fa-chevron-right fa-fw" aria-hidden="true"></i><span class="sr-only">Next</span></a></li> </ul> </div> </div> <div class="action-bar actions-jump"> <p class="jumpbox-return"> <a href="./viewforum.php?f=58&sid=ea46fef75f01d1025dbbe360a8229053" class="left-box arrow-left" accesskey="r"> <i class="icon fa-angle-left fa-fw icon-black" aria-hidden="true"></i><span>Return to “Lua Labs”</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&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-cat-link"> <span> Announcements</span></a></li> <li><a href="./viewforum.php?f=62&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ News</span></a></li> <li><a href="./viewforum.php?f=25&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-cat-link"> <span> General</span></a></li> <li><a href="./viewforum.php?f=6&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Users’ Forum</span></a></li> <li><a href="./viewforum.php?f=70&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ Tournaments</span></a></li> <li><a href="./viewforum.php?f=5&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Release Announcements, Compiling & Installation</span></a></li> <li><a href="./viewforum.php?f=4&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Technical Support</span></a></li> <li><a href="./viewforum.php?f=67&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ iOS Support</span></a></li> <li><a href="./viewforum.php?f=3&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Strategies & Tips</span></a></li> <li><a href="./viewforum.php?f=37&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Gameplay Feedback</span></a></li> <li><a href="./viewforum.php?f=22&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ Mainline Campaign Feedback</span></a></li> <li><a href="./viewforum.php?f=46&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Tutorial</span></a></li> <li><a href="./viewforum.php?f=40&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ A Tale of Two Brothers</span></a></li> <li><a href="./viewforum.php?f=41&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ An Orcish Incursion</span></a></li> <li><a href="./viewforum.php?f=42&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ The South Guard</span></a></li> <li><a href="./viewforum.php?f=39&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Heir to the Throne</span></a></li> <li><a href="./viewforum.php?f=43&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Liberty</span></a></li> <li><a href="./viewforum.php?f=51&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Legend of Wesmere (single player)</span></a></li> <li><a href="./viewforum.php?f=56&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Legend of Wesmere (multiplayer)</span></a></li> <li><a href="./viewforum.php?f=49&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Eastern Invasion</span></a></li> <li><a href="./viewforum.php?f=55&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ The Hammer of Thursagan</span></a></li> <li><a href="./viewforum.php?f=54&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Descent into Darkness</span></a></li> <li><a href="./viewforum.php?f=52&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Delfador’s Memoirs</span></a></li> <li><a href="./viewforum.php?f=45&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Dead Water</span></a></li> <li><a href="./viewforum.php?f=65&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Secrets of the Ancients</span></a></li> <li><a href="./viewforum.php?f=48&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Sceptre of Fire</span></a></li> <li><a href="./viewforum.php?f=53&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Son of the Black Eye</span></a></li> <li><a href="./viewforum.php?f=44&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ The Rise of Wesnoth</span></a></li> <li><a href="./viewforum.php?f=47&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Northern Rebirth</span></a></li> <li><a href="./viewforum.php?f=50&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Under the Burning Suns</span></a></li> <li><a href="./viewforum.php?f=71&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>↳ Winds of Fate</span></a></li> <li><a href="./viewforum.php?f=31&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ Add-on Feedback</span></a></li> <li><a href="./viewforum.php?f=17&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Website</span></a></li> <li><a href="./viewforum.php?f=26&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-cat-link"> <span> Development</span></a></li> <li><a href="./viewforum.php?f=9&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Art Contributions</span></a></li> <li><a href="./viewforum.php?f=23&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Art Workshop</span></a></li> <li><a href="./viewforum.php?f=32&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Writers’ Forum</span></a></li> <li><a href="./viewforum.php?f=21&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ WML Workshop</span></a></li> <li><a href="./viewforum.php?f=58&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Lua Labs</span></a></li> <li><a href="./viewforum.php?f=19&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Faction & Era Development</span></a></li> <li><a href="./viewforum.php?f=15&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Multiplayer Development</span></a></li> <li><a href="./viewforum.php?f=8&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Scenario & Campaign Development</span></a></li> <li><a href="./viewforum.php?f=38&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ Mainline Campaign Development</span></a></li> <li><a href="./viewforum.php?f=68&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ UMC Replays</span></a></li> <li><a href="./viewforum.php?f=14&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Music & Sound Development</span></a></li> <li><a href="./viewforum.php?f=7&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Translations & Internationalization</span></a></li> <li><a href="./viewforum.php?f=60&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ Translation Stats</span></a></li> <li><a href="./viewforum.php?f=12&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Ideas</span></a></li> <li><a href="./viewforum.php?f=10&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Coder’s Corner</span></a></li> <li><a href="./viewforum.php?f=2&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Developers’ Discussions</span></a></li> <li><a href="./viewforum.php?f=73&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>↳ Wesnoth Organizational Updates</span></a></li> <li><a href="./viewforum.php?f=18&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Art Development</span></a></li> <li><a href="./viewforum.php?f=28&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-cat-link"> <span> Miscellaneous</span></a></li> <li><a href="./viewforum.php?f=13&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Game Development</span></a></li> <li><a href="./viewforum.php?f=11&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Off-Topic</span></a></li> <li><a href="./viewforum.php?f=61&sid=ea46fef75f01d1025dbbe360a8229053" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ 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=ea46fef75f01d1025dbbe360a8229053" 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&sid=ea46fef75f01d1025dbbe360a8229053" 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"> </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"> </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>® Forum Software © phpBB Limited</span> </p> <p class="footer-row" role="menu"> <a class="footer-link" href="./ucp.php?mode=privacy&sid=ea46fef75f01d1025dbbe360a8229053" title="Privacy" role="menuitem"> <span class="footer-link-text">Privacy</span> </a> | <a class="footer-link" href="./ucp.php?mode=terms&sid=ea46fef75f01d1025dbbe360a8229053" 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&sid=ea46fef75f01d1025dbbe360a8229053" } }); }); } </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>