An open library of RPG Maker MZ plugins, powered by the community.

PGMZ - The Community-Driven Plugin Library for RPG Maker MZ

MZ plugins

Formation System - FormationSystem.js

Plugin desc : formation system v1.3.0

License : MIT License

Author : unagi ootoro

Website : https://github.com/unagiootoro/RPGMZ/blob/master/FormationSystem.js

Desc page : https://raw.githubusercontent.com/unagiootoro/RPGMZ/master/FormationSystem.js

Download Page : https://raw.githubusercontent.com/unagiootoro/RPGMZ/master/FormationSystem.js

File name : FormationSystem.js

Help of plugin :

@target MZ
@plugindesc formation system v1.3.0
@author unagi ootoro
@url https://raw.githubusercontent.com/unagiootoro/RPGMZ/master/FormationSystem.js
@help
It is a plugin that introduces the formation system.


【Overview】
In this plugin, some formations are stocked in advance from the menu screen,
You can select and apply one of the formations stocked during the battle.
You can change the formation at any time during the battle.


【Method of operation】
・ Setting the formation to be used during battle
By opening the "Tactics" menu from the menu screen,
Customize the formation slots available during battle.

Of the formations in the slot, the formation with the E mark is the formation currently adopted.
The formation you are currently using can be changed to another formation by pressing the Shift key.

・ Change of formation during battle
During combat, a "tactical" command is added to the party command.
When this command is selected, the formations set in the slot are selected.
You can change the formation to apply.


【How to use】
■ Creation of formation
Edit the plugin parameter "Formation Datas" to create a formation.
In formation setting, there are two ways to set the position of each actor.
・ Enter the coordinates using a mathematical formula
It is a method to specify the X coordinate and the Y coordinate. You can use mathematical formulas for the coordinates.
Also, if you use the word index in the formula, the corresponding actor will start from the beginning.
It will be replaced with a numerical value indicating the number. (It will be 0, 1, 2 ... from the beginning)
When using this method, specify 0 for the map ID of the plug-in parameter.

-Read coordinates from the map
It is a method to regard the event placed on the map as the position of each actor.
Create an event on the target map and enter the order from the beginning of the corresponding actor in the memo column.
(Example) When setting the position of the first actor
Create an event and put it in the memo field
0
Described as.

The created formations are assigned IDs in the form of (0, 1, 2, ...) in the order in which the plug-in parameters are registered.
Of these, the formation with ID0 is used as the default formation.

■ Setting additional effects for formations
Additional effects for formations are created by states.
Specify the state to apply for each position of each actor in the formation,
Set the content of the additional effect to the state.

■ Invalid formation
You can create states that negate the additional effects of formations.
In the memo field of the state
<FormationInvalid>
If there is even one actor in that state,
The additional effects of the formation are negated.

■ About the acquisition of formation
You can learn formations by using the plugin parameter "LearnFormation".
On the contrary, you can forget the formation by using "Forget Formation".


【License】
This plugin is available under the terms of the MIT license.

@param FormationDatas
@text formation data
@type struct<FormationData>[]
@default []
@desc
Set formation data.

@param NumEquipFormationSlots
@text Number of formation slots
@type number
@default 3
@desc
Specifies the number of formations that can be set.

@param EnabledBattleFormationChange
@text Enable formation change during battle
@on valid
@off invalid
@type boolean
@default true
@desc
Set to true to enable formation changes during battle.

@param UseBattleBackgroundInMenu
@text Use battle background in menu
@on valid
@off invalid
@type boolean
@default true
@desc
If set to true, the battle background will be displayed on the formation edit screen of the menu.

@param EnabledFormationMenuSwitchId
@text formation menu display switch
@type switch
@default 0
@desc
Specify the switch to switch whether to display the formation menu.

@param ChangeFormationSlotSe
@text Formation slot change SE
@type struct<SE>
@default {"FileName": "Decision5", "Volume": "90", "Pitch": "100", "Pan": "0"}
@desc
Specifies the SE to play when changing formation slots.

@param ChangeCurrentFormationSe
@text Formation change SE
@type struct<SE>
@default {"FileName": "Decision5", "Volume": "90", "Pitch": "100", "Pan": "0"}
@desc
Specifies the SE to play when the formation used is changed.

@param MenuFormationXOfs
@text Menu formation X coordinate offset
@type number
@default 0
@desc
Specifies the X coordinate offset to the start of the formation in the menu.

@param MenuFormationYOfs
@text Menu formation Y coordinate offset
@type number
@default 80
@desc
Specifies the Y coordinate offset to the formation start in the menu.

@param BattleFormationXOfs
@text Combat formation X coordinate offset
@type number
@default 360
@desc
Specifies the X coordinate offset to the starting point of the formation in battle.

@param BattleFormationYOfs
@text Combat formation Y coordinate offset
@type number
@default 100
@desc
Specifies the Y coordinate offset to the start of the formation in battle.

@param WindowSize
@text Window size
@type struct<WindowSize>
@default {"FormationListHeight":"216"}
@desc
Set the size of various windows.

@param ShiftButton
@text shift button
@type struct <ShiftButton>
@default {"ButtonSetX": "8", "ButtonSetW": "2"}
@desc
Set the shift button information.

@param Text
@text Display text
@type struct<Text>
@default {"MenuFormationText":"tactics","EquipFormationList":"Available formations","HasFormationList":"All formations","EmptySlot":"------"}
@desc
Sets the text used in the game.


@command StartFormationScene
@text Formation scene start
@desc Starts the formation scene.


@command LearnFormation
@text Formation acquisition
@desc Learn formations.

@arg FormationId
@text Formation ID
@type number
@desc Specify the formation ID to learn.

@arg VariableId
@text variable ID
@type variable
@desc Specify the variable ID that stores the formation ID to be learned.


@command ForgetFormation
@text formation forgetting
@desc Forget the formation.

@arg FormationId
@text Formation ID
@type number
@default 0
@desc Specify the formation ID to forget.

@arg VariableId
@text variable ID
@type variable
@default 0
@desc Specifies the variable ID that stores the formation ID to forget.


@command ChangeEquipFormations
@text Equipment formation change
@desc Change the formation you are equipped with.

@arg EquipSlotIndex
@text Equipment formation slot
@type number
@desc Specifies the formation slot to change. If -1 is specified, the equipment formation of the slot will be removed.

@arg HasFormationId
@text Formation ID in possession
@type number
@desc Specify the formation ID you have.


@command ChangeFormation
@text Current formation change
@desc Change the current formation.

@arg SlotIndex
@text Equipment formation slot
@type number
@desc Specifies the formation slot to change.

スポンサードリンク

-MZ plugins

Copyright© PGMZ - The Community-Driven Plugin Library for RPG Maker MZ , 2026 All Rights Reserved.