using System.Collections.Generic;
public class PhoneticSound
public PhoneticSound(string written, Language language)
language.PhoneticList.Add(this);
Random Rand = new Random();
public List<PhoneticSound> PhoneticList = new List<PhoneticSound>();
public string GenerateWord(int length)
for (int n = 0; n < length; n++)
int r = Rand.Next(PhoneticList.Count);
returnValue += PhoneticList[r].Written;
return FirstLetterToUpper(returnValue);
public string FirstLetterToUpper(string str)
return char.ToUpper(str[0]) + str.Substring(1);
public Language Language;
public List<Occupation> JobList = new List<Occupation>();
public void AddOccupation(Occupation occupation)
public Culture(Language language, string name)
public string Title = null;
public Occupation(string name, string title = null)
public string HomeAddress = "the wild";
public string Descriptor = "person";
public Occupation Occupation;
public Culture HomeCulture;
public string CultureName = "outsider";
public bool Renown = true;
public TraitController traitController = new TraitController();
public Psyche Personality = new Psyche(new TraitController());
public Person(Culture culture, int age, int gender, Occupation occupation)
Name = culture.Language.GenerateWord(2);
Culture HomeCulture = culture;
CultureName = HomeCulture.Name;
Occupation = new Occupation("child");
Occupation = new Occupation("child");
if (Occupation.Title != null)
Name = occupation.Title + " " + Name;
Name += " of "+ HomeCulture.Language.GenerateWord(3);
talkString += "Hi, my name is ";
talkString += " and I am a ";
talkString += " year old ";
talkString += Descriptor;
talkString += " I am a ";
talkString += Occupation.Name;
talkString += " I belong to the ";
talkString += CultureName;
talkString += " culture. ";
talkString += "I live in ";
talkString += HomeAddress;
for (int i = 0; i < Personality.Traits.Count; i++)
if (i == Personality.Traits.Count-1){
talkString += Personality.Traits[i].Name;
talkString += Personality.Traits[i].Name;
talkString += " My Aggression is ";
talkString += Personality.Aggression;
talkString += " My Greed is ";
talkString += Personality.Greed;
talkString += " My Malice is ";
talkString += Personality.Malice;
talkString += " My Intelligence is ";
talkString += Personality.Intelligence;
Console.WriteLine(talkString);
public List<Trait> Traits = new List<Trait>{};
public float Aggression = 0f;
public float Malice = 0f;
public float Intelligence = 0f;
public Psyche(TraitController traitController)
Traits = traitController.PickRandomTraits(2);
foreach (Trait trait in Traits)
Aggression += trait.modAggression;
Malice += trait.modMalice;
Intelligence += trait.modIntelligence;
public class TraitController
public List<Trait> TraitList = new List<Trait>();
public Random Rand = new Random();
Trait manic = new Trait("manic", this, aggression: 1f);
Trait greedy = new Trait("greedy", this, greed: 1f);
Trait sly = new Trait("sly", this, malice: 1f);
Trait intelligent = new Trait("intelligent", this, intelligence: 1f);
Trait calm = new Trait("calm", this, aggression: -1f);
Trait humble = new Trait("humble", this, greed: -1f);
Trait honourable = new Trait("honourable", this, malice: -1f);
Trait simple = new Trait("simple", this, intelligence: -1f);
public List<Trait> PickRandomTraits(int numberOfTraits)
List<Trait> returnList = new List<Trait>();
for (int i = 0; i < numberOfTraits; i++)
returnList.Add(TraitList[Rand.Next(TraitList.Count)]);
public string Name = "Test";
public float modAggression = 0f;
public float modGreed = 0f;
public float modMalice = 0f;
public float modIntelligence = 0f;
public Trait(string name, TraitController controller, float aggression = 0f, float greed = 0f, float malice = 0f , float intelligence = 0f)
modAggression = aggression;
modIntelligence = intelligence;
controller.TraitList.Add(this);
public static void Main()
Random rand = new Random();
List<string> Occupations = new List<string>{"farmer", "guard", "merchant", "bard", "serf", "king", "lord", "monk"};
Language Dolfian = new Language();
Language Oobi = new Language();
PopulateDolfian(Dolfian);
Culture Dolf = new Culture(Dolfian, "Dolf");
Culture Oob = new Culture(Oobi, "Oob");
Occupation farmer = new Occupation("farmer");
Occupation hunter = new Occupation("hunter");
Occupation merchant = new Occupation("merchant");
Occupation bard = new Occupation("bard");
Occupation serf = new Occupation("serf");
Occupation king = new Occupation("king", "King");
Occupation lord = new Occupation("lord", "Lord");
Occupation monk = new Occupation("monk", "Brother");
Occupation fisherman = new Occupation("fisherman", "Fishmonger");
Occupation chief = new Occupation("tribal chief", "Chief");
Occupation knight = new Occupation("knight", "Sir");
Occupation commander = new Occupation("commander", "Commander");
Dolf.AddOccupation(farmer);
Dolf.AddOccupation(hunter);
Dolf.AddOccupation(merchant);
Dolf.AddOccupation(bard);
Dolf.AddOccupation(serf);
Dolf.AddOccupation(king);
Dolf.AddOccupation(lord);
Dolf.AddOccupation(monk);
Dolf.AddOccupation(knight);
Dolf.AddOccupation(commander);
Oob.AddOccupation(chief);
Oob.AddOccupation(fisherman);
for (int n = 0; n < 20; n++)
Settlement settlement = new Settlement(Dolfian.GenerateWord(3), Dolf.Name, 20, 1000);
Person person = GenerateRandomPerson(rand, Dolf);
person.HomeAddress = settlement.Name;
public static Person GenerateRandomPerson(Random rand, Culture culture)
int age = rand.Next(5, 100);
int gender = rand.Next(2);
return new Person(culture, age, gender, culture.JobList[rand.Next(culture.JobList.Count)]);
public static void PopulateDolfian(Language Dolfian)
PhoneticSound oar = new PhoneticSound("car", Dolfian);
PhoneticSound toe = new PhoneticSound("to", Dolfian);
PhoneticSound bin = new PhoneticSound("be", Dolfian);
PhoneticSound gar = new PhoneticSound("ger", Dolfian);
PhoneticSound yan = new PhoneticSound("pan", Dolfian);
PhoneticSound viss = new PhoneticSound("vis", Dolfian);
PhoneticSound ner = new PhoneticSound("ner", Dolfian);
PhoneticSound oh = new PhoneticSound("e", Dolfian);
PhoneticSound ing = new PhoneticSound("ing", Dolfian);
PhoneticSound ton = new PhoneticSound("ton", Dolfian);
PhoneticSound sher = new PhoneticSound("sher", Dolfian);
PhoneticSound uck = new PhoneticSound("uck", Dolfian);
PhoneticSound shire = new PhoneticSound("sal", Dolfian);
PhoneticSound mat = new PhoneticSound("ma", Dolfian);
PhoneticSound i = new PhoneticSound("i", Dolfian);
public static void PopulateOobi(Language Oobi)
PhoneticSound a1 = new PhoneticSound("oo", Oobi);
PhoneticSound a2 = new PhoneticSound("j", Oobi);
PhoneticSound a3 = new PhoneticSound("ie", Oobi);
PhoneticSound a4 = new PhoneticSound("bur", Oobi);
PhoneticSound a5 = new PhoneticSound("yee", Oobi);
PhoneticSound a6 = new PhoneticSound("pik", Oobi);
PhoneticSound a7 = new PhoneticSound("nak", Oobi);
public string Descriptor;
public Settlement(string name, string culture, int population, float wealth)
else if (Population > 100)
else if (Population > 10)
Descriptor = "Settlement";
textString += "This is the settlement of ";
textString += ". It is a "+Descriptor+" of the ";
textString += " culture. ";
textString += "It is has a population of ";
textString += Population;
textString += " and it is ";
textString += "wealthy. ";
textString += "economically okay. ";
Console.Write(textString);