设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 91|回复: 0

[转载发布] DoubleX RMMV Linked Battlers

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    8259

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    30525
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    39678

    灌水之王

    发表于 6 天前 | 显示全部楼层 |阅读模式
    Note


            This plugin's available for commercial use


    Purpose


            Lets users set some states to let their owners share some stats


    Games using this plugin


            None so far


    Notetags

    Spoiler*    # State Notetags:                                                      
    *      1. <linked battlers: LBCX, LBSX, LBWX>                                
    *         - Sets all owners of this state meeting LBCX to share stats        
    *           included in LBSX with weight LBWX applied to each of them when   
    *           any included stat of any included battler changes               
    *         - Only the 1st applicable notetag of the state with the highest   
    *           priority will be applied to the stat change of the linked battler
    *         - If a linked battler can't take all of that battler's share of the
    *           original stat change due to hitting the min/max stat value, thost
    *           not being taken by that battler will be shared by the rest of the
    *           linked battlers also                                             
    *         - The battler originally having a stat to be changed is the last   
    *           linked battler taking the change not shared by any other ones   
    *         - LBCX can be set in Linked Battler Condition Functions            
    *         - LBSX can be set in Linked Battler Stat Functions                 
    *         - LBWX can be set in Linked Battler Weight Functions







    Plugin Calls

    Spoiler*    # Configuration manipulations                                          
    *      1. DoubleX_RMMV.Linked_Battlers.prop                                 
    *         - Returns the property prop under DoubleX_RMMV.Linked_Battlers     
    *      2. DoubleX_RMMV.Linked_Battlers.prop = function                       
    *         - Sets the property prop under DoubleX_RMMV.Linked_Battlers as     
    *           function which will be bound to the battler upon use            
    *         - No DoubleX_RMMV.Linked_Battlers.prop change will be saved        
    *    # State manipulations                                                   
    *      All meta.linkedBattlers changes can be saved if                       
    *      DoubleX RMMV Dynamic Data is used                                    
    *      1. meta.linkedBattlers                                                
    *         - Returns an Array of all LBCX-LBSX-LBWX triples, each in the form
    *           of [LBCX, LBSX, LBWX]                                            
    *      2. meta.linkedBattlers = [[LBCX, LBSX, LBWX], [LBCX, LBSX, LBWX], ...]
    *         - Resets the Array of all LBCX-LBSX-LBWX triples, each in the form
    *           of [LBCX, LBSX, LBWX], stored sequentially in that Array         
    *      3. meta.linkedBattlers = [LBCX, LBSX, LBWX]                        
    *         - Sets the (i + 1)th LBCX-LBSX-LBWX triple as LBCX-LBSX-LBWX      







             


    Configurations



    Spoiler


        /*------------------------------------------------------------------------
         *    Linked Battler Condition Functions                                 
         *    - Setups LBCX used by <linked battlers: LBCX, LBSX, LBWX>           
         *------------------------------------------------------------------------*/
        /* LBCX are used in functions included in LINKED_STATS
         * LBCX are functions that will be bound to battler calling them upon use
         * LBCX names can only use alphanumeric characters
         * Each linked battler besides the caller can be referenced by battler
         * The caller will always pass LBCX even when it's supposed to fail
         * The below LBCX are examples added to help you set your LBCX
         * You can freely use, rewrite and/or delete these examples
         */

        // Sets the linked battler condition to include all linked battlers
        LBC1: function(battler) { return true; },

        /* Sets the linked battler condition to include all and no linked battlers
         * if switch with id x is on and off respectively
         */
        LBC2: function(battler) { return $gameSwitches.value(x); },

        // Adds new LBCX here


        /*------------------------------------------------------------------------
         *    Linked Battler Stat Functions                                       
         *    - Setups LBSX used by <linked battlers: LBCX, LBSX, LBWX>           
         *------------------------------------------------------------------------*/
        /* LBSX are used in functions included in LINKED_STATS
         * LBSX are functions that will be bound to battlers upon use
         * LBSX names can only use alphanumeric characters
         * It must return an Array, which should include all strings of getter
         * functions of each stat to be included
         * The below LBSX are examples added to help you set your LBSX
         * You can freely use, rewrite and/or delete these examples
         */

        // Sets the linked battler stat to include hp, mp and tp
        LBS1: function() { return ["hp", "mp", "tp"]; },

        // Sets the linked battler stat to include nothing
        LBS2: function() { return []; },

        // Adds new LBSX here


        /*------------------------------------------------------------------------
         *    Linked Battler Weight Functions                                    
         *    - Setups LBWX used by <linked battlers: LBCX, LBSX, LBWX>           
         *------------------------------------------------------------------------*/
        /* LBWX are used in functions included in LINKED_STATS
         * LBWX are functions that will be bound to battlers upon use
         * LBWX names can only use alphanumeric characters
         * It must return a Number
         * No stat change will take place for any linked battler if the sum of all
         * weights of all linked battlers is 0
         * Each linked battler besides the caller can be referenced by battler
         * The below LBWX are examples added to help you set your LBWX
         * You can freely use, rewrite and/or delete these examples
         */

        // Sets the linked battler weight to be the same for all linked battlers
        LBW1: function(battler) { return 1; },

        /* Sets the linked battler weight to be multiplied by x if the linked
         * battler is the one having a stat to be changed
         */
        LBW2:  function(battler) { return battler === this ? x : 1; },

        // Adds new LBWX here


        /* Sets the battler functions to be used by linked battlers
         * Its property names must be the battler stat getter function names
         * Its values must be Arrays, each containing the battler stat setter
         * function name, the index of the argument as the original new stat value
         * in the stat setter function argument list, and each linked battler's
         * min/max stat value
         * All battler functions as min/max stat value must be referenced by this
         * All the included battler stat getter functions will be extended
         */
        LINKED_STATS: {

          /* General form:
           * FunctionClass: {
           *     getter: ["setter", statArgIndex, "statMin", "statMax"]
           * }
           */

          Game_BattlerBase: {
            /* General form:
             * getter: ["setter", statArgIndex, "statMin", "statMax"]
             */
            hp: ["setHp", 0, "0", "this.mhp"],
            mp: ["setMp", 0, "0", "this.mmp"],
            tp: ["setTp", 0, "0", "this.maxTp()"]
            // Adds new functions here

          }

          // Adds new classes here


        }







             


    Prerequisites


            1. Some Javascript coding proficiency to fully utilize this plugin



             


    Terms Of Use


            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/her aliases



             


    Changelog



    Spoiler


     *      v1.00d(GMT 1500 29-1-2016):                                           
     *      1. Fixed undefined g in Proto[func[0]] bug                            
     *      2. Fixed passing getter instead of its name to linkedBattlersStateId  
     *      3. Fixed calling getter via this[getter] instead of this.getter       
     *      4. Fixed state.linkedBattlers instead of state.meta.linkedBattlers bug
     *      5. Fixed adding 2 Arrays instead of concatenating them bug            
     *      6. Fixed undefined battler isStateAdded bug                           
     *      7. Fixed linked battlers' stats being possible to be non-integer bug  
     *      8. Only the target will collapse when some others die at the same time *      v1.00c(GMT 1400 31-12-2015):                                          
     *      1. Fixed writing getter contents directly instead of using String bug
     *      v1.00b(GMT 1100 28-12-2015):                                          
     *      1. Fixed unintentionally declaring global variable in strict mode bug
     *      2. Fixed using new Function and class instead of eval and prototype  
    *      v1.00a(GMT 1400 23-12-2015):                                          
    *      1. 1st version of this plugin finished                                







             


    View attachment DoubleX RMMV Linked Battlers v100d.rar


    本贴来自国际rpgmaker官方论坛作者:DoubleX处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/doublex-rmmv-linked-battlers.53576/
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 18:50 , Processed in 0.105992 second(s), 51 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表