コード例 #1
0
        static public void create()
        {
            var alchemist_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("0937bec61c0dabc468428f496580c721");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "ToxicantArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Toxicant");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "In lands where poisons are legal and may be openly studied and sold, some alchemists obsess over the myriad ways that poisons and venoms can be applied and delivered. Known as toxicants, these deadly artists induce the production of deadly secretions within their own bodies in order to better inflict crippling conditions upon their foes.");
            });
            Helpers.SetField(archetype, "m_ParentClass", alchemist_class);
            library.AddAsset(archetype, "");

            createPoisonBuffAndPoisonImprovements();
            createToxicSecretionAndPoisonDiscoveries();

            var mutagen             = library.Get <BlueprintFeature>("cee8f65448ce71c4b8b8ca13751dd8ea");
            var throw_anything      = library.Get <BlueprintFeature>("65c538dcfd91930489ad3ab18ad9204b");
            var bombs               = library.Get <BlueprintFeature>("c59b2f256f5a70a4d896568658315b7d");
            var discovery           = library.Get <BlueprintFeatureSelection>("cd86c437488386f438dcc9ae727ea2a6");
            var sneak_attack        = library.Get <BlueprintFeature>("9b9eac6709e1c084cb18c3a366e0ec87");
            var medical_discovery   = library.Get <BlueprintFeatureSelection>("67f499218a0e22944abab6fe1c9eaeee");
            var alchemist_discovery = library.Get <BlueprintFeatureSelection>("cd86c437488386f438dcc9ae727ea2a6");
            var advance_talents     = library.Get <BlueprintFeature>("a33b99f95322d6741af83e9381b2391c");

            var poison_immunity    = library.Get <BlueprintFeature>("202af59b918143a4ab7c33d72c8eb6d5");
            var persistent_mutagen = library.Get <BlueprintFeature>("75ba281feb2b96547a3bfb12ecaff052");


            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1, mutagen),
                                                          Helpers.LevelEntry(14, persistent_mutagen) };


            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, poison_secretion),
                                                       Helpers.LevelEntry(3, poison_improvement, poison_move_action),
                                                       Helpers.LevelEntry(6, poison_improvement, poison_swift_action),
                                                       Helpers.LevelEntry(9, poison_improvement),
                                                       Helpers.LevelEntry(12, poison_improvement),
                                                       Helpers.LevelEntry(15, poison_improvement),
                                                       Helpers.LevelEntry(18, poison_improvement), };

            alchemist_class.Progression.UIGroups = alchemist_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(poison_secretion, poison_improvement));
            alchemist_class.Progression.UIGroups = alchemist_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(poison_move_action, poison_swift_action));
            alchemist_class.Archetypes           = alchemist_class.Archetypes.AddToArray(archetype);

            medical_discovery.AllFeatures   = medical_discovery.AllFeatures.AddToArray(sticky_posion, celestial_poison, concentrate_poison);
            alchemist_discovery.AllFeatures = alchemist_discovery.AllFeatures.AddToArray(sticky_posion, celestial_poison, concentrate_poison);

            var dispelling_attack = library.Get <BlueprintFeature>("1b92146b8a9830d4bb97ab694335fa7c");

            ClassToProgression.addClassToFeat(archetype.GetParentClass(), new BlueprintArchetype[] { archetype }, ClassToProgression.DomainSpellsType.NoSpells, dispelling_attack, archetype.GetParentClass());

            var greater_mutagen = library.Get <BlueprintFeature>("76c61966afdd82048911f3d63c6fe0bc");
            var cognatogen      = library.Get <BlueprintFeature>("e3f460ea61fcc504183c7d6818bbbf7a");
            var feral_mutagen   = library.Get <BlueprintFeature>("fd5f7b37ab4301c48a88cc196ee5f0ce");

            greater_mutagen.AddComponent(mutagen.PrerequisiteFeature());
            cognatogen.AddComponent(mutagen.PrerequisiteFeature());
            feral_mutagen.AddComponent(mutagen.PrerequisiteFeature());
        }
        public void OnAreaActivated()
        {
            var buff          = ResourcesLibrary.TryGetBlueprint <BlueprintBuff>(BuffGuid);
            var mainCharacter = Game.Instance.Player.MainCharacter.Value;

            mainCharacter.AddBuff(buff, (MechanicsContext)null);
        }
コード例 #3
0
        static void createArrowSongStrike()
        {
            var bard_class       = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f");
            var add_spell_combat = Helpers.Create <AddMagusMechanicPart>(); //needed for unit_part magus creation (no actual ability though)

            Helpers.SetField(add_spell_combat, "m_Feature", 1);
            Helpers.SetField(add_spell_combat, "m_MagusClass", bard_class);
            //it should not be used since it sets spell combat to be always active by default (ok on magus though since the corresponding toggle is always active by default)

            var add_magus_part = Helpers.Create <NewMechanics.ActivateUnitPartMagus>(a => a.magus_class = bard_class);

            var add_eldritch_archer = Helpers.Create <AddMagusMechanicPart>();

            Helpers.SetField(add_eldritch_archer, "m_Feature", 5);

            var add_spellstrike = Helpers.Create <AddMagusMechanicPart>();

            Helpers.SetField(add_spellstrike, "m_Feature", 2);

            var spellstrike = library.CopyAndAdd <BlueprintActivatableAbility>("e958891ef90f7e142a941c06c811181e", "ArrowsongMinstrelSpellstrike", "");

            spellstrike.SetName("Arrowsong Strike");
            spellstrike.SetDescription("At 6th level, an Arrowsong minstrel can use spellstrike (as per the magus class feature) to cast a single-target ranged touch attack spell and deliver it through a ranged weapon attack.");
            spellstrike.SetIcon(NewSpells.flame_arrow.Icon);
            arrowsong_strike = Common.ActivatableAbilityToFeature(spellstrike, false);
            arrowsong_strike.AddComponents(add_magus_part, add_eldritch_archer, add_spellstrike);
        }
コード例 #4
0
        static public void create()
        {
            var ranger_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("cda0615668a6df14eb36ba19ee881af6");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "DivineTrackerArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Divine Tracker");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "Blessed by his deity, a divine tracker hunts down those he deems deserving of his retribution. His weapon is likely to find purchase in his favored enemy.");
            });
            Helpers.SetField(archetype, "m_ParentClass", ranger_class);
            library.AddAsset(archetype, "");

            createBlessings();
            var deity_selection = library.Get <BlueprintFeatureSelection>("59e7a76987fe3b547b9cce045f4db3e4");
            var hunters_bond    = library.Get <BlueprintFeatureSelection>("b705c5184a96a84428eeb35ae2517a14");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(4, hunters_bond) };

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, deity_selection),
                                                       Helpers.LevelEntry(4, blessings, blessings) };

            ranger_class.Progression.UIDeterminatorsGroup = ranger_class.Progression.UIDeterminatorsGroup.AddToArray(deity_selection);
            ranger_class.Archetypes = ranger_class.Archetypes.AddToArray(archetype);
        }
