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

[转载发布] Side Effects Control

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

    连续签到: 2 天

    [LV.7]常住居民III

    7959

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    Version History


            Version 1.0


    /*
    # - 0.0 : Bêta
    # - 1.0 : Initial release
    #        : Deep code reorganization
    #        : News occasions: "after this skill invoked"
    #                                          "after this attack invoked"
    #                                          "after this item invoked"
    #        : Occasions can be fusioned: <leffect: x,y,z>
    #        : Effects can be read from an external file
    #        : Effects are now preloaded, instant of being read in real time
    */




    Introduction


            This plugin allows the user to set advanced effects for battlers, states and equipments.
            These effects' logics are done through script call in the note box on defined occasions:


    When Something  
            Do that (scriptcall)  
            Do that (scriptcall)  
            ...
    End


            The purpose of this plugin is to allow the user to achieve complex effects. Nowadays skills in RPGs aren't just for dealing damage, healing and altering states. They can trigger complex effects for the sake of gameplay.
            In short, you can achieve mostly complex passive skills and abilities for battlers. Or active skills with side effects.


    Examples


            This video shows some examples of what you can do with this plugin.


            There are mostly passive skills or special abilities intrinsic to actors and enemies.










    How to use


            Defining an effect can be done in two ways:


    1- Through the note box of actors, classes, enemies, states and equipments.



            The pattern is the following:


    <leffect: [OCCASION]>
    [SCRIPT CALL];
    [SCRIPT CALL];
    ...
    </leffect>


            [OCCASION] is the moment to trigger the effect.


            [sCRIPT CALL] are...simply script calls. They are evaluated as Javascript code.


            You can see below the list of occasions and script calls.


            In addition, you can add a requirment for the effect to be triggered;


    <leffect: [OCCASION]>
    req: [CONDITION 1]
    req: [CONDITION 2]
    ...
    [SCRIPT CALL];
    [SCRIPT CALL];
    ...
    </leffect>


    Code example:


            The poisonous skin effect at the end of the video:


    <leffect: after attack invoked on me>
    b.addState(4);
    </leffect>


            Inside slime's note box.


            Note that any tags to states, equipments and skills are in reality applied to their carrier.


    2- Through a data file.



            Create a json file named SideEffects.json inside your data folder.


            The pattern is the following:


    {
            "object": [
                    "occasion1",
                            [
                                    "code_line1",
                                    "code_line2"
                            ],
                    "occasion2",
                            [
                                    "code_line1",
                                     ect.
                            ],
                    "occasion3,occasion4,occasion...ect",
                            [
                                    ect.
                            ]
            ],

            "another_obj": [
                    "occasion",
                            [
                                    code
                            ]
            ]
    }


            It's nearly the same way with tags, just pay attention to commas.


            Objects are in fact a type followed by an ID. If for exemple you want to create an effect for a skill with ID 16, set: "skill_16".


    Code example:


    {
            "skill_12": [
                    "after any obj invoked",
                            [
                                    "req: action.isSkill()",
                                    "var cost = a.skillMpCost(obj);",
                                    "var value = a.mhp*0.005*cost;",
                                    "if(value > 0){",
                                      "anim(a,126);",
                                      "hpDmgWpopup(a,-value);",
                                    "}"
                            ]
            ]
    }




    Occasions & keys list:


    Sheet.


    Script call list:


    Default list of script call.


    Plugin-related script call.


    Demo:


    Link.


    Require:


    LeUtilites.


    MVCommons.


            See demo.


    Important note:


            This plugin is compatible with Yanfly's Battle Engine Core and his CTB. But cast script calls doesn't work so well with his ATB.


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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 06:36 , Processed in 0.066026 second(s), 56 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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