![]() |
#1 |
Apprentice
Join Date: Jan 2009
Posts: 67
![]() |
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?
|
![]() |
![]() |
![]() |
#2 |
Prophet
Join Date: Dec 2009
Posts: 9,024
![]() |
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. |
![]() |
![]() |
![]() |
#3 |
Prophet
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,096
![]() |
|
![]() |
![]() |
![]() |
#4 |
Prophet
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,023
![]() |
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. |
![]() |
![]() |
![]() |
#5 |
Swordsman
Join Date: Mar 2008
Location: Burlingame CA
Age: 57
Posts: 254
![]() |
I recommend vi.
![]() |
![]() |
![]() |
![]() |
#6 |
Knight
Join Date: Jul 2009
Location: Prague,Czech Republic
Posts: 909
![]() |
Real programmers use butterflies.
|
![]() |
![]() |
![]() |
#7 | |
Veteran
Join Date: Apr 2007
Posts: 1,947
Donated: $40
![]() |
Quote:
__________________
takkaria whispers something about options. -more- |
|
![]() |
![]() |
![]() |
#8 |
Apprentice
Join Date: Jan 2009
Posts: 67
![]() |
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. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with editing p_class | Malatar | Vanilla | 13 | October 30, 2012 20:07 |
Sil: amusing typo in monster.txt | bron | Sil | 0 | October 30, 2012 00:09 |
Editing !CCW | kurie | Vanilla | 2 | October 5, 2010 03:34 |
Editing the monster.txt file | Jothar Hillpeople | Vanilla | 3 | September 4, 2008 20:23 |
Something odd about monster.txt | Magnate | Vanilla | 2 | August 3, 2008 01:25 |