Create external TXT files

Discussion in 'JS Plugin Requests' started by JesusGames, Aug 29, 2018.

  1. JesusGames

    JesusGames Veteran Veteran

    Messages:
    32
    Likes Received:
    0
    First Language:
    italian
    Primarily Uses:
    RMMV
    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?
     
    #1
  2. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,931
    Likes Received:
    9,939
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    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.
     
    #2
    Aloe Guvner and Canini like this.
  3. Andar

    Andar Veteran Veteran

    Messages:
    28,447
    Likes Received:
    6,492
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    you need to give more details before we can even start helping you.
    as for starters you might look at iavras Localization plugin
     
    #3
  4. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,803
    Likes Received:
    7,618
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV

    I've moved this thread to Plugin Requests. Please be sure to post your threads in the correct forum next time. 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.
     
    #4
  5. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,312
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    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!!
     
    #5
    mlogan, Poryg and Aloe Guvner like this.
  6. kiyomihana

    kiyomihana Villager Member

    Messages:
    14
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #6
  7. JGreene

    JGreene Veteran Veteran

    Messages:
    375
    Likes Received:
    283
    First Language:
    English
    Primarily Uses:
    RMMV
    If that's the case, there's a mailbox plugin that could do the trick.
     
    #7
  8. kiyomihana

    kiyomihana Villager Member

    Messages:
    14
    Likes Received:
    3
    First Language:
    English
    Primarily Uses:
    RMMV
    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
     
    #8
  9. JGreene

    JGreene Veteran Veteran

    Messages:
    375
    Likes Received:
    283
    First Language:
    English
    Primarily Uses:
    RMMV
    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:
     
    #9
  10. JesusGames

    JesusGames Veteran Veteran

    Messages:
    32
    Likes Received:
    0
    First Language:
    italian
    Primarily Uses:
    RMMV
    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?
     
    #10
  11. Aloe Guvner

    Aloe Guvner Walrus Veteran

    Messages:
    1,600
    Likes Received:
    1,006
    Location:
    USA
    First Language:
    English
    Primarily Uses:
    RMMV
    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.
     
    #11
  12. mlogan

    mlogan Global Moderators Global Mod

    Messages:
    13,803
    Likes Received:
    7,618
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV
    There, your thread now has a meaningful title.
     
    #12
    ?????? and Aloe Guvner like this.
  13. armornick

    armornick Villager Member

    Messages:
    19
    Likes Received:
    3
    First Language:
    Dutch
    Primarily Uses:
    RMMV
    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.
     
    #13

Share This Page