RPG Maker MV
DoubleX RMMV Unison Item
Introduction
Lets you set some skills/items needing mutiple battlers to use
Features
DoubleX RMMV Unison Item Default
DoubleX RMMV Unison Item YEP_X_BattleSysCTB
DoubleX RMMV Unison Item YEP_X_BattleSysATB
Introduction
* In the default RMMV battle system, no skill/item needs more than 1 * battlers to use * With this plugin, you can set some skills/items to be unison ones * needing more than 1 battlers to use them * Unison battlers are those needed to use the unison skill/item * Unison invoker is the battler actually selecting and invoking the * unison skill/item * Unison invokees are all unison battlers besides the unison invoker * There can only be 1 unison invoker for each selected unison skill/item * - (v1.02a+)A synchronous unison skill/item is one without any * <async unison item> notetag * - (v1.02a+)An asynchronous unison skill/item is one with at least 1 * <async unison item> notetags
Parameters
* @param showAllUnisonBattlers * @desc Sets if the battlelog will show all unison battlers instead of only * the unison invoker * @default true * * @param unisonFunctionRule * @desc Sets the string of the rule used for setting the user's functions in * the damage formula of the unison skill/item by using those of all * unison battlers * It'll only be used for those functions not having their unison rules * It must be implemented by function RULES, which must be edited by * opening the plugin js file directly * @default avg
Notetags
* # Skill/Item Notetags: * 1. <unison item actors: ids> * - Sets the list of id of actors needed for the skill/item as ids * , is used to separate the actor id in ids * E.g.: * <unison item actors: 1> means actor with id 1 is needed to use it * <unison item actors: 4, 2> means actors with id 4 and 2 are * needed to use it * - All actors included in ids needs to be inputable, able to use the * skills/item and pay its cost * - All unison actors will pay the unison skill costs after using it * - Only actors included in ids can select the skill/item * - If ids only contains 1 actor id, this notetag will become only * letting the actor with that actor id to use the skill/item * 2. <unison item function rule: rule> * - Sets the rule of setting user's function in the skill/item's * damage formula as rule which is implemented by function * RULES, which must be edited by opening this plugin js file * directly * - function must be a battler function name included in * FUNCTIONS, which must be edited by opening this plugin js file * directly * 3. <unison item function actors: ids> * - Sets user's function in the skill/item's damage formula to use * its unison item rule to combine those of actors with id included * in ids * E.g.: * <unison item atk actors: 1> means the user's atk in its damage * formula uses that of actor with id 1 under the skill/item's * unison rule applied to atk * <unison item mat actors: 4, 2> means the user's mat in its damage * formula uses those of actors with id 4 and 2 under the * skill/item's unison rule applied to mat * - function must be a battler function name included in * FUNCTIONS, which must be edited by opening this plugin js file * directly * 4. (v1.01a+)<unison item actor mp cost: costs> * - Sets the list of mp costs needed for each of the corresponding id * of the unison actor in <unison item actors: ids> * , is used to separate the mp costs in ids * E.g.: * If <unison item actors: 1> is used, then * <unison item actor mp cost: 5> means actor with id 1 needs to pay * the 5 mp cost for using the unison skill/item * If <unison item actors: 4, 2> is used, then * <unison item actor mp cost: 5, 10> means actor with id 4 and 2 * need to pay the 5 and 10 mp cost respectively for using the * unison skill/item * If <unison item actors: 4, 2> is used, then * <unison item actor mp cost: 5> means actor with id 4 needs to pay * the 5 mp cost while that with id 2 needs to pay the default * skill/item mp cost for using the unison skill/item * - MCR will be applied to the mp costs for all unison actors * 5. (v1.01a+)<unison item actor tp cost: costs> * - Sets the list of tp costs needed for each of the corresponding id * of the unison actor in <unison item actors: ids> * , is used to separate the tp costs in ids * E.g.: * If <unison item actors: 1> is used, then * <unison item actor tp cost: 5> means actor with id 1 needs to pay * the 5 tp cost for using the unison skill/item * If <unison item actors: 4, 2> is used, then * <unison item actor tp cost: 5, 10> means actor with id 4 and 2 * need to pay the 5 and 10 tp cost respectively for using the * unison skill/item * If <unison item actors: 4, 2> is used, then * <unison item actor tp cost: 5> means actor with id 4 needs to pay * the 5 tp cost while that with id 2 needs to pay the default * skill/item tp cost for using the unison skill/item * 6. (v1.02a+)<unison item actor learn: flags> * - Sets the list of skill learn requirement flags for each of the * corresponding id of the unison actor in <unison item actors: ids> * , is used to separate the skill learn requirement flags * Flag can be either t or f, meaning true or false respectively * The default unison skill learn requirement is true * This notetag only works on skills and has no effects on items * E.g.: * If <unison item actors: 1> is used, then * <unison item actor skill learn: t> means actor with id 1 needs to * learn the skill in order to use it * If <unison item actors: 4, 2> is used, then * <unison item actor skill learn: t, f> means actor with id 4 needs * to learn the skill in order to use it while actor with id 2 * doesn't need to * If <unison item actors: 4, 2> is used, then * <unison item actor skill learn: f> means actor with id 4 doesn't * need to learn the skill in order to use it while actor with id 2 * needs to due to the default unison skill learn requirement * 7. (v1.02a+)<async unison item> * - Sets the unison skill/item to be inputable when any battler * needed for that skill/item is inputable * - That skill/item and all battlers inputted it will wait for all * battlers needed for that skill/item to input it in order for them * to execute it altogether * - This notetag will be ignored in the default RMMV battle system * and all unison skills/items will be synchronous ones * - This notetag will be ignored in ATB systems that will always wait * when there are inputable actors and all unison skills/items will * be asynchronous ones * 8. (v1.03a+)<unison item actor function drain: weights> * - Sets user's drained hp/mp/etc for skills/items draining hp/mp/etc * to use redistribute the drained hp/mp/etc to all those of actors * with id included in ids in <unison item actors: ids> * - function must be a battler getter name * - The redistribution amount to each actor is the minimum value of * the corresponding weight / sum of weights and the difference * between the hp and the mhp * - If the sum of weights is 0, then no actor will receive any amount * of the drained hp/mp/etc * - All the undistributed drained hp/mp/etc will be taken by the * unison invoker, and any amount left by the unison invoker will be * lost * E.g.: * If <unison item actors: 1> is used, then * <unison item actor hp drain: 0> means actor with id 1 won't * receive any drained hp from skills/items draining hp * If <unison item actors: 4, 2> is used, then * <unison item actor mp drain: 1, 2> means actor with id 4 and 2 * will receive 1/3 and 2/3 of the drained mp from skills/items * draining mp respectively * If <unison item actors: 4, 2> is used, then * <unison item actor mp cost: 1> means actor with id 4 and 2 will * receive 100% and 0% of the drained mp from skills/items draining * mp respectively
Plugin Calls
* # Configuration manipulations * 1. DoubleX_RMMV.Unison_Item.prop * - Returns the property prop under DoubleX_RMMV.Unison_Item * 2. DoubleX_RMMV.Unison_Item.prop = val * - Sets the property prop under DoubleX_RMMV.Unison_Item as val * - No DoubleX_RMMV.Unison_Item.prop change will be saved * 3. $gameSystem.unisonItem.param * - Returns the value of param listed in the plugin manager * 4. $gameSystem.unisonItem.param = val * - Sets the value of param listed in the plugin manager as val * - All $gameSystem.unisonItem.param changes will be saved * # Skill/Item manipulations * 1. meta.unisonItemActors * - Returns the Array of ids of actors needed to use this skill/item * 2. meta.unisonItemActors = [id, id, ...] * - Sets the Array of ids of actors needed to use this skill/item * - All meta.unisonItemActors changes can be saved if * DoubleX RMMV Dynamic Data is used * 3. meta.unisonItemRules[functionName] * - Returns the unison item rule as String for function with name * functionName as a String * 4. meta.unisonItemRules[functionName] = rule * - Sets the unison item rule for function with name functionName as * String as String rule, which must be implemented by * RULES, which must be edited by opening this plugin js file * directly * - function with name functionName must be included in * FUNCTIONS, which must be edited by opening this plugin js file * directly * - All meta.unisonItemRules changes can be saved if * DoubleX RMMV Dynamic Data is used * 5. meta.unisonItemFunctionActors[functionName] * - Returns the Array of ids of actors included for combining their * function functionName as String using its unison item rule * 6. meta.unisonItemFunctionActors[functionName] = [id, id, ...] * - Sets the Array of ids of actors included for combining their * function functionName as String using its unison item rule * - function with name functionName must be included in * FUNCTIONS, which must be edited by opening this plugin js file * directly * - All meta.unisonItemFunctionActors changes can be saved if * DoubleX RMMV Dynamic Data is used * 7. (v1.01a+)meta.unisonItemActorMpCosts * - Returns the Array of mp costs each needed by its corresponding * actor with id in meta.unisonItemActors to use this skill/item * 8. (v1.01a+)meta.unisonItemActorMpCosts = [cost, cost, ...] * - Sets the Array of of mp costs each needed by its corresponding * actor with id in meta.unisonItemActors to use this skill/item * - All meta.unisonItemActorMpCosts changes can be saved if * DoubleX RMMV Dynamic Data is used * 9. (v1.01a+)meta.unisonItemActorTpCosts * - Returns the Array of tp costs each needed by its corresponding * actor with id in meta.unisonItemActors to use this skill/item * 10. (v1.01a+)meta.unisonItemActorTpCosts = [cost, cost, ...] * - Sets the Array of of tp costs each needed by its corresponding * actor with id in meta.unisonItemActors to use this skill/item * - All meta.unisonItemActorTpCosts changes can be saved if * DoubleX RMMV Dynamic Data is used * 11. (v1.02a+)meta.unisonItemActorLearn * - Returns the Array of skill learn requirement flags for each * corresponding actor with id in meta.unisonItemActors to use this * skill/item * 12. (v1.02a+)meta.unisonItemActorLearn = [cost, cost, ...] * - Sets the Array of skill requirement flags for each corresponding * actor with id in meta.unisonItemActors to use this skill/item * - All meta.unisonItemActorTpCosts changes can be saved if * DoubleX RMMV Dynamic Data is used * 13. (v1.02a+)meta.asyncUnisonItem * - Returns whether the unison skill/item is an asynchronous one * 14. (v1.02a+)meta.asyncUnisonItem = boolean * - Sets the unison skill/item to be an asynchronous one if boolean * is true and a synchronous one if otherwise * 15. (v1.03a+)meta.unisonItemActorFunctionDrain[functionName] * - Returns the Array of weights for actors included in the * corresponding meta.unisonItemActors for redistributing the * drained function functionName as String from skills/items * draining functionName to all those actors * 16. (v1.03a+)meta.unisonItemActorFunctionDrain[functionName] = [w, ..] * - Sets the Array of weights for actors included in the * corresponding meta.unisonItemActors for redistributing the * drained function functionName as String from skills/items * draining functionName to all those actors * - function with name functionName must be a battler getter name * - All meta.unisonItemActorFunctionDrain changes can be saved if * DoubleX RMMV Dynamic Data is used
Configurations
/* Implements the unison item function rules * The unison item function rule can be referenced by rule * The Array of unison item function value of all unison battlers can be * referneced by vals * RULES will be bound to the unison invoker upon use * It must return a Number */ RULES: function(rule, vals) { if (rule === "min") { return vals.sort(function(a, b) { return a - b; })[0]; } else if (rule === "avg") { return vals.reduce(function(a, b) { return a + b; }) / vals.length; } else if (rule === "max") { return vals.sort(function(a, b) { return b - a; })[0]; } console.log("The unison item rule " + rule + " isn't implemented"); return 0; }, /* Sets the battler functions using the unison item rules * Its property names must be the class of the battler functions * Its values must be those battler functions as Strings * All the included battler functions will be extended */ FUNCTIONS: { /* General form: * class: [ * "battler function name", * "battler function name", * "battler function name", * ..., * "battler function name" * ] */ Game_BattlerBase: [ "param", "xparam", "sparam" // Adds new battler function names here ] // Adds new classes here }
Video
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.
Instructions
* 1. To use this plugin with the default battle system, place * DoubleX RMMV Unison Item Default below this plugin * 2. To use this plugin with YEP_X_BattleSysCTB, place * DoubleX RMMV Unison Item YEP_X_BattleSysCTB below * DoubleX RMMV Unison Item Default, which should be placed below this * plugin * 3. To use this plugin with YEP_X_BattleSysATB, place * DoubleX RMMV Unison Item YEP_X_BattleSysATB below * DoubleX RMMV Unison Item Default, which should be placed below this * plugin
Version History
* DoubleX RMMV Unison Item YEP_X_BattleSysATB: * v1.00a(GMT 0600 21-5-2016): * 1. 1st version of this plugin finished * DoubleX RMMV Unison Item YEP_X_BattleSysCTB: * v1.00c(GMT 0600 21-5-2016): * 1. Fixed BattleManager.asyncUnisonItems not using unique key * 2. Fixed not clearing actors in BattleManager.asyncUnisonItems * v1.00b(GMT 1300 14-5-2016): * 1. In sync with the latest version of DoubleX RMMV Unison Item Config * v1.00a(GMT 1500 28-2-2016): * 1. 1st version of this plugin finished * 2. Unison skills/items needing charging might be executed immediately * and/or cause the action order queue to be incorrect and/or outdated * DoubleX RMMV Unison Item Default: * v1.00g(GMT 0300 5-6-2016): * 1. Fixed a bug where game crashes when accessing equips in item menu * v1.00f(GMT 1300 14-5-2016): * 1. Fixed a bug where unison items can have unison invokees with no * empty action slots * 2. In sync with the latest version of this plugin * v1.00e(GMT 1500 30-1-2016): * 1. Fixed not passing this to canUseUnisonSkill and canUseUnisonItem * 2. Fixed not checking if item exist first in canUse bug * 3. Fixed unison invoker might not have the smallest party member index * v1.00d(GMT 1100 4-1-2016): * 1. Fixed all unison item being unusable due to typo bug * 2. Added plugin description and author name in the plugin manager * v1.00c(GMT 0100 1-1-2016): * 1. Fixed undefined SceneManager.scene by using $gameParty.inBattle() * v1.00b(GMT 0300 26-12-2015): * 1. Fixed unison skills/items not usable outside battles bug * 2. Simplified the unison skill usability checks * v1.00a(GMT 1400 25-12-2015): * 1. 1st version of this plugin finished * This plugin: * v1.03a(GMT 0500 23-7-2016): * 1. Added <unison item actor function drain: weights> * v1.02a(GMT 1300 14-5-2016): * 1. Added <unison item actor learn: flags> and <async unison item> * v1.01b(GMT 1300 17-3-2016): * 1. Fixed undefined uIFAs[RegExp.$1] in DM.loadItemNotes bug * 2. Fixed incorrect unison battler stat when using unison rules bug * v1.01a(GMT 1400 15-3-2016): * 1. Added <unison item actor mp cost: ids> and * <unison item actor tp cost: ids> * v1.00f(GMT 1000 28-2-2016): * 1. Fixed unison invokees not stepping forward when executing actions * v1.00e(GMT 1500 30-1-2016): * 1. Fixed not returning value in makeDamageValue bug * 2. Fixed not showing unison item names in the battle log window bug * 3. Fixed enemy using actor unison item showing unison actor names bug * v1.00d(GMT 0200 3-1-2016): * 1. FUNCTIONS now store all battler functions instead of merely getters * v1.00c(GMT 1300 31-12-2015): * 1. Fixed writing getter contents directly instead of using String bug * v1.00b(GMT 0900 30-12-2015): * 1. Fixed failed to extend battler property name descriptors bug * 2. Fixed using new Function and class instead of eval and prototype * 3. Fixed unintentionally declaring global variable in strict mode bug * 4. Fixed calling push for an Object instead of its Array values bug * 5. Fixed using 1 single variable to store all old getter functions bug * v1.00a(GMT 1400 25-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 (11)
Leave a Reply
You must be logged in to post a comment.
DoubleX
[b]Updates[/b]
[code] * DoubleX RMMV Unison Item Default:
* v1.00b(GMT 0300 26-12-2015):
* 1. Fixed unison skills/items not usable outside battles bug
* 2. Simplified the unison skill usability checks
* This plugin:
* v1.00b(GMT 0900 30-12-2015):
* 1. Fixed failed to extend battler property name descriptors bug
* 2. Fixed using new Function and class instead of eval and prototype
* 3. Fixed unintentionally declaring global variable in strict mode bug
* 4. Fixed calling push for an Object instead of its Array values bug
* 5. Fixed using 1 single variable to store all old getter functions bug[/code]
DoubleX
[b]Updates[/b]
[code] * DoubleX RMMV Unison Item Default:
* v1.00c(GMT 0100 1-1-2016):
* 1. Fixed undefined SceneManager.scene by using $gameParty.inBattle()
* This plugin:
* v1.00c(GMT 1300 31-12-2015):
* 1. Fixed writing getter contents directly instead of using String bug [/code]
DoubleX
[b]Updates[/b]
[code] * DoubleX RMMV Unison Item Default:
* v1.00d(GMT 1100 4-1-2016):
* 1. Fixed all unison item being unusable due to typo bug
* 2. Added plugin description and author name in the plugin manager
* This plugin:
* v1.00d(GMT 0200 3-1-2016):
* 1. FUNCTIONS now store all battler functions instead of merely getters[/code]
DoubleX
[b]Updates[/b]
Added this video:
[url=https://www.youtube.com/watch?v=iBeSIPQnRb0]DoubleX RMMV Unison Item Default[/url]
[code] * DoubleX RMMV Unison Item Default:
* v1.00e(GMT 1500 30-1-2016):
* 1. Fixed not passing this to canUseUnisonSkill and canUseUnisonItem
* 2. Fixed not checking if item exist first in canUse bug
* 3. Fixed unison invoker might not have the smallest party member index
* This plugin:
* v1.00e(GMT 1500 30-1-2016):
* 1. Fixed not returning value in makeDamageValue bug
* 2. Fixed not showing unison item names in the battle log window bug
* 3. Fixed enemy using actor unison item showing unison actor names bug [/code]
DoubleX
[b]Updates[/b]
Added this video:
[url=https://www.youtube.com/watch?v=spAq2xP8sbM]DoubleX RMMV Unison Item YEP_X_BattleSysCTB[/url]
[code] * DoubleX RMMV Unison Item YEP_X_BattleSysCTB:
* v1.00a(GMT 1500 28-2-2016):
* 1. 1st version of this plugin finished
* 2. Unison skills/items needing charging might be executed immediately
* and/or cause the action order queue to be incorrect and/or outdated
* This plugin:
* v1.00f(GMT 1000 28-2-2016):
* 1. Fixed unison invokees not stepping forward when executing actions [/code]
DoubleX
[b]Updates[/b]
[code]
* This plugin:
* v1.01a(GMT 1400 15-3-2016):
* 1. Added <unison item actor mp cost: ids> and
* <unison item actor tp cost: ids> [/code]
DoubleX
[b]Updates[/b]
[code] * This plugin:
* v1.01b(GMT 1300 17-3-2016):
* 1. Fixed undefined uIFAs[RegExp.$1] in DM.loadItemNotes bug
* 2. Fixed incorrect unison battler stat when using unison rules bug [/code]
DoubleX
[b]Updates[/b]
Added this video:
[url=https://www.youtube.com/watch?v=Sg1sQec_Po8]DoubleX RMMV Unison Item YEP_X_BattleSysCTB(Async)[/url]
[code] * DoubleX RMMV Unison Item YEP_X_BattleSysCTB:
* v1.00b(GMT 1300 14-5-2016):
* 1. In sync with the latest version of DoubleX RMMV Unison Item Config
* DoubleX RMMV Unison Item Default:
* v1.00f(GMT 1300 14-5-2016):
* 1. Fixed a bug where unison items can have unison invokees with no
* empty action slots
* 2. In sync with the latest version of this plugin
* This plugin:
* v1.02a(GMT 1300 14-5-2016):
* 1. Added <unison item actor learn: flags> and <async unison item> [/code]
DoubleX
[b]Updates[/b]
Addd this video:
[url=https://www.youtube.com/watch?v=9JsrGSjbb2s]DoubleX RMMV Unison Item YEP_X_BattleSysATB[/url]
[code] * DoubleX RMMV Unison Item YEP_X_BattleSysATB:
* v1.00a(GMT 0600 21-5-2016):
* 1. 1st version of this plugin finished
* DoubleX RMMV Unison Item YEP_X_BattleSysCTB:
* v1.00c(GMT 0600 21-5-2016):
* 1. Fixed BattleManager.asyncUnisonItems not using unique key
* 2. Fixed not clearing actors in BattleManager.asyncUnisonItems [/code]
DoubleX
[b]Updates[/b]
[code] * DoubleX RMMV Unison Item Default:
* v1.00g(GMT 0300 5-6-2016):
* 1. Fixed a bug where game crashes when accessing equips in item menu [/code]
DoubleX
[b]Updates[/b]
[code] * This plugin:
* v1.03a(GMT 0500 23-7-2016):
* 1. Added <unison item actor function drain: weights> [/code]