Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Development (http://angband.oook.cz/forum/forumdisplay.php?f=10)
-   -   parse error (http://angband.oook.cz/forum/showthread.php?t=9637)

Tibarius October 25, 2019 16:14

parse error
 
Started to work on a variant, modifying the .txt files only under the lib/gamedata folder, using 4.0.5 version as base.

I changed the name of magic book #1
from 'Magic for Beginners'
to 'Magic for Testnners'

in class.txt (6 times)
in object.txt (1 time)
in store.txt (1 time)

using the plain MS Editor program (after opening the file with wordpad, save it (to have ASC II).

Starting the game i get a parser error in monster line 1 column 1.

Anyone an idea why that occurs?

Gwarl October 25, 2019 16:30

Have a read through this thread

Tibarius October 25, 2019 19:53

hint
 
Quote:

Originally Posted by Gwarl (Post 140784)
Have a read through this thread

Thanks for the hint Gwarl, my problem is not to modify .txt files in general. I already changd p_race.txt, history.txt, class.txt to have a different set (and modified) races available at character creation.
After opening the .txt files with Wortpad and saving them again, the encoding is right and i can modify them using the most simple text editior available, Editor from MS Windows.
I was wondering why a renaming of the magic books inside the [ ] brakets crashes the game. I found those names only in class.txt, store.txt and object.txt (with base_object defining some stuff like color).
So if anyone knows about that, explanations welcome :)

wobbly October 25, 2019 20:44

Not sure if it's your issue but casters drop books, so you'll have to change the drops on monsters, otherwise it'll attempt to drop a non-existant book. for instance:

Code:

name:38:Apprentice

base:person

color:r

info:110:15:20:9:15

power:2:1:1584:39:6

blow:HIT:HURT:1d4

flags:MALE | HAS_LIGHT

flags:DROP_40

flags:OPEN_DOOR

flags:FORCE_SLEEP

spell-freq:12

spells:BLIND | BLINK | CONF | MISSILE

drop:magic book:[Magic for Beginners]:5:1:1

friends-base:20:1d3:person

friends-base:40:1d3:person

friends-base:80:1d3:person

friends:50:1d2:Same

desc:He is leaving behind a trail of dropped spell components.


Pete Mack October 25, 2019 21:18

Yep, tha was my guess, but I didn't have access to the code at the time. I strongly recommend getting in the habit of grepping the entire codebase when you make a change like this. Since you aren't using an IDE for your changes, you should install the unix basic tools from minGW or cygwin. grep in particular is a must-have for code changes with a basic editor.

Tibarius October 26, 2019 13:34

thanks
 
Thanks Wobbly ... very likely THAT's the reason why my renaming caused problems!

Pete ... thanks too, but i have to use what is available to me, and there is no grep shell-like command available ...

Pete Mack October 27, 2019 02:20

You can install it. MinGW in particular is a tiny install


All times are GMT +1. The time now is 20:21.

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