Need help editing a small part of Yanfly's Ace Battle Engine

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
Script: https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/

I'm looking to disable the state icon displays under enemy names when they are inflicted with a status ailment/buff. The reason is because I'm using a script that displays state icons over the enemy, and so the state icons displayed under the enemy name while targeting them is redundant.

I found this portion of the script that I believe handles this:

#-------------------------------------------------------------------------- # refresh_battler_name #-------------------------------------------------------------------------- def refresh_battler_name(battler) contents.clear reset_font_settings change_color(normal_color) @text = battler_name(battler) icons = battler.state_icons + battler.buff_icons dy = icons.size <= 0 ? line_height / 2 : 0 draw_text(0, dy, contents.width, line_height, @text, 1) dx = (contents.width - (icons.size * 24)) / 2 draw_actor_icons(battler, dx, line_height, contents.width) endI commented out the last line, and it seems to remove the state icons like I want. However, it ends up looking like this:

As you can see, the name is shifted upwards, as if it is still accomodating the state icon which is now invisible. I would like for it to be centered, as if it were just targetting an enemy with no status effects inflicted. I've tried commenting out and editing various parts of the above snippet but to no success.

Any help on this would be greatly appreciated. If you need anymore information, please ask.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.

Try changing this line:

icons = battler.state_icons + battler.buff_iconsto this:

icons = []Also leave the last line commented out.  If icons is empty, it will automatically center the text vertically.

If that method is used to draw your actor details as well, you might find it has some unwanted side effects in other menus.  But if that method is only used in battles and only for enemies, you should be okay.
 
Last edited by a moderator:

MeowFace

Meow
Veteran
Joined
Feb 22, 2015
Messages
1,034
Reaction score
184
First Language
Meowish
Primarily Uses
dy = icons.size <= 0 ? line_height / 2 : 0change to

dy = 36(36 = y position in window, adjust it as you see fit)
 

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
@Shaz:

It worked! I figured that line in particular had something to do with it, but didn't know how to edit it properly. Everything I did resulted in crashes. After testing, I can't see any other problems this would cause. Actor states appear just fine. Thanks!
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top