Page 1 of 1

NZ Town names - avoiding repeating vowels

Posted: 03 Nov 2010 09:47
by tristanb
Hi everyone.
I've made a quick New Zealand town name NewGRF that uses a simple list pulled from Wikipedia, but my aim is to make all the town names automatically generated.

About 60% (but I was thinking 5/8 or 3/4) of our town names are in Maori. I thought this would be good to make random names from because, sort of like Japanese, it consists of a few 'consonant-vowel' syllables e.g. Ma-ta-ka-na, Wai-he-ke. Also included are vowels that stand alone (i.e. a,e,i,o,u). This is useful for a made-up name like O-wa-ka-nu-i.

I'd like to avoid producing the same vowel in a row, and make sure there's no more than 3 vowels in a row. (To avoid something like Oaaati).

Two ways I've thought of doing this:
1. Only allowing single vowels for the first syllable, and having a greater variety of parts (i.e. "nui", "tau", "noa" will all be pre generated).
2. Having 2 different IDs, each cleverly avoiding possible repeats (so the ID with the first part option "Ma", will not have "a" as an option in the second part. An alternative ID will not have "Ma" as a first part, but have "a" as a second part.)

Obviously option 1 is easiest, but greatly increases the number of needed parts to enable places like "Taie-ri" or "Paua-nui".

I'm just checking that there isn't a "filter" option or anything I'm missing!
I'd appreciate any other input people have. I will upload the completed NewGRF if I get it working satisfactorily. (I've got some things in mind for producing the "English" NZ names, but wanna get the Maori ones sorted first.)

In my attachment note the problem towns Raaaku and Uruupa.

Re: NZ Town names - avoiding repeating vowels

Posted: 03 Nov 2010 10:09
by planetmaker
New Zealand town names is good news, I'll love to see them :-) I just wonder: will you include this one? :-P

I'm sure you had a look already at ... town_names and possibly at one of the town name newgrfs present on the DevZone for inspiration?

IIRC you can define lists of townname parts and link them in a manner you like; thus my making different lists, you can avoid those town names you mention as undesirable. I haven't written any townnames newgrf myself, though.

Re: NZ Town names - version 0.1 beta

Posted: 06 Nov 2010 22:18
by tristanb
I've attached my current work in progress for NZ town names.
There's still a 5/16 chance that the town name will be a real one, I'm slowing brainstorming ideas for completely made up names that maintain some NZness about them.

Don't distribute this version, as it's nowhere near finished and also needs a bit of tidying.

So people can understand, here is my brief description of how it works.
1/2 chance of 3-4 syllable faux-maori name (ID1).
1/2 chance of other (ID2).

ID1 has four parts, the last part has ~40% chance of being blank (""). I need to remove the chance of repeat vowels from here.

ID2 has a 1/8 chance of a two syllable faux-maori name, and to avoid repeating vowels, I have split this into ID5 and ID6 (one that doesn't have the first part end in "i", the other avoids ending in "a"). Each has four parts, the first and last are separate words (e.g. ???" Beach").

ID2 has a 2/8 chance of a "famous" name, which is a 'famous' NZer with a suffix ("ston", "sville", "s Bay", etc).

The 5/8 remaining is ID3, a remnant from my original file that used real towns from a list on Wikipedia. I want to replace this with another randomly generated section.

I will tidy it up before releasing it. I'm happy to receive advice, criticism, comments about my current progress.

Re: NZ Town names - avoiding repeating vowels

Posted: 20 Nov 2010 10:23
by tristanb
I'm done!

This is pretty much going to be the finished product. I'll upload it to Bananas after I've had a few days to ensure there's no glaring mistakes, and may alter some of the probabilities slightly. I won't upload any more versions to the forum.

The source is sparsely commented, but should be followable to anyone used to reading ActionF.


Re: NZ Town names - avoiding repeating vowels

Posted: 29 Nov 2010 08:19
by Ammler
It might not have graphics in your grf, anyway this should go to the graphics section as it most probably also works in TTDP.

Re: NZ Town names - avoiding repeating vowels

Posted: 16 Dec 2010 09:50
by tristanb
I've uploaded it to BaNaNaS. I don't expect to edit it unless there are any major problems.

I'm not completely happy with the proportion of names of each type. About 71% of names are Maori-sounding - in reality this is about 56%. But the GRF should work well, and isn't too repetitive.

Re: NZ Town names - avoiding repeating vowels

Posted: 16 Dec 2010 10:00
by planetmaker
IMHO it's not bad to have rather more Maori-sounding names generated than English ones. After all Maori names are what make this set unique :-) I shall definitely use it in one of my next games.

Topic moved to graphics development section as it's where NewGRF development is on-topic (also those without actual real sprites)