NM Play

~ 0..0 ~
Veteran
Joined
Apr 5, 2015
Messages
47
Reaction score
24
First Language
Spanish
Hi just wanted ask for a addon to Yep_RowFormation plugin for custom enemy row position depending of they row number, like actors settings:


*actor settings are like this:


---Row 1 Settings---


Row 1 Home X =


Row 1 Home Y =


---Row 2 Settings---


...


*Something  like i want for enemies:


---Row 1 Enemy Settings---


Row 1 Home X =


Row 1 Home Y =


---Row 2 Enemy Settings---


...


*Instead of (the original plugin settings):


---Enemy Rows---


Enemy Row X =


Enemy Row Y =


I think it isnt hard to do, i tried but rly failed hard, so thanks.
 
Last edited by a moderator:

Quo

Villager
Member
Joined
Jan 20, 2013
Messages
8
Reaction score
2
First Language
English
Primarily Uses
I've actually been working on doing what this addon would do without the use any addons... because it seems like the script should be able to adjust all positions by using formulas to calculate them all out. After all, the formulas for each row are the same by default. Logically, even if there was only one setting for all player character rows, if it used the same formula as the default settings, it should do the same thing... right?


The problem is, I'm not having very much luck with this, and instead I've been seeing some strange results.


For starters, pretty much any formula I use for the enemy's Y position has the enemy party slide upwards after any row processing occurs on the player side. If a player character moves to another row, the enemy party slides up. Even if it's just entering the row screen and leaving without changing anything. This only happens the first time one of these things occurs, but it looks and is glitchy. This has been the problem I've been dealing with since around 6PM last night, and over 24 hours later I've not gotten anywhere on this front.


What's more, I just noticed that the more characters in a row, the further they seem to get from the row in front of them. If two characters are in row 2, and I have another character join them, the two characters that were in that row slide backwards as the new character slides into the row with them. This doesn't really make sense, and is also inconsistent positioning... and this is with the default formula.


I could set the X locations manually for player characters (which is what this addon would do for enemies, and might be what I need afterall if this is how I have to do things), but as it stands, I can't seem to get any equation that actually positions the characters properly on either side. And using hard numbers for each player row individually would probably get the player side 100% perfect, but that doesn't help me with the enemy side at all. I essentially want the enemy party to functionally mirror the player's party as far as position management. Like, to the letter, as they're supposed to just be "another party of characters" like yourself, who follow the same rules as your party does (usually). But everything I've tried has failed to deliver on this front.


So unless I'm doing something wrong and this actually is possible, this addon would really save my day.
 

NM Play

~ 0..0 ~
Veteran
Joined
Apr 5, 2015
Messages
47
Reaction score
24
First Language
Spanish
Right now im doing the enemy x position like this:


"screenX"


(that make the enemy x to be like in the troop screen where you add the enemy sprite) Is not perfect but works well.


 And enemy Y:


"maxRowY - (maxRows - rowId) * n - n"


x = number (pixels you want move)


literally break my mind yesterday for this maybe it can work for you if u edit it a bit.
 

Quo

Villager
Member
Joined
Jan 20, 2013
Messages
8
Reaction score
2
First Language
English
Primarily Uses
Like I said, I'm currently using the default formulas for the player side. So...


X: maxRowX - (maxRows - rowId) * 112 + rowIndex * 32
Y: centerY + ((rowSize / -2 + 0.5) + rowIndex) * 32


Since maxRowX uses screenWidth, which grabs the right side of the screen, I swapped it out for 0 (the left side) for the enemy X formula, and then reversed the additions/subtractions on the rest of it (except for maxRows-rowID, as that gets the proper row number) since they're going from the opposite direction. Seeing as how I couldn't use a variable for my new maxRowX, I just plugged it into the same spot within parenthesis. Which got me:


X: (0 + partySize * 32 + 16) + (maxRows - rowId) * 112 - rowIndex * 32
Y: centerY + ((rowSize / -2 + 0.5) + rowIndex) * 32


Obviously, Y is the same as the player side (as you would think it should be), and that's actually where I'm having the most significant problems. It should logically work, and the enemy party ends up where I want them eventually... but they start out in the wrong position. As soon as the row screen is accessed, or a player character moves to a different row, they slide up into the correct position... but they don't start there. They start closer to where they are in the editor, which is just wherever they're placed when added through the Add button, because I'm trying to set their positions to a more precise location with this script. Among other things, obviously...


Anyway, I still haven't had any luck with this. I'm going to look over the formulas a little more closely and really dissect them. Because I actually have no idea why maxRowX needs to know the party size. I suppose I'll have to figure that out... or just remove it.


Either way, wish me luck!


[EDIT]


So I managed to find a useful script command that shifts the enemy party to the correct Y coordinate by itself. It still looks weird, but it's progress...


BattleManager.requestRefreshRows();


Still, I don't know if any of this helps you at all. I could try helping you figure out a formula to get enemies where you want them, but since I'm still struggling with doing that in my own project, I can't say I'd have any better luck in helping you with yours. Still, I'm going to continue working on getting mine working right until I am successful or this addon request gets made.


The latter would definitely be easier... but if I do manage to figure it out, I'll try to remember to report my findings back here and possibly help you (assuming the addon isn't made by then).


In the mean time, good luck.
 
Last edited by a moderator:

Latest Threads

Latest Posts

Latest Profile Posts

having anxiety during all this virus stuff is the absolute worst. I'm the only one missing out on my friend's wedding in Sept. because I can't be in large groups of people anymore due to anxiety.
Well... I just spent most of the day making something I cant even use xD

Hero_1.png
The idea was to look at the original but at a medium distance.
In hindsight, I might as well have just edited the original lol... I didn't intend for it to end up so similar.
does anyone else feel tired after completing a sprite?
Fun fact: I always lower every tileset saturation (about 15%-25% of it) in my projects.

Forum statistics

Threads
113,903
Messages
1,078,317
Members
148,002
Latest member
Silvernimbus
Top