Welcome to PGMZ! My goal is to make it easy for everyone to find and share great plugins for creating amazing games. As a plugin developer myself, I'm excited to grow this community with all of you.
NRP U Formation System - NRP_U_FormationSystem.js
Plugin desc : v1.00 It is a modified version of the formation system (By unagi ootoro).
License :
・Copyright: Retained
・Commercial Use: Allowed
・Modification: Allowed
・Redistribution: Allowed
・Details: See Download Page / In-plugin documentation
Author : unagi ootoro (Mod: Takeshi Sunagawa)
Website : https://github.com/NewRPGProject/MZMV_Plugin/blob/main/NRP_U_FormationSystem.js
Desc page : https://newrpg.seesaa.net/article/516396392.html
Download Page : https://raw.githubusercontent.com/NewRPGProject/MZMV_Plugin/main/NRP_U_FormationSystem.js
File name : NRP_U_FormationSystem.js
Help of plugin :
This plugin is a modification of the
formation system plugin (v1.2.0) created by unagi ootoro
by Takeshi Sunagawa in accordance with the MIT license.
https://raw.githubusercontent.com/unagiootoro/RPGMZ/master/FormationSystem.js
I am working on simplifying the specifications
and making various other changes to the system,
aiming for a Romancing SaGa 2-3-like formation system.
■ Major Changes
- Limited the number of formations that can be equipped to one.
Simply equipped formation = current formation.
※Accompanying this change, the ability to change formations
during battle was discontinued.
- The feature to learn formations was eliminated
and all can be selected by default.
- The switch was then made a valid condition for the formation.
- The number of party members was made a valid condition
for the formation.
- The actor's position can be swapped in the formation scene.
- The width of the list and the height of the help column
are now variable.
- The coordinates of the formation
are specified in grid units (48 pixels).
For example, x=10 would be 480.
- Added “Menu formation coordinate offset” as a parameter.
-----------------------------------------------------------------
The following is an explanation.
※The content has been changed from the original text
to match the modifications made.
-----------------------------------------------------------------
It is a plugin that introduces the formation system.
【Method of operation】
- Setting the formation to be used during battle
By opening the "Formation" menu from the menu screen,
Customize the formation slots available during battle.
【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)
This value is multiplied by the Grid Size,
and the offset is added to the actual placement coordinates.
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 note 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.
The one with the smallest ID among those meeting the criteria
will be used as the default formation.
The number of positions in the formation must be
as many as the number of actors participating in the battle.
For example, if 4 actors are to participate in a battle,
4 positions must be registered.
If from 1 to 3 actors are to participate in the battle,
registration for 3 positions is required.
■ Sample Formations
Please refer to the “Formation Datas”
for samples from the initial state.
- Standard (1) to (4) are the initial formations set
for each number of party members.
- Standard (Auto) is a formation in which the placement
is automatically adjusted according to the number of party members.
Choose whichever method you prefer.
■ 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
The formation will be enabled if the switch specified
in the "Formation Datas" is turned on.
If no switch is specified, it is always enabled.
【License】
This plugin is available under the terms of the MIT license.
@param FormationDatas
@text formation data
@type struct<FormationData>[]
@default ["{¥"Name¥":¥"Standard(1)¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"Standard formation in a vertical line.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"1¥",¥"Switch¥":¥"¥"}","{¥"Name¥":¥"Standard(2)¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"Standard formation in a vertical line.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"4¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"2¥",¥"Switch¥":¥"¥"}","{¥"Name¥":¥"Standard(3)¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"Standard formation in a vertical line.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"1¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"5¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"3¥",¥"Switch¥":¥"¥"}","{¥"Name¥":¥"Standard(4)¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"Standard formation in a vertical line.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"0.75¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2.25¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3.75¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"5.25¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"4¥",¥"Switch¥":¥"¥"}","{¥"Name¥":¥"Standard(Auto)¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"Standard formation in a vertical line.¥¥nThe placement is automatically adjusted according to the number of people.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3 - ($gameParty.battleMembers().length - 1)¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"5 - ($gameParty.battleMembers().length - 1)¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"7 - ($gameParty.battleMembers().length - 1)¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"2¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"9 - ($gameParty.battleMembers().length - 1)¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"¥",¥"Switch¥":¥"¥"}","{¥"Name¥":¥"Guadian¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"The lead escorts the rear guard.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"0¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"4¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"2¥",¥"Switch¥":¥"¥"}","{¥"Name¥":¥"Attack Delta¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"The one in front fights for the lead.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"0¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"1¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"3¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"5¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"3¥",¥"Switch¥":¥"¥"}","{¥"Name¥":¥"Square Shield¥",¥"IconIndex¥":¥"¥",¥"Description¥":¥"The two vanguards protect the rear guard.¥",¥"Positions¥":¥"[¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"0¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"1¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"0¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"5¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"4¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"1¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥",¥¥¥"{¥¥¥¥¥¥¥"X¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"4¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"Y¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"5¥¥¥¥¥¥¥",¥¥¥¥¥¥¥"StateId¥¥¥¥¥¥¥":¥¥¥¥¥¥¥"¥¥¥¥¥¥¥"}¥¥¥"]¥",¥"MapId¥":¥"¥",¥"NumberOfMembers¥":¥"4¥",¥"Switch¥":¥"¥"}"]
@desc
Set formation data.
@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 200
@desc
Specifies the X coordinate offset to the starting point of the formation in menu.
@param MenuFormationYOfs
@text Menu formation Y coordinate offset
@type number
@default 120
@desc
Specifies the Y coordinate offset to the starting point of the formation in menu.
@param BattleFormationXOfs
@text Combat formation X coordinate offset
@type number
@default 550
@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 150
@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 Text
@text Display text
@type struct<Text>
@default {"MenuFormationText":"Formation","EquipFormationList":"Current Formation","EmptySlot":"------"}
@desc
Sets the text used in the game.
@param GridSize
@text Grid size
@type number
@default 48
@desc The size of the grid used to position the formation.
By default, 1=48 pixels.
@param CommandPosition
@text Command position
@type number
@default 4
@desc The position at which to insert the formation command into the menu.
@param EacapeDistance
@text Escape distance
@type number
@desc The distance that is set back by the escape. The MZ standard of 300 is too short and can be adjusted.
@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 ChangeEquipFormations
@text Equipment formation change
@desc Change the formation used for battle.
@arg HasFormationId
@text Formation ID in possession
@type number
@desc Specify the formation ID you have.