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

[转载发布] Battle Formation[Beta]

[复制链接]
累计送礼:
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 天前 | 显示全部楼层 |阅读模式
    Battle Formation 1.0
    By Lecode


    Introduction
    This plugin adds the possibility to create battle formations with defined positions and bonuses.

    (Beta)

    I know that currently the plugin isn't fully compatible with Yanfly's ones.

    I plan to make a patch.

    Screenshot





    Files

    Plugin

    BattleFormations.json

    Dependencies

    MVCommons

    LeUtilities

    How to Use

    There are a lot of parameters so make sure to check them.

    And see the detailed help:

    Spoiler
    Setup


    • Download the plugin and save it as LeBattleFormation.js
    • Place it via the plugin manager under MVCommons and LeUtilities
    • Get the file BattleFormations.json and place it in your project Data folder
    • Make sure to set the default formation via the parameters

    Create a formation

    The file BattleFormations.json purpose is to hold all created formations. So, to create a new formation you'll need

    to modify this file.

    Let's analyse the file with just one formation:

    [{   "name": "Equilibred",  "unlock": "true",  "hide": "false",  "size": 5,  "positions": [        [525,310],          [565,350],          [610,275],          [635,310],          [660,345]  ],  "bonus": [          ["def 10%"],          ["def 10%"],          ["atk 10%"],          ["mat 10%"],          ["mcr -20%"]  ],  "partyBonus": ["atk 6%","def 6%","mdf 6%"]}]The file starts with [ and ends with ]. The whole file is an array. Do not remove them.

    Creating a new formation consists of adding some code inside this array.

    That code follows a special pattern as you can see below.

    {  "name": NAME OF THE FORMATION,  "unlock": CONDITION TO UNLOCK BY DEFAULT,  "hide": CONDITION TO HIDE BY DEFAULT,  "size": MAX PARTY MEMBERS IN BATTLE FOR THAT FORMATION,  "positions": [        [X1,Y1],          [X2,Y1],          ...          [XN,YN]  <= WITHOUT COMMA HERE (last element)  ],  "bonus": [          [BONUS_A1,BONUS_A2,BONUS_A3...],          [BONUS_B1,BONUS_B2...],          ...          [BONUS_Z1,...] <= NO COMMA HERE (last element)  ],  "partyBonus": [BONUS_1,BONUS_2,BONUS_3...] <= NO COMMA HERE} <= NO COMMA IF IT'S THE LAST FORMATIONStrings for "unlock" and "hide" are evaluated and must return a boolean ( true or false ). You can set for example:

    "unlock": "$gameParty.members().length >= 2",to enable that formation only if there are 2 or more actors in the party.

    "positions" and "bonus" returns an array.

    In the case of "positions", this array must contains the coordinate of each member as an array ( [x,y] ).

    Make sure that the number of coordinates is equals to the "size" of that formation. Obviously.

    Same for "bonus". This array is also composed with arrays, which the number is equals to "size" value.

    See below to see how to configure the bonuses.

    I suggest you to examine the pre-made formations in the file to understand better the syntaxe.

    Setup Bonuses

    Each array inside the "bonus" array contains one or more strings. See this example:

    "bonus": [  ["mhp 15%"],           <= BONUS FOR THE FIRST MEMBER ( +15% MAX HP)  ["atk 20%","mat 20%"], <= BONUSES FOR THE SECOND MEMBER ( +20% ATK and 20% MAT )  ["def -15"],           <= ... ( -15 flat DEF )  ["mmp 80"]             <= ... ( +80 flat MAX MP )],The string pattern is: "key value" or "key value%".

    Keys are simply used stats in the Game_Battler class:

    mhp:     Max HP

    mmp:    Max MP

    atk:       Attack

    def:       Defense

    mat:      Magic attack power

    mdf:      Magic attack power

    agi:       Agility

    luk:       Luck

    hit:        Hit rate

    eva:      Evasion rate

    cri:        Critical rate

    cev:      Critical evasion rate

    mev:     Magic evasion rate

    mrf:       Magic reflection rate

    cnt:       Counter attack rate

    hrg:       HP regeneration rate

    mrg:      MP regeneration rate

    trg:       TP regeneration rate

    tgr:       Target rate ( I don't know exactly what is the purpose of that stat...)

    grd:      Guard effect rate

    rec:       Recovery effect rate

    pha:      Pharmacology ability

    mcr:      MP cost rate

    tcr:       TP charge rate

    pdr:      Received physical damage rate

    mdr:     Received magical damage rate

    fdr:       Received floor damage rate

    exr:       Experience rate



    Same process for "partyBonus".

    "partyBonus": ["atk 6%","def 6%","mdf 6%"]Finnaly, make sure to add a comma to the } thing if it's not the last formation.

    [{   "name": "Harmony",  "unlock": "true",  "hide": "false",  "size": 4,  "positions": [    [560,320],    [630,275],    [655,310],    [680,345]  ],  "bonus": [    ["mhp 15%"],    ["pdr 15%"],    ["mdr 15%"],    ["rec 15%"]  ],  "partyBonus": ["eva 10%"]}, <== COMMA{   "name": "Mentor & Apprentice",  "unlock": "$gameParty.members().length >= 2",  "hide": "false",  "size": 2,  "positions": [    [525,310],    [635,310]  ],  "bonus": [    ["mhp 10%","pdr 400%","mdr 20%"],    ["exr 100%"]  ],  "partyBonus": ["exr 20%"]} <=== NO COMMA]

    Credit and Thanks
    - Lecode

    Author's Notes
    I plan to add some features in the future, or maybe anothers plugins to give more sense to this,

    like an AOE Manager plugin.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-8-1 07:34 , Processed in 0.091704 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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