CINXE.COM
Seeking tricky WML examples - 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>Seeking tricky WML examples - 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=5da6f13e50f54da5b92352201d076ba6"> <link rel="alternate" type="application/atom+xml" title="Feed - News" href="/app.php/feed/news?sid=5da6f13e50f54da5b92352201d076ba6"> <link rel="alternate" type="application/atom+xml" title="Feed - All forums" href="/app.php/feed/forums?sid=5da6f13e50f54da5b92352201d076ba6"> <link rel="alternate" type="application/atom+xml" title="Feed - New Topics" href="/app.php/feed/topics?sid=5da6f13e50f54da5b92352201d076ba6"> <link rel="alternate" type="application/atom+xml" title="Feed - Forum - Coder’s Corner" href="/app.php/feed/forum/10?sid=5da6f13e50f54da5b92352201d076ba6"> <link rel="alternate" type="application/atom+xml" title="Feed - Topic - Seeking tricky WML examples" href="/app.php/feed/topic/57602?sid=5da6f13e50f54da5b92352201d076ba6"> <link rel="canonical" href="https://forums.wesnoth.org/viewtopic.php?t=57602"> <!-- 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=5da6f13e50f54da5b92352201d076ba6"> <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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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="5da6f13e50f54da5b92352201d076ba6" /> </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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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%3Ft%3D57602&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6"><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="10"><a itemprop="item" href="./viewforum.php?f=10&sid=5da6f13e50f54da5b92352201d076ba6"><span itemprop="name">Coder’s Corner</span></a><meta itemprop="position" content="3" /></span> </li> <li class="rightside responsive-search"> <a href="./search.php?sid=5da6f13e50f54da5b92352201d076ba6" 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=57602&sid=5da6f13e50f54da5b92352201d076ba6">Seeking tricky WML examples</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 all aspects of the game engine, including development of new and existing features.<br /></div> <p> <strong>Moderator:</strong> <a style="color:#008000;" href="./memberlist.php?mode=group&g=6643&sid=5da6f13e50f54da5b92352201d076ba6">Forum Moderators</a> </p> <div class="action-bar bar-top"> <a href="./posting.php?mode=reply&t=57602&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6"> <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=5da6f13e50f54da5b92352201d076ba6" 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="57602" /> <input type="hidden" name="sf" value="msgonly" /> <input type="hidden" name="sid" value="5da6f13e50f54da5b92352201d076ba6" /> </fieldset> </form> </div> <div class="pagination"> 16 posts <ul> <li class="active"><span>1</span></li> <li><a class="button" href="./viewtopic.php?t=57602&sid=5da6f13e50f54da5b92352201d076ba6&start=15" role="button">2</a></li> <li class="arrow next"><a class="button button-icon-only" href="./viewtopic.php?t=57602&sid=5da6f13e50f54da5b92352201d076ba6&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="p686672" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile686672"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" class="avatar"><img class="avatar" src="./download/file.php?avatar=131665_1344050688.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a> </dt> <dd class="profile-rank">Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=131665&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">2357</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 3rd, 2012, 11:26 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Canada</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Celtic_Minstrel"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Celtic_Minstrel</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://pentalithia.ca/blog/" title="Website"> <span class="contact-icon phpbb_website-icon">Website</span> </a> <a href="skype:celticminstrek?userinfo" title="Skype"> <span class="contact-icon phpbb_skype-icon">Skype</span> </a> <a href="http://twitter.com/Celtic_Minstrel" title="Twitter" class="last-cell"> <span class="contact-icon phpbb_twitter-icon">Twitter</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content686672"> <h3 class="first"> <a href="./viewtopic.php?p=686672&sid=5da6f13e50f54da5b92352201d076ba6#p686672">Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=686672&sid=5da6f13e50f54da5b92352201d076ba6" 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=686672&sid=5da6f13e50f54da5b92352201d076ba6#p686672" 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=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a></strong> » </span><time datetime="2024-02-22T04:24:37+00:00">February 22nd, 2024, 4:24 am</time> </p> <div class="content">I'm looking for samples of WML where the preprocessor or parser does something a bit unusual that you might not expect, or where you need to do something a little unusual to make it work correctly. Does anyone have any examples of such things?<br> <br> I'll start with one that I recently noticed:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>[my_tag] value = _ hello [/my_tag] </code></pre></div> When read in-game, it seems that <code class="inline-code">$my_tag.value</code> has the value <code class="inline-code">"_hello"</code> – the space has been removed.<br> <br> And here's a preprocessor one that I think bites people a lot:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA "(if(a = b, 12, 22 ))"#enddef formula = "(base_value + {MY_FORMULA})" </code></pre></div> This ends up being an error. If I understand correctly, the issue is that, due to a macro whose value is quoted being included within a quoted string, the opening quote in the macro wants to be a closing quote. However, it seems a closing quote is not allowed to be followed by characters other than <code class="inline-code">+</code> or whitespace, so you get an error.<br> <br> <span style="font-size:85%;line-height:116%"><em class="text-italics"><strong class="text-strong">Rationale</strong>: The preprocessor and parser are currently messy and hard to extend due to the need to avoid breaking functionality and the lack of unit tests. It's relatively easy to write unit tests for simple, common scenarios, but quite another matter to write them for edge cases. If we can get a lot of weird examples, it would be a big step towards the goal of having sufficient unit tests to be able to be at peace with adding new features.</em></span></div> <div id="sig686672" class="signature">Author of <a href="http://r.wesnoth.org/t37342" class="postlink">The Black Cross of Aleron</a> campaign and <a href="http://r.wesnoth.org/t37417" class="postlink">Default++</a> era.<br> Former maintainer of <a href="http://r.wesnoth.org/t26527" class="postlink">Steelhive</a>.</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="p686724" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile686724"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=219741&sid=5da6f13e50f54da5b92352201d076ba6" class="avatar"><img src="//secure.gravatar.com/avatar/f5f7b5b83330e07f530e15906f8082dc?s=100" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=219741&sid=5da6f13e50f54da5b92352201d076ba6" class="username">egallager</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=219741&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">646</a></dd> <dd class="profile-joined"><strong>Joined:</strong> November 19th, 2020, 7:27 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Concord, New Hampshire</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact egallager"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact egallager</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://twitter.com/cooljeanius" title="Twitter"> <span class="contact-icon phpbb_twitter-icon">Twitter</span> </a> <a href="https://www.youtube.com/channel/UCtE_V52yy8_4j5ld_0UHHdw" title="YouTube" class="last-cell"> <span class="contact-icon phpbb_youtube-icon">YouTube</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content686724"> <h3 > <a href="./viewtopic.php?p=686724&sid=5da6f13e50f54da5b92352201d076ba6#p686724">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=686724&sid=5da6f13e50f54da5b92352201d076ba6" 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=686724&sid=5da6f13e50f54da5b92352201d076ba6#p686724" 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=219741&sid=5da6f13e50f54da5b92352201d076ba6" class="username">egallager</a></strong> » </span><time datetime="2024-02-23T19:22:12+00:00">February 23rd, 2024, 7:22 pm</time> </p> <div class="content">Issue <a class="postlink" href="https://github.com/wesnoth/wesnoth/issues/7885">#7885</a> has some.</div> <div id="sig686724" class="signature">Wesnoth-related GitHub repos:<br> <a href="https://github.com/cooljeanius/wesnoth_mods" class="postlink">General mods collection</a>, <a href="https://github.com/cooljeanius/Son_Of_The_Black_Eye_Easy_Edition" class="postlink"><acronym title="Son of the Black Eye Easy Edition">SotBEEE</acronym></a>, <a href="https://github.com/cooljeanius/Two_Brothers_With_A_Third_Difficulty" class="postlink"><acronym title="A Tale of Two Brothers With a Third Difficulty">AToTBWaTD</acronym></a>, <a href="https://github.com/cooljeanius/The_Earths_Gut" class="postlink">The Earth's Gut</a>, <a href="https://github.com/cooljeanius/A_Little_Adventure" class="postlink">A Little Adventure</a>, <a href="https://github.com/cooljeanius/Flight_Freedom" class="postlink"><acronym title="Flight to Freedom">FtF</acronym></a><br> Social media: Mastodon: <a href="https://social.treehouse.systems/@egallager" class="postlink">@egallager@treehouse.systems</a>, Steam: <a href="https://steamcommunity.com/id/egallager/" class="postlink">egallager</a></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="p687937" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile687937"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=129647&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Wayirr</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=129647&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">90</a></dd> <dd class="profile-joined"><strong>Joined:</strong> February 11th, 2012, 3:42 pm</dd> </dl> <div class="postbody"> <div id="post_content687937"> <h3 > <a href="./viewtopic.php?p=687937&sid=5da6f13e50f54da5b92352201d076ba6#p687937">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=687937&sid=5da6f13e50f54da5b92352201d076ba6" 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=687937&sid=5da6f13e50f54da5b92352201d076ba6#p687937" 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=129647&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Wayirr</a></strong> » </span><time datetime="2024-03-30T04:15:13+00:00">March 30th, 2024, 4:15 am</time> </p> <div class="content">My add-on Age of Tentacles has fairly tricky code of invisibility, which spams constant errors but works somehow. If you want to review it, it would be nice.</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="p688771" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile688771"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=271897&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">62</a></dd> <dd class="profile-joined"><strong>Joined:</strong> March 29th, 2024, 10:50 pm</dd> </dl> <div class="postbody"> <div id="post_content688771"> <h3 > <a href="./viewtopic.php?p=688771&sid=5da6f13e50f54da5b92352201d076ba6#p688771">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688771&sid=5da6f13e50f54da5b92352201d076ba6" 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=688771&sid=5da6f13e50f54da5b92352201d076ba6#p688771" 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=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a></strong> » </span><time datetime="2024-04-16T20:46:22+00:00">April 16th, 2024, 8:46 pm</time> </p> <div class="content"><div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA "(if(a = b, 12, 22 ))"#enddef formula = "(base_value + {MY_FORMULA})" </code></pre></div> As a programmer with a very limited understanding of WML, this has me confused. I thought it would be obvious to anyone who has coded or scripted more than 10 minutes, so why is it tripping people up?<br> <br> I mean, if you use " to define a String and then put " as a character in the String, most parsers will croak because they don't know whether you're trying to add a character or end the string. That's not unusual that's one of the first things any coder or scripter trips over.<br> <br> So why not this? <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA (if(a = b, 12, 22 ))#enddef </code></pre></div> formula = "(base_value + {MY_FORMULA})"<br> [/code]<br> <br> If the quotes are required to define the string, why do they also end up part of the string? And If they are meant as characters, why are they not escaped?</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="p688777" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile688777"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=129456&sid=5da6f13e50f54da5b92352201d076ba6" class="avatar"><img class="avatar" src="./download/file.php?avatar=129456_1408535541.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=129456&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #008000;" class="username-coloured">Ravana</a> </dt> <dd class="profile-rank">Forum Moderator</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=129456&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">3251</a></dd> <dd class="profile-joined"><strong>Joined:</strong> January 29th, 2012, 12:49 am</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Estonia</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Ravana"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Ravana</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="https://github.com/ProditorMagnus" title="Website" class="last-cell"> <span class="contact-icon phpbb_website-icon">Website</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content688777"> <h3 > <a href="./viewtopic.php?p=688777&sid=5da6f13e50f54da5b92352201d076ba6#p688777">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688777&sid=5da6f13e50f54da5b92352201d076ba6" 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=688777&sid=5da6f13e50f54da5b92352201d076ba6#p688777" 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=129456&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #008000;" class="username-coloured">Ravana</a></strong> » </span><time datetime="2024-04-16T23:38:40+00:00">April 16th, 2024, 11:38 pm</time> </p> <div class="content">There is no general way to escape quote, without using << >> as outer quotes instead. Normally to escape quote you need to double it.</div> <div id="sig688777" class="signature">Maintainer of <a href="https://forums.wesnoth.org/viewtopic.php?t=25274" class="postlink">Ageless Era</a>. <a href="https://forums.wesnoth.org/viewtopic.php?f=15&t=39116" class="postlink">Ravana's Multiplayer Works</a><br> <br> <a href="https://forums.wesnoth.org/viewtopic.php?t=56440" class="postlink">Quick WML testing guide</a></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="p688778" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile688778"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" class="avatar"><img class="avatar" src="./download/file.php?avatar=131665_1344050688.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a> </dt> <dd class="profile-rank">Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=131665&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">2357</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 3rd, 2012, 11:26 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Canada</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Celtic_Minstrel"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Celtic_Minstrel</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://pentalithia.ca/blog/" title="Website"> <span class="contact-icon phpbb_website-icon">Website</span> </a> <a href="skype:celticminstrek?userinfo" title="Skype"> <span class="contact-icon phpbb_skype-icon">Skype</span> </a> <a href="http://twitter.com/Celtic_Minstrel" title="Twitter" class="last-cell"> <span class="contact-icon phpbb_twitter-icon">Twitter</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content688778"> <h3 > <a href="./viewtopic.php?p=688778&sid=5da6f13e50f54da5b92352201d076ba6#p688778">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688778&sid=5da6f13e50f54da5b92352201d076ba6" 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=688778&sid=5da6f13e50f54da5b92352201d076ba6#p688778" 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=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a></strong> » </span><time datetime="2024-04-17T00:15:05+00:00">April 17th, 2024, 12:15 am</time> </p> <div class="content">Well, if I understand correctly, this definition would also work fine.<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA " (if(a = b, 12, 22 )) "#enddef</code></pre></div></div> <div id="sig688778" class="signature">Author of <a href="http://r.wesnoth.org/t37342" class="postlink">The Black Cross of Aleron</a> campaign and <a href="http://r.wesnoth.org/t37417" class="postlink">Default++</a> era.<br> Former maintainer of <a href="http://r.wesnoth.org/t26527" class="postlink">Steelhive</a>.</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="p688781" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile688781"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=271897&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">62</a></dd> <dd class="profile-joined"><strong>Joined:</strong> March 29th, 2024, 10:50 pm</dd> </dl> <div class="postbody"> <div id="post_content688781"> <h3 > <a href="./viewtopic.php?p=688781&sid=5da6f13e50f54da5b92352201d076ba6#p688781">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688781&sid=5da6f13e50f54da5b92352201d076ba6" 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=688781&sid=5da6f13e50f54da5b92352201d076ba6#p688781" 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=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a></strong> » </span><time datetime="2024-04-17T00:25:51+00:00">April 17th, 2024, 12:25 am</time> </p> <div class="content"><blockquote cite="./viewtopic.php?p=688778&sid=5da6f13e50f54da5b92352201d076ba6#p688778"><div><cite><a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6">Celtic_Minstrel</a> wrote: <a href="./viewtopic.php?p=688778&sid=5da6f13e50f54da5b92352201d076ba6#p688778" data-post-id="688778" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">April 17th, 2024, 12:15 am</span></cite> Well, if I understand correctly, this definition would also work fine.<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA " (if(a = b, 12, 22 )) "#enddef </code></pre></div> </div></blockquote> Ok, I just realized due to my experience with other markup languages (and parsers). I may actually have negative understanding of how the F WML works because none of this makes sense to me. I'll just shut my mouth and read the tutorial.</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="p688782" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile688782"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" class="avatar"><img class="avatar" src="./download/file.php?avatar=131665_1344050688.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a> </dt> <dd class="profile-rank">Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=131665&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">2357</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 3rd, 2012, 11:26 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Canada</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Celtic_Minstrel"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Celtic_Minstrel</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://pentalithia.ca/blog/" title="Website"> <span class="contact-icon phpbb_website-icon">Website</span> </a> <a href="skype:celticminstrek?userinfo" title="Skype"> <span class="contact-icon phpbb_skype-icon">Skype</span> </a> <a href="http://twitter.com/Celtic_Minstrel" title="Twitter" class="last-cell"> <span class="contact-icon phpbb_twitter-icon">Twitter</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content688782"> <h3 > <a href="./viewtopic.php?p=688782&sid=5da6f13e50f54da5b92352201d076ba6#p688782">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688782&sid=5da6f13e50f54da5b92352201d076ba6" 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=688782&sid=5da6f13e50f54da5b92352201d076ba6#p688782" 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=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a></strong> » </span><time datetime="2024-04-17T00:38:56+00:00">April 17th, 2024, 12:38 am</time> </p> <div class="content">Don't worry, there are people experienced with WML who are <em class="text-italics">also</em> confused by this.</div> <div id="sig688782" class="signature">Author of <a href="http://r.wesnoth.org/t37342" class="postlink">The Black Cross of Aleron</a> campaign and <a href="http://r.wesnoth.org/t37417" class="postlink">Default++</a> era.<br> Former maintainer of <a href="http://r.wesnoth.org/t26527" class="postlink">Steelhive</a>.</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="p688784" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile688784"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=271897&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">62</a></dd> <dd class="profile-joined"><strong>Joined:</strong> March 29th, 2024, 10:50 pm</dd> </dl> <div class="postbody"> <div id="post_content688784"> <h3 > <a href="./viewtopic.php?p=688784&sid=5da6f13e50f54da5b92352201d076ba6#p688784">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688784&sid=5da6f13e50f54da5b92352201d076ba6" 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=688784&sid=5da6f13e50f54da5b92352201d076ba6#p688784" 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=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a></strong> » </span><time datetime="2024-04-17T01:29:33+00:00">April 17th, 2024, 1:29 am</time> </p> <div class="content"><blockquote cite="./viewtopic.php?p=688781&sid=5da6f13e50f54da5b92352201d076ba6#p688781"><div><cite><a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6">Duke_Anax</a> wrote: <a href="./viewtopic.php?p=688781&sid=5da6f13e50f54da5b92352201d076ba6#p688781" data-post-id="688781" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">April 17th, 2024, 12:25 am</span></cite> I'll just shut my mouth and read the tutorial. </div></blockquote> Ok read the tutorial and skimmed most of the relevant docs. Everything is as I expected after all and the macro processor is dead simple. Handling variables in WML is oddly cumbersome but clear enough.<br> <br> So now I'm no longer confused about this example, I'm utterly lost.<br> <br> What is up with this macro? That's not even WML, that's just pseudocode. And why does the Blanc space help? You are still terminating the string, so you have two separate strings with pseudocode in the middle.</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="p688790" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile688790"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" class="avatar"><img class="avatar" src="./download/file.php?avatar=131665_1344050688.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a> </dt> <dd class="profile-rank">Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=131665&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">2357</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 3rd, 2012, 11:26 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Canada</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Celtic_Minstrel"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Celtic_Minstrel</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://pentalithia.ca/blog/" title="Website"> <span class="contact-icon phpbb_website-icon">Website</span> </a> <a href="skype:celticminstrek?userinfo" title="Skype"> <span class="contact-icon phpbb_skype-icon">Skype</span> </a> <a href="http://twitter.com/Celtic_Minstrel" title="Twitter" class="last-cell"> <span class="contact-icon phpbb_twitter-icon">Twitter</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content688790"> <h3 > <a href="./viewtopic.php?p=688790&sid=5da6f13e50f54da5b92352201d076ba6#p688790">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688790&sid=5da6f13e50f54da5b92352201d076ba6" 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=688790&sid=5da6f13e50f54da5b92352201d076ba6#p688790" 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=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a></strong> » </span><time datetime="2024-04-17T03:40:06+00:00">April 17th, 2024, 3:40 am</time> </p> <div class="content">WML has very few special characters. Any character that appears after the <code class="inline-code">=</code>, with a few exceptions, is considered to be part of the value of the attribute. It doesn't matter how convoluted it looks or how many punctuation characters appear in it – as long as none of the <em class="text-italics">special characters</em> appear, it's just a string read according to HTML conventions (that is, runs of whitespace are collapsed down to a single space).<br> <br> Thinking about it more, the amended example in my post would probably only work if it was collapsed down to a single line, as a newline <em class="text-italics">not inside quotes</em> always terminates the attribute value. So <em class="text-italics">this</em> should work:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA " (if(a = b, 12, 22)) "#enddef </code></pre></div> The special characters that <em class="text-italics">aren't</em> just taken as literal are:<br> <ul> <li>Quotes. Contrary to what might be popular belief, quotes don't "enclose a string" or anything like that. <em class="text-italics">Everything</em> in the attribute value is a string, unless it's parsable as a number or is precisely one of the fixed strings yes/no/true/false. Quotes do three things: they disable the whitespace-collapsing behaviour of unquoted text, and they prevent a newline character from terminating the attribute value. Lastly, they prevent most other characters from being treated specially, with the exception of curly braces (which are still treated as macro inclusions) and the quote character itself (which terminates the quoted passage, unless it's doubled, which expands to a single double quote character and continues the quoted passage). So they're an escaping mechanism, comparable to <code class="inline-code"><![CDATA[....]]></code> in XML.</li> <li>Double left angle brackets <code class="inline-code"><<</code>. These are <em class="text-italics">almost</em> semantically identical to quotes, but curly braces and quotes within them are not treated as special characters, whereas double right angle brackets <code class="inline-code">>></code> <em class="text-italics">are</em>, terminating the quoted passage.</li> <li>Plus signs. These have two use-cases. One is as a line-continuation character – if the last non-comment non-whitespace character on the line is a plus sign, the attribute value continues onto the next line. The second use-case comes into play only when placed between two quoted passages. Without a plus sign, a space would be inserted between the two quoted passages; the plus sign prevents this from happening.</li> <li>Number signs. As you probably know, a number sign begins a comment, which means the end of the attribute value unless directly preceded by a plus sign.</li> <li>Commas. These only have a special meaning if they appear outside quotes <em class="text-italics">and</em> the left-hand side of the <code class="inline-code">=</code> contained commas. The value is split on the unquoted commas and assigned to each of the attributes in turn, with the last attribute getting any extra parts (with the commas themselves left in).</li> <li>Underscores. This only has a special meaning when directly preceding a quoted passage (either with actual quotes or with angled brackets), which will then be marked as translatable.</li> </ul> (Note that I've omitted <code class="inline-code">$</code>, since that only comes into play long after the parsing has finished.)<br> <br> And the reason the above code passage works and the below one doesn't is because (from what I can tell) the parser chokes if the character after a quoted passage is not a whitespace character. (Although I haven't tested the below snippet, and it's possible that it's <em class="text-italics">only</em> the newlines that make the original snippet fail.)<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA "(if(a = b, 12, 22))"#enddef </code></pre></div></div> <div id="sig688790" class="signature">Author of <a href="http://r.wesnoth.org/t37342" class="postlink">The Black Cross of Aleron</a> campaign and <a href="http://r.wesnoth.org/t37417" class="postlink">Default++</a> era.<br> Former maintainer of <a href="http://r.wesnoth.org/t26527" class="postlink">Steelhive</a>.</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="p688799" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile688799"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=271897&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">62</a></dd> <dd class="profile-joined"><strong>Joined:</strong> March 29th, 2024, 10:50 pm</dd> </dl> <div class="postbody"> <div id="post_content688799"> <h3 > <a href="./viewtopic.php?p=688799&sid=5da6f13e50f54da5b92352201d076ba6#p688799">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688799&sid=5da6f13e50f54da5b92352201d076ba6" 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=688799&sid=5da6f13e50f54da5b92352201d076ba6#p688799" 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=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a></strong> » </span><time datetime="2024-04-17T05:50:04+00:00">April 17th, 2024, 5:50 am</time> </p> <div class="content">Thanks for the explanation, that makes a lot of things much clearer. So let me get this straight. The earlier macro would turn this: <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>formula = "(base_value + {MY_FORMULA})" </code></pre></div> into this: <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>formula = "(base_value + " (if(a = b, 12, 22 )) ")" </code></pre></div> which wouldn't work because of the newline outside of the quoted String.<br> <br> and the last example produces this: <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>formula = "(base_value + " (if(a = b, 12, 22)) ")"</code></pre></div> which gets turned into one long string value, right? <br> <br> <br> While this: <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>formula = "(base_value + "(if(a = b, 12, 22))")"</code></pre></div> doesn't work because the parser croaks on the<strong class="text-strong"><span style="color:#00BF00"> ( </span></strong>after the<strong class="text-strong"> <span style="color:#00BF00">"</span></strong>, even though it doesn't care about the rest of this mess.<br> <br> wouldn't the <strong class="text-strong"><span style="color:#00BF00">")</span></strong> also cause the same problem? So you might have to add another blank after the macro call: <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>formula = "(base_value + {MY_FORMULA} )"</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="p688800" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile688800"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=271897&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">62</a></dd> <dd class="profile-joined"><strong>Joined:</strong> March 29th, 2024, 10:50 pm</dd> </dl> <div class="postbody"> <div id="post_content688800"> <h3 > <a href="./viewtopic.php?p=688800&sid=5da6f13e50f54da5b92352201d076ba6#p688800">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688800&sid=5da6f13e50f54da5b92352201d076ba6" 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=688800&sid=5da6f13e50f54da5b92352201d076ba6#p688800" 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=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a></strong> » </span><time datetime="2024-04-17T05:55:18+00:00">April 17th, 2024, 5:55 am</time> </p> <div class="content">Now that's the issue with the macro, but what about the part that sent me tumbling to begin with, what's up with this string? <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>"(base_value + "(if(a = b, 12, 22))")"</code></pre></div> Is it just some random string that happens to look like pseudo code, or does it actually do something? It sure doesn't like WML code.</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="p688804" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile688804"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=122117&sid=5da6f13e50f54da5b92352201d076ba6" class="username">gnombat</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=122117&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">855</a></dd> <dd class="profile-joined"><strong>Joined:</strong> June 10th, 2010, 8:49 pm</dd> </dl> <div class="postbody"> <div id="post_content688804"> <h3 > <a href="./viewtopic.php?p=688804&sid=5da6f13e50f54da5b92352201d076ba6#p688804">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688804&sid=5da6f13e50f54da5b92352201d076ba6" 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=688804&sid=5da6f13e50f54da5b92352201d076ba6#p688804" 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=122117&sid=5da6f13e50f54da5b92352201d076ba6" class="username">gnombat</a></strong> » </span><time datetime="2024-04-17T07:09:14+00:00">April 17th, 2024, 7:09 am</time> </p> <div class="content"><blockquote cite="./viewtopic.php?p=686672&sid=5da6f13e50f54da5b92352201d076ba6#p686672"><div><cite><a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6">Celtic_Minstrel</a> wrote: <a href="./viewtopic.php?p=686672&sid=5da6f13e50f54da5b92352201d076ba6#p686672" data-post-id="686672" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">February 22nd, 2024, 4:24 am</span></cite> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA "(if(a = b, 12, 22 ))"#enddef formula = "(base_value + {MY_FORMULA})" </code></pre></div> </div></blockquote> Wouldn't it be better to come up with a more minimalistic test case than that? There's so many things going on in that example it's hard to isolate where the issue actually is.<br> <blockquote cite="./viewtopic.php?p=688790&sid=5da6f13e50f54da5b92352201d076ba6#p688790"><div><cite><a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6">Celtic_Minstrel</a> wrote: <a href="./viewtopic.php?p=688790&sid=5da6f13e50f54da5b92352201d076ba6#p688790" data-post-id="688790" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">April 17th, 2024, 3:40 am</span></cite> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_FORMULA " (if(a = b, 12, 22)) "#enddef </code></pre></div> </div></blockquote> That's better, but it still seems way more complicated than actually necessary.<br> <br> I'm thinking something really simple like:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_MACRO "bar"#enddef [message] speaker=harry message="foo {MY_MACRO}" [/message] </code></pre></div> <blockquote cite="./viewtopic.php?p=688800&sid=5da6f13e50f54da5b92352201d076ba6#p688800"><div><cite><a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6">Duke_Anax</a> wrote: <a href="./viewtopic.php?p=688800&sid=5da6f13e50f54da5b92352201d076ba6#p688800" data-post-id="688800" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">April 17th, 2024, 5:55 am</span></cite> Now that's the issue with the macro, but what about the part that sent me tumbling to begin with, what's up with this string? <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>"(base_value + "(if(a = b, 12, 22))")"</code></pre></div> Is it just some random string that happens to look like pseudo code, or does it actually do something? It sure doesn't like WML code. </div></blockquote> It's <a href="https://wiki.wesnoth.org/Wesnoth_Formula_Language" class="postlink">Wesnoth Formula Language</a>. But again, I think this is just making the issue more complicated than it needs to be (I don't think the issue really has anything to do with Wesnoth Formula 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="p688811" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile688811"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" class="avatar"><img class="avatar" src="./download/file.php?avatar=131665_1344050688.png" width="100" height="100" alt="User avatar" /></a> </div> <a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a> </dt> <dd class="profile-rank">Developer</dd> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=131665&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">2357</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 3rd, 2012, 11:26 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Canada</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact Celtic_Minstrel"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact Celtic_Minstrel</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://pentalithia.ca/blog/" title="Website"> <span class="contact-icon phpbb_website-icon">Website</span> </a> <a href="skype:celticminstrek?userinfo" title="Skype"> <span class="contact-icon phpbb_skype-icon">Skype</span> </a> <a href="http://twitter.com/Celtic_Minstrel" title="Twitter" class="last-cell"> <span class="contact-icon phpbb_twitter-icon">Twitter</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content688811"> <h3 > <a href="./viewtopic.php?p=688811&sid=5da6f13e50f54da5b92352201d076ba6#p688811">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688811&sid=5da6f13e50f54da5b92352201d076ba6" 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=688811&sid=5da6f13e50f54da5b92352201d076ba6#p688811" 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=131665&sid=5da6f13e50f54da5b92352201d076ba6" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a></strong> » </span><time datetime="2024-04-17T13:16:21+00:00">April 17th, 2024, 1:16 pm</time> </p> <div class="content">You're right, the issue doesn't have anything to do with WFL. It just happens to more frequently come up with WFL for various reasons.<br> <blockquote cite="./viewtopic.php?p=688804&sid=5da6f13e50f54da5b92352201d076ba6#p688804"><div><cite><a href="./memberlist.php?mode=viewprofile&u=122117&sid=5da6f13e50f54da5b92352201d076ba6">gnombat</a> wrote: <a href="./viewtopic.php?p=688804&sid=5da6f13e50f54da5b92352201d076ba6#p688804" data-post-id="688804" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">April 17th, 2024, 7:09 am</span></cite> I'm thinking something really simple like:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_MACRO "bar"#enddef [message] speaker=harry message="foo {MY_MACRO}" [/message] </code></pre></div> </div></blockquote> Yup, that looks good. Maybe also something like this:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>#define MY_MACRO " bar "#enddef [message] speaker=harry message="foo {MY_MACRO}" [/message] </code></pre></div></div> <div id="sig688811" class="signature">Author of <a href="http://r.wesnoth.org/t37342" class="postlink">The Black Cross of Aleron</a> campaign and <a href="http://r.wesnoth.org/t37417" class="postlink">Default++</a> era.<br> Former maintainer of <a href="http://r.wesnoth.org/t26527" class="postlink">Steelhive</a>.</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="p688823" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile688823"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./memberlist.php?mode=viewprofile&u=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./search.php?author_id=271897&sr=posts&sid=5da6f13e50f54da5b92352201d076ba6">62</a></dd> <dd class="profile-joined"><strong>Joined:</strong> March 29th, 2024, 10:50 pm</dd> </dl> <div class="postbody"> <div id="post_content688823"> <h3 > <a href="./viewtopic.php?p=688823&sid=5da6f13e50f54da5b92352201d076ba6#p688823">Re: Seeking tricky WML examples</a> </h3> <ul class="post-buttons"> <li> <a href="./posting.php?mode=quote&p=688823&sid=5da6f13e50f54da5b92352201d076ba6" 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=688823&sid=5da6f13e50f54da5b92352201d076ba6#p688823" 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=271897&sid=5da6f13e50f54da5b92352201d076ba6" class="username">Duke_Anax</a></strong> » </span><time datetime="2024-04-17T18:59:39+00:00">April 17th, 2024, 6:59 pm</time> </p> <div class="content"><blockquote cite="./viewtopic.php?p=688804&sid=5da6f13e50f54da5b92352201d076ba6#p688804"><div><cite><a href="./memberlist.php?mode=viewprofile&u=122117&sid=5da6f13e50f54da5b92352201d076ba6">gnombat</a> wrote: <a href="./viewtopic.php?p=688804&sid=5da6f13e50f54da5b92352201d076ba6#p688804" data-post-id="688804" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">April 17th, 2024, 7:09 am</span></cite> It's <a href="https://wiki.wesnoth.org/Wesnoth_Formula_Language" class="postlink">Wesnoth Formula Language</a>. </div></blockquote> Ah yes thank you, that's the bit that I couldn't find myself. I still need more time to understand it, but at least it makes sense now.<br> <br> I agree that the example is way too complex to be of any practical use, as you can see above, it has so many interlocking bits and pieces that I couldn't even make heads or tails of it.<br> <blockquote cite="./viewtopic.php?p=688811&sid=5da6f13e50f54da5b92352201d076ba6#p688811"><div><cite><a href="./memberlist.php?mode=viewprofile&u=131665&sid=5da6f13e50f54da5b92352201d076ba6">Celtic_Minstrel</a> wrote: <a href="./viewtopic.php?p=688811&sid=5da6f13e50f54da5b92352201d076ba6#p688811" data-post-id="688811" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">April 17th, 2024, 1:16 pm</span></cite> You're right, the issue doesn't have anything to do with WFL. It just happens to more frequently come up with WFL for various reasons. </div></blockquote> It seems part of the problem is WML sometimes not being very specific in it's specification. Like meh, everything is a string, but a string could also be code or maybe not. M<br> <br> Is there a "WML coding, best practices" or something somewhere?</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=57602&sid=5da6f13e50f54da5b92352201d076ba6" 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=57602&sid=5da6f13e50f54da5b92352201d076ba6"> <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"> 16 posts <ul> <li class="active"><span>1</span></li> <li><a class="button" href="./viewtopic.php?t=57602&sid=5da6f13e50f54da5b92352201d076ba6&start=15" role="button">2</a></li> <li class="arrow next"><a class="button button-icon-only" href="./viewtopic.php?t=57602&sid=5da6f13e50f54da5b92352201d076ba6&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=10&sid=5da6f13e50f54da5b92352201d076ba6" class="left-box arrow-left" accesskey="r"> <i class="icon fa-angle-left fa-fw icon-black" aria-hidden="true"></i><span>Return to “Coder’s Corner”</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=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-cat-link"> <span> Announcements</span></a></li> <li><a href="./viewforum.php?f=62&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ News</span></a></li> <li><a href="./viewforum.php?f=25&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-cat-link"> <span> General</span></a></li> <li><a href="./viewforum.php?f=6&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Users’ Forum</span></a></li> <li><a href="./viewforum.php?f=70&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Release Announcements, Compiling & Installation</span></a></li> <li><a href="./viewforum.php?f=4&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Technical Support</span></a></li> <li><a href="./viewforum.php?f=67&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Strategies & Tips</span></a></li> <li><a href="./viewforum.php?f=37&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Gameplay Feedback</span></a></li> <li><a href="./viewforum.php?f=22&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Website</span></a></li> <li><a href="./viewforum.php?f=26&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-cat-link"> <span> Development</span></a></li> <li><a href="./viewforum.php?f=9&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Art Contributions</span></a></li> <li><a href="./viewforum.php?f=23&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Art Workshop</span></a></li> <li><a href="./viewforum.php?f=32&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Writers’ Forum</span></a></li> <li><a href="./viewforum.php?f=21&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ WML Workshop</span></a></li> <li><a href="./viewforum.php?f=58&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Lua Labs</span></a></li> <li><a href="./viewforum.php?f=19&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Faction & Era Development</span></a></li> <li><a href="./viewforum.php?f=15&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Multiplayer Development</span></a></li> <li><a href="./viewforum.php?f=8&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Scenario & Campaign Development</span></a></li> <li><a href="./viewforum.php?f=38&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Music & Sound Development</span></a></li> <li><a href="./viewforum.php?f=7&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Translations & Internationalization</span></a></li> <li><a href="./viewforum.php?f=60&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Ideas</span></a></li> <li><a href="./viewforum.php?f=10&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Coder’s Corner</span></a></li> <li><a href="./viewforum.php?f=2&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Developers’ Discussions</span></a></li> <li><a href="./viewforum.php?f=73&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Art Development</span></a></li> <li><a href="./viewforum.php?f=28&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-cat-link"> <span> Miscellaneous</span></a></li> <li><a href="./viewforum.php?f=13&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Game Development</span></a></li> <li><a href="./viewforum.php?f=11&sid=5da6f13e50f54da5b92352201d076ba6" class="jumpbox-sub-link"><span class="spacer"></span> <span>↳ Off-Topic</span></a></li> <li><a href="./viewforum.php?f=61&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" title="Privacy" role="menuitem"> <span class="footer-link-text">Privacy</span> </a> | <a class="footer-link" href="./ucp.php?mode=terms&sid=5da6f13e50f54da5b92352201d076ba6" 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=5da6f13e50f54da5b92352201d076ba6" } }); }); } </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>