Battle Formation[Beta]

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
654
First Language
French
Primarily Uses
N/A
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:

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

Sera

Veteran
Veteran
Joined
Oct 27, 2015
Messages
80
Reaction score
16
First Language
English
Three questions:

1) Would there be any way to apply the default battle formation to the enemy party as well?

2) Would there be any way to split the party into two 'rows', and make the battlers in the back row immune (not invincible but unselectable) to certain skills?

3) Would there be any way to make the 'Formation' command compatible with Bobstah's Battle Commands plugin? I'd like to make it a command exclusive to battler #1, which is contained within the 'Fight/Escape' menu (which is bypassed in my game).
 
Last edited by a moderator:

gokuby

Veteran
Veteran
Joined
Nov 2, 2015
Messages
96
Reaction score
14
First Language
German
Primarily Uses
N/A
Thanks soo much or that one!

Will test it later extensively!
 

Lionheart_84

Veteran
Veteran
Joined
Oct 27, 2015
Messages
504
Reaction score
44
First Language
Italian
Primarily Uses
Fine!!! thank you!!! I was expecting a lot from!!!

A demo???
 
Last edited by a moderator:

Guardcraft Games

Thoughtful
Veteran
Joined
Jan 25, 2014
Messages
36
Reaction score
55
First Language
English
Primarily Uses
Great plugin! Been waiting for this since you announced it!  BD  Keep up the good work!
 

Ryuk

Veteran
Veteran
Joined
Nov 8, 2015
Messages
59
Reaction score
13
First Language
French
Primarily Uses
RMMV
Great Plugin ! It's possible to have symbol and main bind for Yanfly MenuManager?
 
Last edited by a moderator:

Radis3D

Just a Devilz
Veteran
Joined
Nov 1, 2015
Messages
172
Reaction score
33
First Language
Indonesian
Primarily Uses
RMVXA
Lecode finally....

finally you finish it.. *big hug*

sankyu

edit:

may you or some one make a demo? :3
 
Last edited by a moderator:

gekigengar

Villager
Member
Joined
Oct 27, 2015
Messages
23
Reaction score
5
First Language
English
This is very amazing! though, I am having a few issues..

Bug & feedback report :

1. Pressing Formation, and cancelling the action will freeze the selection menu.

2. Is not fully compatible with Yanfly's Battle Engine Core.

3. How do I enable the battle formation Info bonus text? (It is not visible when I tested it.)

4. Is there a way to change/review the default formation on a non-battle menu?
 
Last edited by a moderator:

Ghost of Christmas Kloe

Ghost of a Princess Seagull
Veteran
Joined
Nov 15, 2015
Messages
1,504
Reaction score
914
First Language
English
Primarily Uses
N/A
Cool but I would ask if there is a way to use it without MVCommons or LeUtilities since its rather alot of plugins to add to get one thing working.

Also that it 

 Is not fully compatible with Yanfly's Battle Engine Core.
which would be a rather big problem for lots of people.
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
654
First Language
French
Primarily Uses
N/A
1) Would there be any way to apply the default battle formation to the enemy party as well?
No. You'll need to do that manually.

2) Would there be any way to split the party into two 'rows', and make the battlers in the back row immune (not invincible but unselectable) to certain skills?
Currently, no. You can't give immunity as bonuses. But you can use mdr and pdr.

3) Would there be any way to make the 'Formation' command compatible with Bobstah's Battle Commands plugin? I'd like to make it a command exclusive to battler #1, which is contained within the 'Fight/Escape' menu (which is bypassed in my game).
Don't know. I'll try.

Great Plugin ! It's possible to have symbol and main bind for Yanfly MenuManager?
I don't know how this plugin works but I'll try.

may you or some one make a demo? :3
Why ? The JSON file contains all pre-made formations.

You just need to download that file + the plugin and open the formation menu or test a battle.

1. Pressing Formation, and cancelling the action will freeze the selection menu.

2. Is not fully compatible with Yanfly's Battle Engine Core
Seems like the first one is related to yanfly battle engine.

I'll make a patch.

3. How do I enable the battle formation Info bonus text? (It is not visible when I tested it.)
There isn't any bonus text window in battle, for now.
 
Last edited by a moderator:

Ryuk

Veteran
Veteran
Joined
Nov 8, 2015
Messages
59
Reaction score
13
First Language
French
Primarily Uses
RMMV
Thank you !
 

ArkDG

Veteran
Veteran
Joined
May 26, 2013
Messages
143
Reaction score
48
First Language
portuguese
Primarily Uses
Would you make a row system based on this?
 

Lecode

(─‿‿─)
Veteran
Joined
Dec 18, 2013
Messages
490
Reaction score
654
First Language
French
Primarily Uses
N/A
Probably, but certainly during the holidays, only. :/
 

Villhelm

Veteran
Veteran
Joined
Nov 13, 2015
Messages
66
Reaction score
30
First Language
English
This looks excellent Lecode!

One suggestion for a future update, would it be possible to add state IDs to the list of possible bonuses (specifically I'm trying to make Cover/Substitute a formation-specific mechanic).
 

Ryuk

Veteran
Veteran
Joined
Nov 8, 2015
Messages
59
Reaction score
13
First Language
French
Primarily Uses
RMMV
My question was confuse, i wanted to know if you created a script line to call "Formation Menu" ^^ like This.commandFormation.bind(this)
 

gekigengar

Villager
Member
Joined
Oct 27, 2015
Messages
23
Reaction score
5
First Language
English
Another bug, ask character to attack, then cancel, then change formation.

After changing formation, characters are supposed to skip a turn, but instead, the character that are asked to attack before will still launch their attacks.
 

Emmych

forever rotting in the shamecube, floating eternal
Veteran
Joined
Mar 1, 2012
Messages
1,009
Reaction score
209
First Language
Anglais~
Primarily Uses
Hey, this is neat!  Would you consider adding in things like unlocking certain skills/skill menus depending on what position you're in?  Like, someone in slot 1 could use the Magic command, someone in slot 2 could use Skills, etc.?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Thanks to a post in a forum thread we can better create MV/MZ plugins in Haxe.
Latest video of my adventures in Kingdom Hearts 3~
Imagine every unfunny joke gets a laugh track, and it doesn't top until you genuinely laugh at that unfunny joke.
I miss lockdown already. Since the pubs reopened, there's been nothing but loudmouthed drunks wandering about my neighbourhood.
Twitter is making me embarrassed to be a Persona 5 fan rn
I don't wanna be called out when I say P5R is my favorite game :kaoswt2:

Forum statistics

Threads
99,556
Messages
966,703
Members
131,190
Latest member
SparkleLanturn
Top