Recommend a faster way to batch input dialogues.

● ARCHIVED · READ-ONLY
Started by cedr777 8 posts View original ↗
  1. Hi all, so I've written a long 4 page script in MS Word containing all the event dialogues for the game we've been making.
    Can anyone recommend a faster way to input all of these text into an event, other than manually(and tediously) copying and pasting each line into the editor?
  2. If you're able to put all your game messages into an array and use them in a script call like the one below, it will work.
    Code:
    var messages = ["Tom is cool.", "Be like Tom."];
    var index = $gameVariables.value(5);
    var x = messages[index];
    var y = 5
    $gameMessage.add(x);
    this.setWaitMode('message');
    $gameVariables.setValue(y, index+1);

    So in my example, I made sure variable 5 started at zero. Every time this script call is run, it plays the next message in the array. However, there are a few rules to using this.
    • Cannot use apostrophes, but can use grave accent ( ` ) as an alternative
    • Cannot use punctuation such as commas. Period, question mark, and exclamation points still work.
    • Does not automatically word wrap. You have to insert <br> at the appropriate places.
    I'm sure if you could add that array into a plugin parameter, it would appear less bulky in the engine. You might even be able to turn the whole function into a plugin command.
  3. cedr777 said:
    Hi all, so I've written a long 4 page script in MS Word containing all the event dialogues for the game we've been making.
    Can anyone recommend a faster way to input all of these text into an event, other than manually(and tediously) copying and pasting each line into the editor?
    The fastest and effortless way to input all text into game is .. hire someone do that for you = )
  4. Technically, you can make a JavaScript function that will open and read the contents of your word file (tested with .txt and json formatted files, never actually tried with MS Word files yet).

    If you can set it to follow a JSON acceptable format, it will be easier since you will just need to parse the whole JSON file at the game start into an object (like a $gameVariable) and use that to call on your texts. Basically an externalized version of Greene's work. Also works with apostrophes and commas based on my tests.

    • Cannot use apostrophes, but can use grave accent ( ` ) as an alternative
    • Cannot use punctuation such as commas. Period, question mark, and exclamation points still work

    I tested it via setting a game variable to ["RAWR,","'RAWR'"]
    then called forth a show text and the comma on the first rawr and the apostrophes on the second rawr showed up just fine.
  5. cedr777 said:
    Hi all, so I've written a long 4 page script in MS Word containing all the event dialogues for the game we've been making.
    Can anyone recommend a faster way to input all of these text into an event, other than manually(and tediously) copying and pasting each line into the editor?
    You may want to check out this thread...
  6. found an EZ way, just use Macro recorder.
    feelsgoodman.png
    Request closure of this thread.
  7. This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.