A Very Simple Formation Gimmick request

So, having crossed a few hurdles, I feel like I can move on the very last couple bits of coding-- but I still lack the finesse to tamper with base scripts. What I need now is a very simple script in which a battler's place in the party formation determines their stats--- such as attack and defense. Let me make this clear that I am NOT, by any means, looking for anything quite as complex as Vlue's Formation Bonus, or Dekita's Battle Rows. I'm not even looking to be flashy. To put it into better perspective, the concept goes like this:


056df04e6ae14a0796fc5ff41c9d6151.png



As seen in this image, the closer a battler is to the top of the roster, they gain a modification of higher offense and lower defense. Likewise, the closer they are to the bottom, the lower their offense modification and higher their defense. (Also please note that I don't actually want these modifications to be visibly obvious to the player-- but a change you can only notice by looking at the parameters in a character's status page.)


I have also considered the idea of making every slot accessible (aka put your party members wherever the hell you want) even when a party is nearly empty, like so:


eca84d24f32d1a3dc626ffed997c8c8a.png



but really it's not an absolute requirement--- if it can't be done, then it can't be done and I won't worry about it. But the idea would help for when the player is stuck controlling a lone mage (notorious therein for having terribly low constitution). Just move him/her to the bottom and they won't be pummeled quite so horribly in battle. In case it worries anyone, I'll be having the party leader's sprite determined by an external force akin to "just hit a button and the leader sprite changes". But that's for another topic entirely--- if I find I need help for that too.


One more thing to factor in is that my party member count is not four, but five-- which should only require adding one party slot in the middle with the default unmodified stats--


c8c4e41e3f15c481993f6fdc8f1e1e25.png



I'm pretty sure Phantasy Star 2 did something quite like this, though I haven't played the game in years so I don't know too well. Either way, the intention is to create a very simple dynamic to the battle system without making drastic changes to the overall appearance of things, and to give the player a good reason to actually fiddle with that vanilla-lookin' battle formation. 


IF anyone is actually interested in trying something like this, I wouldn't mind it if you include something else that you might think adds to the dynamic. All I can think of is attack and defense power right now-- maybe MAT and MDF should be factored in as well? Who knows.


Anyhow I hope this was clear enough-- and doesn't sound boring as hell. Or difficult.  Thank you for taking the trouble to read, and I hope you all have a lovely day!
Evented this in 10 minutes. Let me explain:


4r4et.png


First, make some states that give the desired bonuses to the actors.


Store which actor is in formation slot 1 in a variable. Add the desired state to the actor in that variable and remove the other states. Did it for 4 actors, I don't think it would be harder for 5.


Not much more to explain. Remove all states from the other actors if you want.


Hope I helped ^^
Ok, well, I did try that out just today, and while it does definitely seem like a step in the right direction, the eventing idea... has just a couple flaws.


For one thing, the system tends to get very confused as to who is where when there's less than four party members. So far as it's concerned, everyone is member #4 until you get that last party member. So that's not good--- I guess what I could do in a case like that is make multiple common events that act depending on how many party members are present. I guess it could be done-- being that there are only five playable characters and they'll only leave and enter the party by way of events. Given that I can keep track.


But then there's the issue that the states don't take place immediately upon changing the formation. You have to exit out of the camp menu and then go back in to see the states have changed. I guess that shouldn't be such a big problem, but I kind of prefer it to be seamless.


Still, I'm not trying to knock it. If that's my only option, I'll definitely take it! I'll give it a little more time, and if I can't find an alternative, States & Common Events it shall be.

Original thread: https://forums.rpgmakerweb.com/threads/a-very-simple-formation-gimmick-request.68706/