コード例 #5
0
        static public void create()
        {
            var cleric_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("67819271767a9dd4fbfd4ae700befea0");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "DivineScourgeArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Divine Scourge");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "Some divine servants take on the role of dealing out unique punishments on behalf of their deities, taking pleasure in carrying out their sacrosanct duties. Such divine scourges are most common among worshipers of Abadar (meting out punishment to lawbreakers in concert with local courts), Calistria (punishing those truly deserving of vengeance), and Zon-Kuthon (seeing punishment as an applied form of pain and suffering). Divine scourges make a point of inflicting long-lasting maladies and curses on those deserving of such fates under the tenets of the scourges’ religions.");
            });
            Helpers.SetField(archetype, "m_ParentClass", cleric_class);
            library.AddAsset(archetype, "");

            createSpontaneousConversion();
            createCurseSubdomain();
            createDivineHexes();


            var channel_selection = library.Get <BlueprintFeatureSelection>("d332c1748445e8f4f9e92763123e31bd");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1, library.Get <BlueprintFeature>("48525e5da45c9c243a343fc6545dbdb9"), //domain selection
                                                                             library.Get <BlueprintFeature>("43281c3d7fe18cc4d91928395837cd1e"),    //second domain
                                                                             channel_selection) };

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, curse_subdomain, spontnaeous_conversion),
                                                       Helpers.LevelEntry(3, divine_hexes),
                                                       Helpers.LevelEntry(7, divine_hexes),
                                                       Helpers.LevelEntry(11, divine_hexes),
                                                       Helpers.LevelEntry(15, divine_hexes),
                                                       Helpers.LevelEntry(19, divine_hexes), };

            cleric_class.Progression.UIDeterminatorsGroup = cleric_class.Progression.UIDeterminatorsGroup.AddToArray(curse_subdomain);
            cleric_class.Progression.UIGroups             = cleric_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(divine_hexes));
            cleric_class.Archetypes = cleric_class.Archetypes.AddToArray(archetype);
        }
コード例 #6
0
        static public void create()
        {
            var barbarian_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("f7d7eb166b3dd594fb330d085df41853");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "BeastkinBerserkerArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Beastkin Berserker");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "While some barbarians take on bestial aspects in their rages, the beastkin berserker descends so deeply into primal fury that she actually transforms into an animal. Berserkers of the surface world often associate with predators such as bears or wolves, and are sometimes mistaken for lycanthropes. Some barbarians shapechange into rampaging dinosaurs or megafauna, crafting their armor out of the hide and bones of their favored animals.");
            });
            Helpers.SetField(archetype, "m_ParentClass", barbarian_class);
            library.AddAsset(archetype, "");

            createSavageRapport();
            createFeralTransformation();

            var fast_movement = library.Get <BlueprintFeature>("d294a5dddd0120046aae7d4eb6cbc4fc");
            var rage_power    = library.Get <BlueprintFeatureSelection>("28710502f46848d48b3f0d6132817c4e");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1, fast_movement),
                                                          Helpers.LevelEntry(4, rage_power),
                                                          Helpers.LevelEntry(8, rage_power),
                                                          Helpers.LevelEntry(12, rage_power), };

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, savage_rapport),
                                                       Helpers.LevelEntry(4, feral_transformation_wolf, feral_transformation_leopard),
                                                       Helpers.LevelEntry(8, feral_transformation_bear, feral_transformation_dire_wolf),
                                                       Helpers.LevelEntry(12, feral_transformation_smilodon, feral_transformation_mastodon), };

            barbarian_class.Progression.UIGroups = barbarian_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(feral_transformation_wolf, feral_transformation_dire_wolf, feral_transformation_mastodon));
            barbarian_class.Progression.UIGroups = barbarian_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(feral_transformation_leopard, feral_transformation_bear, feral_transformation_smilodon));
            barbarian_class.Archetypes           = barbarian_class.Archetypes.AddToArray(archetype);
        }
コード例 #7
0
        internal static void create()
        {
            var kineticist_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("42a455d9ec1ad924d889272429eb8391");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "OverhelmingSoulArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Overwhelming Soul");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "Some kineticists have such a powerful personality that they can seize control of their element with their minds alone, without endangering their bodies.");
            });
            Helpers.SetField(archetype, "m_ParentClass", kineticist_class);
            library.AddAsset(archetype, "");

            var burn_feature = library.Get <BlueprintFeature>("57e3577a0eb53294e9d7cc649d5239a3");
            var overflow     = library.Get <BlueprintProgression>("86beb0391653faf43aec60d5ec05b538");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1, burn_feature, overflow),
                                                          Helpers.LevelEntry(6, KineticistFix.internal_buffer) };

            createMindOverMatter();
            createMentalProwess();
            createOverwhelmingPower();

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, mind_over_matter, mental_prowess),
                                                       Helpers.LevelEntry(3, overwhelming_power) };

            archetype.OverrideAttributeRecommendations = true;
            archetype.RecommendedAttributes            = new StatType[] { StatType.Charisma, StatType.Dexterity };
            archetype.ReplaceClassSkills = true;
            archetype.ClassSkills        = kineticist_class.ClassSkills.AddToArray(StatType.SkillPersuasion);
            kineticist_class.Progression.UIDeterminatorsGroup = kineticist_class.Progression.UIDeterminatorsGroup.AddToArray(mind_over_matter);
            kineticist_class.Progression.UIGroups             = kineticist_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(mental_prowess, overwhelming_power));
            kineticist_class.Archetypes = kineticist_class.Archetypes.AddToArray(archetype);
        }
コード例 #8
0
        public static bool TP()
        {
            Main.Mod.Debug(MethodBase.GetCurrentMethod());

            BlueprintAreaEnterPoint ep = new BlueprintAreaEnterPoint();
            bool result = false;

            if (InThroneRoom) //TODO: change getter to check if in throne room, do not set it...
            {
                IsStone = Game.Instance.CurrentlyLoadedArea.AssetGuid.Equals("c39ed0e2ceb98404b811b13cb5325092");
                ep      = ResourcesLibrary.TryGetBlueprint <BlueprintAreaEnterPoint>(merchGuildEpId);
                result  = true;
            }
            if (InGuild)
            {
                if (IsStone)
                {
                    ep = ResourcesLibrary.TryGetBlueprint <BlueprintAreaEnterPoint>("3a9748aba32e1694f80a6cae9b7b3f99");
                }
                else
                {
                    ep = ResourcesLibrary.TryGetBlueprint <BlueprintAreaEnterPoint>("21fb2ff53d1e2fb4c9b06f067ab89435");
                }
                //LibraryUnload();
                result = true;
            }
            if (result)
            {
                GameHelper.EnterToArea(ep, Kingmaker.EntitySystem.Persistence.AutoSaveMode.None);
            }
            return(result);
        }
