{"id":2526,"date":"2014-03-16T18:55:12","date_gmt":"2014-03-16T23:55:12","guid":{"rendered":"http:\/\/www.himeworks.com\/?p=2526"},"modified":"2014-10-16T10:10:26","modified_gmt":"2014-10-16T15:10:26","slug":"conditional-effects","status":"publish","type":"post","link":"https:\/\/himeworks.com\/2014\/03\/conditional-effects\/","title":{"rendered":"Conditional Effects"},"content":{"rendered":"<p><a href=\"http:\/\/www.himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects1.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"size-full wp-image-2525 aligncenter\" src=\"http:\/\/www.himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects1.jpg\" alt=\"conditionalEffects1\" width=\"620\" height=\"262\" srcset=\"https:\/\/himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects1.jpg 620w, https:\/\/himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects1-300x126.jpg 300w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/a><\/p>\n<p>This script allows you to assign custom conditions to skill or item effects.<br \/>\nEffects are only executed if they meet the conditions.<\/p>\n<p>Conditions are specified as a formula, so you can create any condition that\u00a0you can think of as long as you can write it.<\/p>\n<h2 style=\"text-align: center;\"><!--more-->Download<\/h2>\n<p>Script: <a href=\"http:\/\/himeworks.com\/redirect.php?type=script&amp;name=Conditional_Effects\" target=\"_blank\">download here<\/a><\/p>\n<h2 style=\"text-align: center;\">Installation<\/h2>\n<p>Place this script below Materials and above Main<\/p>\n<h2 style=\"text-align: center;\">Usage<\/h2>\n<p>To specify a condition for an effect, note-tag skills or items with<\/p>\n<pre>&lt;effect condition: ID&gt;\n  FORMULA\n&lt;\/effect condition&gt;<\/pre>\n<p>Where the ID is the ID of the effect that you want to assign the condition to.<br \/>\nYou can determine an effect&#8217;s ID by counting their position on the list,<br \/>\nso the first effect has ID 1, second effect has ID 2, and so on.<\/p>\n<p><a href=\"http:\/\/www.himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2527\" src=\"http:\/\/www.himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects2.jpg\" alt=\"conditionalEffects2\" width=\"342\" height=\"254\" srcset=\"https:\/\/himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects2.jpg 342w, https:\/\/himeworks.com\/blog\/wp-content\/uploads\/2014\/03\/conditionalEffects2-300x222.jpg 300w\" sizes=\"(max-width: 342px) 100vw, 342px\" \/><\/a><\/p>\n<p>As a shortcut, you can assign a condition to multiple effects by specifying<br \/>\nmultiple ID&#8217;s separated by commas like this<\/p>\n<pre>&lt;effect condition: 1,2,3&gt;\n  FORMULA\n&lt;\/effect condition&gt;<\/pre>\n<p>The formula can be anything that returns true or false.<br \/>\nThe following formula variables are available<\/p>\n<pre>a - user of the action\nb - target of the action\ni - item used\nt - game troop\np - game party\ns - game switches\nv - game variables<\/pre>\n<p>The formula is evaluated within the context of the effect, so any of the<br \/>\neffect&#8217;s attributes can be referenced as well (eg: data_id, code)<\/p>\n<h2 style=\"text-align: center;\">Notes<\/h2>\n<p>Common events are not subject to conditions, because they are handled differently. If you require conditions for your common events, you can use <a title=\"Formula Effects\" href=\"http:\/\/www.himeworks.com\/2014\/02\/formula-effects\/\">Formula Effects <\/a>and then call the common event using that<\/p>\n<pre>$game_temp.reserve_common_event(ID)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This script allows you to assign custom conditions to skill or item effects. Effects are only executed if they meet the conditions. Conditions are specified as a formula, so you can create any condition&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2527,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":""},"categories":[20,22,4,7],"tags":[],"_links":{"self":[{"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/posts\/2526"}],"collection":[{"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/comments?post=2526"}],"version-history":[{"count":0,"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/posts\/2526\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/media\/2527"}],"wp:attachment":[{"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/media?parent=2526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/categories?post=2526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/himeworks.com\/wp-json\/wp\/v2\/tags?post=2526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}