Difference between revisions of "Category:Conditions"
m
Split "or" out into its own section
imported>Egocarib |
imported>Bug64 m (Split "or" out into its own section) |
||
Line 6: | Line 6: | ||
*[[:Category:Package_Templates#Procedure_Trees|Package Procedure Trees]] | *[[:Category:Package_Templates#Procedure_Trees|Package Procedure Trees]] | ||
*[[:Category:Procedures|Procedures]]</blockquote> | *[[:Category:Procedures|Procedures]]</blockquote> | ||
|<blockquote | |<blockquote>[[Magic_Effect|Magic Effects]]<br>[[Effect_Item|Effect List]] entries for: | ||
*[[Spell|Spells]] | *[[Spell|Spells]] | ||
*[[Enchantment|Enchantments]] | *[[Enchantment|Enchantments]] | ||
Line 37: | Line 37: | ||
*'''Subject:''' The actor owning the object. In the case of dialogue, it's whoever is saying it. In the case of quest targets, it's the player. In the case of Magic Effects and other [[Effect_Item | Effect Items]], it is the reference being targeted by the effect. | *'''Subject:''' The actor owning the object. In the case of dialogue, it's whoever is saying it. In the case of quest targets, it's the player. In the case of Magic Effects and other [[Effect_Item | Effect Items]], it is the reference being targeted by the effect. | ||
*'''Target:''' For dialogue, this is the actor being spoken to. For Packages, it's the actor/object specified as the target. | *'''Target:''' For dialogue, this is the actor being spoken to. For Packages, it's the actor/object specified as the target. Magic Effects and Effect Items, it is the reference being targeted by the effect. | ||
*'''Reference:''' A specific reference in the world. Use the Select button to find the reference. | *'''Reference:''' A specific reference in the world. Use the Select button to find the reference. | ||
*'''Combat Target:''' If the owning actor is in combat, it is his current combat target. For Magic Effects and Effect Items, it is the reference being targeted by the effect. | *'''Combat Target:''' If the owning actor is in combat, it is his current combat target. For Magic Effects and Effect Items, it is the reference being targeted by the effect. | ||
Line 46: | Line 46: | ||
===Swap Subject and Target=== | ===Swap Subject and Target=== | ||
The "Swap Subject and Target" flag is particularly useful for Magic Effects and Effect Items in the Effect Lists associated with Spells, Enchantments, and Scrolls. Condition functions attached to these types of objects that are Run On the '''Subject''', | The "Swap Subject and Target" flag is particularly useful for Magic Effects and Effect Items in the Effect Lists associated with Spells, Enchantments, and Scrolls. Condition functions attached to these types of objects that are Run On the '''Subject''', '''Target''', or '''Combat Target''' will all be checked only against the targeted reference. Ticking "Swap Subject and Target" and running the condition on the '''Subject''' will allow you to instead target ''the caster of the effect'' with your condition, assuming that there is a caster. | ||
Line 55: | Line 55: | ||
===Comparison and Value=== | ===Comparison and Value=== | ||
The "Comparison" dropdown list includes various logical operators that determine how the return value of the Condition Function should be compared against the provided "Value" to determine whether the condition item is true. For Condition Functions that would return a ''true'' or ''false'' value, setting the "Value" field to 1.00 will check whether the function is ''true'' and setting the "Value" to 0.00 will test whether the Condition Function is ''false''. | The "Comparison" dropdown list includes various logical operators that determine how the return value of the Condition Function should be compared against the provided "Value" to determine whether the condition item is true. For Condition Functions that would return a ''true'' or ''false'' value, setting the "Value" field to 1.00 will check whether the function is ''true'' and setting the "Value" to 0.00 will test whether the Condition Function is ''false''. | ||
The comparison "Value" is (by default) a text field where a numeric value can be entered by the user. However, if the '''Use Global''' checkbox below the "Value" field is checked, you will instead be able to choose any [[Globals|Global Variable]] from the dropdown list to be compared against the Condition Function's return value. | The comparison "Value" is (by default) a text field where a numeric value can be entered by the user. However, if the '''Use Global''' checkbox below the "Value" field is checked, you will instead be able to choose any [[Globals|Global Variable]] from the dropdown list to be compared against the Condition Function's return value. | ||
===Or=== | |||
By default, all Conditions are set to be run with an '''AND''' operator between themselves and the condition that follows them. The '''OR''' checkbox is used to override this behavior, and replace the operator following this condition with an '''OR''' instead. In the Condition List, consecutive '''OR'''s are treated like a single block when evaluating and have order precedence over '''AND'''. | By default, all Conditions are set to be run with an '''AND''' operator between themselves and the condition that follows them. The '''OR''' checkbox is used to override this behavior, and replace the operator following this condition with an '''OR''' instead. In the Condition List, consecutive '''OR'''s are treated like a single block when evaluating and have order precedence over '''AND'''. | ||
For example, the condition items: '''''A''''' AND '''''B''''' OR '''''C''''' AND '''''D''''' are evaluated as ( '''''A''''' AND ( '''''B''''' OR '''''C''''' ) AND '''''D''''' ) and ''not'' as ( ( '''''A''''' AND '''''B''''' ) OR ( '''''C''''' AND '''''D''''' ) ). | For example, the condition items: '''''A''''' AND '''''B''''' OR '''''C''''' AND '''''D''''' are evaluated as ( '''''A''''' AND ( '''''B''''' OR '''''C''''' ) AND '''''D''''' ) and ''not'' as ( ( '''''A''''' AND '''''B''''' ) OR ( '''''C''''' AND '''''D''''' ) ). | ||
== Complex Conditions == | == Complex Conditions == |