static public void LoadAfterwards() { ArcaneExploits.LoadAfterwards(); var sponmetaFeat = SponMetamagic.Create(); var entries = arcanist.Progression.LevelEntries.ToList(); foreach (var entry in entries) { if (entry.Level == 1) { entry.Features.Add(sponmetaFeat); } } arcanist.Progression.LevelEntries = entries.ToArray(); RegisterOtherAssets(); LoadArchetypes(); }
static public void Load() { wizard = library.Get <BlueprintCharacterClass>("ba34257984f4c41408ce1dc2004e342e"); sorcerer = library.Get <BlueprintCharacterClass>("b3a505fb61437dc4097f43c3f8f9a4cf"); arcanist = Helpers.Create <BlueprintCharacterClass>(); library.AddAsset(arcanist, "c94a10ada8f7b4ac49c5b39a9f909b1a");//MD5-32[ArcanistClass] var HPD6 = wizard.HitDie; var BABLow = wizard.BaseAttackBonus; var SaveHigh = wizard.WillSave; var SaveLow = wizard.FortitudeSave; arcanist.name = "ArcanistClass"; arcanist.LocalizedName = Helpers.CreateString("ArcanistClass.ClassName"); arcanist.LocalizedDescription = Helpers.CreateString("ArcanistClass.ClassDesc"); arcanist.m_Icon = sorcerer.m_Icon; arcanist.SkillPoints = wizard.SkillPoints; arcanist.HitDie = HPD6; arcanist.BaseAttackBonus = BABLow; arcanist.FortitudeSave = SaveLow; arcanist.ReflexSave = SaveLow; arcanist.WillSave = SaveHigh; arcanist.ClassSkills = new StatType[] { StatType.SkillKnowledgeArcana, StatType.SkillKnowledgeWorld, StatType.SkillLoreNature, StatType.SkillLoreReligion, StatType.SkillUseMagicDevice, StatType.SkillPersuasion }; var spellbook = Helpers.Create <BlueprintSpellbook>(); library.AddAsset(spellbook, "c05d9a49349f602d114a69dac8143408");//MD5-32[ArcanistClass.Spellbook] spellbook.name = "ArcanistClassSpellbook"; spellbook.Name = arcanist.LocalizedName; spellbook.SpellsPerDay = CreateArcanistPerDay(); spellbook.SpellsKnown = CreateArcanistMemorize(); spellbook.SpellList = wizard.Spellbook.SpellList; spellbook.Spontaneous = true; spellbook.IsArcane = true; spellbook.AllSpellsKnown = false; spellbook.CanCopyScrolls = true; spellbook.CastingAttribute = StatType.Intelligence; spellbook.CharacterClass = arcanist; spellbook.CantripsType = CantripsType.Cantrips; spellbook.SpellsPerLevel = 2; arcanist.Spellbook = spellbook; arcanist.IsDivineCaster = false; arcanist.IsArcaneCaster = true; arcanist.StartingGold = 411; arcanist.StartingItems = wizard.StartingItems; arcanist.PrimaryColor = wizard.PrimaryColor; arcanist.SecondaryColor = wizard.SecondaryColor; arcanist.EquipmentEntities = sorcerer.EquipmentEntities; arcanist.MaleEquipmentEntities = sorcerer.MaleEquipmentEntities; arcanist.FemaleEquipmentEntities = sorcerer.FemaleEquipmentEntities; arcanist.RecommendedAttributes = new StatType[] { StatType.Intelligence, StatType.Charisma }; arcanist.NotRecommendedAttributes = new StatType[] { StatType.Strength }; arcanist.ComponentsArray = sorcerer.ComponentsArray; var progression = Helpers.CreateProgression("ArcanistClassProgression", "奥能师", "奥能师-描述", "9559b14457eddc15fffe6aae4f63783e",//MD5-32[ArcanistClass.Progression] arcanist.Icon, FeatureGroup.None); progression.SetName(Helpers.CreateString("ArcanistClass.ProgressionName")); progression.SetDescription(Helpers.CreateString("ArcanistClass.ProgressionDesc")); progression.Classes = new BlueprintCharacterClass[] { arcanist }; var arcanistCantrip = library.CopyAndAdd <BlueprintFeature>( "44d19b62d00179e4bad7afae7684f2e2", // wizard cantrip "ArcanistClassCantrip", "c39de0ed2f661b0bf95300a1fcc23f02"); //MD5-32[ArcanistClass.Cantrip] arcanistCantrip.SetName(Helpers.CreateString("ArcanistClass.Cantrip.Name")); arcanistCantrip.SetDescription(Helpers.CreateString("ArcanistClass.Cantrip.Desc")); arcanistCantrip.SetComponents(arcanistCantrip.ComponentsArray.Select(c => { var bind = c as BindAbilitiesToClass; if (bind == null) { var bind2 = c as LearnSpells; if (bind2 == null) { return(c); } bind2 = UnityEngine.Object.Instantiate(bind2); bind2.CharacterClass = arcanist; return(bind2); } bind = UnityEngine.Object.Instantiate(bind); bind.CharacterClass = arcanist; bind.Stat = StatType.Intelligence; return(bind); })); //UnityModManagerNet.UnityModManager.Logger.Log($"{((arcanistCantrip.ComponentsArray[2] as BindAbilitiesToClass).CharacterClass == arcanist ? "Rua yes" : "Rua no")}"); var arcanistProfiency = library.CopyAndAdd <BlueprintFeature>( "25c97697236ccf2479d0c6a4185eae7f", //sorcerer profiency "ArcanistClassProfiencies", "ee849748c015853463ea315725f998d3"); //MD5-32[ArcanistClass.Profiencies] arcanistProfiency.SetName(Helpers.CreateString("ArcanistClass.Profiencies.Name")); arcanistProfiency.SetDescription(Helpers.CreateString("ArcanistClass.Profiencies.Desc")); var rayCalcFeat = library.Get <BlueprintFeature>("d3e6275cfa6e7a04b9213b7b292a011c"); var touchCalcFeat = library.Get <BlueprintFeature>("62ef1cdb90f1d654d996556669caf7fa"); var Caster9 = library.Get <BlueprintFeature>("9fc9813f569e2e5448ddc435abf774b3"); var detectMagic = library.Get <BlueprintFeature>("ee0b69e90bac14446a4cf9a050f87f2e"); var reservoirFeat = ArcaneReservoir.CreateReservoir(); var sponmetaFeat = SponMetamagic.Create(); var greaterExploit = GreaterExploits.Create(); ArcaneExploits.Load(); var reservoirAblFeat = ArcaneReservoir.CreateAddDCCLFeature(); var consumeFeat = ConsumeSpells.Create(); var supremancyFeat = Supremancy.Create(); var entries = new List <LevelEntry>(); entries.Add(Helpers.LevelEntry(1, arcanistCantrip, arcanistProfiency, rayCalcFeat, touchCalcFeat, Caster9, detectMagic, reservoirFeat, reservoirAblFeat, sponmetaFeat, consumeFeat, ArcaneExploits.exploitSelection )); for (int i = 3; i <= 20; i += 2) { if (i != 11) { entries.Add(Helpers.LevelEntry(i, ArcaneExploits.exploitSelection)); } else { entries.Add(Helpers.LevelEntry(11, ArcaneExploits.exploitSelection, greaterExploit)); } } entries.Add(Helpers.LevelEntry(20, supremancyFeat)); progression.LevelEntries = entries.ToArray <LevelEntry>(); progression.UIDeterminatorsGroup = new BlueprintFeatureBase[] { arcanistCantrip, arcanistProfiency, rayCalcFeat, touchCalcFeat, Caster9, detectMagic }; var exploit = ArcaneExploits.exploitSelection; progression.UIGroups = new UIGroup[] { new UIGroup { Features = (new BlueprintFeature[] { exploit, exploit, exploit, exploit, exploit, exploit, exploit, exploit, exploit, exploit }).ToList <BlueprintFeatureBase>() } }; arcanist.Progression = progression; arcanist.RegisterClass(); RegisterOtherAssets(); }