コード例 #9
0
        static void fixCompanions()
        {
            var valerie_feature    = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("912444657701e2d4ab2634c3d1e130ad");
            var amiri1_feature     = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("df943986ee329e84a94360f2398ae6e6");
            var tristian_companion = ResourcesLibrary.TryGetBlueprint <BlueprintUnit>("f6c23e93512e1b54dba11560446a9e02");
            var harrim_feature     = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("8910febae2a7b9f4ba5eca4dde1e9649");
            var linzi_feature      = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("920cb420385dbb34681b620b6c1b59e9");
            var ekun_feature       = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("0bc6dc9b6648a744899752508addae8c");
            var jaethal_feature    = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("34280596dd550074ca55bd15285451b3");
            var jubilost_feature   = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("c9618e3c61e65114b994f3fabcae1d97");
            var nok_nok_companion  = ResourcesLibrary.TryGetBlueprint <BlueprintUnit>("f9417988783876044b76f918f8636455");
            var kanerah_feature    = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("ccb52e235941e0442be0cb0ee5570f07");
            var kalikke_feature    = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("385e8d69b89992844b0992caf666a5fd");
            var octavia_feature    = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("200151a5a5c78a4439d0f6e9fb26620a");
            var regongar_feature   = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("12ee53c9e546719408db257f489ec366");
            var varn_feature       = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("2babd2d4687b5ee428966322eccfe4b6");
            var cephal_feature     = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("d152b07305353474ba15d750015d99ee");

            addDeityToCompanion(amiri1_feature.GetComponent <AddClassLevels>(), ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("8f49a5d8528a82c44b8c117a89f6b68c")); //gorum
            addDeityToCompanion(linzi_feature.GetComponent <AddClassLevels>(), ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("b382afa31e4287644b77a8b30ed4aa0b"));  //shaelyn
            //addDeityToCompanion(kanerah_feature.GetComponent<AddClassLevels>(), ResourcesLibrary.TryGetBlueprint<BlueprintFeature>("6262cfce7c31626458325ca0909de997"));//nethys
            //addDeityToCompanion(kalikke_feature.GetComponent<AddClassLevels>(), ResourcesLibrary.TryGetBlueprint<BlueprintFeature>("6262cfce7c31626458325ca0909de997"));//nethys
            addDeityToCompanion(octavia_feature.GetComponent <AddClassLevels>(), ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("c7531715a3f046d4da129619be63f44c"));  //calistria
            addDeityToCompanion(regongar_feature.GetComponent <AddClassLevels>(), ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("c7531715a3f046d4da129619be63f44c")); //calistria
            //nok-nok should have lamashtu
            //jubilost
            //jaethal - uragathoa
            //varn ?
            addDeityToCompanion(ekun_feature.GetComponent <AddClassLevels>(), ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("d2d5c5a58885a6b489727467e13c3337"));   //torag
            addDeityToCompanion(cephal_feature.GetComponent <AddClassLevels>(), ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("a3a5ccc9c670e6f4ca4a686d23b89900")); //asmodeus
        }
コード例 #10
0
        public static void CreateVendorTables()
        {
            Main.Mod.Debug(MethodBase.GetCurrentMethod());
            foreach (KeyValuePair <string, NewVendorTable> vendors in vendorTables)
            {
                var newTable = ScriptableObject.CreateInstance <BlueprintSharedVendorTable>();

                newTable.name = vendors.Value.Name;
                newTable.AutoIdentifyAllItems = vendors.Value.AutoId;

                Library.AddAsset(newTable, vendors.Key);

                List <LootItemsPackFixed> list = new List <LootItemsPackFixed>();

                foreach (KeyValuePair <string, int> blueprintGuid in vendors.Value.Table)
                {
                    var blueprintScriptableObject = ResourcesLibrary.TryGetBlueprint <BlueprintScriptableObject>(blueprintGuid.Key);
                    var lootItem = new LootItem();
                    var packed   = ScriptableObject.CreateInstance <LootItemsPackFixed>();
                    Helpers.SetField(lootItem, "m_Item", blueprintScriptableObject as BlueprintItem);
                    Helpers.SetField(lootItem, "m_Type", LootItemType.Item);
                    Helpers.SetField(packed, "m_Item", lootItem);
                    Helpers.SetField(packed, "m_Count", blueprintGuid.Value);
                    list.Add(packed);
                }

                newTable.ComponentsArray = list.ToArray();
            }
        }
コード例 #11
0
        static void createArcaneArchery()
        {
            var bard_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("772c83a25e2268e448e841dcd548235f");
            var icon       = library.Get <BlueprintAbility>("9a46dfd390f943647ab4395fc997936d").Icon; //acid arrow

            arcane_achery = Helpers.CreateFeature("ArrowsongMinstrelArcaneArcheryFeature",
                                                  "Arcane Archery",
                                                  "An Arrowsong minstrel’s skill at ranged martial arts allows her to learn to cast a number of powerful, offensive spells that would otherwise be unavailable to her.\n"
                                                  + "Arrowsong Minstrel adds following spells to her spell list: acid arrow, flame arrow, hurricane bow, greater magic weapon, magic weapon, protection from arrows, snowball, true strike, and sorcerer/wizard spells of the evocation school. An Arrowsong minstrel must still select these spells as spells known before she can cast them.\n"
                                                  + "In addition, for the purpose of meeting the requirements of combat feats and prestige classes, an Arrowsong minstrel treats her bard level as her base attack bonus (in addition to base attack bonuses gained from other classes and Hit Dice).\n"
                                                  + "An Arrowsong minstrel casts one fewer spell of each level than normal. If this reduces the number to 0, she can cast spells of that level only if her Charisma score allows bonus spells of that level.",
                                                  "",
                                                  icon,
                                                  FeatureGroup.None,
                                                  Common.createReplace34BabWithClassLevel(bard_class)
                                                  );
            var magus = library.Get <BlueprintCharacterClass>("45a4607686d96a1498891b3286121780");

            arcane_achery_selection = Helpers.CreateFeatureSelection("ArrowsongMinstrelArcaneArcherySelectionFeature",
                                                                     arcane_achery.Name,
                                                                     arcane_achery.Description,
                                                                     "",
                                                                     icon,
                                                                     FeatureGroup.None
                                                                     );
            arcane_achery_selection.Obligatory  = true;
            arcane_achery_selection.AllFeatures = new BlueprintFeature[] { arcane_achery };
            arcane_achery.AddComponent(Helpers.Create <PrerequisiteNoClassLevel>(p => p.CharacterClass = magus));
        }
コード例 #12
0
        static public void create()
        {
            var alchemist_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("0937bec61c0dabc468428f496580c721");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "BeastmorphArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Beastmorph");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "Beastmorphs study the anatomy of monsters, learning how they achieve their strange powers. They use their knowledge to duplicate these abilities, but at the cost of taking on inhuman shapes when they use mutagens.");
            });
            Helpers.SetField(archetype, "m_ParentClass", alchemist_class);
            library.AddAsset(archetype, "");


            var posion_resistance  = library.Get <BlueprintFeature>("c9022272c87bd66429176ce5c597989c");
            var poison_immunity    = library.Get <BlueprintFeature>("202af59b918143a4ab7c33d72c8eb6d5");
            var persistent_mutagen = library.Get <BlueprintFeature>("75ba281feb2b96547a3bfb12ecaff052");

            createFeralMutagenAndWings();
            createBeastformMutagen();

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(5, posion_resistance),
                                                          Helpers.LevelEntry(8, posion_resistance),
                                                          Helpers.LevelEntry(10, poison_immunity),
                                                          Helpers.LevelEntry(14, persistent_mutagen), };

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(3, feral_mutagen),
                                                       Helpers.LevelEntry(6, feral_wings),
                                                       Helpers.LevelEntry(10, pounce),
                                                       Helpers.LevelEntry(14, blindsense), };

            alchemist_class.Progression.UIGroups = alchemist_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(feral_mutagen, feral_wings, pounce, blindsense));
            alchemist_class.Archetypes           = alchemist_class.Archetypes.AddToArray(archetype);
        }
