<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tengen</id>
	<title>The Battle for Wesnoth Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wesnoth.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tengen"/>
	<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/Special:Contributions/Tengen"/>
	<updated>2026-11-04T19:19:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.wesnoth.org/index.php?title=EffectWML&amp;diff=16373</id>
		<title>EffectWML</title>
		<link rel="alternate" type="text/html" href="https://wiki.wesnoth.org/index.php?title=EffectWML&amp;diff=16373"/>
		<updated>2007-07-07T18:19:25Z</updated>

		<summary type="html">&lt;p&gt;Tengen: /* the [effect] tag */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{WML Tags}}&lt;br /&gt;
== the [effect] tag ==&lt;br /&gt;
&lt;br /&gt;
The tag [effect] is used to describe one modification to a unit.&lt;br /&gt;
Any number of [effect] tags can be used to describe a complete&lt;br /&gt;
modification.&lt;br /&gt;
Modifications are permanent changes to a unit;&lt;br /&gt;
currently there is no way of removing a modification.&lt;br /&gt;
&lt;br /&gt;
The following keys are always recognized for [effect]:&lt;br /&gt;
* &#039;&#039;unit_type&#039;&#039; only apply this effect if the affected unit&#039;s type name matches &#039;&#039;unit_type&#039;&#039; (can be a list of types).&lt;br /&gt;
* &#039;&#039;apply_to&#039;&#039; describes what the effect actually affects.&lt;br /&gt;
[effect] uses different keys depending on the value of &#039;&#039;apply_to&#039;&#039;.  &#039;&#039;apply_to&#039;&#039; can take the following values:&lt;br /&gt;
* &amp;quot;new_attack&amp;quot; will use all other keys and tags as the description of an attack that will be added to the unit. See [[AttackWML]].&lt;br /&gt;
* &#039;&#039;remove_attacks&#039;&#039; {{DevFeature}} remove the matching attacks. All tags from the attack filter construct will be used to match the attack; see [[FilterWML]]. Notes: do not use a [filter] tag. Also, the last remaining attack will never be removed (since Wesnoth don&#039;t support it).&lt;br /&gt;
* &amp;quot;attack&amp;quot; find an attack and modify it.  All tags from the attack filter construct will be used to match the attack; see [[FilterWML]].  After that, the following keys and tags can be used to modify the attack.  Note: do not use a [filter] tag.  Just put the keys you want to filter on inside the [effect] tag.&lt;br /&gt;
** &#039;&#039;set_name&#039;&#039; change the attack&#039;s name (ie identifier). ({{DevFeature}} this doesn&#039;t change the weapon&#039;s description like in 1.2)&lt;br /&gt;
** &#039;&#039;set_description&#039;&#039; {{DevFeature}} change the attack&#039;s description (ie displayed name). &lt;br /&gt;
** &#039;&#039;set_type&#039;&#039; change the attack type. Values are &#039;blade&#039;, &#039;pierce&#039;, &#039;impact&#039;, &#039;fire&#039;, &#039;cold&#039;, and &#039;holy&#039;.&lt;br /&gt;
** &#039;&#039;set_special&#039;&#039; change the attack&#039;s specials. See [[AbilitiesWML]] for a list of possible values. Note that you can only set the normal specials defined in &#039;&#039;data/abilities.cfg&#039;&#039;, not custom ones.&lt;br /&gt;
** &#039;&#039;[set_specials]&#039;&#039; {{DevFeature}} change the attack&#039;s specials. The specials to add are given exactly as in the [specials] tag.&lt;br /&gt;
*** &#039;&#039;mode&#039;&#039; if &#039;&#039;append&#039;&#039;, adds the given specials to the attack. If &#039;&#039;replace&#039;&#039;, replaces the existing specials with the given ones. Default &#039;&#039;replace&#039;&#039;.&lt;br /&gt;
** &#039;&#039;remove_specials&#039;&#039; {{DevFeature}} remove the listed specials. The value of this key is the coma-separated list of the id of the specials to remove. This key is always evaluated before a [set_specials] tags in the same [effect]&lt;br /&gt;
** &#039;&#039;increase_damage&#039;&#039; increases the attack&#039;s damage.  This can be positive or negative, so you can use it to decrease damage as well.  If it ends in a percent(&#039;&#039;&#039;&#039;%&#039;&#039;&#039;&#039;), the change in damage will be a percentage ratio of the attack&#039;s original damage.&lt;br /&gt;
** &#039;&#039;increase_attacks&#039;&#039; increases the number of attack strikes. Like &#039;&#039;increase_damage&#039;&#039;, it can be positive or negative, or a percentage.&lt;br /&gt;
** &#039;&#039;attack_weight&#039;&#039; change the attack&#039;s attack_weight. See [[AttackWML]] for explainations about attack_weight.&lt;br /&gt;
** &#039;&#039;defense_weight&#039;&#039; change the attack&#039;s defense_weight. See [[AttackWML]] for explainations about defense_weight.&lt;br /&gt;
* &amp;quot;hitpoints&amp;quot; modifies the unit&#039;s HP and/or max HP.&lt;br /&gt;
** &#039;&#039;increase&#039;&#039; the amount to increase the unit&#039;s HP.&lt;br /&gt;
** &#039;&#039;heal_full&#039;&#039; if present  and not set to &amp;quot;no&amp;quot; the unit will be put back to full HP.&lt;br /&gt;
** &#039;&#039;increase_total&#039;&#039; will increase the total HP of the unit.  Can be specified either as a negative or a positive value.  It can also be specified as a percentage of the current total; i.e. &amp;quot;-50%&amp;quot; will cut max HP in half.&lt;br /&gt;
** &#039;&#039;violate_maximum&#039;&#039; it the unit ends up with more than its max HP after these modifications, and this key is present (set to any non-null value, ex. &#039;yes&#039;), the unit&#039;s HP won&#039;t be lowered to its max HP.&lt;br /&gt;
* &amp;quot;movement&amp;quot; modifies the unit&#039;s movement points.&lt;br /&gt;
** &#039;&#039;increase&#039;&#039; maximum movement is increased by this amount. It can be positive, negative, or specified as a percentage.&lt;br /&gt;
** &#039;&#039;set&#039;&#039; maximum movement is set to a specific value.&lt;br /&gt;
* &amp;quot;max_experience&amp;quot; affects the amount of XP the unit needs for the next level.&lt;br /&gt;
** &#039;&#039;increase&#039;&#039; how to change the xp; again it can be negative, positive or a percentage.&lt;br /&gt;
* &amp;quot;loyal&amp;quot; no keys associated. The affected unit will be loyal i.e have an upkeep of 0.&lt;br /&gt;
* &amp;quot;movement_costs&amp;quot; speed through specific terrain is modified&lt;br /&gt;
** &#039;&#039;replace&#039;&#039; If set to &amp;quot;true&amp;quot;, any new values replace the old ones. Otherwise, new values are added to old values (negative values allowed).&lt;br /&gt;
** [set_specials]&lt;br /&gt;
** [movement_costs] a subtag that describes the new movement costs just like in [[UnitWML]] for describing a unit type&lt;br /&gt;
* &amp;quot;defense&amp;quot; Sets unit chance to be hit in specific terrain (100 - defense value)&lt;br /&gt;
** &#039;&#039;replace&#039;&#039; If set to &amp;quot;true&amp;quot;, any new values replace the old ones. Otherwise, new values are added to old values (negative values allowed).&lt;br /&gt;
** [defense] a subtag that describes the new defense just like in [[UnitWML]] for describing a unit type&lt;br /&gt;
* &amp;quot;resistance&amp;quot; Sets percent damage taken from combat&lt;br /&gt;
** &#039;&#039;replace&#039;&#039; If set to &amp;quot;true&amp;quot;, any new values replace the old ones. Otherwise, new values are added to old values (negative values allowed).&lt;br /&gt;
** [resistance] a subtag that describes the new resistance just like in [[UnitWML]] for describing a unit type&lt;br /&gt;
* &amp;quot;variation&amp;quot; switches the unit into one of its variations.&lt;br /&gt;
** &#039;&#039;name&#039;&#039; the name of the variation to invoke.&lt;br /&gt;
* &amp;quot;status&amp;quot; modifies the status affecting the unit.&lt;br /&gt;
** &#039;&#039;add&#039;&#039; a list of status modifications to add. Beware, these may be reapplied later, such as when the unit is recalled or levels up; if in an event, you can use [[InternalActionsWML|[store_unit]]] and [[DirectActionsWML|[unstore_unit]]], modifying unit.status.name directly, to avoid this, or if you are creating the unit, you can just add it to the unit&#039;s [status] tag in the [unit] tag.  These are listed in [status], [[SingleUnitWML]].&lt;br /&gt;
** &#039;&#039;remove&#039;&#039; a list of status modifications to remove.&lt;br /&gt;
* &#039;&#039;zoc&#039;&#039; {{DevFeature}} toggle the zone of control.&lt;br /&gt;
** &#039;&#039;value&#039;&#039; new value for zoc (0=disable, other=enable).&lt;br /&gt;
* &#039;&#039;profile&#039;&#039; {{DevFeature}} customize the profile for this unit type&lt;br /&gt;
** &#039;&#039;portrait&#039;&#039; new image to display when the unit speaks&lt;br /&gt;
** &#039;&#039;description&#039;&#039; sets the text to display when hovering over the unit&#039;s type in the righthand pane&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[UnitWML]]&lt;br /&gt;
* [[AttackWML]]&lt;br /&gt;
* [[ReferenceWML]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: WML Reference]]&lt;/div&gt;</summary>
		<author><name>Tengen</name></author>
	</entry>
</feed>