preload button hover image:
Current Time: Jan 27, 2023, 07:28:24 pm
 Dwarf Fortress File Depot » Utilities » DF Word Generator
Registration is not required to download. However, it will allow you to vote, comment, and upload. Forgot your password?
File Listing: DF Word Generator
Last Updated: Aug 21, 2008, 09:55:00 pm
File version: 1.0
For DF version:
Downloads: 331 Size: 3.5 KB
Views: 3,942 Type: ZIP
Rating (2 votes): 4.5 / 5.0
by Mephansteras

This perl script is designed to make brand new languages for Dwarf Fortress. Using it is fairly simple. However, it does require the Math::Random module. If you do not have it, you can get it using the PPM.

For those that need perl, I suggest going to Active State and using their distribution. I also use the Open Perl IDE which is a program that makes writing/editing/running perl scripts much easier. To use the PPM, after installing ActiveState it should be in the Perl/bin directory. You may want to add the following repository to it's list: I know that one has the Math::Random module on it.

If you need help with any of this, send me a PM or e-mail (my username and I'll try to get back to you in a somewhat timely manner.

All you need to do is update the file locations at the top of the program:

my $LangFile = 'C:\Games\DwarfFortress\40a\raw\objects\language_words.txt'; # This is the language file to get the words from
my $NewLanguage = 'DWARF_CHAOS'; ## This goes in the [TRANSLATION: ] entry in the entities file
my $OutputFile = 'C:\Games\DwarfFortress\40a\raw\objects\language_' . $NewLanguage . '.txt'; # This is where the new language is going to go

The NewLanguage entry is the name of the language you're creating. It goes in the entities file under the race as [TRANSLATION:YOUR_LANGUAGE] or whatever you've named it.

Next, you need to set the rules for the language.

First, you set the frequency of each vowel.
For example, if you want 'a' to be used often, set it to a high number like 10.
$Vow{'a'}{'Freq'} = 10;
Or, if you want it to be used infrequently, set it to a low number like 1 or 2
$Vow{'a'}{'Freq'} = 1;
If you don't want it to be used at all, set it to 0
$Vow{'a'}{'Freq'} = 0;

You can also give letters specific rules. They are:
$Vow{'a'}{'NoStart'} = 1 means the letter cannot start a word
$Vow{'a'}{'NoEnd'} = 1 means the letter cannot end a word
$Vow{'a'}{'NoDouble'} = 1 means that the letter cannot follow itself
$Vow{'a'}{'OnlyStart'} = 1 means that the letter can only start a word
$Vow{'a'}{'OnlyEnd'} = 1 means that the letter can only end a word
Setting any of them to 0 will turn off that rule

Do the same for the consonants, which is the next section in the program.
You are free to add in any letter combinations that you like. Simple add the appropriate line, and copy any rules you like from the existing letters.

Next you set the word specific rules. These will add more flavor to your language.
## StartWithCons = 1 means that the word can start with a consonant
## StartWithVowel = 1 means that the word can start with a vowel
## EndWithCons = 1 means that the word can end with a consonant
## EndWithVowel = 1 means the the word can end with a vowel
## NoDoubleCons = 1 means the word cannot have two consonant picks in a row
## NoDoubleVowels = 1 means the word cannot have two vowel picks in a row
my %Rules;
$Rules{'StartWithCons'} = 1;
$Rules{'StartWithVowel'} = 1;
$Rules{'EndWithCons'} = 1;
$Rules{'EndWithVowel'} = 1;
$Rules{'NoDoubleCons'} = 1;
$Rules{'NoDoubleVowels'} = 1;

Setting any of these to 0 will turn off that rule.

Have fun making languages, and if you have any issues you can PM on the dwarf fortress board, post in the thread about this program, or e-mail me at [my username] @
Raw Data: JSON / Text
Checksum / Hash
SHA-256: 25a6c0d92d35f9a47b0b88baa67fe329e14101eb44888b28cd78d504ff6b8de9
IP: logged
More From This Author
No comments have been posted for this file yet.

Website by Brett Flannigan. The core site script is PHCDownload (© 2005-2023).
Hosted by Linode.