Hey there! Looking for a script that would print the battle log to a text file in the games folder. Mainly for number crunching purposes. I've attempted to write this myself, but to no avail.
Here's the snippet I have thus far:
class Window_BattleLog < Window_Selectable
module PrintToFile
FILENAME = "outputtesting.txt"
end
# if $imported["YEA-CombatLogDisplay"]
# alias combatlog
#File.open(PrintToFile::FILENAME, 'a+') {|f| f.write(@lines) }
# end
File.open(PrintToFile::FILENAME, 'a+') {|f| f.write(@lines) }
end
I know that I should be accessing the Scene_Battle, and have some form of check for if a battle is ended, and write that line as well. Or, alternatively, only print at the end, assuming that I can dump the entire log. That was why I originally was attempting to import the Yanfly Ace Engine combat log stuff, as I figure to display everything, it must *have* everything stored somewhere.
I don't necessarily *need* someone to just write it for me, but I'd love some help and I'd be massively appreciative if someone could point me in the right direction.