I'm working on a game that makes use of writing txt files to the project folder. Using the solution in this thread, I was able to get them successfully written to the project file in the RPG Maker MZ editor. Although, when I deploy my project file as an .exe, I noticed it doesn't work and won't write the .txt file to that project file. I'm running it on my main hard drive where I have full write permission, so I'm wondering if maybe there's just a better solution geared towards deployed projects that I'm unaware of.
This is the code I have currently:
Is there a better way to do this that would allow it to work in an exported version of the game/outside of RPG Maker?
Edit: I ended up actually resolving this after digging further into this! It was just how I had the subfolders set up, so this was all I needed to change it to:
Hopefully this is helpful to someone else who might've also run into this issue!
This is the code I have currently:
Is there a better way to do this that would allow it to work in an exported version of the game/outside of RPG Maker?
Edit: I ended up actually resolving this after digging further into this! It was just how I had the subfolders set up, so this was all I needed to change it to:
fs.writeFileSync(base + '/extra_folder/intro.txt', fileText);Hopefully this is helpful to someone else who might've also run into this issue!