Display Stats normally in YF Ace Battle Engine

Hi folks,

I need help with Yanfly Battle Engine. What the script gives me: Stats infliced / removed are either displayed as pop-ups or they aren't displayed at all by disabling the pop-ups. However, I want them to display in the Battle Log just as it is in the default battle system.

Can someone help me with that? Working for hours with this script and I don't see it's possible.

(I can't post the Script, it's huge...)

Did you change the settings to show the message?
Ruby:
    MSG_ENEMY_APPEARS  = false  # Message when enemy appears start of battle.
    MSG_CURRENT_STATE  = false  # Show which states has affected battler.
    MSG_CURRENT_ACTION = true   # Show the current action of the battler.
    MSG_COUNTERATTACK  = true   # Show the message for a counterattack.
    MSG_REFLECT_MAGIC  = true   # Show message for reflecting magic attacks.
    MSG_SUBSTITUTE_HIT = true   # Show message for ally taking another's hit.
    MSG_FAILURE_HIT    = false  # Show effect failed against target.
    MSG_CRITICAL_HIT   = false  # Show attack was a critical hit.
    MSG_HIT_MISSED     = false  # Show attack missed the target.
    MSG_EVASION        = false  # Show attack was evaded by the target.
    MSG_HP_DAMAGE      = false  # Show HP damage to target.
    MSG_MP_DAMAGE      = false  # Show MP damage to target.
    MSG_TP_DAMAGE      = false  # Show TP damage to target.
    MSG_ADDED_STATES   = false  # Show target's added states.
    MSG_REMOVED_STATES = false  # Show target's removed states.
    MSG_CHANGED_BUFFS  = false  # Show target's changed buffs.
Did you change the settings to show the message?
Ah, I see. My bad. Thank you.
@Roninator2 Basically my problem is solved now, but TBH, removing the stat pop-ups is just a workaround because I can't seem to change the stat names displayed when the stat pops up. They seem to come directly from the database, but I don't see where their database name is set, and for me that's bonkers. I need a way to set the stat names (death, poison, stun...) in the script as constants so I can change them. Namely, depending on whether a switch is on or off, a stat can have two different names. Is this possible? :LZSsmile:
stat names (death, poison, stun...)
That's two different things.
stat -> hp, mp, atk, def
death, poison, stun -> state

The state is obviously in the database for the states. If you want two names there, that will require a script. Depending on what scripts you have.
the stat is in the Terms tab of the database. This will be much harder because the change has to affect every script you are using that makes a reference to the stats. Unless it's the xparams or sparams, then it has to be made unless you have a script that has defined them already.
I have Blackmorning base script in my project and it has those defined. So if that was the case for you, then we can modify the script to include another option. but it still has to be changed for every script that makes a reference to them.
@Roninator2 Basically my problem is solved now, but TBH, removing the stat pop-ups is just a workaround because I can't seem to change the stat names displayed when the stat pops up. They seem to come directly from the database, but I don't see where their database name is set, and for me that's bonkers. I need a way to set the stat names (death, poison, stun...) in the script as constants so I can change them. Namely, depending on whether a switch is on or off, a stat can have two different names. Is this possible? :LZSsmile:
You know that your request could be considered a terrible game design?

Unless you are planning to add a second language to your game interface, that'd be bonkers.
@Roninator2 In terms of correct wording, it's the states then. For example, I want to be able to rename what's written as Collapse, Poison, Stun, etc.

1666528098557.png


@kyonides Yes, it's a language based change. I have a switch defined that changes several terms depending if it's ON or OFF. I need to be able to change the states as well. So basically it would be enough to have different state names based on Switch 1 is ON or OFF.
This works. Change the switch number and the states are like this
switch off, switch on.
1666539649319.png

If you put a space after the comma then it will add that to the text. which could work as the + sign is really close to the text.
Ruby:
class Game_BattlerBase
  def make_state_popup(state_id, type)
    state = $data_states[state_id]
    return if state.icon_index == 0
    rules = state.popup_rules[type]
    return if rules.nil?
    state_name = state.name.split(/,/)
    name = state_name[0]
    name = state_name[1] if $game_switches[1] == true
    text = sprintf(YEA::BATTLE::POPUP_SETTINGS[type], name)
    flags = ["state", state.icon_index]
    create_popup(text, rules, flags)
  end
end
@Roninator2 You, sir, are not only a genius, but a BIG genius! I couldn't find a way to make this work for hours, which was quite frustrating, but you definetely nailed it. :LZSjoy: Thanks a lot, my friend. It works like a charm.
@Roninator2 you know, it would be a bit shorter if you used a game variable instead, one that always defaults to 0. Then you could use it as the current index of the statuses array. Thus @Tw0Face could simply add 1 or subtract it.
@Roninator2 you know, it would be a bit shorter if you used a game variable instead, one that always defaults to 0. Then you could use it as the current index of the statuses array. Thus @Tw0Face could simply add 1 or subtract it.
That may be good, but Tw0Face is using a switch in other scripts to control the language, so I just kept it to that.
So I think I'm only one line extra.
Also it was google that led me to the split(/,/) part. Learn something every day (if I remember it later)
@Roninator2 just a quick follow up on this one. What needs to be done to translate Class Names the same way?
translate Class Names
What scenes are they shown?
What scenes are they shown?
In the main menu. They can be defined in the RM VXA Database.

Idea is to set it up like this as well:
1668453770465.png
Idea is to set it up like this as well:
Try this. taken from Window Base so it should work everywhere. but depends on if other scripts have a different method.
Ruby:
class Window_Base < Window
  def draw_actor_class(actor, x, y, width = 112)
    change_color(normal_color)
    class_name = actor.class.name.split(/,/)
    name = class_name[0]
    name = class_name[1] if $game_switches[1] == true
    draw_text(x, y, width, line_height, name)
  end
end
I think I should insist, especially if some day you end up translating your game into 3 or more languages. Use $game_variables instead of $game_switches for the switches can only have 2 states because nil gets treated like false most of the time. I know that the original script demanded you to use a switch, but that seems to be falling short once you start adding more languages to your GUI.
translating your game into 3 or more languages
If that happens then yes I agree. But should be a fairly easy to do for the small snippets I've done, it's only a question of every other script that he may have incorporated the language switch in.

Original thread: https://forums.rpgmakerweb.com/threads/display-stats-normally-in-yf-ace-battle-engine.152158/