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,326
Reaction score
482
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

Worst part about doing a plugin based on an existing system: figuring out the best way for developers to set up the data.
Right now, my free time is less when Covid 19 in my country.
Begin to reduce the number of daily infections to 0.
Okay someone really needs to fix that broken railing, its a health hazard...

Forum statistics

Threads
99,210
Messages
963,079
Members
130,798
Latest member
dirty_score
Top