コード例 #13
0
 public static void UnlockAllMythicPaths()
 {
     Game.Instance.Player.EtudesSystem.StartEtude(ResourcesLibrary.TryGetBlueprint <BlueprintEtude>("d85f7367b453b7b468b77e5e708297ae"));
     Game.Instance.Player.EtudesSystem.StartEtude(ResourcesLibrary.TryGetBlueprint <BlueprintEtude>("e6669aad304206c4d969f6602e6b412e"));
     Game.Instance.Player.EtudesSystem.StartEtude(ResourcesLibrary.TryGetBlueprint <BlueprintEtude>("8f2f0ea65ef3a3f48948d27a39b37db1"));
     Game.Instance.Player.EtudesSystem.StartEtude(ResourcesLibrary.TryGetBlueprint <BlueprintEtude>("f6dce66b61f98eb4dbe6388e16b1de11"));
 }
コード例 #14
0
        internal static void create()
        {
            var kineticist_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("42a455d9ec1ad924d889272429eb8391");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "ElementalAnnihilatorArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Elemental Annihilator");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "For some kineticists, nothing in life is as sweet as destruction and pain. Elemental annihilators pursue only uses of their powers that harm others.");
            });
            Helpers.SetField(archetype, "m_ParentClass", kineticist_class);
            library.AddAsset(archetype, "");

            var element_selection     = library.Get <BlueprintFeatureSelection>("1f3a15a3ae8a5524ab8b97f469bf4e3d");
            var infusion_selection    = library.Get <BlueprintFeatureSelection>("58d6f8e9eea63f6418b107ce64f315ea");
            var wild_talent_selection = library.Get <BlueprintFeatureSelection>("5c883ae0cd6d7d5448b7a420f51f8459");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1, infusion_selection),
                                                          Helpers.LevelEntry(2, wild_talent_selection),
                                                          Helpers.LevelEntry(3, infusion_selection),
                                                          Helpers.LevelEntry(4, wild_talent_selection),
                                                          Helpers.LevelEntry(5, infusion_selection),
                                                          Helpers.LevelEntry(6, wild_talent_selection),
                                                          Helpers.LevelEntry(8, wild_talent_selection),
                                                          //Helpers.LevelEntry(9, infusion_selection), since no extreme range infusion
                                                          Helpers.LevelEntry(10, wild_talent_selection),
                                                          Helpers.LevelEntry(12, wild_talent_selection),
                                                          Helpers.LevelEntry(14, wild_talent_selection),
                                                          Helpers.LevelEntry(16, wild_talent_selection),
                                                          Helpers.LevelEntry(18, wild_talent_selection),
                                                          Helpers.LevelEntry(20, wild_talent_selection) };
            createDevastatingInfusion();
            // creatBlastTraining();
            // createDampenedVersality();
            // createOmnicide();

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, devastating_infusion),

                                                       /* Helpers.LevelEntry(2, dampened_versality),
                                                        * Helpers.LevelEntry(3, increased_range),
                                                        * Helpers.LevelEntry(5, blast_training),
                                                        * Helpers.LevelEntry(8, dampened_versality),
                                                        * Helpers.LevelEntry(9, blast_training),
                                                        * Helpers.LevelEntry(10, dampened_versality),
                                                        * Helpers.LevelEntry(13, blast_training),
                                                        * Helpers.LevelEntry(14, dampened_versality),
                                                        * Helpers.LevelEntry(17, blast_training),
                                                        * Helpers.LevelEntry(18, dampened_versality),
                                                        * Helpers.LevelEntry(20, omnicide)*/
            };

            archetype.OverrideAttributeRecommendations        = true;
            kineticist_class.Progression.UIDeterminatorsGroup = kineticist_class.Progression.UIDeterminatorsGroup.AddToArray(devastating_infusion);
            kineticist_class.Progression.UIGroups             = kineticist_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(increased_range, dampened_versality, omnicide));
            kineticist_class.Archetypes = kineticist_class.Archetypes.AddToArray(archetype);

            //fix expanded element bonus
            wild_talent_selection.AddComponent(Common.prerequisiteNoArchetype(archetype));
            kineticist_class.Archetypes = kineticist_class.Archetypes.AddToArray(archetype);
        }
コード例 #15
0
        // Make our mod-specific updates to the blueprint based on the data stored in assetId.  Return a string which
        // is the AssetGuid of the supplied blueprint plus our customization again, or null if we couldn't change the
        // blueprint.
        static string ApplyBlueprintPatch(BlueprintItemEquipment blueprint, string assetId)
        {
            Match match = blueprintRegex.Match(assetId);

            if (match.Success)
            {
                int casterLevel = int.Parse(match.Groups[2].Value);
                blueprint.CasterLevel = casterLevel;
                int spellLevel = -1;
                if (match.Groups[3].Success)
                {
                    spellLevel           = int.Parse(match.Groups[4].Value);
                    blueprint.SpellLevel = spellLevel;
                }
                string spellId = null;
                if (match.Groups[5].Success)
                {
                    spellId           = match.Groups[6].Value;
                    blueprint.Ability = (BlueprintAbility)ResourcesLibrary.TryGetBlueprint(spellId);
                }
                blueprint.DC = 10 + spellLevel * 3 / 2;
                Traverse.Create(blueprint).Field("m_Cost").SetValue(0); // Allow the game to auto-calculate the cost
                return(BuildCustomItemGuid(blueprint.AssetGuid, casterLevel, spellLevel, spellId));
            }
            else
            {
                storedModEntry.Logger.Warning($"Failed to find expected substring in custom blueprint assetId ${assetId}");
                return(null);
            }
        }
コード例 #16
0
        internal static void create()
        {
            var slayer_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("c75e0971973957d4dbad24bc7957e4fb");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "GraveWardenArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Grave Warden");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "While paladins and inquisitors use their connection with the divine to fight undead hordes and other horrors of the night, a grave warden relies on knowledge, skill with weapons, and tenacity to put an end to these night-born terrors.");
            });
            Helpers.SetField(archetype, "m_ParentClass", slayer_class);
            library.AddAsset(archetype, "");

            var slayer_talent2  = library.Get <BlueprintFeatureSelection>("04430ad24988baa4daa0bcd4f1c7d118");
            var slayer_talent10 = library.Get <BlueprintFeatureSelection>("913b9cf25c9536949b43a2651b7ffb66");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(2, slayer_talent2),
                                                          Helpers.LevelEntry(10, slayer_talent10) };

            createHolyWaterSprinkerAndDeathWard();
            createDustBringer();

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(2, holy_water_sprinkler),
                                                       Helpers.LevelEntry(7, death_ward),
                                                       Helpers.LevelEntry(10, dustbringer) };

            slayer_class.Progression.UIGroups = slayer_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(holy_water_sprinkler, death_ward, dustbringer));
            slayer_class.Archetypes           = slayer_class.Archetypes.AddToArray(archetype);
        }
