[SOLVED] Is it possible to have VX Ace create a .txt file upon the player finishing the game?

I’m looking for a way to have the game export a .txt file into the game’s folder when the player reached the end.

I would prefer not using script if possible; I don’t mind complex events. However, if there’s absolutely no way, I will look into scripts as well.

I also don’t mind if I have to write the text of that file inside the events/scripts. What I mean is if there’s a way to hide a .txt file before the player finish the game, that would be good too.

Thank you.
I'm too lazy to test this. But try this in the script call if this does work.
Code:
File.open("textfile.txt", 'w') do |file|
  file.print "Hello world\n"
  file.print "Hello world\n"
  file.print "Created at : #{Time.now}"
end
event's can't do it, there is no way for them to do anything outside the engine.

with scripts it's possible - you might want to look up SES external text as that is one script that does this, or tsukihime's scripts that create picture files
I'm too lazy to test this. But try this in the script call if this does work.
Code:
File.open("textfile.txt", 'w') do |file|
  file.print "Hello world\n"
  file.print "Hello world\n"
  file.print "Created at : #{Time.now}"
end
@Andar This does work. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/solved-is-it-possible-to-have-vx-ace-create-a-txt-file-upon-the-player-finishing-the-game.125652/