KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
153
Reaction score
57
First Language
English
Primarily Uses
RMMV
Using Yanfly's Battle Core, it let's you play around with the default positioning formula for the party members as a group, within battles. One issue I'm running into however, is that if the party is full, they settings are perfect. However, with just one or two members in the party, it looks really awkward because the two party members still remain up top.

So formula wise, is it possible to take into account how many actors are in the party and push the standard position down a few notches when it's not full?

Here's the default formula's for X Positions:
screenWidth - 16 - (maxSize + 2) * 32 + index * 32
And for Y:
screenHeight - statusHeight - maxSize * 48 + (index+1) * 48 - 32

Here's a visual example of my problem. Full 3 actor party looks good:
Here1.png


One person party seems off since the first actor remains in that top starting position:
Here2.png

Any kind of insight or alternatives method would be awesome! Thank you in advance!
 

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
291
Reaction score
82
First Language
English
Primarily Uses
RMMV
The only way I see this working is to make it so that party member 1(index 0) is always in the middle. You can try using Yanfly’s Row plugin to put member one in his own row. This will allow you to adjust his position independent of the other members. Adjust the Y spacing of your other two members to be further apart while adjusting the Y position of member 1 lower down and his X position closer to the row your other members are on so that they all appear on the same row. (or don’t if you want to give them a triangle formation) Hope that makes sense.
 
Last edited:

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
291
Reaction score
82
First Language
English
Primarily Uses
RMMV
That said, it might be possible to do this with just the default positioning formula. I haven’t messed with it enough to know. Try adjusting the “index” part of the formula.
 

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
153
Reaction score
57
First Language
English
Primarily Uses
RMMV
That said, it might be possible to do this with just the default positioning formula. I haven’t messed with it enough to know. Try adjusting the “index” part of the formula.
Thanks for the reply! I'm not much of a math person or a coder, so a lot of the formula stuff goes right over my head. The only reason I got them to align that way in the screenshots was just a lot of back and forth number plugging, rather than any actual comprehension of what the formula is doing haha.

Any insight on how the index is being calculated in the formula? Like is it literally just taking the party position number itself? Cause if that's the case, I'd have to figure out how to add/multiply something with "0" that also increments "1" and "2" in one formula, right?
 

Rugman

Veteran
Veteran
Joined
Jun 11, 2020
Messages
291
Reaction score
82
First Language
English
Primarily Uses
RMMV
Right there with you man. I just guess, edit and look at the result. I started with this Y formula:
"Graphics.boxHeight - 128 - ($gameParty.maxBattleMembers() - index - 1) * 48"
I changed: "index - 1) * 48"
to "index - 1) * -48".
That made my party line up from bottom to top instead of top to bottom, so I'd say that "index" is more than just a number.

I feel like it would be possible to do what you want using "$gameParty.members().length" in your formula, which returns the party size. If you want the lazy way, use Yanfly's Row Formation like I was saying and set up your party up like this:
----------------------------3---------3
Three party members--1 ------or----1
----------------------------2 --------2
Member 1 will always be in the middle.
 
Last edited:

KingKraken

Veteran
Veteran
Joined
Apr 2, 2015
Messages
153
Reaction score
57
First Language
English
Primarily Uses
RMMV
Might have to cut my losses for now and go with the Row Formation option then! Especially since all I need is the actor to look decent in the scene, haha. Thanks so much for humoring my attempt at mathing a solution though!
 

Latest Threads

Latest Profile Posts

Ami
need a time to not open my MV,still addicted with new vegas

i wonder what addiction effect behind playing new vegas too much,maybe INT & Science gone worse in many days :D
cdjensen94 wrote on Kaliya's profile.
Are you the one who develops Kaliya's Visual Map Enhancements. If so I desperately need some help. I bought the plugin back a few months. I've only started using it recently.
Cause MP Damage instead of HP, Localization Plugin for Translation | RPG Maker News #112

Here in Fla were are seeing crazy covid spikes and some vaccinated getting bad infections. I had a mild fever on Thurs but it went down fast. How is everyone else doing. Hopefully you are all well. :)
Wish I was better at art, specifically that I was faster at it, bc this one NPC took Several Days to complete! It's gonna take So Extremely Long to do all of the art for my game, never mind writing it... Anyways, here's my gorgon, Hopernica Sthyxis!

57b88732c7abbcd84981dacf624a98495af61fcc.gifv

Forum statistics

Threads
113,831
Messages
1,077,763
Members
147,887
Latest member
Narilus
Top