DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Updates


Added this video:







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
 *      v1.00f(GMT 1000 28-2-2016):                                           
 *      1. Fixed unison invokees not stepping forward when executing actions
 
Last edited by a moderator:

Goldschuss

A.K.A. Lye
Veteran
Joined
Dec 4, 2015
Messages
202
Reaction score
88
First Language
German
Primarily Uses
RMMV
"Prerequisites


1. Some Javascript coding proficiency to fully utilize this plugin"


uhm.. care to explain, how much a newbie can do? basically what are the restricitions if I have no Javascript knowledge?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
"Prerequisites


1. Some Javascript coding proficiency to fully utilize this plugin"


uhm.. care to explain, how much a newbie can do? basically what are the restricitions if I have no Javascript knowledge?

Without external help, you'll likely have a hard time figuring these out:

Spoiler



 *    # 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 the plugin js file        
 *           directly                                                         
 *         - function with name functionName must be included in              
 *           FUNCTIONS, which must be edited by opening the 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 the plugin js file    
 *           directly                                                         
 *         - All meta.unisonItemFunctionActors changes can be saved if        
 *           DoubleX RMMV Dynamic Data is used                               


    /* 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
        


    }



But you should still be ok with these:

Spoiler



 * @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


 *    # 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 the plugin js file        
 *           directly                                                         
 *         - function must be a battler function name included in             
 *           FUNCTIONS, which must be edited by opening the 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 the plugin js file    
 *           directly                                                        



With external helps, like asking me, you should be able to fully utilize it though :)
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Updates

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>
 
Last edited by a moderator:

Villhelm

Veteran
Veteran
Joined
Nov 13, 2015
Messages
84
Reaction score
54
First Language
English
Great job with this plugin!


Just tried it out with Yanfly CTB and was wondering if you had any plans to (provide the option to) relax the requirement that unison actors be adjacent to each other in the turn order (either the invoker charges until the invokee is ready or the invokee can act out of turn, but still spend any charge time associate with the skill)?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Great job with this plugin!


Just tried it out with Yanfly CTB and was wondering if you had any plans to (provide the option to) relax the requirement that unison actors be adjacent to each other in the turn order (either the invoker charges until the invokee is ready or the invokee can act out of turn, but still spend any charge time associate with the skill)?

After briefly thinking about it, I might use the below setup:


1. Uses a special unison actor queue for an unison skill/item to mark all its unison actors


2. The most up front actor in the queue will always be the unison invoker


3. Right after an actor finish inputting an unison skill/item, that actor will be placed at the end of the unison actor queue of that unison skill/item


4. A new command will be added to let players cancel actors' inputted actions


5. As long as not all unison actors are collected for an unison skill/item, those actors will continue to wait(but not charge) until all such actors are collected(then they'll start to charge the unison skill/item together)


6. If an unison actor cancels the inputted unison skill/item, that actor will be removed from the unison actor queue of the unison skill/item(Then 2nd point will apply to that queue) and become inputable again


Using this setup would mean the need for the Yanfly CTB to let players cancels the inputted actions, otherwise there can be cases where the unison actors can never be fully collected and those already inputted unison skills/items will be forced to wait infinitely :)


As letting players cancel the inputted actions is a separation of concerns from unison skills/items, I'll either wait for such upgrade in Yanfly CTB, or I'll make such addon myself :D
 
Last edited by a moderator:

Villhelm

Veteran
Veteran
Joined
Nov 13, 2015
Messages
84
Reaction score
54
First Language
English
Sounds great! This could help get around situations such as when Actors 1 and 2 want to perform a unison skill but Actor 3 is between them in the turn order.


I have a question regarding your third notetag option. You provide an example of <unison item mat actors: 4, 2> to combine two actor's mat params. It looks like you've updated the format of FUNCTIONS (defineProperties: [ "mat"] has been replaced with "param") in the config file however, and the example is outdated, as using it I'm getting the following error:


TypeError: Cannot read property 'push' of undefined
at
uIFAs[RegExp.$1].push(+id);


I've tried adding "mat" to the list of functions, or replacing mat in the notetag with "param(4)", but haven't had any luck. Can you please provide an updated notetag/FUNCTIONS example?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Updates

Code:
 *      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
 

Villhelm

Veteran
Veteran
Joined
Nov 13, 2015
Messages
84
Reaction score
54
First Language
English
Thanks for the quick turnaround DoubleX!


I seem to have got this working by including both notetags #1 and #3:


<unison item actors: 1, 2>


<unison item param actors: 1, 2>


If I omit the first notetag, it doesn't recognize the skill as a unison skill. Is that intended?
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Thanks for the quick turnaround DoubleX!


I seem to have got this working by including both notetags #1 and #3:


<unison item actors: 1, 2>


<unison item param actors: 1, 2>


If I omit the first notetag, it doesn't recognize the skill as a unison skill. Is that intended?

Yes :)


<unison item actors: 1, 2> is to inform that the skill/item is an unison one needing actors with id 1 and 2.


<unison item param actors: 1, 2>  is to inform that the value of param in the damage formula will be based on those of actors with id 1 and 2 combined via the unison rule of param.
 

Kenshin

Veteran
Veteran
Joined
Jul 26, 2013
Messages
33
Reaction score
4
First Language
Italian
Primarily Uses
Sorry to bother you, but it's possible to have a demo or a video tutorial on how to configure the plug-in?
Maybe it's because of my non eglish main language, but I don't understand how to use it ^^;


Thank you
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Sorry to bother you, but it's possible to have a demo or a video tutorial on how to configure the plug-in?
Maybe it's because of my non eglish main language, but I don't understand how to use it ^^;


Thank you

Maybe I'll use an easy, simple and small use case to demonstrate some ways to use these plugins(yes, Unison Item Config won't work alone at all):

Suppose I want to make skill A to be an unison skill needing actors with id 1 and 2 to use together. Then I can add this notetag to the notebox of skill A:


<unison item actors: 1, 2>


Now only actor 1 or 2 is possible to invoke skill A(the one actually using skill A).


If one of them has inputted skill A into one of that actor's action slots, the other actor will also reserve 1 action slot(not accessible by players) for this inputted skill A.


When that skill A's executed(which is actually executed by the former actor alone), the execution will look like(at least from the players' perspective) that both aforementioned actors are executing that skill A together and then paying its costs together.


Actually, the above single notetag is suffice to make a skill/item an unison skill/item. But let's suppose I want to further customize some more unison skill properties for skill A.


For instance, I may want actor with id 1 and 2 to pay different mp and tp costs(the default is all unison actors are always paying the same mp/tp cost, although the real mp cost can be different after begin multiplied by each actor's mcr for that actor). I can then add these notetag to the notebox of skill A:


<unison item actor mp cost: 5, 10>


<unison item actor tp cost: 10, 5>


Note that the meaning of these 2 notetags depends on which <unison item function actors: ids> notetag's used(and the formers will mean nothing if the latter's absent).


In this case, as the notetag <unison item actors: 1, 2> is used:


- <unison item actor mp cost: 5, 10> means the mp cost for actors with id 1 and 2 are 5 and 10 respectively(before being multiplied by mcr).


- <unison item actor tp cost: 10, 5> means the tp cost for actors with id 1 and 2 are 10 and 5 respectively.


On a side note: If I want the battle log window to show the names of all actors seemingly involved in executing an unison skill/item, I can set showAllUnisonBattlers as true, otherwise I can set it as false(or anything other than true).

The above easy, simple and small use case should already cover many applications of the basic configurations of Unison Item Config.


Although there are also unisonFunctionRule, <unison item function rule: rule> and <unison item function actors: ids>, these are more advanced features needing at least little javascript coding proficiency to be fully utilized(and FUNCTIONS probably needs some RMMV plugin developement proficiency to be fully utilized).


I hope this reply is easy, simple and small enough to be understood, as it's clearly 100% my fault when someone can't understand how to use at least 1 of my plugins :)
 
Last edited by a moderator:

Kenshin

Veteran
Veteran
Joined
Jul 26, 2013
Messages
33
Reaction score
4
First Language
Italian
Primarily Uses
Well I was doing it right, but I was forgot what I've done in my game ^^;;;
I've put the skill under magic but my characters doesn't have the skill magic but special ^^;;;;;


[EDIT] Now I have other 2 problems:


1 the character automatic learn that skill and i don't want to (I wan't to make them learn when I decide to)


[EDIT 2] 2 SOLVED  I'm using Action Sequence Pack 2 and I don't know how to make both character use the skill (I want to do a non magic skill, I want that bot characters jump and punch on the enemy... I will try to make differents things... maybe I ending learn how to ^^; )
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
[EDIT] Now I have other 2 problems:


1 the character automatic learn that skill and i don't want to (I wan't to make them learn when I decide to)

It seems to me that this has nothing to do with whether that skill's an unison skill.


The only relationship between unison skills and learning skill is that, every unison skill needs all unison actors to have learned that unison skill.


So may you please elaborate this issue if you think unison skills do have something to do with it?
 

Kenshin

Veteran
Veteran
Joined
Jul 26, 2013
Messages
33
Reaction score
4
First Language
Italian
Primarily Uses
Yep you're right, it was my fault, thank's.
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Updates


Added this video:







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>
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Updates


Added this video:








* 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


Note that the rar attachment has been updated.
 
Last edited by a moderator:

EastsideTrouble

Veteran
Veteran
Joined
Feb 8, 2014
Messages
39
Reaction score
9
First Language
English
Primarily Uses
Hey, I'm getting a bit of an odd error.  When I go to the "Item" screen on the menu, I get a crash saying "cannot read property 'length' of undefined" when I try to select Weapons or Armor.  I copied the error report below.  It seems to be saying that it is the UnisonItemDefault script.  None of my weapons or armors are using any note tags or otherwise anything special going on with them.


Thanks for any input.  I'm sure it's because I've done something silly.


TypeError: Cannot read property 'length' of undefined
    at Game_Actor.Game_BattlerBase.canUse (file:///C:/Users/Dennis/Documents/Games/Project3/js/plugins/DoubleX%20RMMV%20Unison%20Item%20Default%20v100f.js:190:67)
    at file:///C:/Users/Dennis/Documents/Games/Project3/js/rpg_objects.js:4998:22
    at Array.some (native)
    at Game_Party.canUse (file:///C:/Users/Dennis/Documents/Games/Project3/js/rpg_objects.js:4997:27)
    at Window_ItemList.isEnabled (file:///C:/Users/Dennis/Documents/Games/Project3/js/rpg_windows.js:1962:23)
    at Window_ItemList.isEnabled (file:///C:/Users/Dennis/Documents/Games/Project3/js/plugins/DoubleX%20RMMV%20Unison%20Item%20Config%20v102a.js:603:34)
    at Window_ItemList.drawItem (file:///C:/Users/Dennis/Documents/Games/Project3/js/rpg_windows.js:1985:38)
    at Window_ItemList.Window_Selectable.drawAllItems (file:///C:/Users/Dennis/Documents/Games/Project3/js/rpg_windows.js:1250:18)
    at Window_ItemList.refresh (file:///C:/Users/Dennis/Documents/Games/Project3/js/rpg_windows.js:2010:10)
    at Window_ItemList.setCategory (file:///C:/Users/Dennis/Documents/Games/Project3/js/rpg_windows.js:1916:14)
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,856
Reaction score
1,003
First Language
Chinese
Primarily Uses
N/A
Updates


* 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


Note that the attached rar is updated.
 

EastsideTrouble

Veteran
Veteran
Joined
Feb 8, 2014
Messages
39
Reaction score
9
First Language
English
Primarily Uses
Hey, thanks.  The problem I posted about is totally fixed.  But, now I get a crash after I use a unison skill. See below for the report.  I wasn't getting it before.  Thanks again.


TypeError: Cannot read property 'meta' of null
    at Game_Actor.Game_BattlerBase.canUse (/C:/Users/Dennis/Documents/Games/Project3/js/plugins/DoubleX%20RMMV%20Unison%20Item%20Default%20v100g.js:192)
    at Game_Action.isValid (rpg_objects.js:1426)
    at Function.BattleManager.processTurn (rpg_managers.js:2075)
    at Function.BattleManager.updateTurn (rpg_managers.js:2064)
    at Function.BattleManager.update (rpg_managers.js:1889)
    at Scene_Battle.updateBattleProcess (rpg_scenes.js:2050)
    at Scene_Battle.update (rpg_scenes.js:2042)
    at Function.SceneManager.updateScene (rpg_managers.js:1673)
    at Function.SceneManager.updateMain (/C:/Users/Dennis/Documents/Games/Project3/js/plugins/TDDP_FluidTimestep.js:108)
    at Function.SceneManager.update (/C:/Users/Dennis/Documents/Games/Project3/js/plugins/TDDP_FluidTimestep.js:86)
 

Latest Threads

Latest Posts

Latest Profile Posts

I wonder if anyone would be interested in free character art from me...
I remade/fixed my Elf XP Mack Templates. The Ears are looking better now.
Male Update.pngFemale Update.png
You can check them out, they are in 12 recolours, both Human and Elf Versions!
I'M BACK BABEY!!!
College is hitting me a lil' softer than I expected, so I'm back on MV!
And to kick things off, here's a lil' test of a tileset edit I made today! (Took me, like, 5 hours, considering this was the first time I've EVER used GraphicsGale...)Edit test SUCCESS.PNG

Forum statistics

Threads
124,612
Messages
1,164,728
Members
163,434
Latest member
MouthyStream4
Top