Modding Help Trouble Converting .yaml to.xnb

Discussion in 'Mods' started by AstroEllipse, Aug 1, 2017.

Tags:
  1. AstroEllipse

    AstroEllipse Void-Bound Voyager

    There is something wrong with my .yaml file, but I can't for the life of me figure out what. My best guess is that I accidentally put an extra pair of quotation marks in some of the dialogue, as I have 216 lines of text (and 6 quotation marks from the stuff above the dialogue) and 440 quotation marks... leaving two unaccounted for. I'm asking this because I have literally zero programming history before today.
    Here's some background/info:
    This is a simple text edit, though I added a lot.
    The file passed .yaml validator... if that means anything
    While trying to do "pack Input Output" nothing actually happens
    While trying to do "pack Input/MarriageDialogueSebastian.yaml Output/MarriageDialogueSebastian.xnb"
    I get the following error:
    SyntaxError: Unexpected token .
    at Object.parse (native)
    at getValue (C:\Users\(Name)\Downloads\xnb-node\typeyaml.js:203:18)
    at getObject (C:\Users\(Name)\Downloads\xnb-node\typeyaml.js:180:21)
    at getObject (C:\Users\(Name)\Downloads\xnb-node\typeyaml.js:182:21)
    at Object.parse (C:\Users\(Name)\Downloads\xnb-node\typeyaml.js:222:12)
    at packXnb (C:\Users\(Name)\Downloads\xnb-node\main.js:50:25)
    at C:\Users\(Name)\Downloads\xnb-node\main.js:60:16
    at applyOrRecurse (C:\Users\(Name)\Downloads\xnb-node\main.js:86:9)
    at Command.<anonymous> (C:\Users\(Name)\Downloads\xnb-node\main.js:28:9)
    at Command.listener (C:\Users\(Name)\Downloads\xnb-node\node_modules\commander\index.js:301:8)
    And here's a link to said file.
    http://www.mediafire.com/file/ebi40gbb6klxhfp/MarriageDialogueSebastian.yaml

    ... ok, I'm going to be real here now. I've spent my entire day on this piece of trash. It's 3:20AM and I've spent the last two hours trying to figure this out. I've tried doing everything I know how to... even if it isn't much. Please help.
     
    • MysticTempest

      MysticTempest Spaceman Spiff

      Thanks for providing the yaml file; It helps a lot!
      I took a quick look. There's a few formatting errors.


      Entries that are missing the #!String at the end of the line.
      -------------------
      spring_4
      summer_6
      summer_19
      fall_4


      Has a period right after the ending #!String which causes errors.
      -----------------------------
      Rainy_Day_13


      After you fix those issues it'll pack. Or grab this fixed one.
       

        Attached Files:

        Last edited: Aug 1, 2017
      • AstroEllipse

        AstroEllipse Void-Bound Voyager

        Thank you so much for the help! I knew it was going to be something simple... but the #!String? That's actually the thing I was most careful on. Guess being careful doesn't matter when you're half asleep. Oh, and I have to ask, as I'll probably be doing more of this text editing, how did you pick out the problems? I mean, you couldn't have looked through the entire file manually... right? But, thanks again! The help is much appreciated! ^^
         
        • MysticTempest

          MysticTempest Spaceman Spiff

          Ah sure.
          So, that missing " #!String is a pretty common issue. I did a 'Find all In document' on it.

          Since I'm using Geany (It's similar to Notepadd++ that's recommended by Windows users, but Geany is cross-platform.)for all my SDV modding; it gave me this:
          GeanyFindandMarkinDocument.png

          First note at the bottom that it says it only found 213. That clues us in that 4 are missing(235 lines minus the 18 lines before the dialogue data equals, 217).

          Next, with Geany I get a message window(bottom pane) that lets me scroll through all the matches. From there it was quick work to compare to the days listed.
          For example where my cursor is in the message window has "spring_4" missing.

          For the period; well I also checked a few other things. The : " at the beginning of the lines, and also quotation marks by themselves. Sometimes, people add them into the dialogue, but forget to escape them. So the program thinks that they're marking the end of the line; which breaks that line. You can escape them by putting a backslash before the quotation mark.

          The dialogue file, "Alex.yaml" has an example:
          Code:
           \"fan\". 
          And, once those checked out fine. I just made a backup copy, and started cutting the dialogue in half; saving and attempting to pack it a few times. Ended up narrowing it down to the top 20 lines which was much easier to sort through manually.


          So yea, nothing too fancy. And, easily done in any editor. But those are the top 3 culprits I look for, and then when in doubt just start breaking up the problem into smaller parts.
          But, overall a lot quicker than going through each line one at a time.
           

          Share This Page