Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old June 14, 2013, 04:22   #1
ShadowTechnology
Rookie
 
Join Date: Jan 2009
Posts: 22
ShadowTechnology is on a distinguished road
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?
ShadowTechnology is offline   Reply With Quote
Old June 14, 2013, 05:34   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 8,259
Derakon is on a distinguished road
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.
Derakon is offline   Reply With Quote
Old June 14, 2013, 10:56   #3
Timo Pietilš
Prophet
 
Join Date: Apr 2007
Location: Climbing up from hole I just dug.
Posts: 4,093
Timo Pietilš is on a distinguished road
Quote:
Originally Posted by Derakon View Post
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.).
Timo Pietilš is offline   Reply With Quote
Old June 14, 2013, 16:18   #4
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 2,951
fizzix is on a distinguished road
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.
fizzix is offline   Reply With Quote
Old June 14, 2013, 17:35   #5
DaviddesJ
Swordsman
 
Join Date: Mar 2008
Location: Burlingame CA
Age: 54
Posts: 254
DaviddesJ is on a distinguished road
I recommend vi.
DaviddesJ is offline   Reply With Quote
Old June 14, 2013, 17:39   #6
Philip
Knight
 
Join Date: Jul 2009
Location: Prague,Czech Republic
Posts: 813
Philip is on a distinguished road
Real programmers use butterflies.
Philip is offline   Reply With Quote
Old June 14, 2013, 18:14   #7
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,846
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by ShadowTechnology View Post
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?
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old June 17, 2013, 21:28   #8
ShadowTechnology
Rookie
 
Join Date: Jan 2009
Posts: 22
ShadowTechnology is on a distinguished road
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.
ShadowTechnology is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 09:02.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.