<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://datoolset.net/mw/index.php?action=history&amp;feed=atom&amp;title=Effect_keyword%2Fru</id>
		<title>Effect keyword/ru - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://datoolset.net/mw/index.php?action=history&amp;feed=atom&amp;title=Effect_keyword%2Fru"/>
		<link rel="alternate" type="text/html" href="https://datoolset.net/mw/index.php?title=Effect_keyword/ru&amp;action=history"/>
		<updated>2026-06-18T18:35:27Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.6</generator>

	<entry>
		<id>https://datoolset.net/mw/index.php?title=Effect_keyword/ru&amp;diff=17684&amp;oldid=prev</id>
		<title>Sunjammer: Created</title>
		<link rel="alternate" type="text/html" href="https://datoolset.net/mw/index.php?title=Effect_keyword/ru&amp;diff=17684&amp;oldid=prev"/>
				<updated>2011-10-23T12:27:58Z</updated>
		
		<summary type="html">&lt;p&gt;Created&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
The '''effect''' type represents a modifier that can be applied to a game object.&lt;br /&gt;
&lt;br /&gt;
== Constructor ==&lt;br /&gt;
&lt;br /&gt;
The [[Scripting terminology#constructor|constructor]] for an effect is the [[Effect]] function.&lt;br /&gt;
&lt;br /&gt;
== Literals ==&lt;br /&gt;
&lt;br /&gt;
There is no [[Scripting terminology#literal|literal]] for an effect.&lt;br /&gt;
&lt;br /&gt;
== Conversion ==&lt;br /&gt;
&lt;br /&gt;
There is no explicit or implicit conversion to or from an effect.&lt;br /&gt;
&lt;br /&gt;
== Persistence ==&lt;br /&gt;
&lt;br /&gt;
The following functions allow an effect to exist outside of the scope of the current script by storing it on an object:&lt;br /&gt;
&lt;br /&gt;
* [[SetLocalEffect]]&lt;br /&gt;
&lt;br /&gt;
The  following functions allow an effect which exists outside of the scope  of the current script to be used in the current script by retrieving it  from an object:&lt;br /&gt;
&lt;br /&gt;
* [[GetLocalEffect]]&lt;br /&gt;
    &lt;br /&gt;
== Remarks ==&lt;br /&gt;
&lt;br /&gt;
Every  effect has a type set on it that determines how it affects the object  it is applied to.  They also have a number of parameters on them, which  vary based on the type, that change the specific behaviour.&lt;br /&gt;
&lt;br /&gt;
When  the effect is removed (usually because the duration on the effect  expires) the modifier is removed.  These modifiers can be rule or stat  based or more complicated visual and game effects.&lt;br /&gt;
&lt;br /&gt;
They can be assigned different duration types which affect how they're applied and removed:&lt;br /&gt;
&lt;br /&gt;
# '''Temporary:''' Applied for a short duration (measured in seconds)&lt;br /&gt;
# '''Permanent:''' Applied until manually removed through scripting &lt;br /&gt;
# '''Instant:'''  These are one-shot modifiers that are not stored on the object (the death effect is an instant modifier for example)&lt;br /&gt;
# '''Equipped:''' Associated with an equipped item. The effect is removed when the item is unequipped.&lt;br /&gt;
&lt;br /&gt;
Some  effect types can only be applied as instant effects.  These effects  will delete themselves after they've been applied no matter what  duration type was set for them.  All other duration types will be stored  in a list on the object they're applied to.&lt;br /&gt;
&lt;br /&gt;
Effects are usually created and applied through the [[script|scripting language]].   The list of effects applied to an object can also be examined and  modified through scripting.  The game engine itself will apply some  instant effects when appropriate (like death or damage during combat).&lt;br /&gt;
&lt;br /&gt;
When an effect is applied through scripting, the designer has the option of specifying a sub-type  on it.  The subtype, which can be either &amp;quot;normal&amp;quot; or &amp;quot;magical&amp;quot;, affects  whether a &amp;quot;Dispel Magic&amp;quot; spell should clear the effect or not (Dispel  Magic is an instant effect type).  Magical effects are usually tagged  with the spell id that created it so that more rules checking can be  done when they're cleared.&lt;br /&gt;
&lt;br /&gt;
Some effects trigger [[Event (dascript type)|event]]s  to the object that they're applied to.  This is especially important  for hostile effects like damage or death.  Each effect is tagged with  the object id of the creator so that the target can react appropriately.   &lt;br /&gt;
&lt;br /&gt;
All stat modifiers stack with each other.  If an object has  two bonuses of the same type applied, they will get the full bonus from  each.&lt;br /&gt;
&lt;br /&gt;
When a game is reloaded, all the effects on an object are re-applied  but with a special &amp;quot;loading&amp;quot; flag turned on.  Most effects will see  this and do nothing, since the object they're applying themselves to has  already had the modifiers applied.  A few effects will need to re-apply themselves if their effect is not easily saved.&lt;br /&gt;
&lt;br /&gt;
Packages  of effects can be constructed by &amp;quot;linking&amp;quot; them in the scripting  language before they're applied.  Any effects that are linked together  will be given the same unique id when they're applied.  If any effect in  this group is then removed, either through expiry or scripting, then  the entire group will go with them. This is most often used to tie a  visual effect to a stat modifier.  When the modifier expires the visual  effect will disappear.&lt;br /&gt;
&lt;br /&gt;
Effects are applied internally by  signalling an &amp;quot;apply effect&amp;quot; event with pointer to the effect attached.   They are usually removed in the same way because you don't know what  else is linked to that effect and what dispelling them will do to the  object.&lt;br /&gt;
&lt;br /&gt;
The check to see if an effect has expired is done as part  of an object's AI Update.  Some effect types also have timers that are  checked here to see if they need to be given an update (used for  regeneration type effects).&lt;br /&gt;
&lt;br /&gt;
Party members will have a series of  &amp;quot;effect icons&amp;quot; that appear on their character sheets so that the player  can see what effects are on them.  These icons will be controlled by a  special &amp;quot;Effect Icon&amp;quot; effect that will be linked to the spell's effects  and managed by the scripter.&lt;br /&gt;
&lt;br /&gt;
=== Effect Behaviour ===&lt;br /&gt;
&lt;br /&gt;
Behaviour  for effects can be defined in either the engine or in scripting.  When  an effect is applied or removed, the game will check for a defined  handler for that effect type.  If none exists, then the object will  receive an event to their script with the effect attached.&lt;br /&gt;
&lt;br /&gt;
To access the effect in an onApply or onRemove event, use the &amp;lt;code&amp;gt;effect GetCurrentEffect()&amp;lt;/code&amp;gt;  scripting command.  The properties on this effect can be examined to  determine type, duration and other parameters.  If your script handles  the effect properly and you want it to be stored (so that you get the  onRemove event later) you need to call the special &amp;lt;code&amp;gt;void SetIsCurrentEffectValid(int nValid)&amp;lt;/code&amp;gt; function.  This will add it to the effect list on that object.&lt;br /&gt;
&lt;br /&gt;
Effects will usually be handled by the core scripts rather than by an object's AI script.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;dascript&amp;gt;&lt;br /&gt;
void main()&lt;br /&gt;
{&lt;br /&gt;
    // uninitialised&lt;br /&gt;
    effect eDefault;&lt;br /&gt;
 &lt;br /&gt;
    // initialised using the constructor&lt;br /&gt;
    effect eEmpty = Effect();&lt;br /&gt;
&lt;br /&gt;
    // initialised using damage effect function &lt;br /&gt;
    effect eDamage = EffectDamage(42.0);    &lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/dascript&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[IsEffectValid]], &lt;br /&gt;
&lt;br /&gt;
[[Category:Keywords]]&lt;br /&gt;
[[Category:Effects]]&lt;br /&gt;
[[Category:Требуется перевод]]&lt;/div&gt;</summary>
		<author><name>Sunjammer</name></author>	</entry>

	</feed>