Angband.oook.cz
Angband.oook.cz
AboutDownloadVariantsLadderForumCompetitionSpoilersComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old December 13, 2010, 17:14   #1
fbas
Apprentice
 
Join Date: Oct 2010
Posts: 59
fbas is on a distinguished road
Cool 'Names' file edits

Angband Vanilla 3.1.2v2 (angband-3.1.2v2-win.zip 1,636,853 bytes February 14, 2010)

Wanted to edit the names file ({ANGBAND}/lib/edit/names.txt), which says don't edit unless you know exactly what you're doing else you will cause crashes.

Sure enough, it causes crashes, so what do I need to know?

I did not change the number of names just edited in place, then sorted them alphabetically (case-insensitive, though.. I notice the originals were all lowercase).

Are there case limitations? length limitations? must be sorted in a particular way?

Thanks for any input.
fbas is offline   Reply With Quote
Old December 13, 2010, 17:21   #2
Derakon
Prophet
 
Derakon's Avatar
 
Join Date: Dec 2009
Posts: 5,963
Derakon is on a distinguished road
Without looking at the code, I'd say either you screwed up the formatting of the file (e.g. merged the two lists of names) or the names need to be all lowercase. You should be able to determine if the latter is problematic with a trivial experiment: start with a clean file, capitalize one name, and see if it breaks.
Derakon is offline   Reply With Quote
Old December 13, 2010, 20:04   #3
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 4,999
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
AFAICR it's not a case issue, but I can't be certain of that. It shouldn't matter if you increase or decrease the number of names in a section, or even add a whole new section of names, as long as you preserve the file syntax.

Best bet is to post your edited file in this thread and we can try and get it working ourselves.
Magnate is online now   Reply With Quote
Old December 13, 2010, 20:57   #4
fbas
Apprentice
 
Join Date: Oct 2010
Posts: 59
fbas is on a distinguished road
experimented

it's not case, and can accept name lengths up to 30 chars (possibly more, haven't tested further)

I had to remove non alpha characters (numbers, hyphen, underscore, apostrophe, etc).

Still can't get my list to work, but will use binary method to find what is offending.

Thanks for the tip about the number of items. I saw in some ini files about array sizes dimensioned there, so was nervous about changing numbers of elements in lists.
fbas is offline   Reply With Quote
Old December 13, 2010, 21:00   #5
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 4,999
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by fbas View Post
Thanks for the tip about the number of items. I saw in some ini files about array sizes dimensioned there, so was nervous about changing numbers of elements in lists.
The names parser is one of the few places in the game that can cope with changing numbers of elements: it does two passes through the file - the first to count the number of sections and number of names in each section (at which point it dimensions the arrays properly), and the second to get the names.
Magnate is online now   Reply With Quote
Old December 13, 2010, 21:44   #6
fbas
Apprentice
 
Join Date: Oct 2010
Posts: 59
fbas is on a distinguished road
this is totally lame. I finally got it to stop crashing (had a few numeric digits still in there) and the program doesn't even use the list. I don't know where it's getting the names from now, since the ones coming up are not in the file.
fbas is offline   Reply With Quote
Old December 13, 2010, 21:48   #7
camlost
Sangband 1.x Maintainer
 
camlost's Avatar
 
Join Date: Apr 2007
Posts: 521
camlost is on a distinguished road
Quote:
Originally Posted by fbas View Post
this is totally lame. I finally got it to stop crashing (had a few numeric digits still in there) and the program doesn't even use the list. I don't know where it's getting the names from now, since the ones coming up are not in the file.
Try deleting the .raw?
__________________
a chunk of Bronze {These look tastier than they are. !E}
3 blank Parchments (Vellum) {No french novels please.}
camlost is offline   Reply With Quote
Old December 13, 2010, 22:35   #8
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 4,999
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate Send a message via Skype™ to Magnate
Quote:
Originally Posted by camlost View Post
Try deleting the .raw?
fbas, what version are you using??
Magnate is online now   Reply With Quote
Old December 13, 2010, 22:54   #9
fbas
Apprentice
 
Join Date: Oct 2010
Posts: 59
fbas is on a distinguished road
Quote:
Originally Posted by Magnate View Post
fbas, what version are you using??
3.1.2v2

don't worry about it, this is not a big deal. just wondering why it won't work, especially if it crashes when I put bad characters in the file.
fbas is offline   Reply With Quote
Old December 13, 2010, 23:27   #10
Dean Anderson
Apprentice
 
Join Date: Nov 2009
Posts: 73
Dean Anderson is on a distinguished road
Quote:
Originally Posted by fbas View Post
this is totally lame. I finally got it to stop crashing (had a few numeric digits still in there) and the program doesn't even use the list. I don't know where it's getting the names from now, since the ones coming up are not in the file.
It probably is using the list, but not the way you might have imagined.

The code doesn't pick a name randomly from the list.

What it does is build up a set of probabilities based on the list.

For example, if your list has...

aaron
alice
bob
fred

The code will read this and decide that the start letter is:

A (50% chance)
B (25% chance)
F (25% chance)

It will also determine that an 'a' has a 33% chance of being followed by another 'a' (as in "aaron"), a 33% chance of being followed by an 'r' (as in "aaron", and a 33% chance of being followed by an "l" (as in "alice")

A 'b' has a 50% chance of being followed by an "o" (as in "bob") and a 50% chance of ending the word (as in "bob").

A 'c' is always followed by an 'e' (as in "alice").

And so forth...

So when it wants to produce a random name, it starts by picking a random starting letter from its list (based on their chances), and then keeps adding another random letter based on the chances of the current last letter until it gets to a word end.

With just a few words, it's rubbish. With that short list of four names it would always follow an 'l' with an 'i' and an 'i' with a 'c' and a 'c' with an 'e', for example. But with lots of words to use as a basis for its probabilities - particularly since those words will show various common letter patterns (i.e. syllables), it's remarkably good at coming up with words that look as though they should be real words in the language that the list was written in.

For example, the main list in the file is a list of names of Tolkien characters. Based on these, the code comes up with random names that also sound plausibly Tolkien-ish.

If you put in a big list of English boys names, it would come up with random names that sound like they could be English boys names. If you put in Latin words, it would come up with words that sound Latin (as it does when choosing the text for scrolls).

So it does work, and is based on the names you give it. It just isn't as crude as picking a random one from the list. It's far less repetitive than that.
Dean Anderson is offline   Reply With Quote
Reply

Tags
names edit


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
Monster list edits fizzix Vanilla 21 November 17, 2010 13:27
Truncation of monster names half Development 4 June 19, 2010 01:08
Save file recovery buzzkill Vanilla 14 August 20, 2009 06:14
Interesting scroll names. Whelk Vanilla 5 May 14, 2008 10:51
Item names Kiyoshi Aman Vanilla 3 May 5, 2007 23:01


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


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.