For those looking to setup sideview actor position with Visustella Battle Core.
Basic overview: Here
Custom Dynamic Example:
Basic overview: Here
Custom Dynamic Example:
1280 x 720
Up to 4 Battle Members
Single Battle Member:
2 Battle Members:
3 Battle Members:
4 Battle Members:
Up to 4 Battle Members
Single Battle Member:
2 Battle Members:
3 Battle Members:
4 Battle Members:
VisuMZ_1_BattleCore > Actor Battler Settings > JS: Home Position >
Replace code with:
Of course, this is just an example, you can modify the values to suit your needs.
Replace code with:
Code:
// 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 = 832;
y = 408;
}
if (members == 2) {
x = 832;
y = 360;
y += index * 72;
}
if (members == 3) {
x = 832;
y = 360;
y += index * 72;
if (index == 2) {
x = 880;
y = 312;
}
}
if (members == 4) {
x = 832;
y = 360;
y += index * 72;
if (index == 2) {
x = 880;
y = 312;
}
if (index == 3) {
x = 880;
y = 480;
}
}
// 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);
Of course, this is just an example, you can modify the values to suit your needs.