[ACE] Causing in-battle text from a process in the script editor?

I have a process where HP damage can be split from the a victim to an ally using a spell, allowing for survivability.

I want to relay the text " absorbed [value] points of damage!"

So it would be

"#{mem_name} absorbed #{split_val} points of damage!" (example: "Natalie absorbed 100 points of damage with Blood Pact!") which I will already have stored the data for mem_name and split_val, I'm just not sure how to make this message show up. And, mind you, I do not mean message format as in dialogue, but as in the same style as it is shown as "The target becomes poisoned!".

What would the call for this be? Even something simple like "The enemy troop has been resurrected!"
Look for how the battle scene sends message to @log_window (which is an instance of Window_BattleLog)
I don't understand.

I'm in execute_damage(user), and I've tried Scene_Battle.log_window.add_text("Hello") and Window_BattleLog.log_window.add_text("Hello")

(and also just Window_BattleLog.add_text("Hello"))

and other variations and it'd always give me an undefined error for log_window
because @log_window is private to the battle scene... and it's an instance variable too. So you can't just do Scene_Battle.instance_variable because Scene_Battle returns the whole class, not an instance of it, hence the instance variable won't even exist...

To do it you might want to add this first to a blank script

class Scene_Battle  attr_reader @log_windowendthen on your script, do 

SceneManager.scene.log_window.add_text
try SceneManager.scene.add_text("...")
From this 

class Scene_Battle attr_reader @log_windowendit says nil is not a symbol

And Shaz, yours gives me an undefined error of 'add_text'
ah wait. it should be :log_window
I see. That makes more sense.

But that gives me a error of superclass mismatch for class Scene_Battle.
Maybe you placed it at the wrong place... You should put it on the materials section, possibly at the lowest point to avoid problems...

or just change it to

class Scene_Battle < Scene_Base so that the superclass is explicitly written.
That works. Thanks  🙂

Original thread: https://forums.rpgmakerweb.com/threads/ace-causing-in-battle-text-from-a-process-in-the-script-editor.36589/