コード例 #17
0
        static void createNaturalMagic()
        {
            var magus_class         = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("45a4607686d96a1498891b3286121780");
            var drudi_spell_list    = library.Get <BlueprintSpellList>("bad8638d40639d04fa2f80a1cac67d6b");
            var magus_spell_list    = library.Get <BlueprintSpellList>("4d72e1e7bd6bc4f4caaea7aa43a14639");
            var combined_spell_list = Common.combineSpellLists("NatureBondedMagusNaturalMagicSpellList", drudi_spell_list);

            Common.excludeSpellsFromList(combined_spell_list, magus_spell_list);

            for (int i = 1; i <= 6; i++)
            {
                natural_magic[i - 1] = Helpers.CreateFeatureSelection($"NatureBondedMagusNaturalMagic{i}FeatureSelection",
                                                                      "Natural Magic " + $"(level {i})",
                                                                      "A nature - bonded magus adds one 1st - level spell from the druid spell list to his spellbook. Each time a nature - bonded magus gains the ability to cast a new level of spells, he can add one spell of that level from the druid spell list to his spellbook.",
                                                                      "",
                                                                      Helpers.GetIcon("0fd00984a2c0e0a429cf1a911b4ec5ca"), //entangle
                                                                      FeatureGroup.None);
                var learn_spell = library.CopyAndAdd <BlueprintParametrizedFeature>("bcd757ac2aeef3c49b77e5af4e510956", $"NatureBondedMagusNaturalMagic{i}ParametrizedFeature", "");
                learn_spell.SpellLevel         = i;
                learn_spell.SpecificSpellLevel = true;
                learn_spell.SpellLevelPenalty  = 0;
                learn_spell.SpellcasterClass   = magus_class;
                learn_spell.SpellList          = combined_spell_list;
                learn_spell.ReplaceComponent <LearnSpellParametrized>(l => { l.SpellList = combined_spell_list; l.SpecificSpellLevel = true; l.SpellLevel = i; l.SpellcasterClass = magus_class; });
                learn_spell.SetName(Helpers.CreateString($"NatureBondedMagusNaturalMagic{i}ParametrizedFeature.Name", "Natural Magic " + $"(level {i})"));
                learn_spell.SetDescription(natural_magic[i - 1].Description);
                learn_spell.SetIcon(natural_magic[i - 1].Icon);
                natural_magic[i - 1].AllFeatures = new BlueprintFeature[] { learn_spell };
            }
        }
コード例 #18
0
        internal static void createDawnflowerAnchoriteClass()
        {
            var ranger_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("cda0615668a6df14eb36ba19ee881af6");
            var druid_class  = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("610d836f3a3a9ed42a4349b62f002e96");

            var sarenrae = library.Get <BlueprintFeature>("c1c4f7f64842e7e48849e5e67be11a1b");


            var savesPrestigeLow  = library.Get <BlueprintStatProgression>("dc5257e1100ad0d48b8f3b9798421c72");
            var savesPrestigeHigh = library.Get <BlueprintStatProgression>("1f309006cd2855e4e91a6c3707f3f700");

            dawnflower_anchorite      = Helpers.Create <BlueprintCharacterClass>();
            dawnflower_anchorite.name = "DawnflowerAnchoriteClass";
            library.AddAsset(dawnflower_anchorite, "");

            dawnflower_anchorite.LocalizedName        = Helpers.CreateString("DawnflowerAnchoriteClass.Name", "Dawnflower Anchorite");
            dawnflower_anchorite.LocalizedDescription = Helpers.CreateString("DawnflowerAnchoriteClass.Description",
                                                                             "Although most of Sarenrae’s worshipers seek to aid others or seek out those villains who can be redeemed, a rare few instead raise their eyes in awe of the greatest of Sarenrae’s gifts to mortals: the sun. These Dawnflower anchorites hope to receive enlightenment in their retreat to the wilds so that they can, some day, return to civilization and use their newfound grace to help heal the church’s wounds."
                                                                             );
            dawnflower_anchorite.m_Icon                  = druid_class.Icon;
            dawnflower_anchorite.SkillPoints             = druid_class.SkillPoints;
            dawnflower_anchorite.HitDie                  = DiceType.D8;
            dawnflower_anchorite.BaseAttackBonus         = druid_class.BaseAttackBonus;
            dawnflower_anchorite.FortitudeSave           = savesPrestigeLow;
            dawnflower_anchorite.ReflexSave              = savesPrestigeHigh;
            dawnflower_anchorite.WillSave                = savesPrestigeHigh;
            dawnflower_anchorite.ClassSkills             = new StatType[] { StatType.SkillAthletics, StatType.SkillPerception, StatType.SkillLoreReligion, StatType.SkillLoreNature, StatType.SkillKnowledgeWorld, StatType.SkillKnowledgeArcana };
            dawnflower_anchorite.IsDivineCaster          = true;
            dawnflower_anchorite.IsArcaneCaster          = true;
            dawnflower_anchorite.PrestigeClass           = true;
            dawnflower_anchorite.StartingGold            = druid_class.StartingGold;
            dawnflower_anchorite.PrimaryColor            = druid_class.PrimaryColor;
            dawnflower_anchorite.SecondaryColor          = druid_class.SecondaryColor;
            dawnflower_anchorite.RecommendedAttributes   = new StatType[] { };
            dawnflower_anchorite.EquipmentEntities       = druid_class.EquipmentEntities;
            dawnflower_anchorite.MaleEquipmentEntities   = druid_class.MaleEquipmentEntities;
            dawnflower_anchorite.FemaleEquipmentEntities = druid_class.FemaleEquipmentEntities;
            dawnflower_anchorite.StartingItems           = druid_class.StartingItems;

            dawnflower_anchorite.ComponentsArray = ranger_class.ComponentsArray;
            dawnflower_anchorite.AddComponent(Common.createPrerequisiteAlignment(AlignmentMaskType.NeutralGood));
            dawnflower_anchorite.AddComponent(Helpers.Create <PrerequisiteMechanics.PrerequsiteOrAlternative>(p =>
            {
                p.base_prerequsite        = Helpers.PrerequisiteStatValue(StatType.SkillLoreNature, 5);
                p.alternative_prerequsite = Helpers.PrerequisiteStatValue(StatType.SkillLoreReligion, 5);
            }
                                                                                                              )
                                              );
            dawnflower_anchorite.AddComponent(Helpers.PrerequisiteFeature(sarenrae));
            dawnflower_anchorite.AddComponent(Common.createPrerequisiteCasterTypeSpellLevel(true, 1, true));
            dawnflower_anchorite.AddComponent(Helpers.Create <SpellbookMechanics.PrerequisiteDivineCasterTypeSpellLevel>(p => { p.RequiredSpellLevel = 1; p.Group = Prerequisite.GroupType.Any; }));
            dawnflower_anchorite.AddComponent(Helpers.Create <SpellbookMechanics.PrerequisitePsychicCasterTypeSpellLevel>(p => { p.RequiredSpellLevel = 1; p.Group = Prerequisite.GroupType.Any; }));

            createDawnflowerAnchoriteProgression();
            dawnflower_anchorite.Progression = dawnflower_anchorite_progression;

            Helpers.RegisterClass(dawnflower_anchorite);
        }
