RPG Maker MV
DoubleX RMMV Item Triggers
Introduction
Sets some items to trigger some actions when conditions are met
Features
Notetag
* # Skill/Item Notetags: * 1. <timing item trigger: ITCX, ITAX> * - Sets a skill/item to trigger ITAX when timing and ITCX are met * - timing can be pre, post or custom timings set by you * - preBattle means right before using the skill/item in battles * - postBattle means right after using the skill/item in battles * - preMap means right before using the skill/item outside battles * - postMap means right after using the skill/item outside battles * - timing must only consist of alphanumeric characters * - ITCX can be set in Item Trigger Condition Functions * - ITAX can be set in Item Trigger Action Functions
Plugin Calls
* # Configuration manipulations * 1. DoubleX_RMMV.Item_Triggers.prop * - Returns the property prop under DoubleX_RMMV.Item_Triggers * 2. DoubleX_RMMV.Item_Triggers.prop = function * - Sets the property prop under DoubleX_RMMV.Item_Triggers as * function which will be bound to the battler upon use * - No DoubleX_RMMV.Item_Triggers.prop change will be saved * # Item manipulations * All meta.itemTriggers changes can be saved if * DoubleX RMMV Dynamic Data is used * 1. meta.itemTriggers[timing] * - Returns the array of all ITCX-ITAX pairs of timing timing * 2. meta.itemTriggers[timing] = [[ITCX, ITAX], [ITCX, ITAX], ...] * - Adds a new timing with some ITCX-ITAX pairs or overwrites all the * existing ones with those pairs if timing is an existing timing * 3. meta.itemTriggers[timing][i] = [ITCX, ITAX] * - Set the ith ITCX-ITAX pair as the new ITCX-ITAX pair * # Battler manipulations * 1. GBB.execItemTriggers.call(battler, item, timing) * - Executes all item triggers with timing timing of item of battler * battler * - GBB is DoubleX_RMMV.Item_Triggers.Game_BattlerBase
Configurations
/*------------------------------------------------------------------------ * Item Trigger Condition Functions * - Setups ITCX used by <timing item trigger: ITCX, ITAX> *------------------------------------------------------------------------*/ /* ITCX are used at: 1. DoubleX_RMMV.Item_Triggers.Game_BattlerBase - if (IT[trigger[0]].call(this)) { IT[trigger[1]].call(this); } in - execItemTriggers ITCX are Javascript functions which will be bound to the battler upon use ITCX names can only use alphanumeric characters item is the skill/item using the ITCX The below ITCX are examples added to help you set your ITCX You can freely use, rewrite and/or delete these examples */ // Sets the item trigger condition as always true ITC1: function(item) { return true; }, // Sets the item trigger condition as needing switch with id x to be on ITC2: function(item) { return $gameSwitches.value(x); }, // Adds new ITCX here /*------------------------------------------------------------------------ * Item Trigger Action Values * - Setups ITAX used by <timing item trigger: ITCX, ITAX> *------------------------------------------------------------------------*/ /* ITAX are used at: 1. DoubleX_RMMV.Item_Triggers.Game_BattlerBase - if (IT[trigger[0]].call(this)) { IT[trigger[1]].call(this); } in - execItemTriggers ITAX are Javascript functions which will be bound to the battler upon use ITAX names can only use alphanumeric characters item is the skill/item using the ITAX The below ITAX are examples added to help you set your ITAX You can freely use, rewrite and/or delete these examples */ // Sets the item trigger action as what Special Effect Escape does ITA1: function(item) { this.hide(); }, // Sets the item trigger action as setting the battler's hp to full ITA2: function(item) { this._hp = this.mhp; }, // Adds new ITAX here
The Code
License Terms
Attribution 3.0 Unported - You must attribute the work in the manner specified by the author or licensor. Commerical use allowed.
Version History
* v1.01a(GMT 1300 26-2-2016): * 1. ITCX and ITAX take the skill/item using them as an argument as well * v1.00b(GMT 1400 27-1-2016): * 1. Fixed calling current action via battler function upon action end * v1.00a(GMT 1500 17-12-2015): * 1. 1st version of this plugin finished
Credits & Thanks
DoubleX(Optional)
Terms & Conditions
* You shall keep this plugin's Plugin Info part's contents intact * You shalln't claim that this plugin's written by anyone other than * DoubleX or his aliases * None of the above applies to DoubleX or his aliases
Comments (2)
Leave a Reply
You must be logged in to post a comment.
DoubleX
[b]Updates[/b]
[code] * v1.00b(GMT 1400 27-1-2016):
* 1. Fixed calling current action via battler function upon action end [/code]
DoubleX
[b]Updates[/b]
[code] * v1.01a(GMT 1300 26-2-2016):
* 1. ITCX and ITAX take the skill/item using them as an argument as well[/code]