Hi everyone, I would like to create a game in which external TXT files are created in the game folder. would you know how to pass me some plugins that works well?
Create external TXT files
● ARCHIVED · READ-ONLY
-
-
I don't think there's a plugin out there that does this. However, since node.js uses file system, feel free to learn how to make it; hint: It's not too different from how MV creates savefiles.
-
you need to give more details before we can even start helping you.
as for starters you might look at iavras Localization plugin -
I've moved this thread to Plugin Requests. Thank you.
Also, please change your title to something more informative. Most people posting here are looking for help, and your title does not tell other members whether it is a question they may be able to answer or not, therefore, you are less likely to get responses. -
for what purpose?
Like, whats the point of the txt files? did the player create them? did the game create them secretly as the player played through? are they just random files that never get used? what is their purpose!! -
I think hes wanting files to appear in your game folder like how some horror games do.for what purpose?
Like, whats the point of the txt files? did the player create them? did the game create them secretly as the player played through? are they just random files that never get used? what is their purpose!!
Basically the player interacts with something or a NPC and they send a player a message in the game folder like "GOT you" or something. -
If that's the case, there's a mailbox plugin that could do the trick.Basically the player interacts with something or a NPC and they send a player a message in the game folder like "GOT you" or something.
-
I dont think he wants mailing system in game, hes probably wanting something like thisIf that's the case, there's a mailbox plugin that could do the trick.
Talking to the NPC/Object creates a file in ether your main folder or one of the other folders -
Unless you're going to make a circular reference for them in game, it's not really beneficial. Now, if it's for error logging, there should be a script call for that. I guess we won't know until the OP replies. :LZSskeptic:
-
Yes, the idea would be that but I can't find the plugin that allows it to do the followingI dont think he wants mailing system in game, hes probably wanting something like this
View attachment 97264
Talking to the NPC/Object creates a file in ether your main folder or one of the other folders
and the plugin you recommended to me is not there. Could you pass a link to me? -
No plugin is needed for this, run something like this in a "script" Event Command:
Code:As Poryg said, you should read more about the Node File System module, the code above is essentially how the save files are written to your computer.const path = require('path'); const base = path.dirname(process.mainModule.filename); const fs = require('fs'); const fileText = "First Line\nSecond Line"; fs.writeFileSync(base + '/test.txt', fileText); -
There, your thread now has a meaningful title.
-
Do note that if you want to create files inside your game folder, you can't make a real installer because if you install your game in Program Files then your application won't have permission to write in the application folder.
-
@Aloe Guvner Hi!! Question, How do I tell the script to save the TXT file in a specific folder? This:
const path = require('path'); const base = path.dirname(process.mainModule.filename); const fs = require('fs'); const fileText = "First Line\nSecond Line"; fs.writeFileSync(base + '/test.txt', fileText);
will save the txt file in the root folder, lets say I want to save it on the data folder. I tried to specify the path but I fail every time...
EDIT
NM!!!I got it. I must specify the folder in the fs.writeFileSync line not in the constant base. Sorry.