MZ Moving the home position of the sideview battlers

So apparently, since my dumbass didn't buy rpgmaker on Steam, I don't get the plugin to move my side-view battlers the normal way, I have to go into Visualstella and code it myself. The only problem is I don't have a clue what any of this does or means.

// Declare Constants
const sprite = this;
const actor = this._actor;
const index = arguments[0];

// Make Calculations
let x = Math.round((Graphics.width / 2) + 192)
x -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);
x += index * 32;
let y = (Graphics.height - 200) - ($gameParty.maxBattleMembers() * 48);
y -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);
y += index * 48;
// 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);

I wanted to have the sideveiw battlers like this...
Untitled_Artwork.png

Can anyone walk me through how to change the home position with this code?
Something like this (you can change where x starts, where y starts and how much every battler is to the right of the previous with how much index is multiplied with):

// Declare Constants
const sprite = this;
const actor = this._actor;
const index = arguments[0];

// Make Calculations
let x = 200;
x += index * 100;
let y = 600;
// 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);
// Declare Constants
const sprite = this;
const actor = this._actor;
const index = arguments[0];
Don't change that, this only exists due to how JavaScript works.

// Make Calculations
let x = Math.round((Graphics.width / 2) + 192)
x -= Math.floor((Graphics.width - Graphics.boxWidth) / 2);
x += index * 32;
let y = (Graphics.height - 200) - ($gameParty.maxBattleMembers() * 48);
y -= Math.floor((Graphics.height - Graphics.boxHeight) / 2);
y += index * 48;
That's math. The position of each battler is calculated.

// 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);
This code section looks super complicated but all it does is to analyze whether your actor, or their class, equip, states... contains a <SIDEVIEW HOME OFFSET> notetag. You can keep this section as it is, or remove it when you don't plan to use notetags anyway.

// Set Home Position
this.setHome(x, y);
Again, don't touch that.

In the end:
The math section is where you want to customize your code, so I suggest to replace the whole "math" part with this:

Code:
let x = 300 * index + 100;
let y = Graphics.height - 200;

and then change the numbers until it fits.
So apparently, since my dumbass didn't buy rpgmaker on Steam, I don't get the plugin to move my side-view battlers the normal way
This is definitely not true even if you bought RPGMaker outside of Steam. That plugin should be available as a separate download somewhere. Alternatively, even if you bought it outside of Steam you should be able to also activate it on Steam with the same code.
This is definitely not true even if you bought RPGMaker outside of Steam. That plugin should be available as a separate download somewhere. Alternatively, even if you bought it outside of Steam you should be able to also activate it on Steam with the same code.
my brother, sister or sibling in Christ, I am tired of digging for that damn thing. i am good

Don't change that, this only exists due to how JavaScript works.


That's math. The position of each battler is calculated.


This code section looks super complicated but all it does is to analyze whether your actor, or their class, equip, states... contains a <SIDEVIEW HOME OFFSET> notetag. You can keep this section as it is, or remove it when you don't plan to use notetags anyway.


Again, don't touch that.

In the end:
The math section is where you want to customize your code, so I suggest to replace the whole "math" part with this:

Code:
let x = 300 * index + 100;
let y = Graphics.height - 200;

and then change the numbers until it fits.thank

thanks for the rundown

Original thread: https://forums.rpgmakerweb.com/threads/moving-the-home-position-of-the-sideview-battlers.181673/