private static void ParentsOnInit(CharacterCreation characterCreation) { characterCreation.ClearFaceGenMounts(); characterCreation.ClearFaceGenPrefab(); FaceGenChar mother; FaceGenChar father; BodyProperties player = CharacterObject.PlayerCharacter.GetBodyProperties(CharacterObject.PlayerCharacter.Equipment, -1); BodyProperties motherBodyProperties = player; BodyProperties fatherBodyProperties = player; FaceGen.GenerateParentKey(player, ref motherBodyProperties, ref fatherBodyProperties); motherBodyProperties = new BodyProperties(new DynamicBodyProperties(33f, 0.3f, 0.2f), motherBodyProperties.StaticProperties); fatherBodyProperties = new BodyProperties(new DynamicBodyProperties(33f, 0.5f, 0.5f), fatherBodyProperties.StaticProperties); CharacterObject characterObject1 = Game.Current.ObjectManager.GetObject <CharacterObject>("village_woman_empire"); CharacterObject characterObject2 = Game.Current.ObjectManager.GetObject <CharacterObject>("townsman_empire"); mother = new FaceGenChar(motherBodyProperties, characterObject1.Equipment, true, "anim_mother_1"); father = new FaceGenChar(fatherBodyProperties, characterObject2.Equipment, false, "anim_father_1"); CharacterCreation characterCreation1 = characterCreation; List <FaceGenChar> faceGenCharList = new List <FaceGenChar>(); faceGenCharList.Add(mother); faceGenCharList.Add(father); characterCreation1.ChangeFaceGenChars(faceGenCharList); ChangeParentsOutfit(characterCreation); ChangeParentsAnimation(characterCreation); }
private static void EscapeOnInit(CharacterCreation characterCreation) //Different from Base { //Use these to get private fields FaceGenChar mother = (FaceGenChar)CharacterCreationContent.Instance.GetType().GetField("_mother", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(CharacterCreationContent.Instance); FaceGenChar father = (FaceGenChar)CharacterCreationContent.Instance.GetType().GetField("_father", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(CharacterCreationContent.Instance); characterCreation.CurrentStage = CharacterCreation.Stages.EscapeMenu; characterCreation.ClearFaceGenPrefab(); ClearCharacters(characterCreation); ClearMountEntity(characterCreation); Hero @object = MBObjectManager.Instance.GetObject <Hero>("tutorial_npc_brother"); List <FaceGenChar> list = new List <FaceGenChar>(); BodyProperties bodyProperties = CharacterObject.PlayerCharacter.GetBodyProperties(CharacterObject.PlayerCharacter.Equipment, -1); bodyProperties = FaceGen.GetBodyPropertiesWithAge(ref bodyProperties, 23f); BodyProperties randomBodyProperties = BodyProperties.GetRandomBodyProperties(CharacterObject.PlayerCharacter.IsFemale, mother.BodyProperties, father.BodyProperties, 1, Hero.MainHero.Mother.CharacterObject.GetDefaultFaceSeed(1), Hero.MainHero.Father.CharacterObject.HairTags, Hero.MainHero.Father.CharacterObject.BeardTags, Hero.MainHero.Father.CharacterObject.TattooTags); randomBodyProperties = new BodyProperties(new DynamicBodyProperties(randomBodyProperties.Age, 0.5f, 0.5f), randomBodyProperties.StaticProperties); @object.ModifyPlayersFamilyAppearance(randomBodyProperties.StaticProperties); @object.DynamicBodyProperties = randomBodyProperties.DynamicProperties; list.Add(new FaceGenChar(bodyProperties, new Equipment(), CharacterObject.PlayerCharacter.IsFemale, "act_childhood_schooled")); // if (CSCharCreationOption.CSWithFamily) { list.Add(new FaceGenChar(@object.BodyProperties, new Equipment(), @object.CharacterObject.IsFemale, "act_brotherhood_schooled")); characterCreation.ChangeFaceGenChars(list); characterCreation.ChangeCharsAnimation(new List <string> { "act_childhood_schooled", "act_brotherhood_schooled" }); } else { characterCreation.ChangeFaceGenChars(list); characterCreation.ChangeCharsAnimation(new List <string> { "act_childhood_schooled", }); } //CharacterCreationContent.Instance.GetType().GetMethod("ChangeStoryStageEquipments", BindingFlags.NonPublic | BindingFlags.Static).Invoke(CharacterCreationContent.Instance, new object[] { characterCreation }); **Cant invoke due to Hardcoded change brother ChangeStoryStageEquipments(characterCreation); List <FaceGenMount> list2 = new List <FaceGenMount>(); if (CharacterObject.PlayerCharacter.HasMount()) { ItemObject item = CharacterObject.PlayerCharacter.Equipment[EquipmentIndex.ArmorItemEndSlot].Item; list2.Add(new FaceGenMount(MountCreationKey.FromString(MountCreationKey.GetRandomMountKey(item, 2)), CharacterObject.PlayerCharacter.Equipment[EquipmentIndex.ArmorItemEndSlot].Item, CharacterObject.PlayerCharacter.Equipment[EquipmentIndex.HorseHarness].Item, "act_inventory_idle_start")); } if (@object.CharacterObject.HasMount()) { ItemObject item2 = @object.CharacterObject.Equipment[EquipmentIndex.ArmorItemEndSlot].Item; list2.Add(new FaceGenMount(MountCreationKey.FromString(MountCreationKey.GetRandomMountKey(item2, 2)), @object.CharacterObject.Equipment[EquipmentIndex.ArmorItemEndSlot].Item, @object.CharacterObject.Equipment[EquipmentIndex.HorseHarness].Item, "act_inventory_idle_start")); } }