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?
Help editing monster.txt file
Collapse
X
-
Tags: None
-
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
-
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
-
-
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?takkaria whispers something about options. -more-Comment
-
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
Comment