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

[转载发布] Dynamic Buff

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

    连续签到: 2 天

    [LV.7]常住居民III

    7524

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 5 小时前 | 显示全部楼层 |阅读模式
    Dynamic Buff
    Author: Vyndicate


    There's a part that you want to give a buff to allies or enemy gain a buff
    But you also want to make it dynamic instead of 25% of each buff (or other value from plugins)

    You can make it dynamic with this plugin

    Description:
    This plugin to make buff increase dynamically
    Create a dynamic buff based on state you use

    Notetag (States):
    <BUFFS: [
    {"paramId": 0, "buff": 2, "based": true, "type": 0},
    {"paramId": 1, "buff": 1.3}
    ]>

    paramId (Mandatory) => parameter id (Refer to game data)
    buff (Optional) => Multiplier or Flat, depends on type, default will
    multiplied by 1 or added by 0. Can use negative value
    based (Optional) => Whether you want multiply from base only or with other calc
    type (Optional) => between 0 and 1 (Only when based = false)
    if 0, The buff will do multiplication
    if 1, The buff will do addition

    Default value:
    based = false
    type = 0

    In that example, paramId 0 and 1 is Max HP and Max MP

    Example of using based = true:
    Def from stats = 10, def from other source (Armor, weapon, etc) = 20
    Total def = 30
    Buff = 2x
    Total def after buff = 10 * 2 + 20 = 40
    if based false, it will like this => (10 + 20) * 2 = 60

    You can write either in one line or like example above

    You can also write string like:
    <BUFFS: [
    {"paramId": 0, "buff": "v[3] + value / 200 + this.paramOrigin(4) / 5"},
    {"paramId": 1, "buff": 1.3}
    ]>
    v => variable value
    value => param value of that id (in this case is mhp)
    this.paramOrigin(x) => parameter value, same as param but in other function
    to avoid recursive loop

    You can use other like this.paramBase, this.paramPlus, etc. But avoid
    this.param(), use this.paramOrigin() instead

    Notetag (Weapon, Armor):
    <BUFFS: [
    {"paramId": 2, "buff": 0.5, "type": 0, "armorId": 2, "armorSlot": 2},
    {"paramId": 2, "buff": -0.5, "type": 0, "armorId": 2, "armorSlot": 3}
    ]>

    Pretty much similar to states but without based, with addition armorId,
    armorSlot, weaponId, and weaponSlot

    Buff value 0 is neutral, buff value 1 will double the value (Ex: atk +15,
    buff: 1 will become atk +30). Remove the upgrade, set to -1. Assuming all
    of this using type: 0

    armorId can exist alone, but armorSlot need armorId. Similar to weapon

    So far, the usage between armor and weapon separated. So it will like this
    <BUFFS: [
    {"paramId": 2, "buff": 0.5, "type": 0, "armorId": 2, "armorSlot": 2},
    {"paramId": 2, "buff": -0.5, "type": 0, "weaponId": 2, "weaponSlot": 3}
    ]>

    I'm yet to create if armor and weapon must exist, buff applied

    Regarding how big the value is, you can go crazy whatever you want

    From changelog 1.3.3: Thank you for someone mentioned me in Discord regarding this bug

    Terms of Use:
    Free for commercial and non commercial use with credits

    Changelog:
    v1.3.3
    Simplified code
    Fix multiple state use the latest one

    v1.3.1
    Fix when get .equips() cause error for enemies

    v1.3.0
    Add notetag for weapon and armor

    v1.2.0
    Add type, change buff between flat add or multiply it, and this.paramOrigin() function

    v1.1.0
    Add custom value, multiplier based on what you need, with variable and value

    v1.0.0
    Init plugin

    Showcase:






    In this case, allies who get Emergency Defense gets Max HP buff by 2x, def by 10x, and magical def by 10x

    Stats before getting buff:




    Stats when getting buff:




    Showcase regarding weapon and armor notetag:


    Notetag used for this showcase:
                    Code:       
    1. <BUFFS: [
    2. {"paramId": 2, "buff": 0.5, "type": 0, "armorId": 2, "armorSlot": 2},
    3. {"paramId": 2, "buff": -0.5, "type": 0, "armorId": 2, "armorSlot": 3}
    4. ]>
    复制代码




    本贴来自国际rpgmaker官方论坛作者:Vyndicate处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/dynamic-buff.176805/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-30 19:35 , Processed in 0.131191 second(s), 59 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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