- Joined
- May 16, 2014
- Messages
- 140
- Reaction score
- 10
- Primarily Uses
This is the normal command to have text be displayed in the log of Yanfly's Combat Log Display https://yanflychannel.wordpress.com/rmvxa/battle-scripts/combat-log-display/
combatlog(text)However, this call was not designed to be accessed outside of the script (or so I believe).
So I normally just make the call
SceneManager.scene.log_window.add_text(text)but that delays the battle as it shows up mid-battle and has a slight pause to it.
What I want to do is be able to have text that is only shown in the combat log so it may be reviewed on choosing actions.
For example, you could have it so that you "roll" a 20-sided die aka rand(20)+1 with stat influence to see if you hit an opponent, and mid-battle it only shows you if you rolled a 20 [an auto-success] or a 1 [an auto-fail], but in the log it displays the actual value of the roll regardless.
I tried
class Game_Interpreter #-------------------------------------------------------------------------- # new method: combatlog #-------------------------------------------------------------------------- def combatlog(text) return if Window_BattleLog.combatlog_window.nil? return if text == "" Window_BattleLog.combatlog_window.add_line(text) endendbut it returned an undefined error.
Normally the script just aliases a bunch of processes and makes calls from there. But what I'm trying to do is have a universal script call that puts text in the combat log discretely from anywhere.
combatlog(text)However, this call was not designed to be accessed outside of the script (or so I believe).
So I normally just make the call
SceneManager.scene.log_window.add_text(text)but that delays the battle as it shows up mid-battle and has a slight pause to it.
What I want to do is be able to have text that is only shown in the combat log so it may be reviewed on choosing actions.
For example, you could have it so that you "roll" a 20-sided die aka rand(20)+1 with stat influence to see if you hit an opponent, and mid-battle it only shows you if you rolled a 20 [an auto-success] or a 1 [an auto-fail], but in the log it displays the actual value of the roll regardless.
I tried
class Game_Interpreter #-------------------------------------------------------------------------- # new method: combatlog #-------------------------------------------------------------------------- def combatlog(text) return if Window_BattleLog.combatlog_window.nil? return if text == "" Window_BattleLog.combatlog_window.add_line(text) endendbut it returned an undefined error.
Normally the script just aliases a bunch of processes and makes calls from there. But what I'm trying to do is have a universal script call that puts text in the combat log discretely from anywhere.
Last edited by a moderator: