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 Profile Posts

Okay someone really needs to fix that broken railing, its a health hazard...

I'm starting to wonder if I should go the Half Minute Hero route with my game. The character's main weapon is logistically way too strong. So I can't really let the player continuously grow it.... But if they had to build it up each time like HMH, that could work. Also it lets me take advantage of my randomly generated maps so much more. Hmm... This could work! :LZSexcite:
std::vector, std::map and std::string. Three reasons why I'd take C++ over C. :D

Forum statistics

Threads
99,203
Messages
963,007
Members
130,791
Latest member
xericho
Top