Visu_1_BattleCore 中 Actor Battler Settings 选项中 JS:Home Position
// 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) - 800;
// Set Home Position
// 设置角色位置
if(index == 0){x=640,y=750};
if(index == 1){x=450,y=750};
if(index == 2){x=450,y=900};
if(index == 3){x=450,y=600};
if(index == 4){x=600,y=280};
this.setHome(x, y);