MZ VisuStella MZ Battle Core Actor Positions Help

I am playing around with the actor battler positions in the Battlecore because I recently upped my resolution to 1280x720. I am editing the code for actor home positions over and over and nothing seems to be changing, and the positions of the actors either don't move or are stuck on top of each other. The code is listed below. Does not seem to be working the intended way. Is there any better way to add dynamic battler positions?


// Declare Constants

const sprite = this;

const actor = this._actor;

const index = arguments[0];

const members = $gameParty.battleMembers().length;

let x;

let y;



// Make Calculations

if (members == 1) {

x = 800;

y = 600;

}

if (members == 2) {

x = 1200;

y = 650;

y += index * 64;

}

if (members == 3) {

x = 1200;

y = 650;

y -= index * 64;

if (index == 2) {

x = 1000;

y = 500;

}

}

if (members == 4) {

x = 1200;

y = 650;

y -= index * 64;

if (index == 2) {

x = 950;

y = 450;

}

if (index == 3) {

x = 900;

y = 400;

}

}



// Home Position Offsets

const offsetNote = /<SIDEVIEW HOME OFFSET:[ ]([\+\-]\d+),[ ]([\+\-]\d+)>/i;

const xOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$1) : 0));

const yOffsets = actor.traitObjects().map((obj) => (obj && obj.note.match(offsetNote) ? Number(RegExp.$2) : 0));

x = xOffsets.reduce((r, offset) => r + offset, x);

y = yOffsets.reduce((r, offset) => r + offset, y);



// Set Home Position

this.setHome(x, y);

Original thread: https://forums.rpgmakerweb.com/threads/visustella-mz-battle-core-actor-positions-help.170461/