<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/index.php?action=history&amp;feed=atom&amp;title=WMLsyntax_ch</id>
	<title>WMLsyntax ch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/index.php?action=history&amp;feed=atom&amp;title=WMLsyntax_ch"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;action=history"/>
	<updated>2026-05-04T06:06:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=71015&amp;oldid=prev</id>
		<title>Egallager: link cleanup</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=71015&amp;oldid=prev"/>
		<updated>2023-04-24T02:28:34Z</updated>

		<summary type="html">&lt;p&gt;link cleanup&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 02:28, 24 April 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot; &gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/set_variable]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/set_variable]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;标量变量的全名就是给它的名字，如my_variable。注意变量的值可以是可翻译形式或是一个格式化表达式，见特殊属性值节。([&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;http://wiki.wesnoth.org/&lt;/del&gt;SyntaxWML#Special_Attribute_Values Special Attribute Values]).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;标量变量的全名就是给它的名字，如my_variable。注意变量的值可以是可翻译形式或是一个格式化表达式，见特殊属性值节。([&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[&lt;/ins&gt;SyntaxWML#Special_Attribute_Values&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;|&lt;/ins&gt;Special Attribute Values&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;]&lt;/ins&gt;]).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== 数组 ====&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;==== 数组 ====&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Egallager</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=56324&amp;oldid=prev</id>
		<title>Vultraz: Removed AlphabeticalWML link</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=56324&amp;oldid=prev"/>
		<updated>2015-04-22T07:37:13Z</updated>

		<summary type="html">&lt;p&gt;Removed AlphabeticalWML link&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 07:37, 22 April 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l22&quot; &gt;Line 22:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 22:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;每个标签介绍了一些不同的东西关于这个游戏;不同的标签以不同的方式发挥作用,但那些标签必须在上下文中有意义。这是一些 &amp;quot;[[ReferenceWML#WML_toplevel_tags|top-level tags]]&amp;quot; ，这是一些不在任何其他标签内就可使用的标签，以及这些标签允许使用的子标签(以及键)。不能被理解的标签和键，如错别字，有些时候会产生错误信息，但是多数时候它们被无视掉。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;每个标签介绍了一些不同的东西关于这个游戏;不同的标签以不同的方式发挥作用,但那些标签必须在上下文中有意义。这是一些 &amp;quot;[[ReferenceWML#WML_toplevel_tags|top-level tags]]&amp;quot; ，这是一些不在任何其他标签内就可使用的标签，以及这些标签允许使用的子标签(以及键)。不能被理解的标签和键，如错别字，有些时候会产生错误信息，但是多数时候它们被无视掉。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''键不能与变量混淆!'' &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;一个常见错误在初学者那里就是使用一个没有上下文意义的名字。相反，应使用在WML标准里能被找到的，具有上下文意义的，处于某个标签下的键名。所有这些标签下的键名字可以在这个文档[[AlphabeticalWML]] 中查到，或者&lt;/del&gt;''WML Tags'' 导航框。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;''键不能与变量混淆!'' &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;一个常见错误在初学者那里就是使用一个没有上下文意义的名字。相反，应使用在WML标准里能被找到的，具有上下文意义的，处于某个标签下的键名。或者&lt;/ins&gt;''WML Tags'' 导航框。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;此外,对于标签和键的名遵循一个特殊形式。它们必须由字母数字与下划线组成，特别是不能有什么&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;之类的运算符(它们有特殊意义，见下)。不过，对于值来说它们可以包含任何它们需要的符号。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;此外,对于标签和键的名遵循一个特殊形式。它们必须由字母数字与下划线组成，特别是不能有什么&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;之类的运算符(它们有特殊意义，见下)。不过，对于值来说它们可以包含任何它们需要的符号。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Vultraz</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=52376&amp;oldid=prev</id>
		<title>Yiyuezhuo at 12:12, 10 November 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=52376&amp;oldid=prev"/>
		<updated>2013-11-10T12:12:33Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;amp;diff=52376&amp;amp;oldid=52375&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Yiyuezhuo</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=52375&amp;oldid=prev</id>
		<title>Yiyuezhuo at 11:57, 10 November 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=52375&amp;oldid=prev"/>
		<updated>2013-11-10T11:57:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 11:57, 10 November 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l29&quot; &gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 标签修正语法 ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== 标签修正语法 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Inserting a plus sign &lt;/del&gt;(&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;code&amp;gt;&lt;/del&gt;+&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/code&amp;gt;&lt;/del&gt;) &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;before a tag name allows one to append to an earlier tag (the most recent with the same name) rather than starting a new tag. This allows attributes to be added or replaced.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;插入一个加号&lt;/ins&gt;(+)&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;在一个标签前面名的标签形式允许追加到一个同名的（除去+后）较早的标签。这允许属性的增加或覆盖。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [tag]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [tag]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key=value&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key=value&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l37&quot; &gt;Line 37:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 37:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/tag]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/tag]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;All keys in the ''&lt;/del&gt;+tag&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;'' will be set to the given values. If the keys did not exist in the most recent [tag] then they are added to that [tag]; otherwise their values will replace the old values in the most recent [tag].&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;所有在&lt;/ins&gt;+tag&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;(追加的标签代称)里的键必须设置一个给定的值。如果这个键不存在于想要追加的标签，则它们会被添加到要追加的那个标签里。其他情况下它们的值会替换老值在所追加的标签。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Any child tags of the ''&lt;/del&gt;+&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;tag'' will be appended to the children of the most recent [tag]. To be clear&lt;/del&gt;: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;none of those original child tags will be altered by this operation, since this is an &amp;quot;&lt;/del&gt;append&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot; and not a &amp;quot;&lt;/del&gt;merge&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;.&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;任何在&lt;/ins&gt;+&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;tag里出现的子标签会被追加到对应标签子标签中。澄清一点&lt;/ins&gt;:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;所追加标签的子标签不会因此被改变，这是一个追加(&lt;/ins&gt;append&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)而不是一个合并(&lt;/ins&gt;merge&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It is even possible to make tag amendments to a child tag after the parent tag has already closed. Using [+tag] syntax multiple times in a row (first for the parent, then for the child) will allow you to amend the more inward scopes.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;还可以在一个标签外部修正这个标签的子标签，只要在修正子标签被修正父标签包围即可。这加强了修正的能力。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Multiple Assignment Syntax &lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;多行赋值语法 &lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;It is possible to set multiple attributes on a single line. This is done by listing the associated keys, followed by an equal sign, followed by the desired values.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;在一行内多次赋值是可行的。通过用等号分隔的几个键与几个值的形式。像这样:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [tag]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [tag]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key1,key2,key3=value1,value2,value3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key1,key2,key3=value1,value2,value3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/tag]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/tag]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;would be the same as:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;这等价于&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [tag]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [tag]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key1=value1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key1=value1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l55&quot; &gt;Line 55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key3=value3&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; key3=value3&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/tag]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; [/tag]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;If there are extra keys, they will be set to an empty value. If there are extra values the last key will be set to the comma-separated list of all remaining values.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;允许两边项数不对称。当键更多时，从左数起没有对应值得键被赋空值。当值更多时，最后一个可对应的值以及后面所有的值作为一个表赋给最后一个键。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Special Attribute Values &lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;特殊属性值 &lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Although an attribute's value can be just text corresponding to the function of its key, a value can also be encoded in many other ways, each with a specific purpose.&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;一个属性值除了被赋予纯文本，也可以赋予其他形式，这些形式有不同的意义。&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''key = &amp;quot;value&amp;quot;''': a ''quoted value'' is a value surrounded by quotes. This is often unnecessary as single-line values are typically interpreted as intended. However, quotes are required in order to specify multiple-line values (a line break inside quotes does not end the value). Quotes may also be required to cancel the special meaning of other characters, and they prevent spaces from being stripped. It is never wrong to use quotes with correct WML.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''key = &amp;quot;value&amp;quot;''': a ''quoted value'' is a value surrounded by quotes. This is often unnecessary as single-line values are typically interpreted as intended. However, quotes are required in order to specify multiple-line values (a line break inside quotes does not end the value). Quotes may also be required to cancel the special meaning of other characters, and they prevent spaces from being stripped. It is never wrong to use quotes with correct WML.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''key = _&amp;quot;value&amp;quot;''': a ''[[translatable|translatable value]]'' is a value that is subject to translations, and should be used for all text intended to be shown to a player (most notably seen in [story], [message], and the name= key in unit definitions). A translatable value is surrounded by quotes and preceded by an underscore (_). In terms of WML syntax, it behaves very much like a quoted value, other than being unsuitable for [[ConditionalActionsWML#Condition_Tags|comparisons to other values]]. Translatable values are intended for display on the screen, not for internal data.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* '''key = _&amp;quot;value&amp;quot;''': a ''[[translatable|translatable value]]'' is a value that is subject to translations, and should be used for all text intended to be shown to a player (most notably seen in [story], [message], and the name= key in unit definitions). A translatable value is surrounded by quotes and preceded by an underscore (_). In terms of WML syntax, it behaves very much like a quoted value, other than being unsuitable for [[ConditionalActionsWML#Condition_Tags|comparisons to other values]]. Translatable values are intended for display on the screen, not for internal data.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Yiyuezhuo</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=52374&amp;oldid=prev</id>
		<title>Yiyuezhuo: Created page with &quot;{{WML Tags}}  '''韦诺标记语言''' ('''WML''')被用于编码几乎所有在韦诺里的事物，包括剧本，单位，存档文件以及用户交互接口，WML文件...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=WMLsyntax_ch&amp;diff=52374&amp;oldid=prev"/>
		<updated>2013-11-10T11:55:14Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{WML Tags}}  &amp;#039;&amp;#039;&amp;#039;韦诺标记语言&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;WML&amp;#039;&amp;#039;&amp;#039;)被用于编码几乎所有在韦诺里的事物，包括剧本，单位，存档文件以及用户交互接口，WML文件...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{WML Tags}}&lt;br /&gt;
&lt;br /&gt;
'''韦诺标记语言''' ('''WML''')被用于编码几乎所有在韦诺里的事物，包括剧本，单位，存档文件以及用户交互接口，WML文件时简单，易读的文本文件，经常以.cfg后缀标出，与ini与XML文件非常类似。&lt;br /&gt;
关于如何使这些文件写的更易读,见 [[ConventionsWML#Indentation|ConventionsWML]].&lt;br /&gt;
&lt;br /&gt;
== 标签和属性结构 ==&lt;br /&gt;
&lt;br /&gt;
WML有一个包含两个成员的语法结构: ''标签'' and ''属性''. 其中属性又由''键''(keys)与''值''(value)组成。作为例子:&lt;br /&gt;
  [tag]&lt;br /&gt;
      key=value&lt;br /&gt;
  [/tag]&lt;br /&gt;
&lt;br /&gt;
标签用于区分信息,直到一个数据被包含在属性里。键标出保存的数据的数据类型而值真正保存它们。当一个WML文件执行,标签识别成一些信息单元，如一个执行行动或一整个战役。这给了一个在一个标签内的属性一个上下文(context)。像每个在一个标签内的key=value行,其值被算进那个标签内。&lt;br /&gt;
标签也可以出现在另一个标签里，里面的标签被认为是包围它的标签的子标签，像下面的例子一样.&lt;br /&gt;
  [parent_tag]&lt;br /&gt;
      key1=value1&lt;br /&gt;
      [child_tag]&lt;br /&gt;
          key2=value2&lt;br /&gt;
      [/child_tag]&lt;br /&gt;
  [/parent_tag]&lt;br /&gt;
&lt;br /&gt;
每个标签介绍了一些不同的东西关于这个游戏;不同的标签以不同的方式发挥作用,但那些标签必须在上下文中有意义。这是一些 &amp;quot;[[ReferenceWML#WML_toplevel_tags|top-level tags]]&amp;quot; ，这是一些不在任何其他标签内就可使用的标签，以及这些标签允许使用的子标签(以及键)。不能被理解的标签和键，如错别字，有些时候会产生错误信息，但是多数时候它们被无视掉。&lt;br /&gt;
&lt;br /&gt;
''键不能与变量混淆!'' 一个常见错误在初学者那里就是使用一个没有上下文意义的名字。相反，应使用在WML标准里能被找到的，具有上下文意义的，处于某个标签下的键名。所有这些标签下的键名字可以在这个文档[[AlphabeticalWML]] 中查到，或者''WML Tags'' 导航框。&lt;br /&gt;
&lt;br /&gt;
此外,对于标签和键的名遵循一个特殊形式。它们必须由字母数字与下划线组成，特别是不能有什么&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; &amp;lt;code&amp;gt;-&amp;lt;/code&amp;gt;之类的运算符(它们有特殊意义，见下)。不过，对于值来说它们可以包含任何它们需要的符号。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 标签修正语法 ===&lt;br /&gt;
&lt;br /&gt;
Inserting a plus sign (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;) before a tag name allows one to append to an earlier tag (the most recent with the same name) rather than starting a new tag. This allows attributes to be added or replaced.&lt;br /&gt;
  [tag]&lt;br /&gt;
      key=value&lt;br /&gt;
  [/tag]&lt;br /&gt;
  [+tag]&lt;br /&gt;
      key=value&lt;br /&gt;
  [/tag]&lt;br /&gt;
&lt;br /&gt;
* All keys in the ''+tag'' will be set to the given values. If the keys did not exist in the most recent [tag] then they are added to that [tag]; otherwise their values will replace the old values in the most recent [tag].&lt;br /&gt;
&lt;br /&gt;
* Any child tags of the ''+tag'' will be appended to the children of the most recent [tag]. To be clear: none of those original child tags will be altered by this operation, since this is an &amp;quot;append&amp;quot; and not a &amp;quot;merge.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* It is even possible to make tag amendments to a child tag after the parent tag has already closed. Using [+tag] syntax multiple times in a row (first for the parent, then for the child) will allow you to amend the more inward scopes.&lt;br /&gt;
&lt;br /&gt;
=== Multiple Assignment Syntax ===&lt;br /&gt;
&lt;br /&gt;
It is possible to set multiple attributes on a single line. This is done by listing the associated keys, followed by an equal sign, followed by the desired values.&lt;br /&gt;
  [tag]&lt;br /&gt;
      key1,key2,key3=value1,value2,value3&lt;br /&gt;
  [/tag]&lt;br /&gt;
would be the same as:&lt;br /&gt;
  [tag]&lt;br /&gt;
      key1=value1&lt;br /&gt;
      key2=value2&lt;br /&gt;
      key3=value3&lt;br /&gt;
  [/tag]&lt;br /&gt;
* If there are extra keys, they will be set to an empty value. If there are extra values the last key will be set to the comma-separated list of all remaining values.&lt;br /&gt;
&lt;br /&gt;
=== Special Attribute Values ===&lt;br /&gt;
&lt;br /&gt;
Although an attribute's value can be just text corresponding to the function of its key, a value can also be encoded in many other ways, each with a specific purpose.&lt;br /&gt;
* '''key = &amp;quot;value&amp;quot;''': a ''quoted value'' is a value surrounded by quotes. This is often unnecessary as single-line values are typically interpreted as intended. However, quotes are required in order to specify multiple-line values (a line break inside quotes does not end the value). Quotes may also be required to cancel the special meaning of other characters, and they prevent spaces from being stripped. It is never wrong to use quotes with correct WML.&lt;br /&gt;
* '''key = _&amp;quot;value&amp;quot;''': a ''[[translatable|translatable value]]'' is a value that is subject to translations, and should be used for all text intended to be shown to a player (most notably seen in [story], [message], and the name= key in unit definitions). A translatable value is surrounded by quotes and preceded by an underscore (_). In terms of WML syntax, it behaves very much like a quoted value, other than being unsuitable for [[ConditionalActionsWML#Condition_Tags|comparisons to other values]]. Translatable values are intended for display on the screen, not for internal data.&lt;br /&gt;
* '''key = &amp;quot;value1&amp;quot; + &amp;quot;value2&amp;quot;''': ''string concatenation'' is performed with the plus sign (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;). If a plus sign appears outside quotes in a value, it means that the string/value on its right will be appended to the string/value on its left.  To have an actual plus sign in a value, the string containing the &amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt; character must be surrounded by quotes (a quoted value or a translatable value). Quotes are not strictly necessary around the pre-concatenated values, but they are advisable so that it is easy to tell where the values begin and end and to spot some kinds of mistakes.&lt;br /&gt;
* '''key = &amp;quot;quoted &amp;quot;&amp;quot;double quoted value&amp;quot;&amp;quot; value&amp;quot;''': ''doubled quotes'' can be used to create quote marks within a quoted or translatable value. The doubled quote mark in the value produces one quote mark in the stored data and does not terminate the quoted value. (These do not necessarily need to be used in pairs.)&lt;br /&gt;
* '''key = $variable''': a ''variable substitution'' sets the key to the value of the indicated WML variable. This is indicated by the dollar sign (&amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;) and is really just  a special case of general variable substitution, as variables can be substituted within other values. See [[#Variable_Substitution|below]] for more information on values based on WML variables. (Note that some keys require their data to be a variable name, not the variable's value; in that case there would be no dollar sign.) ''Variable substitution is supported in only a few contexts, such as in [[IntroWML]] and [[EventWML]].&lt;br /&gt;
* '''key = &amp;quot;$(formula-expression)&amp;quot;''': a ''formula expression'' sets the key to the value of the processed formula. This is indicated by a dollar sign (&amp;lt;code&amp;gt;$&amp;lt;/code&amp;gt;) followed by a parenthesized expression. See [[FormulaAI]] for more information on formula basics, data types, and built-in functions. Quotes around the formula are not strictly necessary in all cases, but they are advisable, particularly since quotes are the only way to use a plus sign (&amp;lt;code&amp;gt;+&amp;lt;/code&amp;gt;) within a formula (without quotes, the plus sign represents string concatenation). ''Formula expressions are only supported where variable substitution is supported.''&lt;br /&gt;
&lt;br /&gt;
== Variables ==&lt;br /&gt;
&lt;br /&gt;
Variables in WML are used to store data for later retrieval. Each variable is identified by its name, which may contain only alphanumerics and underscores. Once created, a variable persists until the end of a campaign unless explicitly cleared.&lt;br /&gt;
&lt;br /&gt;
The three basic manipulations of WML variables are assigning a value, querying the value, and clearing the variable.&lt;br /&gt;
* '''Assigning to a variable''': stores a value in the variable. This is done with tags like {{tag|InternalActionsWML|set_variable}} or with [[PreprocessorRef|macros]] like &amp;lt;tt&amp;gt;{VARIABLE}&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* '''Querying a variable''': returns the last value stored in the variable (or the empty string, if no value was). This is done by prefixing the variable name with a dollar sign, as in &amp;lt;tt&amp;gt;$variable&amp;lt;/tt&amp;gt;, and sometimes ending the variable name with a pipe character, as in &amp;lt;tt&amp;gt;$variable|&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* '''Clearing a variable''': makes the WML engine forget about that variable. This is useful for reducing overhead, since all used variables are stored in saved games. This is done with {{tag|InternalActionsWML|clear_variable}} or the &amp;lt;tt&amp;gt;{CLEAR_VARIABLE}&amp;lt;/tt&amp;gt; [[PreprocessorRef|macro]].&lt;br /&gt;
&lt;br /&gt;
=== Kinds of Variables ===&lt;br /&gt;
==== Scalar ====&lt;br /&gt;
A scalar variable can store a single string or number.&lt;br /&gt;
&lt;br /&gt;
  [set_variable]&lt;br /&gt;
      name=my_variable&lt;br /&gt;
      value=&amp;quot;sample value&amp;quot;&lt;br /&gt;
  [/set_variable]&lt;br /&gt;
&lt;br /&gt;
The full name of a scalar variable is its given name, in this case ''my_variable''. Note that the value of the variable can be translatable or even a formula expression ([http://wiki.wesnoth.org/SyntaxWML#Special_Attribute_Values Special Attribute Values]).&lt;br /&gt;
&lt;br /&gt;
==== Array ====&lt;br /&gt;
An array variable is a numbered sequence of container variables. There are some specific tags that assign array information, for example [store_unit] and [store_locations]. One could create an array using [set_variable] like this:&lt;br /&gt;
  [set_variable]&lt;br /&gt;
      name=my_awesome_array[0].x&lt;br /&gt;
      value=10&lt;br /&gt;
  [/set_variable]&lt;br /&gt;
  [set_variable]&lt;br /&gt;
      name=my_awesome_array[1].x&lt;br /&gt;
      value=12&lt;br /&gt;
  [/set_variable]&lt;br /&gt;
  [set_variable]&lt;br /&gt;
      name=my_awesome_array[2].x&lt;br /&gt;
      value=14&lt;br /&gt;
  [/set_variable]&lt;br /&gt;
&lt;br /&gt;
However, when working with arrays, it is usually easier to make use of [set_variables]. This would be written as follows:&lt;br /&gt;
  [set_variables]&lt;br /&gt;
      name=my_awesome_array&lt;br /&gt;
      [value]&lt;br /&gt;
          x=10&lt;br /&gt;
      [/value]&lt;br /&gt;
      [value]&lt;br /&gt;
          x=12&lt;br /&gt;
      [/value]&lt;br /&gt;
      [value]&lt;br /&gt;
          x=14&lt;br /&gt;
      [/value]&lt;br /&gt;
  [/set_variables]&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;tt&amp;gt;foo&amp;lt;/tt&amp;gt; is the name of an array, &amp;lt;tt&amp;gt;foo[0]&amp;lt;/tt&amp;gt; is the full name of its first container variable, &amp;lt;tt&amp;gt;foo[1]&amp;lt;/tt&amp;gt; the full name of its second, and so on. &amp;lt;tt&amp;gt;foo.length&amp;lt;/tt&amp;gt; is the special variable that always stores the number of containers in the array &amp;lt;tt&amp;gt;foo&amp;lt;/tt&amp;gt;. Hence, if the value stored in &amp;lt;tt&amp;gt;foo.length&amp;lt;/tt&amp;gt; is 18, the last container in the array would be &amp;lt;tt&amp;gt;foo[17]&amp;lt;/tt&amp;gt;. If you try to query an array as if it were a container, then it will simply use the first index[0]. Thus $foo.bar would be the same as $foo[0].bar&lt;br /&gt;
&lt;br /&gt;
''Note'': Do not attempt to store a scalar value to the explicit index of an array, which is a container of scalar variables. Hence referring to a variable named &amp;lt;tt&amp;gt;foo[3]&amp;lt;/tt&amp;gt; as if it were a scalar one is illegal; instead, you would use &amp;lt;tt&amp;gt;foo[3].value&amp;lt;/tt&amp;gt; to store a scalar value. (While it may appear to work to an extent if you ignore this rule, it may also cause undefined behavior. For example, loading a text save of a game that contains such variables will fail with a WML error.)&lt;br /&gt;
&lt;br /&gt;
==== Container ====&lt;br /&gt;
A container variable can store any number of scalar and/or array variables. There are tags to assign specific information, for instance [store_side]. To refer to a variable &amp;lt;tt&amp;gt;bar&amp;lt;/tt&amp;gt; stored in a container &amp;lt;tt&amp;gt;foo&amp;lt;/tt&amp;gt; you would write &amp;lt;tt&amp;gt;foo.bar&amp;lt;/tt&amp;gt;. An explicit index inside an array is also considered a container.&lt;br /&gt;
&lt;br /&gt;
=== Conditionals ===&lt;br /&gt;
Variables and be compared with and used in a conditional block by [variable] within an [if] or [while] tag. For more information, please refer to [[ConditionalActionsWML]].&lt;br /&gt;
&lt;br /&gt;
=== Variable Substitution ===&lt;br /&gt;
Whenever using a $ in front of a variable name, the content which has previously been put into this variable name is used instead of the name of the variable. For example:&lt;br /&gt;
  [event]&lt;br /&gt;
      name=turn 1&lt;br /&gt;
      [set_variable]&lt;br /&gt;
          name=my_variable&lt;br /&gt;
          value= _ &amp;quot;Konrad&amp;quot;&lt;br /&gt;
      [/set_variable]&lt;br /&gt;
      [message]&lt;br /&gt;
          speaker=Delfador&lt;br /&gt;
          message= _ &amp;quot;Hello, $my_variable|... How are you?&amp;quot;&lt;br /&gt;
      [/message]&lt;br /&gt;
  [/event]&lt;br /&gt;
&lt;br /&gt;
The WML code above will cause Delfador to say &amp;quot;Hello, Konrad... How are you?&amp;quot; on turn 1.&lt;br /&gt;
&lt;br /&gt;
When writing scenario events ([[EventWML]]), a scalar variable can generally be substituted into the right-hand of any '''key=value''' assignment. If the provided value contains a &amp;lt;tt&amp;gt;$&amp;lt;/tt&amp;gt;, the WML engine with interpret what is between the rightmost &amp;lt;tt&amp;gt;$&amp;lt;/tt&amp;gt; and the next &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt; as a full variable name to be queried, and replace &amp;lt;tt&amp;gt;$''variable''|&amp;lt;/tt&amp;gt; with the result of this query.&lt;br /&gt;
&lt;br /&gt;
In certain situations, the &amp;lt;tt&amp;gt;|&amp;lt;/tt&amp;gt; that marks the end of the variable name to be queried can be omitted. The exact rule is: if there is no |, variable names span letters, digits, underlines, balanced square brackets and some periods. Doubled periods and some periods that would result in an illegal variable name will not be included. If the variable name ends up being empty (e.g. when using $|), then it will be replaced by just $, giving you an easy way to include a dollar sign in an interpolated string.&lt;br /&gt;
&lt;br /&gt;
==== Literal Mode ====&lt;br /&gt;
&lt;br /&gt;
There are a few places where the substitution mode is literal. In these places, attribute value are used exactly as provided, nothing is substituted, and the &amp;lt;tt&amp;gt;$&amp;lt;/tt&amp;gt; will not have special significance. The following places use the literal mode:&lt;br /&gt;
* value of '''literal=''' inside [set_variable]&lt;br /&gt;
* contents of '''[literal]''' inside [set_variables]&lt;br /&gt;
* the special [[SyntaxWML#The_.5Bvariables.5D_tag|[variables]]] tag, used to give initial values to many variables upon scenario start&lt;br /&gt;
&lt;br /&gt;
=== Automatically Stored Variables ===&lt;br /&gt;
* '''side_number''': the number of the current player's side (may be empty during start or prestart events)&lt;br /&gt;
* '''turn_number''': the number of the current turn (may be empty during start or prestart events)&lt;br /&gt;
* '''x1''': this is the x-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* '''y1''': this is the y-coordinate of the location where the most recent event was triggered&lt;br /&gt;
* '''x2''': this is the x-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
* '''y2''': this is the y-coordinate of the location that assisted in triggering the most recent event&lt;br /&gt;
* '''unit''': inside an event, this is the unit at $x1,$y1&lt;br /&gt;
* '''second_unit''': inside an event, this is the unit at $x2,$y2&lt;br /&gt;
* '''this_unit''': inside a standard unit filter, this is the unit currently being considered for a possible match&lt;br /&gt;
* '''damage_inflicted''': inside attacker_hits and defender_hits events, this is the amount of damage that was inflicted&lt;br /&gt;
* '''weapon''': inside attack, attack_end, attacker_hits, attacker_misses, defender_hits, defender_misses, die and last_breath events, this is some information about the weapon that is/was being used by the unit at $x1,$y1. It contains the attributes from [attack], see [[UnitTypeWML]].&lt;br /&gt;
* '''second_weapon''': inside attack, attack_end, attacker_hits, attacker_misses, defender_hits, defender_misses, die and last_breath events, this is some information about the weapon that is/was being used by the unit at $x2,$y2. It contains the attributes from [attack], see [[UnitTypeWML]].&lt;br /&gt;
&lt;br /&gt;
Note: Automatically stored container and array variables are only stored once that one of their attributes is accessed for the first time. This means that one can sometimes get wrong results, for instance by killing the unit at $x1,$y1 as first action in a moveto event and then accessing $unit.something. This can be worked around by previously making a dummy access, such as adding 0 to hitpoints.&lt;br /&gt;
&lt;br /&gt;
=== The [variables] tag ===&lt;br /&gt;
&lt;br /&gt;
The [variables] tag is used in saved games to describe the current value of each variable, and in scenario files for assigning initial values to variables at scenario start.&lt;br /&gt;
&lt;br /&gt;
A scalar variable is assigned using an attribute, where the attribute's key is the variable's given name, and the attribute's value is the value to be stored in the variable.&lt;br /&gt;
&lt;br /&gt;
A container variable with given name ''foo'' is assigned using a [foo] tag that contains the definitions for the contained variables.&lt;br /&gt;
&lt;br /&gt;
An array variable with given name ''foo'' is assigned using several [foo] tags, where the first tag describes foo[0], the second foo[1], ...&lt;br /&gt;
&lt;br /&gt;
=== Storing variables inside units ===&lt;br /&gt;
&lt;br /&gt;
Sometimes it is useful to store a custom WML variable inside a unit. Units stored with the [[InternalActionsWML#.5Bstore_unit.5D|[store_unit]]] command have a '''unit.variables''' sub-container where custom variables related to that unit may be saved. (Remember to [[DirectActionsWML#.5Bunstore_unit.5D|[unstore_unit]]] for the changes to be kept.) One benefit of this approach is that the unit may then be [[FilterWML|filtered]] based on the value, for example:&lt;br /&gt;
 [filter]&lt;br /&gt;
   [filter_wml]&lt;br /&gt;
     [variables]&lt;br /&gt;
       my_variable=&amp;quot;test&amp;quot;&lt;br /&gt;
     [/variables]&lt;br /&gt;
   [/filter_wml]&lt;br /&gt;
 [/filter]&lt;br /&gt;
&lt;br /&gt;
=== Variable Usage Examples ===&lt;br /&gt;
Consider a saved game with the following [variables] tag (or a freshly started scenario with that tag)&lt;br /&gt;
 [variables]&lt;br /&gt;
     attitude_of_elves=hate&lt;br /&gt;
     attitude_of_dwarves=love&lt;br /&gt;
     attitude_of_humans=like&lt;br /&gt;
     current_opponent=elves&lt;br /&gt;
 [/variables]&lt;br /&gt;
&lt;br /&gt;
Then, &lt;br /&gt;
 [message]&lt;br /&gt;
    message=&amp;quot;Oh, I see $current_opponent|! They surely $attitude_of_$current_opponent|| us!&amp;quot;&lt;br /&gt;
 [/message]&lt;br /&gt;
displays the message&lt;br /&gt;
 Oh, I see elves! They surely hate us!&lt;br /&gt;
&lt;br /&gt;
Consider another game with variables&lt;br /&gt;
 [variables]&lt;br /&gt;
     our_side=1&lt;br /&gt;
     their_side=2&lt;br /&gt;
 [/variables]&lt;br /&gt;
where side 1 has 75 gold, and side 2 50 gold. Then, &lt;br /&gt;
 [store_side]&lt;br /&gt;
     side=$our_side&lt;br /&gt;
     variable=we&lt;br /&gt;
 [/store_side]&lt;br /&gt;
 [store_side]&lt;br /&gt;
     side=$their_side&lt;br /&gt;
     variable=they&lt;br /&gt;
 [/store_side]&lt;br /&gt;
 [message]&lt;br /&gt;
     message=We have $we.gold gold, they have $they.gold gold.&lt;br /&gt;
 [/message]&lt;br /&gt;
 [if]&lt;br /&gt;
     [variable]&lt;br /&gt;
         name=we.gold&lt;br /&gt;
         greater_than=$they.gold&lt;br /&gt;
     [/variable]&lt;br /&gt;
     [then]&lt;br /&gt;
         [message]&lt;br /&gt;
             message=This should be easy!&lt;br /&gt;
         [/message]&lt;br /&gt;
     [/then]&lt;br /&gt;
     [else]&lt;br /&gt;
         [message]&lt;br /&gt;
             message=This will not be easy!&lt;br /&gt;
         [/message]&lt;br /&gt;
     [/else]&lt;br /&gt;
 [/if]&lt;br /&gt;
 [clear_variable]&lt;br /&gt;
     name=we&lt;br /&gt;
 [/clear_variable]&lt;br /&gt;
 [clear_variable]&lt;br /&gt;
     name=they&lt;br /&gt;
 [/clear_variable]&lt;br /&gt;
displays the messages&lt;br /&gt;
 We have 75 gold, they have 50 gold.&lt;br /&gt;
 This should be easy!&lt;br /&gt;
If side 2 had 100 gold instead, the same code would display the messages&lt;br /&gt;
 We have 75 gold, they have 100 gold.&lt;br /&gt;
 This will not be easy!&lt;br /&gt;
&lt;br /&gt;
The code&lt;br /&gt;
 [store_unit]&lt;br /&gt;
     [filter]&lt;br /&gt;
         canrecruit=yes&lt;br /&gt;
         side=1&lt;br /&gt;
     [/filter]&lt;br /&gt;
     variable=leader&lt;br /&gt;
 [/store_unit]&lt;br /&gt;
 [message]&lt;br /&gt;
     message=Our leader's first attack does $leader[0].attack[0].damage damage per hit.&lt;br /&gt;
 [/message]&lt;br /&gt;
 [clear_variable]&lt;br /&gt;
     name=leader&lt;br /&gt;
 [/clear_variable]&lt;br /&gt;
always displays a true sentence.&lt;br /&gt;
&lt;br /&gt;
You may find more complicated examples of variable use in the [[UsefulWMLFragments]] section.&lt;br /&gt;
&lt;br /&gt;
== Comments ==&lt;br /&gt;
&lt;br /&gt;
Comments are indicated by starting a line with a pound sign (&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt;). Unless the line forms a valid [[PreprocessorRef#Preprocessor_directives|preprocessor directive]], all text after the pound sign will be ignored by the WML engine.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[PreprocessorRef]]&lt;br /&gt;
* [[ConventionsWML]]&lt;br /&gt;
* [[SavefileWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Yiyuezhuo</name></author>
		
	</entry>
</feed>