CINXE.COM

[solved] wml.get_child for unit - Page 2 - 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>[solved] wml.get_child for unit - Page 2 - 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=82a90fbf901ae9eb044287746a6cfc34"> <link rel="alternate" type="application/atom+xml" title="Feed - News" href="/app.php/feed/news?sid=82a90fbf901ae9eb044287746a6cfc34"> <link rel="alternate" type="application/atom+xml" title="Feed - All forums" href="/app.php/feed/forums?sid=82a90fbf901ae9eb044287746a6cfc34"> <link rel="alternate" type="application/atom+xml" title="Feed - New Topics" href="/app.php/feed/topics?sid=82a90fbf901ae9eb044287746a6cfc34"> <link rel="alternate" type="application/atom+xml" title="Feed - Forum - Lua Labs" href="/app.php/feed/forum/58?sid=82a90fbf901ae9eb044287746a6cfc34"> <link rel="alternate" type="application/atom+xml" title="Feed - Topic - [solved] wml.get_child for unit" href="/app.php/feed/topic/58564?sid=82a90fbf901ae9eb044287746a6cfc34"> <link rel="canonical" href="https://forums.wesnoth.org/viewtopic.php?t=58564&amp;start=15"> <!-- 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//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=82a90fbf901ae9eb044287746a6cfc34"> <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=82a90fbf901ae9eb044287746a6cfc34" 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=82a90fbf901ae9eb044287746a6cfc34" 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=82a90fbf901ae9eb044287746a6cfc34" 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=82a90fbf901ae9eb044287746a6cfc34" 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="82a90fbf901ae9eb044287746a6cfc34" /> </fieldset> </form> </div> </div> </div> <div class="navbar" role="navigation"> <div class="inner"> <ul id="nav-main" class="nav-main linklist" role="menubar"> <li id="quick-links" class="quick-links dropdown-container responsive-menu" data-skip-responsive="true"> <a href="#" class="dropdown-trigger"> <i class="icon fa-bars fa-fw" aria-hidden="true"></i><span>Quick links</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <ul class="dropdown-contents" role="menu"> <li class="separator"></li> <li> <a href="./../search.php?search_id=unanswered&amp;sid=82a90fbf901ae9eb044287746a6cfc34" role="menuitem"> <i class="icon fa-file-o fa-fw icon-gray" aria-hidden="true"></i><span>Unanswered topics</span> </a> </li> <li> <a href="./../search.php?search_id=active_topics&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=82a90fbf901ae9eb044287746a6cfc34" 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=82a90fbf901ae9eb044287746a6cfc34" rel="help" title="Frequently Asked Questions" role="menuitem"> <i class="icon fa-question-circle fa-fw" aria-hidden="true"></i><span>FAQ</span> </a> </li> <li data-last-responsive="true"> <a href="https://forums.wesnoth.org/viewtopic.php?t=24277&amp;sid=82a90fbf901ae9eb044287746a6cfc34" rel="help" title="View the Community Guidelines" role="menuitem"> <i class="icon fa-book fa-fw" aria-hidden="true"></i><span>Community Guidelines</span> </a> </li> <li class="rightside" data-skip-responsive="true"> <a href="./../ucp.php?mode=login&amp;redirect=viewtopic.php%2F%2Fviewtopic.php%3Fstart%3D15%26t%3D58564&amp;sid=82a90fbf901ae9eb044287746a6cfc34" title="Login" accesskey="x" role="menuitem"> <i class="icon fa-power-off fa-fw" aria-hidden="true"></i><span>Login</span> </a> </li> <li class="rightside" data-skip-responsive="true"> <a href="./../ucp.php?mode=register&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=82a90fbf901ae9eb044287746a6cfc34" accesskey="h" data-navbar-reference="index"><i class="icon fa-home fa-fw"></i><span itemprop="name">Forums</span></a><meta itemprop="position" content="1" /></span> <span class="crumb" itemtype="https://schema.org/ListItem" itemprop="itemListElement" itemscope data-forum-id="26"><a itemprop="item" href="./../viewforum.php?f=26&amp;sid=82a90fbf901ae9eb044287746a6cfc34"><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&amp;sid=82a90fbf901ae9eb044287746a6cfc34"><span itemprop="name">Lua Labs</span></a><meta itemprop="position" content="3" /></span> </li> <li class="rightside responsive-search"> <a href="./../search.php?sid=82a90fbf901ae9eb044287746a6cfc34" 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=58564&amp;start=15&amp;sid=82a90fbf901ae9eb044287746a6cfc34">[solved] wml.get_child for unit</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&amp;g=6643&amp;sid=82a90fbf901ae9eb044287746a6cfc34">Forum Moderators</a> </p> <div class="action-bar bar-top"> <a href="./../posting.php?mode=reply&amp;t=58564&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=82a90fbf901ae9eb044287746a6cfc34"> <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=82a90fbf901ae9eb044287746a6cfc34" 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="58564" /> <input type="hidden" name="sf" value="msgonly" /> <input type="hidden" name="sid" value="82a90fbf901ae9eb044287746a6cfc34" /> </fieldset> </form> </div> <div class="pagination"> 23 posts <ul> <li class="arrow previous"><a class="button button-icon-only" href="./../viewtopic.php?t=58564&amp;sid=82a90fbf901ae9eb044287746a6cfc34" rel="prev" role="button"><i class="icon fa-chevron-left fa-fw" aria-hidden="true"></i><span class="sr-only">Previous</span></a></li> <li><a class="button" href="./../viewtopic.php?t=58564&amp;sid=82a90fbf901ae9eb044287746a6cfc34" role="button">1</a></li> <li class="active"><span>2</span></li> </ul> </div> </div> <div id="p692733" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile692733"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./../memberlist.php?mode=viewprofile&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">2347</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_content692733"> <h3 class="first"> <a href="./../viewtopic.php?p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a></strong> &raquo; </span><time datetime="2024-08-22T17:38:03+00:00">August 22nd, 2024, 5:38 pm</time> </p> <div class="content"><blockquote cite="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726" data-post-id="692726" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 3:58 pm</span></cite> So does that mean any changes I make are "stored" immediately? I thought I had to "unstore" the unit (e.g to_map). </div></blockquote>Nope, __cfg can be thought of as a WML <em class="text-italics">copy</em> of the unit.<br> <blockquote cite="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726" data-post-id="692726" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 3:58 pm</span></cite> I've always thought of .__cfg as being akin to storing the unit. </div></blockquote>It is <em class="text-italics">exactly</em> the same apart from not going into a WML variable.<br> <blockquote cite="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726" data-post-id="692726" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 3:58 pm</span></cite> But in WML, I store a unit to a variable, which is then just a WML variable and I can do whatever I want with it (or not). And I suppose I could store it to multiple variables, each independent of the others. Short of doing a by-value copy, I don't think I can do this in lua (this is a rather silly example that can help me understand, not something I can see myself doing). </div></blockquote>Sure you can. Access <code class="inline-code">__cfg</code> twice and now you have two independent WML copies of the unit.<br> <blockquote cite="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692726&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692726" data-post-id="692726" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 3:58 pm</span></cite> My immediate confusion likes with "It'll serialize <em class="text-italics">every time you access it</em>". Seems like that would mean if I made a change the next time I accessed .__cfg my change would be overwritten by the serialized data from the unit. Unless behind the scenes there are actually two copies of the unit, the "real" one and the ".__cfg" one and I'm getting a serialized version of the latter. Then "unstoring" would be syncing the real one from the "working copy". </div></blockquote>I don't really get your confusion or how you drew any of these conclusions. Every time you access <code class="inline-code">unit.__cfg</code>, the game serializes that unit to WML and returns the result. If you access <code class="inline-code">__cfg</code> twice in a row, you'll end up with two identical but independent WML tables. If you access <code class="inline-code">__cfg</code>, make some change to the unit directly, and access <code class="inline-code">__cfg</code> again, the first WML table reflects the state of the unit before the change and the second WML table reflects the state of the unit after the change.<br> <blockquote cite="./../viewtopic.php?p=692730&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692730"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692730&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692730" data-post-id="692730" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 4:28 pm</span></cite> Are you saying there is a difference in serialization cost between: <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>local unit = wesnoth.units.find_on_map(cfg)[1] unit.__cfg.hitpoints=23 unit.__cfg.language_name=_"Uncle Bob" unit.__cfg.experience=100</code></pre></div> and<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>local unit = wesnoth.units.find_on_map(cfg)[1].__cfg unit.hitpoints=23 unit.language_name=_"Uncle Bob" unit.experience=100 </code></pre></div> </div></blockquote>There is, and also the first version results in no change to the unit, since you're only modifying the temporary WML table that was created when you accessed <code class="inline-code">__cfg</code>. The second version doesn't serialize anything. It directly modifies the unit.</div> <div id="sig692733" 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="p692737" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile692737"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./../memberlist.php?mode=viewprofile&amp;u=122117&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">gnombat</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./../search.php?author_id=122117&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">826</a></dd> <dd class="profile-joined"><strong>Joined:</strong> June 10th, 2010, 8:49 pm</dd> </dl> <div class="postbody"> <div id="post_content692737"> <h3 > <a href="./../viewtopic.php?p=692737&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692737">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692737&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692737&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692737" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=122117&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">gnombat</a></strong> &raquo; </span><time datetime="2024-08-22T18:05:04+00:00">August 22nd, 2024, 6:05 pm</time> </p> <div class="content"><blockquote cite="./../viewtopic.php?p=692731&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692731"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=129456&amp;sid=82a90fbf901ae9eb044287746a6cfc34">Ravana</a> wrote: <a href="./../viewtopic.php?p=692731&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692731" data-post-id="692731" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 4:44 pm</span></cite> Yes. Different behaviour too if you wanted to do anything with the wml table.<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>$ unit.__cfg == unit.__cfg false </code></pre></div> </div></blockquote> <blockquote cite="./../viewtopic.php?p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34">Celtic_Minstrel</a> wrote: <a href="./../viewtopic.php?p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733" data-post-id="692733" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 5:38 pm</span></cite> I don't really get your confusion or how you drew any of these conclusions. Every time you access <code class="inline-code">unit.__cfg</code>, the game serializes that unit to WML and returns the result. If you access <code class="inline-code">__cfg</code> twice in a row, you'll end up with two identical but independent WML tables. If you access <code class="inline-code">__cfg</code>, make some change to the unit directly, and access <code class="inline-code">__cfg</code> again, the first WML table reflects the state of the unit before the change and the second WML table reflects the state of the unit after the change. </div></blockquote> Personally I think it would be better if it were something like <code class="inline-code">.cfg()</code> instead of <code class="inline-code">.__cfg</code>. Magical properties are always confusing.<br> <blockquote cite="./../viewtopic.php?p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34">Celtic_Minstrel</a> wrote: <a href="./../viewtopic.php?p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733" data-post-id="692733" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 5:38 pm</span></cite> The second version doesn't serialize anything. </div></blockquote> It doesn't? (Did you see the <code class="inline-code">.__cfg</code> at the end of the first line?)</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="p692743" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile692743"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">white_haired_uncle</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./../search.php?author_id=165464&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">1449</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 26th, 2018, 11:46 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> A country place, far outside the Wire</dd> </dl> <div class="postbody"> <div id="post_content692743"> <h3 > <a href="./../viewtopic.php?p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">white_haired_uncle</a></strong> &raquo; </span><time datetime="2024-08-22T19:44:26+00:00">August 22nd, 2024, 7:44 pm</time> </p> <div class="content"><blockquote cite="./../viewtopic.php?p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34">Celtic_Minstrel</a> wrote: <a href="./../viewtopic.php?p=692733&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692733" data-post-id="692733" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 5:38 pm</span></cite> <br> I don't really get your confusion or how you drew any of these conclusions. Every time you access <code class="inline-code">unit.__cfg</code>, the game serializes that unit to WML and returns the result. If you access <code class="inline-code">__cfg</code> twice in a row, you'll end up with two identical but independent WML tables. If you access <code class="inline-code">__cfg</code>, make some change to the unit directly, and access <code class="inline-code">__cfg</code> again, the first WML table reflects the state of the unit before the change and the second WML table reflects the state of the unit after the change.<br> </div></blockquote> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>local a = wesnoth.units.find_on_map({id = Bob})[1].__cfg local b = wesnoth.units.find_on_map({id = Bob})[1].__cfg</code></pre></div> Now, as I understand it, that's two copies of Bob serialized and stored in completely separate tables (and if this is true, I believe it confirms my suspicion that .__cfg is not a table, it RETURNS a table). No changes to a will affect b, and nothing I do to a or b will affect Bob until I "unstore" a or b.<br> <br> Here's where it gets interesting:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>u = wesnoth.units.find_on_map({id = Bob})[1] print(u.__cfg.hitpoints) ==&gt; 24 u.__cfg.hitpoints=12 print(u.__cfg.hitpoints) ==&gt; ???</code></pre></div> I would have thought the second print would print 12. But if every access to .__cfg serializes from the unit (Bob), and I've done nothing here to change Bob, then I guess it would print 24.<br> <br> I probably just need to play with it a bit. My gut is telling me the second code block is either just stupid, or making a change this way will only work if you "unstore" immediately after the change.</div> <div id="sig692743" class="signature"><div style="text-align:center">Speak softly, and carry <a class="postlink" href="//wiki.wesnoth.org/LotI_Items#Doombringer_.E2.80.93_sword">Doombringer</a>.</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="p692753" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile692753"> <dt class="has-profile-rank has-avatar"> <div class="avatar-container"> <a href="./../memberlist.php?mode=viewprofile&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">2347</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_content692753"> <h3 > <a href="./../viewtopic.php?p=692753&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692753">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692753&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692753&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692753" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=131665&amp;sid=82a90fbf901ae9eb044287746a6cfc34" style="color: #D52929;" class="username-coloured">Celtic_Minstrel</a></strong> &raquo; </span><time datetime="2024-08-22T23:21:24+00:00">August 22nd, 2024, 11:21 pm</time> </p> <div class="content"><blockquote cite="./../viewtopic.php?p=692737&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692737"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=122117&amp;sid=82a90fbf901ae9eb044287746a6cfc34">gnombat</a> wrote: <a href="./../viewtopic.php?p=692737&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692737" data-post-id="692737" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 6:05 pm</span></cite> It doesn't? (Did you see the <code class="inline-code">.__cfg</code> at the end of the first line?) </div></blockquote> Ah, you're right, I did indeed miss that… which means <em class="text-italics">both</em> versions result in no actual change to the unit.<br> <blockquote cite="./../viewtopic.php?p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743" data-post-id="692743" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 7:44 pm</span></cite> Now, as I understand it, that's two copies of Bob serialized and stored in completely separate tables (and if this is true, I believe it confirms my suspicion that .__cfg is not a table, it RETURNS a table). No changes to a will affect b, and nothing I do to a or b will affect Bob until I "unstore" a or b. </div></blockquote>Correct.<br> <blockquote cite="./../viewtopic.php?p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743" data-post-id="692743" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 7:44 pm</span></cite> Here's where it gets interesting:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>u = wesnoth.units.find_on_map({id = Bob})[1] print(u.__cfg.hitpoints) ==&gt; 24 u.__cfg.hitpoints=12 print(u.__cfg.hitpoints) ==&gt; ???</code></pre></div> I would have thought the second print would print 12. But if every access to .__cfg serializes from the unit (Bob), and I've done nothing here to change Bob, then I guess it would print 24. </div></blockquote><code class="inline-code">__cfg</code> is read-only. It's a little unfortunate that Lua allows you to modify its members anyway, but that won't do anything, as what you're modifying is just a temporary copy of the table.<br> <blockquote cite="./../viewtopic.php?p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692743&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692743" data-post-id="692743" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 22nd, 2024, 7:44 pm</span></cite> My gut is telling me the second code block is either just stupid, or making a change this way will only work if you "unstore" immediately after the change. </div></blockquote>Making a change this way will <em class="text-italics">never</em> work. You need to store <code class="inline-code">__cfg</code> in a variable (which includes passing it to a function), otherwise any changes to it will be immediately lost.</div> <div id="sig692753" 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="p692754" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile692754"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./../memberlist.php?mode=viewprofile&amp;u=141214&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="avatar"><img class="avatar" src="./../download/file.php?avatar=141214_1654827317.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./../memberlist.php?mode=viewprofile&amp;u=141214&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">hermestrismi</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./../search.php?author_id=141214&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">717</a></dd> <dd class="profile-joined"><strong>Joined:</strong> February 6th, 2016, 11:28 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Tunisia</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact hermestrismi"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact hermestrismi</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://facebook.com/mejri.ziad.1/" title="Facebook" class="last-cell"> <span class="contact-icon phpbb_facebook-icon">Facebook</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content692754"> <h3 > <a href="./../viewtopic.php?p=692754&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692754">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692754&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692754&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692754" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=141214&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">hermestrismi</a></strong> &raquo; </span><time datetime="2024-08-23T05:41:59+00:00">August 23rd, 2024, 5:41 am</time> </p> <div class="content">hi, <br> a quick <em class="text-italics"> stupid </em> question. I want to build a wml array (like append variables) like that: <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>[set_variables] mode=append name=unit_items_pair [literal] id=Blood Bat-20 item=sword2 [/literal] ... [/variables] </code></pre></div> what's the best way to do that? the ways I tried ( <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>wml.array_access_set </code></pre></div> <br> and <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>wml.variables </code></pre></div> didn't build an append array</div> <div id="sig692754" class="signature"><a href="https://forums.wesnoth.org/viewtopic.php?p=646876#p646876" class="postlink">The Dark Master</a>, <a href="https://forums.wesnoth.org/viewtopic.php?p=673570#p673570" class="postlink">The Dark Hordes (Unofficial version)</a>,<a href="https://forums.wesnoth.org/viewtopic.php?t=55629" class="postlink"> Return of the Legion </a>, <a href="https://forums.wesnoth.org/viewtopic.php?t=55729" class="postlink">Eternal Kingdom</a>, <a href="https://forums.wesnoth.org/viewtopic.php?t=55743" class="postlink">An Elvish Scout</a>,<a href="https://forums.wesnoth.org/viewtopic.php?t=55793" class="postlink">Unrest in Elfland</a> ,<a href="https://forums.wesnoth.org/viewtopic.php?t=55954" class="postlink"> Hidden War </a>...<br> <a href="https://forums.wesnoth.org/viewtopic.php?p=673686#p673686" class="postlink">The Dark Master Project</a>, Arabic tra. maintainer <br> "But he loves you" G. Carlin</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="p692755" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile692755"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">white_haired_uncle</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./../search.php?author_id=165464&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">1449</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 26th, 2018, 11:46 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> A country place, far outside the Wire</dd> </dl> <div class="postbody"> <div id="post_content692755"> <h3 > <a href="./../viewtopic.php?p=692755&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692755">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692755&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692755&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692755" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">white_haired_uncle</a></strong> &raquo; </span><time datetime="2024-08-23T09:52:28+00:00">August 23rd, 2024, 9:52 am</time> </p> <div class="content">wml.array_access.get and wml.array_access.set are used to convert WML arrays to/from lua tables.<br> <br> Generally, you'll use table.insert to append to a lua table. <a href="https://www.lua.org/pil/19.2.html" class="postlink">https://www.lua.org/pil/19.2.html</a><br> <br> WML and I don't get along well, but I think this is close to what you want:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>local a=wml.array_access.get("unit_items_pair") b["id]="Blood Bat-20" b["item"]="sword" table.insert(a,b) print(a[#a].item) ==&gt; "Blood Bat-20" wml.array_access.set("unit_items_pair",a)</code></pre></div></div> <div id="sig692755" class="signature"><div style="text-align:center">Speak softly, and carry <a class="postlink" href="//wiki.wesnoth.org/LotI_Items#Doombringer_.E2.80.93_sword">Doombringer</a>.</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="p692756" class="post has-profile bg2"> <div class="inner"> <dl class="postprofile" id="profile692756"> <dt class="no-profile-rank has-avatar"> <div class="avatar-container"> <a href="./../memberlist.php?mode=viewprofile&amp;u=141214&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="avatar"><img class="avatar" src="./../download/file.php?avatar=141214_1654827317.png" width="72" height="72" alt="User avatar" /></a> </div> <a href="./../memberlist.php?mode=viewprofile&amp;u=141214&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">hermestrismi</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./../search.php?author_id=141214&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">717</a></dd> <dd class="profile-joined"><strong>Joined:</strong> February 6th, 2016, 11:28 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> Tunisia</dd> <dd class="profile-contact"> <strong>Contact:</strong> <div class="dropdown-container dropdown-left"> <a href="#" class="dropdown-trigger" title="Contact hermestrismi"> <i class="icon fa-commenting-o fa-fw icon-lg" aria-hidden="true"></i><span class="sr-only">Contact hermestrismi</span> </a> <div class="dropdown"> <div class="pointer"><div class="pointer-inner"></div></div> <div class="dropdown-contents contact-icons"> <div> <a href="http://facebook.com/mejri.ziad.1/" title="Facebook" class="last-cell"> <span class="contact-icon phpbb_facebook-icon">Facebook</span> </a> </div> </div> </div> </div> </dd> </dl> <div class="postbody"> <div id="post_content692756"> <h3 > <a href="./../viewtopic.php?p=692756&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692756">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692756&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692756&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692756" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=141214&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">hermestrismi</a></strong> &raquo; </span><time datetime="2024-08-23T09:56:42+00:00">August 23rd, 2024, 9:56 am</time> </p> <div class="content"><blockquote cite="./../viewtopic.php?p=692755&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692755"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34">white_haired_uncle</a> wrote: <a href="./../viewtopic.php?p=692755&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692755" data-post-id="692755" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 23rd, 2024, 9:52 am</span></cite> wml.array_access.get and wml.array_access.set are used to convert WML arrays to/from lua tables.<br> <br> Generally, you'll use table.insert to append to a lua table. <a href="https://www.lua.org/pil/19.2.html" class="postlink">https://www.lua.org/pil/19.2.html</a><br> <br> WML and I don't get along well, but I think this is close to what you want:<br> <div class="codebox"><p>Code: <a href="#" onclick="selectCode(this); return false;">Select all</a></p><pre><code>local a=wml.array_access.get("unit_items_pair") b["id]="Blood Bat-20" b["item"]="sword" table.insert(a,b) print(a[#a].item) ==&gt; "Blood Bat-20" wml.array_access.set("unit_items_pair",a)</code></pre></div> </div></blockquote> thanks. I'll try it. may I ask if this is the best way to serialize a table (so that it became surely persistent upon reload)?</div> <div id="sig692756" class="signature"><a href="https://forums.wesnoth.org/viewtopic.php?p=646876#p646876" class="postlink">The Dark Master</a>, <a href="https://forums.wesnoth.org/viewtopic.php?p=673570#p673570" class="postlink">The Dark Hordes (Unofficial version)</a>,<a href="https://forums.wesnoth.org/viewtopic.php?t=55629" class="postlink"> Return of the Legion </a>, <a href="https://forums.wesnoth.org/viewtopic.php?t=55729" class="postlink">Eternal Kingdom</a>, <a href="https://forums.wesnoth.org/viewtopic.php?t=55743" class="postlink">An Elvish Scout</a>,<a href="https://forums.wesnoth.org/viewtopic.php?t=55793" class="postlink">Unrest in Elfland</a> ,<a href="https://forums.wesnoth.org/viewtopic.php?t=55954" class="postlink"> Hidden War </a>...<br> <a href="https://forums.wesnoth.org/viewtopic.php?p=673686#p673686" class="postlink">The Dark Master Project</a>, Arabic tra. maintainer <br> "But he loves you" G. Carlin</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="p692757" class="post has-profile bg1"> <div class="inner"> <dl class="postprofile" id="profile692757"> <dt class="no-profile-rank no-avatar"> <div class="avatar-container"> </div> <a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">white_haired_uncle</a> </dt> <dd class="profile-posts"><strong>Posts:</strong> <a href="./../search.php?author_id=165464&amp;sr=posts&amp;sid=82a90fbf901ae9eb044287746a6cfc34">1449</a></dd> <dd class="profile-joined"><strong>Joined:</strong> August 26th, 2018, 11:46 pm</dd> <dd class="profile-custom-field profile-phpbb_location"><strong>Location:</strong> A country place, far outside the Wire</dd> </dl> <div class="postbody"> <div id="post_content692757"> <h3 > <a href="./../viewtopic.php?p=692757&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692757">Re: wml.get_child for unit</a> </h3> <ul class="post-buttons"> <li> <a href="./../posting.php?mode=quote&amp;p=692757&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=692757&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692757" title="Post"> <i class="icon fa-file fa-fw icon-lightgray icon-md" aria-hidden="true"></i><span class="sr-only">Post</span> </a> <span class="responsive-hide">by <strong><a href="./../memberlist.php?mode=viewprofile&amp;u=165464&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="username">white_haired_uncle</a></strong> &raquo; </span><time datetime="2024-08-23T10:09:59+00:00">August 23rd, 2024, 10:09 am</time> </p> <div class="content"><blockquote cite="./../viewtopic.php?p=692756&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692756"><div><cite><a href="./../memberlist.php?mode=viewprofile&amp;u=141214&amp;sid=82a90fbf901ae9eb044287746a6cfc34">hermestrismi</a> wrote: <a href="./../viewtopic.php?p=692756&amp;sid=82a90fbf901ae9eb044287746a6cfc34#p692756" data-post-id="692756" onclick="if(document.getElementById(hash.substr(1)))href=hash">↑</a><span class="responsive-hide">August 23rd, 2024, 9:56 am</span></cite> <br> thanks. I'll try it. may I ask if this is the best way to serialize a table (so that it became surely persistent upon reload)? </div></blockquote> Best? I don't know. It's how I do it.<br> <br> There's also<br> <br> <a href="https://wiki.wesnoth.org/LuaAPI/wesnoth#wesnoth.persistent_tags" class="postlink">https://wiki.wesnoth.org/LuaAPI/wesnoth ... stent_tags</a><br> <br> but I've never used it.</div> <div id="sig692757" class="signature"><div style="text-align:center">Speak softly, and carry <a class="postlink" href="//wiki.wesnoth.org/LotI_Items#Doombringer_.E2.80.93_sword">Doombringer</a>.</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 class="action-bar bar-bottom"> <a href="./../posting.php?mode=reply&amp;t=58564&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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=58564&amp;start=15&amp;sid=82a90fbf901ae9eb044287746a6cfc34"> <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"> 23 posts <ul> <li class="arrow previous"><a class="button button-icon-only" href="./../viewtopic.php?t=58564&amp;sid=82a90fbf901ae9eb044287746a6cfc34" rel="prev" role="button"><i class="icon fa-chevron-left fa-fw" aria-hidden="true"></i><span class="sr-only">Previous</span></a></li> <li><a class="button" href="./../viewtopic.php?t=58564&amp;sid=82a90fbf901ae9eb044287746a6cfc34" role="button">1</a></li> <li class="active"><span>2</span></li> </ul> </div> </div> <div class="action-bar actions-jump"> <p class="jumpbox-return"> <a href="./../viewforum.php?f=58&amp;sid=82a90fbf901ae9eb044287746a6cfc34" 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&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-cat-link"> <span> Announcements</span></a></li> <li><a href="./../viewforum.php?f=62&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; News</span></a></li> <li><a href="./../viewforum.php?f=25&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-cat-link"> <span> General</span></a></li> <li><a href="./../viewforum.php?f=6&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Users’ Forum</span></a></li> <li><a href="./../viewforum.php?f=70&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Tournaments</span></a></li> <li><a href="./../viewforum.php?f=5&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Release Announcements, Compiling &amp; Installation</span></a></li> <li><a href="./../viewforum.php?f=4&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Technical Support</span></a></li> <li><a href="./../viewforum.php?f=67&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; iOS Support</span></a></li> <li><a href="./../viewforum.php?f=3&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Strategies &amp; Tips</span></a></li> <li><a href="./../viewforum.php?f=37&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Gameplay Feedback</span></a></li> <li><a href="./../viewforum.php?f=22&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Mainline Campaign Feedback</span></a></li> <li><a href="./../viewforum.php?f=46&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Tutorial</span></a></li> <li><a href="./../viewforum.php?f=40&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; A Tale of Two Brothers</span></a></li> <li><a href="./../viewforum.php?f=41&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; An Orcish Incursion</span></a></li> <li><a href="./../viewforum.php?f=42&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; The South Guard</span></a></li> <li><a href="./../viewforum.php?f=39&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Heir to the Throne</span></a></li> <li><a href="./../viewforum.php?f=43&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Liberty</span></a></li> <li><a href="./../viewforum.php?f=51&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Legend of Wesmere (single player)</span></a></li> <li><a href="./../viewforum.php?f=56&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Legend of Wesmere (multiplayer)</span></a></li> <li><a href="./../viewforum.php?f=49&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Eastern Invasion</span></a></li> <li><a href="./../viewforum.php?f=55&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; The Hammer of Thursagan</span></a></li> <li><a href="./../viewforum.php?f=54&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Descent into Darkness</span></a></li> <li><a href="./../viewforum.php?f=52&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Delfador’s Memoirs</span></a></li> <li><a href="./../viewforum.php?f=45&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Dead Water</span></a></li> <li><a href="./../viewforum.php?f=65&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Secrets of the Ancients</span></a></li> <li><a href="./../viewforum.php?f=48&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Sceptre of Fire</span></a></li> <li><a href="./../viewforum.php?f=53&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Son of the Black Eye</span></a></li> <li><a href="./../viewforum.php?f=44&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; The Rise of Wesnoth</span></a></li> <li><a href="./../viewforum.php?f=47&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Northern Rebirth</span></a></li> <li><a href="./../viewforum.php?f=50&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Under the Burning Suns</span></a></li> <li><a href="./../viewforum.php?f=71&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Winds of Fate</span></a></li> <li><a href="./../viewforum.php?f=31&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Add-on Feedback</span></a></li> <li><a href="./../viewforum.php?f=17&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Website</span></a></li> <li><a href="./../viewforum.php?f=26&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-cat-link"> <span> Development</span></a></li> <li><a href="./../viewforum.php?f=9&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Art Contributions</span></a></li> <li><a href="./../viewforum.php?f=23&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Art Workshop</span></a></li> <li><a href="./../viewforum.php?f=32&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Writers’ Forum</span></a></li> <li><a href="./../viewforum.php?f=21&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; WML Workshop</span></a></li> <li><a href="./../viewforum.php?f=58&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Lua Labs</span></a></li> <li><a href="./../viewforum.php?f=19&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Faction &amp; Era Development</span></a></li> <li><a href="./../viewforum.php?f=15&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Multiplayer Development</span></a></li> <li><a href="./../viewforum.php?f=8&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Scenario &amp; Campaign Development</span></a></li> <li><a href="./../viewforum.php?f=38&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Mainline Campaign Development</span></a></li> <li><a href="./../viewforum.php?f=68&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; UMC Replays</span></a></li> <li><a href="./../viewforum.php?f=14&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Music &amp; Sound Development</span></a></li> <li><a href="./../viewforum.php?f=7&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Translations &amp; Internationalization</span></a></li> <li><a href="./../viewforum.php?f=60&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Translation Stats</span></a></li> <li><a href="./../viewforum.php?f=12&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Ideas</span></a></li> <li><a href="./../viewforum.php?f=10&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Coder’s Corner</span></a></li> <li><a href="./../viewforum.php?f=2&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Developers’ Discussions</span></a></li> <li><a href="./../viewforum.php?f=73&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span><span class="spacer"></span> <span>&#8627; &nbsp; Wesnoth Organizational Updates</span></a></li> <li><a href="./../viewforum.php?f=18&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Art Development</span></a></li> <li><a href="./../viewforum.php?f=28&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-cat-link"> <span> Miscellaneous</span></a></li> <li><a href="./../viewforum.php?f=13&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Game Development</span></a></li> <li><a href="./../viewforum.php?f=11&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Off-Topic</span></a></li> <li><a href="./../viewforum.php?f=61&amp;sid=82a90fbf901ae9eb044287746a6cfc34" class="jumpbox-sub-link"><span class="spacer"></span> <span>&#8627; &nbsp; Forum Games</span></a></li> </ul> </div> </div> </div> </div> <div id="page-footer" class="page-footer" role="contentinfo"> <div class="navbar" role="navigation"> <div class="inner"> <ul id="nav-footer" class="nav-footer linklist" role="menubar"> <li class="breadcrumbs"> <span class="crumb"><a href="./../index.php?sid=82a90fbf901ae9eb044287746a6cfc34" data-navbar-reference="index"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span>Forums</span></a></span> </li> <li class="rightside">All times are <span title="UTC">UTC</span></li> <li class="rightside"> <a href="./../ucp.php?mode=delete_cookies&amp;sid=82a90fbf901ae9eb044287746a6cfc34" data-ajax="true" data-refresh="true" role="menuitem"> <i class="icon fa-trash fa-fw" aria-hidden="true"></i><span>Delete cookies</span> </a> </li> </ul> </div> </div> <div id="darkenwrapper" class="darkenwrapper" data-ajax-error-title="AJAX error" data-ajax-error-text="Something went wrong when processing your request." data-ajax-error-text-abort="User aborted request." data-ajax-error-text-timeout="Your request timed out; please try again." data-ajax-error-text-parsererror="Something went wrong with the request and the server returned an invalid reply."> <div id="darken" class="darken">&nbsp;</div> </div> <div id="phpbb_alert" class="phpbb_alert" data-l-err="Error" data-l-timeout-processing-req="Request timed out."> <a href="#" class="alert_close"> <i class="icon fa-times-circle fa-fw" aria-hidden="true"></i> </a> <h3 class="alert_title">&nbsp;</h3><p class="alert_text"></p> </div> <div id="phpbb_confirm" class="phpbb_alert"> <a href="#" class="alert_close"> <i class="icon fa-times-circle fa-fw" aria-hidden="true"></i> </a> <div class="alert_text"></div> </div> </div> </div> <div class="copyright"> <p class="footer-row"> <span class="footer-copyright">Powered by <a href="https://www.phpbb.com/">phpBB</a>&reg; Forum Software &copy; phpBB Limited</span> </p> <p class="footer-row" role="menu"> <a class="footer-link" href="./../ucp.php?mode=privacy&amp;sid=82a90fbf901ae9eb044287746a6cfc34" title="Privacy" role="menuitem"> <span class="footer-link-text">Privacy</span> </a> | <a class="footer-link" href="./../ucp.php?mode=terms&amp;sid=82a90fbf901ae9eb044287746a6cfc34" title="Terms" role="menuitem"> <span class="footer-link-text">Terms</span> </a> </p> </div> <div> <a id="bottom" class="anchor" accesskey="z"></a> </div> <script src="./../assets/javascript/jquery-3.6.0.min.js?assets_version=264"></script> <script src="./../assets/javascript/core.js?assets_version=264"></script> <script type="text/javascript"> var CodeboxExpandText = "Expand"; var CodeboxCollapseText = "Collapse"; </script> <script src="./../assets/cookieconsent/cookieconsent.min.js?assets_version=264"></script> <script> if (typeof window.cookieconsent === "object") { window.addEventListener("load", function(){ window.cookieconsent.initialise({ "palette": { "popup": { "background": "#0F538A" }, "button": { "background": "#E5E5E5" } }, "theme": "classic", "content": { "message": "This\u0020website\u0020uses\u0020cookies\u0020to\u0020ensure\u0020you\u0020get\u0020the\u0020best\u0020experience\u0020on\u0020our\u0020website.", "dismiss": "Got\u0020it\u0021", "link": "Learn\u0020more", "href": "./../ucp.php?mode=privacy&amp;sid=82a90fbf901ae9eb044287746a6cfc34" } }); }); } </script> </div> <!-- #content --> <script src="./../styles/prosilver/template/forum_fn.js?assets_version=264"></script> <script src="./../styles/prosilver/template/ajax.js?assets_version=264"></script> </body> </html>

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