Help editing monster.txt file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShadowTechnology
    Apprentice
    • Jan 2009
    • 71

    Help editing monster.txt file

    I'm trying to do some simple editing of the monster.txt file (in a nightly of Vanilla version 3.5.dev). The edits I made should not have broken the file, but I get the error "Parse error in monster line 1 column 1: # File: undefined directive" when trying to launch Angband. So I tried opening a clean copy of monster.txt in either Notepad or MS Word, then saving as a text file without making any changes. Same error message! Simply re-saving the file puts it in a format that Angband can't deal with. Is there something (different encoding?) that I need to do when saving the edited text file to maintain comparability with the Angband executable?
  • Derakon
    Prophet
    • Dec 2009
    • 9022

    #2
    MS Word is definitely going to mangle that file. It needs to be in plain text, and it sounds like it probably needs Unix-style line terminations instead of Windows' default line terminations (this is one of those weird platform inconsistencies that usually doesn't cause problems and is completely invisible to the average user).

    You might try using WordPad or NotePad++ instead.

    Comment

    • Timo Pietilä
      Prophet
      • Apr 2007
      • 4096

      #3
      Originally posted by Derakon
      You might try using WordPad or NotePad++ instead.
      Big + vote for notepad++. It's good for all kinds of text editing and with some add-ons recognizes huge amount of languages too (not talking about human languages, c, c++, c#, vbs, vb, js, etc etc etc.).

      Comment

      • fizzix
        Prophet
        • Aug 2009
        • 3025

        #4
        Notepad++ will have the option to show what line terminations are used. If I remember correctly the most common ones are LF and CR. Windows is probably atuomatically putting CR + LF for each line termination while the Angband parser only wants LF.

        Along with TIMO, i recommend notepad++ for any coding work.

        Comment

        • DaviddesJ
          Swordsman
          • Mar 2008
          • 254

          #5
          I recommend vi.

          Comment

          • Philip
            Knight
            • Jul 2009
            • 909

            #6
            Real programmers use butterflies.

            Comment

            • takkaria
              Veteran
              • Apr 2007
              • 1951

              #7
              Originally posted by ShadowTechnology
              I'm trying to do some simple editing of the monster.txt file (in a nightly of Vanilla version 3.5.dev). The edits I made should not have broken the file, but I get the error "Parse error in monster line 1 column 1: # File: undefined directive" when trying to launch Angband. So I tried opening a clean copy of monster.txt in either Notepad or MS Word, then saving as a text file without making any changes. Same error message! Simply re-saving the file puts it in a format that Angband can't deal with. Is there something (different encoding?) that I need to do when saving the edited text file to maintain comparability with the Angband executable?
              Could you post that file up here?
              takkaria whispers something about options. -more-

              Comment

              • ShadowTechnology
                Apprentice
                • Jan 2009
                • 71

                #8
                Notepad++ solved the problem. Thanks! Yes, the monster.txt file was expecting LF only, and both editors I tried were changing it to LF/CR.

                I discovered another thing when editing treasure drops in the same file. "DROP" and "drop" are both used in different ways, and they are *not* interchangable. If you use the find/replace command, be careful. Changing case will break the file.

                Comment

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