private static void GenerateSkills(Pawn pawn) { List <SkillDef> allDefsListForReading = DefDatabase <SkillDef> .AllDefsListForReading; for (int i = 0; i < allDefsListForReading.Count; i++) { SkillDef skillDef = allDefsListForReading[i]; int num = PawnGenerator.FinalLevelOfSkill(pawn, skillDef); SkillRecord skill = pawn.skills.GetSkill(skillDef); skill.Level = num; if (!skill.TotallyDisabled) { float num2 = (float)num * 0.11f; float value = Rand.Value; if (value < num2) { if (value < num2 * 0.2f) { skill.passion = Passion.Major; } else { skill.passion = Passion.Minor; } } skill.xpSinceLastLevel = Rand.Range(skill.XpRequiredForLevelUp * 0.1f, skill.XpRequiredForLevelUp * 0.9f); } } }