Change Row with the Formation Menu [Yanfly's Row Formation]

thebangzats

Villager
Member
Joined
Oct 12, 2015
Messages
6
Reaction score
0
First Language
Indonesian
Hi all, so I'm trying to add a twist to Yanfly's Row Formation script and instead make something similar to the system in Darkest Dungeon.

In a nutshell, both allies and enemies have 4 rows, and each can only be occupied by 1 character.
Skills have a user requirement (must be standing in a certain row) and can only target certain rows (e.g. Slash can only be used by someone in Row 1 or 2, and can only hit enemies in Row 1). Some Skills move you around, but you can also do it the hard way and spend a turn moving. Whenever you move, you shift the party around. If someone in Row 1 moves back to Row 2, whoever is in Row 2 moves to Row 1. If someone in Row 1 moves back to row 3, whoever is in Row 2 moves to Row 1, and whoever is in Row 3 moves to Row 2.


(you can also just click the link and watch their battle system in action).

I'm not very good with scripting, but I did manage to make moving in battle work using Skills that move you and an ally at the same time. What I don't know how to do is add the ability to move around outside of battle.

Yanfly's Row Formation script has a Row Menu that you can open up both inside and outside of battle, but I can't use this because from a lot of searching, no one seems to know how to make it so that only 1 character can occupy 1 row. Without the ability to change rows outside of battle, it becomes a little tedious. I think I have an elegant solution, but I can't script my way out of a paper bag, so some help would be nice:

What I need is a way to control Rows using the Party Formation menu, NOT the Row menu.

You know the Formation option in the menu that lets you reorder your party? That has very little use, but what if we set it so that whoever is first on the party formation will be in Row 1. Whoever's second in Row 2. Third in 3. Fourth in 4. If you happen to have more party members than the number of rows, nothing would happen with them, so Fifth in the position will not be in Row 5, he'll just not be in the party, same with Sixth, Seventh and so on.




With a Party Formation like the above Row 1, 2, 3, 4 would be Harold, Therese, Marsha and Lucius.


If you shift it around like the second image, Row 1, 2, 3, 4 would be Marsha, Therese, Harold, Lucius instead.



If possible, this formation should also reset at the end of every battle, so let's say you go into battle with the row order of Harold, Therese, Marsha and Lucius. You move Harold back to Row 2 and Therese takes his place. You win the battle with the row order of Therese, Harold, Marsha and Lucius. When you go back to the map, you revert back to Harold, Therese, Marsha and Lucius.


Tl;Dr
How do I make it so that I control the Row using the Party Formation menu instead of the Row menu? Where the first in the party will be in Row 1, second in Row 2, etc.


Thanks in advance.
 
Last edited by a moderator:

thebangzats

Villager
Member
Joined
Oct 12, 2015
Messages
6
Reaction score
0
First Language
Indonesian
I'll give it a shot :)


@thebangzats Congratulations! My shortest snippet yet :)


Continuum Row by Index


Heya, I tried it and it works... kinda.

The problem now is that the row is locked to the formation forever. One workaround is that instead of changing rows, you'd just change Formation for the rest of the game. For example, a skill that pushes you back will use $gameParty.swapOrder instead, swapping the order of the party, thereby swapping the rows. However, this feels like a messy workaround and I basically lock myself out of all the Row commands.

What if your script only activates every time you leave a battle? Example scenario:
1. Party order is A, B, C, D. Because of your script, the Row formation is also now A, B, C, D.


2. You enter battle, maybe use some skills to move rows around, and end the battle as D, C, A, B. Your party order is still A, B, C, D because the script won't be active in battle


3. You leave battle, script activates again and because Party order is A, B, C, D the Row formation is A, B, C, D

Basically, instead of a script that simply forces Party formation = Row formation. What's needed may be a way to reset formations at the end of each battle.



Tl;Dr


Changing Party formation outside of battle = changing Row too, like it is now with this script.
Changing Row inside battle changing Party formation, not like the script which locks it indiscriminately.


Exiting a battle (winning, escaping) = reset your Row formation to reflect your Party formation.
 
Last edited by a moderator:

continuumg

Veteran
Veteran
Joined
Oct 27, 2016
Messages
68
Reaction score
43
First Language
English
Primarily Uses
Sure, I could do that. Might have to wait a day or two; pretty busy


EDIT


@thebangzats


Okay, I updated the original file. I believe that should work.


Give'r a try :)
 
Last edited by a moderator:

thebangzats

Villager
Member
Joined
Oct 12, 2015
Messages
6
Reaction score
0
First Language
Indonesian
Sure, I could do that. Might have to wait a day or two; pretty busy


EDIT


@thebangzats


Okay, I updated the original file. I believe that should work.


Give'r a try :)
Hmmm, tried it and it doesn't seem to work. Does it work on your end?

Just to be sure I turned the script off, used a skill that shifts an ally's rows, and it works as intended. Turn the script on and it doesn't move the row at all. I also tried using the Row Menu and it's still locked like before.

EDIT: I'll try in a fresh test project. Maybe it's just incompatible with other scripts.
 
Last edited by a moderator:

continuumg

Veteran
Veteran
Joined
Oct 27, 2016
Messages
68
Reaction score
43
First Language
English
Primarily Uses
I haven't been able to test the row menu; for some reason I can't get it to work with or wiithout my script. I'll see if I messed something with the skills.


EDIT @thebangzats Seems to work on my end. How are your skills set up? Maybe I missed a method of changing rows.


I tested the following


<Change User Row: 1>


<Push Back User Row: 1>
 
Last edited by a moderator:

thebangzats

Villager
Member
Joined
Oct 12, 2015
Messages
6
Reaction score
0
First Language
Indonesian
I haven't been able to test the row menu; for some reason I can't get it to work with or wiithout my script. I'll see if I messed something with the skills.


EDIT @thebangzats Seems to work on my end. How are your skills set up? Maybe I missed a method of changing rows.


I tested the following


<Change User Row: 1>


<Push Back User Row: 1>


Alright, I tested it again with a new test project. I can confirm this works :D
I don't know what script was conflicting with this, but I did just use one of Yanfly's Sample Projects instead of my own (which is chock full of scripts I might not even use), so whatever other thing was causing the script not to work the first time, I'll just cross that bridge when I come to it.

Thanks again :D
 
Last edited by a moderator:

continuumg

Veteran
Veteran
Joined
Oct 27, 2016
Messages
68
Reaction score
43
First Language
English
Primarily Uses
Excellent :)


No problem


EDIT @thebangzats


The problem might be that your project uses an outdated version of the row plugin. You should check.


Make sure you put mine below after.
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with a session of the Interactive Text Adventure! Feel free to drop by!
Am I allowed to make a recruitment thread NOT for RPG Maker stuff?

Like for a group project?
(NOT RPG Maker project.)
If the new RPG Maker's character generator produces full busts and can match the art styles of previous RPG Makers, that might be a big incentive to buy it. An easier way to craft custom map tile sheets though would probably be an even bigger game changer.
Note to self: One lemon is enough to flavor my drink.
'I'm not homophobic, I'm not scared of me house.' - Peter Kay xD

Forum statistics

Threads
98,194
Messages
950,289
Members
129,498
Latest member
Mangas
Top