コード例 #19
0
        static internal void init()
        {
            var animal_calss = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("4cd1757a0eea7694ba5c933729a53920");
            var slayer       = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("c75e0971973957d4dbad24bc7957e4fb");
            var kineticist   = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("42a455d9ec1ad924d889272429eb8391");

            slayer.AddComponent(Helpers.Create <PrerequisiteNoClassLevel>(p => p.CharacterClass     = animal_calss));
            kineticist.AddComponent(Helpers.Create <PrerequisiteNoClassLevel>(p => p.CharacterClass = animal_calss));
            Helpers.RegisterClass(animal_calss);
            animal_calss.HideIfRestricted = false;


            foreach (var c in BlueprintRoot.Instance.Progression.CharacterClasses)
            {
                if (c != Eidolon.eidolon_class)
                {
                    c.AddComponent(Helpers.Create <PrerequisiteNoClassLevel>(p => p.CharacterClass = Eidolon.eidolon_class));
                }
            }


            //fix feats
            var eidolon_restricted_feats = new BlueprintFeature[]
            {
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("6d3728d4e9c9898458fe5e9532951132"), //light armor proficiency
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("46f4fb320f35704488ba3d513397789d"), //medium armor proficiency
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("1b0f68188dcc435429fb87a022239681"), //heavy armor proficiency
            };

            var animal_restricted_feats = eidolon_restricted_feats.AddToArray(new BlueprintFeature[]
            {
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("e70ecf1ed95ca2f40b754f1adb22bbdd"),                                                                //simple weapon proficiency
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("203992ef5b35c864390b4e4a1e200629"),                                                                //medium armor proficiency
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("9a01b6815d6c3684cb25f30b8bf20932"),                                                                //heavy armor proficiency
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("7812ad3672a4b9a4fb894ea402095167"),                                                                //improved unarmed strike
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("cb8686e7357a68c42bdd9d4e65334633"),                                                                //shields proficiency
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("6105f450bb2acbd458d277e71e19d835"),                                                                //tower shield proficiency
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("ac8aaf29054f5b74eb18f2af950e752d"),                                                                //two weapon fighting
            });

            foreach (var f in eidolon_restricted_feats)
            {
                f.AddComponent(Helpers.Create <PrerequisiteNoClassLevel>(p => p.CharacterClass = Eidolon.eidolon_class));
            }

            foreach (var f in animal_restricted_feats)
            {
                f.AddComponent(Helpers.Create <PrerequisiteNoClassLevel>(p => p.CharacterClass = animal_calss));
                f.AddComponent(Common.prerequisiteNoArchetype(Eidolon.eidolon_class, Eidolon.quadruped_archetype));
                f.AddComponent(Common.prerequisiteNoArchetype(Eidolon.eidolon_class, Eidolon.serpentine_archetype));
            }


            var improved_unarmed_strike = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("7812ad3672a4b9a4fb894ea402095167");
            var weapon_override         = improved_unarmed_strike.GetComponent <EmptyHandWeaponOverride>();

            improved_unarmed_strike.ReplaceComponent(weapon_override, Helpers.Create <NewMechanics.EmptyHandWeaponOverrideIfNoWeapon>(e => e.Weapon = weapon_override.Weapon));
        }
 // ReSharper disable once InconsistentNaming
 private static void Postfix(string assetId, ref BlueprintScriptableObject __result)
 {
     if (__result == null && assetId.Length > VanillaAssetIdLength)
     {
         // Failed to load custom blueprint - return the original.
         var originalGuid = assetId.Substring(0, VanillaAssetIdLength);
         __result = ResourcesLibrary.TryGetBlueprint(originalGuid);
     }
 }
コード例 #21
0
        static internal void fixVarnFeats()
        {
            var varn_companion    = ResourcesLibrary.TryGetBlueprint <BlueprintUnit>("e83a03d50fedd35449042ce73f1b6908");
            var varn_feature      = ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("2babd2d4687b5ee428966322eccfe4b6");
            var varn_class_levels = varn_feature.GetComponent <AddClassLevels>();

            varn_class_levels.Selections[2].Features[1] = NewFeats.dirty_fighting;
            varn_class_levels.Selections[1].Features[0] = RogueTalents.underhanded;
        }
コード例 #22
0
        static void addDeityToCompanion(AddClassLevels add_classLevels, BlueprintFeature deity)
        {
            var deity_selection = new SelectionEntry();

            deity_selection.Selection = ResourcesLibrary.TryGetBlueprint <BlueprintFeatureSelection>("59e7a76987fe3b547b9cce045f4db3e4");
            deity_selection.Features  = new BlueprintFeature[] { deity };

            add_classLevels.Selections = add_classLevels.Selections.AddToArray(deity_selection);
        }
コード例 #23
0
        internal static void TestDefaultLevelPlan2()
        {
            var            defaultClass   = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("0937bec61c0dabc468428f496580c721"); //Alchemist
            var            defaultBuild   = defaultClass.DefaultBuild;
            var            addClassLevels = defaultBuild.GetComponent <AddClassLevels>();
            var            targetPoints   = Main.settings.DefaultPointBuy25 ? 25 : 20;
            var            stats          = defaultBuild.GetComponents <StatsDistributionPreset>().FirstOrDefault(sd => sd.TargetPoints == targetPoints);
            UnitEntityData unitData       = Main.settings.DefaultPointBuy25 ?
                                            Game.Instance.CreateUnitVacuum(BlueprintRoot.Instance.DefaultPlayerCharacter) :
                                            Game.Instance.CreateUnitVacuum(BlueprintRoot.Instance.CustomCompanion);
            var unit = unitData.Descriptor;

            LogUnit("BlankUnit.txt", unit);
            var  levelUpController = TestLevelUpController.Start(unit: unit, instantCommit: true, unitJson: null, onSuccess: null, mode: LevelUpState.CharBuildMode.CharGen);
            bool success           = true;

            success = levelUpController.SelectPortrait(ResourcesLibrary.GetBlueprints <BlueprintPortrait>().First());
            if (!success)
            {
                Main.Log("Error selecting portrait");
            }
            success = levelUpController.SelectGender(Gender.Male);
            if (!success)
            {
                Main.Log("Error selecting gender");
            }
            var race = ResourcesLibrary.TryGetBlueprint <BlueprintRace>("0a5d473ead98b0646b94495af250fdc4"); //Human

            race    = ResourcesLibrary.TryGetBlueprint <BlueprintRace>("5c4e42124dc2b4647af6e36cf2590500");  //Tiefling
            success = levelUpController.SelectRace(race);
            if (!success)
            {
                Main.Log("Error selecting race");
            }
            levelUpController.State.SelectedClass = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("0937bec61c0dabc468428f496580c721");
            ApplyDefaultBuild(levelUpController);
            //success = levelUpController.SelectClass(ResourcesLibrary.TryGetBlueprint<BlueprintCharacterClass>("0937bec61c0dabc468428f496580c721"));
            //if (!success) Main.Log("Error selecting class");
            //levelUpController.ApplyClassMechanics();
            //levelUpController.ApplySpellbook();
            //levelUpController.SelectDefaultClassBuild();

            var levelPlanHolder = new LevelPlanHolder();

            for (int i = 0; i < 20; i++)
            {
                var plan = unit.Progression.GetLevelPlan(i + 1);
                levelPlanHolder.LevelPlanData[i] = plan;
            }
            LevelPlanManager.CurrentLevelPlan = levelPlanHolder;

            var token = UnitSerialization.Serialize(unit);

            File.WriteAllText("TestDefaultAlch.json", token.ToString());
            LogUnit("TestDefaultAlch.txt", unit);
        }
