Create external TXT files

● ARCHIVED · READ-ONLY
Started by JesusGames 14 posts View original ↗
  1. 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?
  2. 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.
  3. you need to give more details before we can even start helping you.
    as for starters you might look at iavras Localization plugin
  4. 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.
  5. 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!!
  6. ?????? said:
    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.
    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.
  7. kiyomihana said:
    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.
  8. JGreene said:
    If that's the case, there's a mailbox plugin that could do the trick.
    I dont think he wants mailing system in game, hes probably wanting something like this
    upload_2018-8-28_16-7-30.png

    Talking to the NPC/Object creates a file in ether your main folder or one of the other folders
  9. 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:
  10. kiyomihana said:
    I 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
    Yes, the idea would be that but I can't find the plugin that allows it to do the following
    and the plugin you recommended to me is not there. Could you pass a link to me?
  11. No plugin is needed for this, run something like this in a "script" Event Command:
    Code:
    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);
    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.
  12. There, your thread now has a meaningful title.
  13. 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.
  14. @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.