Yanfly Battle engine adjustment.

alaky

Villager
Member
Joined
Oct 16, 2015
Messages
14
Reaction score
0
First Language
Portuguese
Primarily Uses
RMVXA
Hello everyone! I know it may seen a minor thing but, this thing has been bothering me for a while.
In this project I'm working, I use Mog Hunters Battle Hud Ex to create all the battle huds.
And make it look like this:
Picture1.jpg
Yet I also use Yanfly's battle engine that helps a lot in the combat overall experience.
The "issue" happens when I use a skill and the status menu created by Yanfly appears.

When I have more than one character in the party, and select a skill that effects a party member, this screen appears:
Picture2.jpg
Miharu the character on the center is the party leader, the battler is in the middle postion, this being done by Mog's battle Hud ex. But Yanfly's Battle engine, uses the index to define the scope of the skill as you can see in the highlighted area of the picture above.

The thing is, I want to edit that part of the script to "swap" the display of the Index0 and Index1 in battle. Making the scope appear below the character battler.
Picture3.jpg
I tried messing with Yanfly's Battle Engine, and figured out wich parts should do this(It starts on line 1726 of the cod), yet I wasn't able to edit it:
Mog Battle Hud ex: Yanfly's Battle Engine:
I think you guys can help me figuring out what changes I have to do in order to make this work. Thanks a lot, I'll be waiting your replies.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,334
Reaction score
483
First Language
English
Primarily Uses
RMVXA
Based on the numbers you have for MOG HUD I would start with this and see if it adjusts properly.
Ruby:
class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # overwrite method: item_rect
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new
    rect.width = contents.width / $game_party.max_battle_members
    rect.height = contents.height
    if index == 0
      rect.x = 188
    elsif index == 1
      rect.x == 8
    elsif index == 2
      rect.x == 370
    end
#    rect.x = index * rect.width
    if YEA::BATTLE::BATTLESTATUS_CENTER_FACES
      rect.x += (contents.width - $game_party.members.size * rect.width) / 2
    end
    rect.y = 0
    return rect
  end
end
 

alaky

Villager
Member
Joined
Oct 16, 2015
Messages
14
Reaction score
0
First Language
Portuguese
Primarily Uses
RMVXA
Based on the numbers you have for MOG HUD I would start with this and see if it adjusts properly.
Ruby:
class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # overwrite method: item_rect
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new
    rect.width = contents.width / $game_party.max_battle_members
    rect.height = contents.height
    if index == 0
      rect.x = 188
    elsif index == 1
      rect.x == 8
    elsif index == 2
      rect.x == 370
    end
#    rect.x = index * rect.width
    if YEA::BATTLE::BATTLESTATUS_CENTER_FACES
      rect.x += (contents.width - $game_party.members.size * rect.width) / 2
    end
    rect.y = 0
    return rect
  end
end
Thanks a lot Roninator2!!! It works!!
Yet, the third character swapped places with the second, and the second doesn't appear) any thoughts?
But You are right on the spot!
Picture4.jpg
You don't know how happy I am to see this!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Inspired by @fluffymonster 's Cute Ghost
His name is POKO!
I made a giant tree + treehouse for the next country woods pack \o\
Calculated my tax refund - CHEERS
Looked at my student debt - cries
Still, might be just enough left over to pay for my new computer, which would be awesome!
And my student debt will be fully paid, which is also pretty nice.
They say nice guys finish last. But mean guys don't finish at all!
I keep forgetting how much I hate how VX-MV implements fences and autotile tables.

Forum statistics

Threads
99,414
Messages
965,045
Members
131,035
Latest member
KeziaG96
Top