Modifying Artifacts - Parse error?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • philly1919d
    Rookie
    • Nov 2017
    • 4

    Modifying Artifacts - Parse error?

    Hey everyone! I am coming back to the game after a while, and wanted just to have some fun (a bit less frustrating I hope).

    I went to modifying the artifact.txt, but when I do, I get a Parse Error in artifact line 1 column 1.

    Any clue what I am doing wrong?

    Thanks!
  • Nick
    Vanilla maintainer
    • Apr 2007
    • 9351

    #2
    It's hard to say without knowing what modifications you made.
    One for the Dark Lord on his dark throne
    In the Land of Mordor where the Shadows lie.

    Comment

    • philly1919d
      Rookie
      • Nov 2017
      • 4

      #3
      It is actually doing it if I make no changes at all, and just save the artifact.txt file.

      I was looking to modify some of the drop rates and levels, but after experimenting a bit, it was clear that it was generating a parse error just by saving the file.

      Comment

      • Nick
        Vanilla maintainer
        • Apr 2007
        • 9351

        #4
        That's very odd. Is that in Windows? Could you indulge me by posting a file that is failing to parse, so I can try to find why?
        One for the Dark Lord on his dark throne
        In the Land of Mordor where the Shadows lie.

        Comment

        • philly1919d
          Rookie
          • Nov 2017
          • 4

          #5
          Here is the file. I might be just doing something basic wrong, but I can't tell.

          It is for 4.1.1
          Attached Files

          Comment

          • Gwarl
            Administrator
            • Jan 2017
            • 987

            #6
            ### IMPORTANT NOTES ###
            # (1.) Any changes or additions to the file may have influence on randarts
            # and may break savefile compatibility for old savegames with randarts. If
            # using random artifacts, finish your existing game before making any
            # changes to the artifact.txt file at all.
            # (2.) Removing any artifact, or changing its "base" type (as defined by
            # the tval and sval entries in the "base-object:" line), will break savefile
            # compatibility for ALL savefiles.
            # (3.) Adding a new artifact, WILL now affect savefile compatibility for all
            # savefiles.
            Is 1 still accurate?

            Comment

            • philly1919d
              Rookie
              • Nov 2017
              • 4

              #7
              That certainly is possible, but it doesn't even get to a point where it can load. It has the parse error immediately on boot-up.

              Comment

              • Sideways
                Knight
                • Nov 2008
                • 886

                #8
                The format of the Angband part of the file is good, the problem is that there are 3 extra characters (EF BB BF, the UTF-8 byte order mark) at the very beginning of the file and they mess everything up. My guess would be that whichever editor you used put those extra characters there, and the problem wasn't immediately clear because the byte order mark is invisible in any editor that would put it there in the first place.
                The Complainer worries about the lack of activity here these days.

                Comment

                • PowerWyrm
                  Prophet
                  • Apr 2008
                  • 2941

                  #9
                  Originally posted by philly1919d
                  It is actually doing it if I make no changes at all, and just save the artifact.txt file.

                  I was looking to modify some of the drop rates and levels, but after experimenting a bit, it was clear that it was generating a parse error just by saving the file.
                  File is encoded as UTF-8. If you used an editor where the encoding was not UTF-8, your file will not be parsed properly.
                  PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                  Comment

                  • PowerWyrm
                    Prophet
                    • Apr 2008
                    • 2941

                    #10
                    Originally posted by Gwarl
                    Is 1 still accurate?
                    Yes and no. In the newer versions, all properties are stored on the object, so modifying randart generation won't change anything on your current game. However, it will influence future games, since modifying the base set will probably generate different randarts.
                    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                    Comment

                    Working...
                    😀
                    😂
                    🥰
                    😘
                    🤢
                    😎
                    😞
                    😡
                    👍
                    👎