コード例 #24
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
        {
            string text = (string)reader.Value;

            if (text == null || text == "null")
            {
                return(null);
            }
            return(new CraftingBlueprint <T>(ResourcesLibrary.TryGetBlueprint(text) as T));
        }
コード例 #25
0
        static void TryPreloadWeapon(BlueprintRef assetId, Gender gender, Race race)
        {
            if (string.IsNullOrEmpty(assetId))
            {
                return;
            }
            var item = ResourcesLibrary.TryGetBlueprint <BlueprintItemEquipment>(assetId);

            item?.EquipmentEntity?.Preload(gender, race);
        }
コード例 #26
0
        static void createCommandUndead()
        {
            var cleric_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("67819271767a9dd4fbfd4ae700befea0");
            var resource     = library.Get <BlueprintAbilityResource>("5e2bba3e07c37be42909a12945c27de7");

            command_undead = ChannelEnergyEngine.createCommandUndead("UndeadLord",
                                                                     "Command Undead",
                                                                     " As a standard action, you can use one of your uses of channel negative energy to enslave one undead creature within close range. Undead receive a Will save to negate the effect. The DC for this Will save is equal to 10 + 1/2 your cleric level + your Charisma modifier. Undead that fail their saves fall under your control, obeying your commands to the best of their ability, as if under the effects of control undead.",
                                                                     StatType.Charisma, new BlueprintCharacterClass[] { cleric_class }, resource);
        }
コード例 #27
0
        public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer szr)
        {
            JObject jObject    = JObject.Load(reader);
            var     name       = (string)jObject["name"];
            var     typeName   = (string)jObject["$type"];
            var     realType   = Type.GetType(typeName);
            var     settings   = JsonBlueprints.CreateSettings(realType);
            var     serializer = JsonSerializer.Create(settings);
            BlueprintScriptableObject result = null;

            if (jObject["$append"] != null)
            {
                serializer.ObjectCreationHandling = ObjectCreationHandling.Reuse;
                var copy = (string)jObject["$append"];
                jObject.Remove("$append");
                var parts = copy.Split(':');
                result = ResourcesLibrary.TryGetBlueprint(parts[1]);
                name   = result.name;
                Main.DebugLog($"Appending to {result.name}");
            }
            if (jObject["$replace"] != null)
            {
                var copy = (string)jObject["$replace"];
                jObject.Remove("$replace");
                var parts = copy.Split(':');
                result = ResourcesLibrary.TryGetBlueprint(parts[1]);
                name   = result.name;
                Main.DebugLog($"replacing to {result.name}");
            }
            if (jObject["$copy"] != null)
            {
                var copy = (string)jObject["$copy"];
                jObject.Remove("$copy");
                var parts    = copy.Split(':');
                var resource = ResourcesLibrary.TryGetBlueprint(parts[1]);
                result = (BlueprintScriptableObject)BlueprintUtil.ShallowClone(resource);
                Main.DebugLog($"Copying {resource.name}");
            }
            if (name == null)
            {
                throw new System.Exception("Missing name");
            }
            if (JsonBlueprints.Blueprints.ContainsKey(name))
            {
                //throw new System.Exception("Cannot create blueprint twice");
            }
            if (result == null)
            {
                result = ScriptableObject.CreateInstance(realType) as BlueprintScriptableObject;
            }
            JsonBlueprints.Blueprints[name] = result;
            BlueprintUtil.AddBlueprint(result, name);
            serializer.Populate(jObject.CreateReader(), result);
            return(result);
        }
コード例 #28
0
        internal static void create()
        {
            var kineticist_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("42a455d9ec1ad924d889272429eb8391");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "KineticChirurgeonArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Kinetic Chirurgeon");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "While any hydrokineticist can learn the rudiments of healing, some kineticists are virtuosos of the curative arts.");
            });
            Helpers.SetField(archetype, "m_ParentClass", kineticist_class);
            library.AddAsset(archetype, "");

            var element_selection     = library.Get <BlueprintFeatureSelection>("1f3a15a3ae8a5524ab8b97f469bf4e3d");
            var infusion_selection    = library.Get <BlueprintFeatureSelection>("58d6f8e9eea63f6418b107ce64f315ea");
            var wild_talent_selection = library.Get <BlueprintFeatureSelection>("5c883ae0cd6d7d5448b7a420f51f8459");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1, infusion_selection),
                                                          Helpers.LevelEntry(2, wild_talent_selection),
                                                          Helpers.LevelEntry(4, wild_talent_selection),
                                                          Helpers.LevelEntry(6, wild_talent_selection, KineticistFix.internal_buffer),
                                                          Helpers.LevelEntry(8, wild_talent_selection),
                                                          Helpers.LevelEntry(10, wild_talent_selection),
                                                          Helpers.LevelEntry(12, wild_talent_selection),
                                                          Helpers.LevelEntry(14, wild_talent_selection),
                                                          Helpers.LevelEntry(16, wild_talent_selection),
                                                          Helpers.LevelEntry(18, wild_talent_selection),
                                                          Helpers.LevelEntry(20, wild_talent_selection) };
            createKineticChirurgery();
            createMetahealerTalent();
            createHealingBuffer();

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, kinetic_chirurgery),
                                                       Helpers.LevelEntry(2, metahealer_wild_talent),
                                                       Helpers.LevelEntry(4, metahealer_wild_talent),
                                                       Helpers.LevelEntry(6, healing_buffer, metahealer_wild_talent),
                                                       Helpers.LevelEntry(8, metahealer_wild_talent),
                                                       Helpers.LevelEntry(10, metahealer_wild_talent),
                                                       Helpers.LevelEntry(12, metahealer_wild_talent),
                                                       Helpers.LevelEntry(14, metahealer_wild_talent),
                                                       Helpers.LevelEntry(16, metahealer_wild_talent),
                                                       Helpers.LevelEntry(18, metahealer_wild_talent),
                                                       Helpers.LevelEntry(20, metahealer_wild_talent) };

            archetype.OverrideAttributeRecommendations        = true;
            kineticist_class.Progression.UIDeterminatorsGroup = kineticist_class.Progression.UIDeterminatorsGroup.AddToArray(kinetic_chirurgery);
            kineticist_class.Archetypes = kineticist_class.Archetypes.AddToArray(archetype);

            //fix expanded element bonus
            wild_talent_selection.AddComponent(Common.prerequisiteNoArchetype(archetype));
            metahealer_wild_talent.AddComponent(Common.createPrerequisiteArchetypeLevel(archetype, 1));


            KineticistFix.expanded_element_bonus_talent_selection.AllFeatures = KineticistFix.expanded_element_bonus_talent_selection.AllFeatures.AddToArray(metahealer_wild_talent);
        }
