Moghunter Battle HUD: Design issue

Hey guys,

I've been having trouble with something for 2 days and I can't seem to figure it out...

Using these two Battle Design Plugins:
Battle HUD
Battle Commands

This is how it should look like:

DzjuPbP.png


1. I would like the command window position to be fixed to always the same place.
2. However, the Faces (face_1, face_2) should always move each turn, to show which actor's turn it is.

In the MOG_BattleHUD Plugin, there is a Parameter "Command Auto adjust".
if I set it to true, both the command AND the faces move each turn.
if i set it to false, none of them move.

Maybe I need to change something here?

Spoiler: MOG Battle HUD
//==============================
// ** createAllWindows
//==============================
var _alias_mog_bhud_createAllWindows = Scene_Battle.prototype.createAllWindows;
Scene_Battle.prototype.createAllWindows = function() {
_alias_mog_bhud_createAllWindows.call(this);
// ACTOR COMMAND ---------------------------------------------------------------------
this._actorCommandWindow.x = Moghunter.bhud_com_x;
this._actorCommandWindow.y = Moghunter.bhud_com_y;
this._actorCommandWindow.vis = this._actorCommandWindow.visible;
this._actorCommandWindow.width = Moghunter.bhud_com_width;
this._actorCommandWindow.height = Moghunter.bhud_com_height;
if (String(Moghunter.bhud_com_layout) === "true") {this._actorCommandWindow.opacity = 0};


//==============================
// ** update Battle Commands
//==============================
Window_ActorCommand.prototype.updateBattleCommands = function() {
if ($gameTemp._bhud_position_active) {
this.visible = this.active;
if ($gameSystem._bhud_auto_com) {
this.x = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x;
if (this._com_mode === 0) {
this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y - this.height;}
else {this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y}; }
else {
this.x = Moghunter.bhud_com_x;
this.y = Moghunter.bhud_com_y;
};
};
};

//==============================
// ** update Position S
//==============================
Window_ActorCommand.prototype.updatePosS = function() {
if ($gameTemp._bhud_position_active) {
this.visible = this.active;
if ($gameSystem._bhud_auto_com) {
if (this.xp != $gameTemp._bhud_position_active[0] || this.yp != $gameTemp._bhud_position_active[1]) {
this.xp = $gameTemp._bhud_position_active[0];
this.yp = $gameTemp._bhud_position_active[1];
this.org[0] = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x;
if (this._com_mode === 0) {
this.org[1] = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y - this.height;
} else {
this.org[1] = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y;
};
this.org2 = [
this.org[0] + Moghunter.bhud_com_slideX,
this.org[1] + Moghunter.bhud_com_slideY
];
if (this._actorVis != this._actor) {
this.x = this.org2[0];
this.y = this.org2[1];
this._actorVis = this._actor;
};
};
this.slideWindow(this,false);
} else {
this.slideWindow(this,false);
};
};
};

//==============================
// ** update Position N
//==============================
Window_ActorCommand.prototype.updatePosN = function() {
if ($gameTemp._bhud_position_active) {
this.visible = this.active;
if ($gameSystem._bhud_auto_com) {
this.x = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x;
if (this._com_mode === 0) {
this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y - this.height;}
else {this.y = $gameTemp._bhud_position_active[1] + Moghunter.bhud_com_y}; }
else {
this.x = Moghunter.bhud_com_x;
this.y = Moghunter.bhud_com_y;
};
};
};

Spoiler: MOG Battle commands
//==============================
// * Create Face
//==============================
Window_ActorCommand.prototype.create_face = function() {
if (this._face) {this.removeChild(this._face)};
var fname = String("Face_" + this._actor._actorId)
var face_img = ImageManager.loadBcom(fname);
this._face = new Sprite(face_img);
this._face.x = Moghunter.bcom_face_x;
this._face.y = Moghunter.bcom_face_y;
this.addChild(this._face);
};

Basically, the turn window moves exactly like the faces should move, even if i set "Command Auto adjust" to false:

Spoiler: Turn
//==============================
// * Refresh Position
//==============================
Battle_Hud.prototype.refresh_position = function() {
this.set_hud_position();
this.create_sprites();
this._layout.x = this._pos_x;
this._layout.y = this._pos_y;
if (this._face) {
this._face.x = this._pos_x + Moghunter.bhud_face_pos_x;
this._face.y = this._pos_y + Moghunter.bhud_face_pos_y;
};
if (this._turn) {
this._turn.x = this._pos_x + (this._turn.width / 2) + Moghunter.bhud_turn_pos_x;
this._turn.y = this._pos_y + (this._turn.height / 2) + Moghunter.bhud_turn_pos_y;
};

Your help would be VERY appreciated...!
OK I really think I can't solve this myself, if somebody finds the solution I'll pay you 20 Euros per paypal
So it seems that the x coordinate of the command window is determined by

$gameTemp._bhud_position_active[0]

So I'm trying to delete that for the command x position, and instead, integrate this into:

//==============================
// * Create Face
//==============================
Window_ActorCommand.prototype.create_face = function() {
if (this._face) {this.removeChild(this._face)};
var fname = String("Face_" + this._actor._actorId)
var face_img = ImageManager.loadBcom(fname);
this._face = new Sprite(face_img);
this._face.x = $gameTemp._bhud_position_active[0] + Moghunter.bcom_face_x;
this._face.y = Moghunter.bcom_face_y;
this.addChild(this._face);
};

But when I do that, it says: Cannot read property of 0 of null.
What do I do now?
So it seems I found the solution. All I had to do is change

this._x = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x; in the command window options

to

this._face.x = $gameTemp._bhud_position_active[0] + Moghunter.bhud_com_x;

and now it works, I hope. :^)

Original thread: https://forums.rpgmakerweb.com/threads/moghunter-battle-hud-design-issue.84026/