108 this.ints[6] = value;
123 this.ints[7] = value;
138 this.ints[8] = value;
153 this.ints[9] = value;
164 return this.ints[10];
168 this.ints[10] = value;
179 return this.ints[11];
183 this.ints[11] = value;
194 return this.ints[12];
198 this.ints[12] = value;
209 return this.ints[13];
213 this.ints[13] = value;
224 return this.ints[14];
228 this.ints[14] = value;
239 return this.ints[15];
243 this.ints[15] = value;
254 return this.ints[16];
258 this.ints[16] = value;
269 return this.ints[17];
273 this.ints[17] = value;
280 public int extroversion
284 return this.ints[18];
288 this.ints[18] = value;
295 public int idInterest
299 return this.ints[19];
303 this.ints[19] = value;
309 public string nameHome
313 return this.StrBio(this.idHome);
319 public string nameLoc
323 return this.StrBio(this.idLoc);
329 public string nameDad
333 return "textParent".lang(this.StrBio(this.idAdvDad), this.StrBio(this.idDad),
null,
null,
null);
339 public string nameMom
343 return "textParent".lang(this.StrBio(this.idAdvMom), this.StrBio(this.idMom),
null,
null,
null);
349 public string nameBirthplace
353 return "birthLoc2".lang(this.nameHome, this.nameLoc,
null,
null,
null);
364 return EClass.world.date.year - this.birthYear;
368 this.birthYear = EClass.world.date.year - value;
374 public int ageOriginal
378 return EClass.game.Prologue.year - this.birthYear;
384 public bool IsUnderAge
388 return this.age < 18;
393 public string TextAge(
Chara c)
398 if ((result = (c.IsUnique ?
this.ageOriginal :
this.age).ToString()) ==
null)
411 public void Generate(
Chara c)
413 string bio = c.source.bio;
415 this.stability = Rand.rndNormal(100);
416 this.law = Rand.rndNormal(100);
417 this.affection = Rand.rndNormal(100);
418 this.dominance = Rand.rndNormal(100);
419 this.extroversion = Rand.rndNormal(100);
420 this.idInterest =
EClass.rnd(Enum.GetNames(typeof(Interest)).Length);
421 if (
Biography.idFemale.Contains(c.id) || c.race.id ==
"roran")
427 this.SetGender(Gender.GetRandom());
429 this.RerollBio(c, 0,
false);
432 bool flag = c.IsHuman;
435 string[] array = bio.Split(
'/', StringSplitOptions.None);
436 this.SetGender((array[0] ==
"f") ? 1 : 2);
437 if (array.Length > 1)
439 if (!c.source.HasTag(CTAG.randomPortrait))
443 this.age =
int.Parse(array[1]);
444 c.pccData = IO.LoadFile<PCCData>(CorePath.packageCore +
"Data/PCC/" + c.id +
".txt",
false,
null);
446 if (array.Length > 2)
448 this.height =
int.Parse(array[2]);
450 if (array.Length > 3)
452 this.weight =
int.Parse(array[3]);
454 if (array.Length > 4)
456 c.c_idTone = array[4];
458 if (array.Length > 5 && !array[5].IsEmpty())
460 c.c_idTalk = array[5];
467 if (flag && !c.HasTag(CTAG.noPortrait))
471 if (c.id ==
"prostitute" &&
this.age < 15)
476 this.idLike = row.id;
481 public void RerollBio(
Chara c,
int ageIndex = 0,
bool keepParent =
false)
483 this.GenerateBirthday(c, ageIndex);
484 this.GenerateAppearance(c);
489 this.idHome = this.RndBio(
"home");
490 this.idLoc = this.RndBio(
"loc");
495 public void GenerateBirthday(
Chara c,
int ageIndex = 0)
498 int num = race.age[0];
499 int num2 = race.age[1];
502 int num3 = (num2 - num) / 4;
503 this.age = Rand.Range(num + num3 * (ageIndex - 1), num + num3 * ageIndex);
507 this.age = Rand.Range(num, num2);
509 this.birthDay =
EClass.rnd(30) + 1;
510 this.birthMonth =
EClass.rnd(12) + 1;
514 public void GenerateAppearance(
Chara c)
517 this.height = race.height +
EClass.rnd(race.height / 5 + 1) -
EClass.rnd(race.height / 5 + 1);
518 this.weight = this.height * this.height * (
EClass.rnd(6) + 18) / 10000;
522 public void GenerateDad()
524 this.idDad = this.RndBio(
"parent");
525 this.idAdvDad = this.RndBio(
"adv");
529 public void GenerateMom()
531 this.idMom = this.RndBio(
"parent");
532 this.idAdvMom = this.RndBio(
"adv");
536 private int RndBio(
string group)
538 return WordGen.GetID(group);
542 private string StrBio(
int id)
545 if (!
EClass.sources.langWord.map.ContainsKey(
id))
547 if ((result =
id.ToString()) ==
null)
554 result =
EClass.sources.langWord.map[id].GetText(
"name",
false).Split(
',', StringSplitOptions.None)[0];
560 public void SetGender(
int g)
570 public void SetPortrait(
Chara c)
574 c.c_idPortrait =
Portrait.GetRandomPortrait(
"special_f-littlegirl");
577 c.c_idPortrait =
Portrait.GetRandomPortrait(this.gender, c.GetIdPortraitCat());
581 public string TextBio(
Chara c)
583 return string.Concat(
new string[]
585 c.race.GetText(
"name",
false).ToTitleCase(
true),
587 Lang.Parse(
"age", this.TextAge(c),
null,
null,
null,
null),
589 Lang._gender(this.gender)
594 public string TextBio2(
Chara c)
596 return Lang.Parse(
"heightWeight", this.height.ToString() ??
"",
this.weight.ToString() ??
"",
null,
null,
null) +
" " + ((c.material.alias ==
"meat") ?
"" : c.material.GetName().ToTitleCase(
true));
600 public string TextBirthDate(
Chara c,
bool _age =
false)
602 return Lang.Parse(
"birthText", (this.birthYear >= 0) ? (this.birthYear.ToString() ??
"") :
"???",
this.birthMonth.ToString() ??
"",
this.birthDay.ToString() ??
"",
null,
null) + (_age ? (
" (" + Lang.Parse(
"age", this.TextAge(c),
null,
null,
null,
null) +
")") :
"");
606 public string TextAppearance()
608 return Lang.Parse(
"heightWeight", this.height.ToString() ??
"",
this.weight.ToString() ??
"",
null,
null,
null);
612 public static string[] idFemale =
new string[]
623 public int[] ints =
new int[20];
627 public string[] strs =
new string[3];
630 public int[] personalities =
new int[5];