コード例 #29
0
        static public void create()
        {
            var barbarian_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("f7d7eb166b3dd594fb330d085df41853");

            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "UntamedRagerArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Untamed Rager");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "There are no rules in the wild. Some barbarians enter combat with only victory in mind and do anything in their power to achieve it.");
            });
            Helpers.SetField(archetype, "m_ParentClass", barbarian_class);
            library.AddAsset(archetype, "");

            createDirtyTrickTactics();
            createFeralAppearance();
            createDishonorable();

            var uncanny_dodge          = library.Get <BlueprintFeature>("3c08d842e802c3e4eb19d15496145709");
            var improved_uncanny_dodge = library.Get <BlueprintFeature>("485a18c05792521459c7d06c63128c79");
            var danger_sense           = library.Get <BlueprintFeature>("fdd591c1fbf1c0b41a359d59756f2888");
            var damage_reduction       = library.Get <BlueprintFeature>("cffb5cddefab30140ac133699d52a8f8");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(2, uncanny_dodge),
                                                          Helpers.LevelEntry(3, danger_sense),
                                                          Helpers.LevelEntry(5, improved_uncanny_dodge),
                                                          Helpers.LevelEntry(6, danger_sense),
                                                          Helpers.LevelEntry(7, damage_reduction),
                                                          Helpers.LevelEntry(9, danger_sense),
                                                          Helpers.LevelEntry(10, damage_reduction),
                                                          Helpers.LevelEntry(12, danger_sense),
                                                          Helpers.LevelEntry(13, damage_reduction),
                                                          Helpers.LevelEntry(15, danger_sense),
                                                          Helpers.LevelEntry(16, damage_reduction),
                                                          Helpers.LevelEntry(18, danger_sense),
                                                          Helpers.LevelEntry(19, damage_reduction), };

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(2, despicable_tactics),
                                                       Helpers.LevelEntry(3, feral_appearance),
                                                       Helpers.LevelEntry(5, deplorable_tactics),
                                                       Helpers.LevelEntry(6, feral_appearance),
                                                       Helpers.LevelEntry(7, dishonorable),
                                                       Helpers.LevelEntry(9, feral_appearance),
                                                       Helpers.LevelEntry(10, dishonorable),
                                                       Helpers.LevelEntry(12, feral_appearance),
                                                       Helpers.LevelEntry(13, dishonorable),
                                                       Helpers.LevelEntry(15, feral_appearance),
                                                       Helpers.LevelEntry(16, dishonorable),
                                                       Helpers.LevelEntry(18, feral_appearance),
                                                       Helpers.LevelEntry(19, dishonorable), };

            barbarian_class.Progression.UIGroups = barbarian_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(feral_appearance));
            barbarian_class.Progression.UIGroups = barbarian_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(dishonorable));
            barbarian_class.Progression.UIGroups = barbarian_class.Progression.UIGroups.AddToArray(Helpers.CreateUIGroup(despicable_tactics, deplorable_tactics));
            barbarian_class.Archetypes           = barbarian_class.Archetypes.AddToArray(archetype);
        }
コード例 #30
0
        internal static void create()
        {
            var paladin_class = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("bfa11238e7ae3544bbeb4d0b92e897ec");


            archetype = Helpers.Create <BlueprintArchetype>(a =>
            {
                a.name                 = "SacredServantArchetype";
                a.LocalizedName        = Helpers.CreateString($"{a.name}.Name", "Sacred Servant");
                a.LocalizedDescription = Helpers.CreateString($"{a.name}.Description", "Paladins as a general rule, venerate the gods of good and purity, but some take this a step further, dedicating themselves to a specific deity and furthering the cause of the faith. These sacred servants are rewarded for their devotion with additional spells and powerful allies.");
            });
            Helpers.SetField(archetype, "m_ParentClass", paladin_class);
            library.AddAsset(archetype, "");

            createDomainSelection();
            createDivineBond();
            createCallCelestialAlly();

            var smite_evil_extra      = library.Get <BlueprintFeature>("0f5c99ffb9c084545bbbe960b825d137");
            var weapon_bond_feature   = library.Get <BlueprintFeature>("1c7cdc1605554954f838d85bbdd22d90");
            var weapon_bond_feature2  = library.Get <BlueprintFeature>("c8db0772b7059ec4eabe55b7e0e79824");
            var weapon_bond_feature3  = library.Get <BlueprintFeature>("d2f45a2034d4f7643ba1a450bc5c4c06");
            var weapon_bond_feature4  = library.Get <BlueprintFeature>("6d73f49b602e29a43a6faa2ea1e4a425");
            var weapon_bond_feature5  = library.Get <BlueprintFeature>("f17c3ba33bb44d44782cb3851d823011");
            var weapon_bond_feature6  = library.Get <BlueprintFeature>("b936ee90c070edb46bd76025dc1c5936");
            var weapon_bond_extra_use = library.Get <BlueprintFeature>("5a64de5435667da4eae2e4c95ec87917");
            var aura_of_resolve       = library.Get <BlueprintFeature>("a28693b24cc412c478b8b85877f2dad2");

            archetype.RemoveFeatures = new LevelEntry[] { Helpers.LevelEntry(1, paladin_deity),
                                                          Helpers.LevelEntry(4, smite_evil_extra),
                                                          Helpers.LevelEntry(5, weapon_bond_feature),
                                                          Helpers.LevelEntry(8, aura_of_resolve, weapon_bond_feature2),
                                                          Helpers.LevelEntry(9, weapon_bond_extra_use),
                                                          Helpers.LevelEntry(10, smite_evil_extra),
                                                          Helpers.LevelEntry(11, weapon_bond_feature3),
                                                          Helpers.LevelEntry(13, weapon_bond_extra_use),
                                                          Helpers.LevelEntry(14, weapon_bond_feature4),
                                                          Helpers.LevelEntry(16, smite_evil_extra),
                                                          Helpers.LevelEntry(17, weapon_bond_feature5, weapon_bond_extra_use),
                                                          Helpers.LevelEntry(20, weapon_bond_feature6), };

            archetype.AddFeatures = new LevelEntry[] { Helpers.LevelEntry(1, paladin_deity, domain_selection),
                                                       Helpers.LevelEntry(5, divine_bond[0]),
                                                       Helpers.LevelEntry(8, divine_bond[1], call_celestial_ally),
                                                       Helpers.LevelEntry(11, divine_bond[2]),
                                                       Helpers.LevelEntry(14, divine_bond[3]),
                                                       Helpers.LevelEntry(17, divine_bond[4]),
                                                       Helpers.LevelEntry(20, divine_bond[5]), };

            paladin_class.Progression.UIDeterminatorsGroup = paladin_class.Progression.UIDeterminatorsGroup.AddToArray(domain_selection);
            paladin_class.Progression.UIGroups[0].Features.AddRange(divine_bond);
            paladin_class.Progression.UIGroups[2].Features.Add(call_celestial_ally);
            paladin_class.Archetypes = paladin_class.Archetypes.AddToArray(archetype);
        }