static BlueprintFeature Manipulative()
        {
            var manipulative = ScriptableObject.CreateInstance <BlueprintFeature>();
            var addBluffStat = ScriptableObject.CreateInstance <AddStatBonus>();

            addBluffStat.name       = "CustomRaceStat";
            addBluffStat.Descriptor = Kingmaker.Enums.ModifierDescriptor.Racial;
            addBluffStat.Stat       = Kingmaker.EntitySystem.Stats.StatType.CheckBluff;
            addBluffStat.Value      = 2;
            var addPerceptionStat = ScriptableObject.CreateInstance <AddStatBonus>();

            addPerceptionStat.name       = "CustomRaceStat";
            addPerceptionStat.Descriptor = Kingmaker.Enums.ModifierDescriptor.Racial;
            addPerceptionStat.Stat       = Kingmaker.EntitySystem.Stats.StatType.CheckBluff;
            addPerceptionStat.Value      = 2;
            manipulative.ComponentsArray = new BlueprintComponent[]
            {
                addBluffStat,
                addPerceptionStat,
            };
            manipulative.name = "Manipulative";
            Traverse.Create(manipulative).Field("m_DisplayName").SetValue(BlueprintUtil.MakeLocalized("Manipulative"));
            Traverse.Create(manipulative).Field("m_Description").SetValue(BlueprintUtil.MakeLocalized("Dhampir gain a +2 racial bonus on Bluff and Perception checks."));
            BlueprintUtil.AddBlueprint(manipulative, "6480bda61617490ca18e3ecb068e74bf");
            return(manipulative);
        }
        public static BlueprintRace CreateRace()
        {
            if (bundle == null)
            {
                bundle = AssetBundle.LoadFromFile("Mods/CustomRaces/AssetBundles/customrace");
            }
            var blueprints = ResourcesLibrary.LibraryObject.BlueprintsByAssetId;
            var human      = (BlueprintRace)blueprints["0a5d473ead98b0646b94495af250fdc4"];
            var newRace    = BlueprintUtil.CopyRace(human, "96f0c206fb134674a0c0bbbfcb39803c");

            newRace.Features = new BlueprintFeatureBase[]
            {
                (BlueprintFeatureBase)blueprints["03fd1e043fc678a4baf73fe67c3780ce"] //ElvenWeaponFamiliarity
            };
            newRace.SelectableRaceStat = false;
            newRace.name = "MeshTestRace";
            foreach (var preset in newRace.Presets)
            {
                preset.name += "MeshTestRace";
            }
            //SetSMR(newRace);
            SetSMR2(newRace);
            Traverse.Create(newRace).Field("m_DisplayName").SetValue(BlueprintUtil.MakeLocalized("MeshTest"));
            Traverse.Create(newRace).Field("m_Description").SetValue(BlueprintUtil.MakeLocalized("Description Goes Here"));
            race = newRace;
            return(newRace);
        }
        static BlueprintFeatureBase SlayerTalent()
        {
            var slayerTalent = ScriptableObject.CreateInstance <BlueprintFeatureSelection>();

            slayerTalent.Group = FeatureGroup.RogueTalent;
            slayerTalent.name  = "SlayerTalent";
            var rogueTalent = ResourcesLibrary.TryGetBlueprint <BlueprintFeatureSelection>("b78d146cea711a84598f0acef69462ea");

            //var sprite = Traverse.Create(rogueTalent).Field("m_Icon").GetValue<Sprite>();
            //Traverse.Create(slayerTalent).Field("m_Icon").SetValue(sprite);
            Traverse.Create(slayerTalent).Field("m_DisplayName").SetValue(BlueprintUtil.MakeLocalized("Slayer Talent"));
            Traverse.Create(slayerTalent).Field("m_Description").SetValue(BlueprintUtil.MakeLocalized("As a slayer gains experience, he learns a number of talents that aid him and confound his foes. Starting at 2nd level and every 2 levels thereafter, a slayer gains one slayer talent. Unless otherwise noted, a slayer cannot select an individual talent more than once."));
            slayerTalent.AllFeatures = new BlueprintFeature[]
            {
                //TODO
                //Blood Reader
                //Deadly Range
                //Foil Scrutiny
                //Poison Use
                //Ranger Combat Style
                //Rogue Talent
                //Slowing Strike*
                //Sticks and Stones (Ex)
                //Studied Ally
                //Sunlight Strike (Ex)
                //Sure Footing (Ex)
                //Toxin Training (Ex)
                ResourcesLibrary.TryGetBlueprint <BlueprintFeatureSelection>("c6d0da9124735a44f93ac31df803b9a9"), //RangerStyleSelection2
                ResourcesLibrary.TryGetBlueprint <BlueprintFeatureSelection>("61f82ba786fe05643beb3cd3910233a8"), //RangerStyleSelection6
                ResourcesLibrary.TryGetBlueprint <BlueprintFeatureSelection>("78177315fc63b474ea3cbb8df38fafcd"), //RangerStyleSelection10
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("dbb6b3bffe6db3547b31c3711653838e"),          //Trapfinding
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("68a23a419b330de45b4c3789649b5b41"),          //CannyObserver
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("c5158a6622d0b694a99efb1d0025d2c1"),          //CombatTrick,
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("97a6aa2b64dd21a4fac67658a91067d7"),          // FastStealth
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("955ff81c596c1c3489406d03e81e6087"),          // FocusingAttackConfused,
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("791f50e199d069d4f8e933996a2ce054"),          //FocusingAttackShaken,
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("79475c263e538c94f8e23907bd570a35"),          //FocusingAttackSicken
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("6087e0c9801b5eb48bf48d6e75116aad"),          //IronGuts
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("7787030571e87704d9177401c595408e"),          //SlowRections
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("ca5274d057152fa45b7527cad0927840"),          //UncannyDodgeTalent,
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("ce72662a812b1f242849417b2c784b5e"),          //ConfoundingBlades,
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("b696bd7cb38da194fa3404032483d1db"),          //CripplingStrike
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("1b92146b8a9830d4bb97ab694335fa7c"),          //DispellingAttack
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("dd699394df0ef8847abba26038333f02"),          //DoubleDelibitation
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("0d35d6c4d5eef8d4790d09bd9a874e57"),          //ImprovedEvasion
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("e821c61b2711cea4cb993725b910e7e8"),          //ImprovedUncannyDodgeTalent
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("5bb6dc5ce00550441880a6ff8ad4c968"),          //Oppotunist
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("d76497bfc48516e45a0831628f767a0f"),          //IntimidatingProwess
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("c9629ef9eebb88b479b2fbc5e836656a"),          //SkillFocusSelection
                ResourcesLibrary.TryGetBlueprint <BlueprintFeature>("1e1f627d26ad36f43bbd26cc2bf8ac7e"),          //WeaponFocus
            };
            BlueprintUtil.AddBlueprint(slayerTalent, "efc3ce27f70e4487b280272580d601e9");
            return(slayerTalent);
        }
Beispiel #4
0
        public static BlueprintRace CreateRace()
        {
            if (bundle == null)
            {
                bundle = AssetBundle.LoadFromFile("Mods/CustomRaces/AssetBundles/drow");
            }

            var blueprints = ResourcesLibrary.LibraryObject.BlueprintsByAssetId;
            var elf        = (BlueprintRace)blueprints["25a5878d125338244896ebd3238226c8"];
            var newRace    = BlueprintUtil.CopyRace(elf, "42a7466432fd4db4870363ffa1a9eaba");

            newRace.name = "DrowRace";
            var addDex = ScriptableObject.CreateInstance <AddStatBonus>();

            addDex.name       = "CustomRaceStat";
            addDex.Descriptor = Kingmaker.Enums.ModifierDescriptor.Racial;
            addDex.Stat       = Kingmaker.EntitySystem.Stats.StatType.Dexterity;
            addDex.Value      = 2;
            var addCha = ScriptableObject.CreateInstance <AddStatBonus>();

            addCha.name       = "CustomRaceStat";
            addCha.Descriptor = Kingmaker.Enums.ModifierDescriptor.Racial;
            addCha.Stat       = Kingmaker.EntitySystem.Stats.StatType.Charisma;
            addCha.Value      = 2;
            var addCon = ScriptableObject.CreateInstance <AddStatBonus>();

            addCon.name             = "CustomRaceStat";
            addCon.Descriptor       = Kingmaker.Enums.ModifierDescriptor.Racial;
            addCon.Stat             = Kingmaker.EntitySystem.Stats.StatType.Constitution;
            addCon.Value            = -2;
            newRace.ComponentsArray = new BlueprintComponent[]
            {
                addDex,
                addCon,
                addCha
            };
            SetRamps(newRace);
            newRace.Features = new BlueprintFeatureBase[]
            {
                (BlueprintFeatureBase)blueprints["9c747d24f6321f744aa1bb4bd343880d"], //Keen Senses
                (BlueprintFeatureBase)blueprints["55edf82380a1c8540af6c6037d34f322"], //ElvenMagic
                (BlueprintFeatureBase)blueprints["2483a523984f44944a7cf157b21bf79c"], //ElvenImmunity
                (BlueprintFeatureBase)blueprints["03fd1e043fc678a4baf73fe67c3780ce"], //ElvenWeaponFamiliarity
                SpellResistance()
            };
            Traverse.Create(newRace).Field("m_DisplayName").SetValue(BlueprintUtil.MakeLocalized("Drow"));
            Traverse.Create(newRace).Field("m_Description").SetValue(BlueprintUtil.MakeLocalized("Cruel and cunning, drow are a dark reflection of the elven race. Also called dark elves, they dwell deep underground in elaborate cities shaped from the rock of cyclopean caverns. Drow seldom make themselves known to surface folk, preferring to remain legends while advancing their sinister agendas through proxies and agents. Drow have no love for anyone but themselves, and are adept at manipulating other creatures. While they are not born evil, malignancy is deep-rooted in their culture and society, and nonconformists rarely survive for long. Some stories tell that given the right circumstances, a particularly hateful elf might turn into a drow, though such a transformation would require a truly heinous individual."));
            return(newRace);
        }
        public static BlueprintRace CreateRace()
        {
            if (bundle == null)
            {
                bundle = AssetBundle.LoadFromFile("Mods/CustomRaces/AssetBundles/dhampir");
            }
            var blueprints = ResourcesLibrary.LibraryObject.BlueprintsByAssetId;
            var human      = (BlueprintRace)blueprints["0a5d473ead98b0646b94495af250fdc4"];
            var newRace    = BlueprintUtil.CopyRace(human, "7ef12cdd1464418d9f9547033bd9f77d");

            newRace.name = "DhampirRace";
            var addDex = ScriptableObject.CreateInstance <AddStatBonus>();

            addDex.name       = "CustomRaceStat";
            addDex.Descriptor = Kingmaker.Enums.ModifierDescriptor.Racial;
            addDex.Stat       = Kingmaker.EntitySystem.Stats.StatType.Dexterity;
            addDex.Value      = 2;
            var addCha = ScriptableObject.CreateInstance <AddStatBonus>();

            addCha.name       = "CustomRaceStat";
            addCha.Descriptor = Kingmaker.Enums.ModifierDescriptor.Racial;
            addCha.Stat       = Kingmaker.EntitySystem.Stats.StatType.Charisma;
            addCha.Value      = 2;
            var addCon = ScriptableObject.CreateInstance <AddStatBonus>();

            addCon.name             = "CustomRaceStat";
            addCon.Descriptor       = Kingmaker.Enums.ModifierDescriptor.Racial;
            addCon.Stat             = Kingmaker.EntitySystem.Stats.StatType.Dexterity;
            addCon.Value            = -2;
            newRace.ComponentsArray = new BlueprintComponent[]
            {
                addDex,
                addCon,
                addCha
            };
            newRace.SelectableRaceStat = false;
            SetRamps(newRace);
            newRace.Features = new BlueprintFeatureBase[]
            {
                (BlueprintFeatureBase)blueprints["8a75eb16bfff86949a4ddcb3dd2f83ae"], //UndeadImmunities
                Manipulative()
            };
            Traverse.Create(newRace).Field("m_DisplayName").SetValue(BlueprintUtil.MakeLocalized("Dhampir"));
            Traverse.Create(newRace).Field("m_Description").SetValue(BlueprintUtil.MakeLocalized("The half-living children of vampires birthed by human females, dhampirs are progenies of both horror and tragedy. The circumstances of a dhampir’s conception are often called into question but scarcely understood, as few mortal mothers survive the childbirth. Those who do often abandon their monstrous children and refuse to speak of the matter. While some speculate that dhampirs result when mortal women couple with vampires, others claim that they form when a pregnant woman suffers a vampire bite. Some particularly zealous scholars even contest dhampirs’ status as a unique race, instead viewing them as humans suffering from an unholy affliction. Indeed, this hypothesis is strengthened by dhampirs’ seeming inability to reproduce, their offspring inevitably humans (usually sorcerers with the undead bloodline)."));
            return(newRace);
        }
        public static BlueprintCharacterClass CreateClass()
        {
            var newClass = ScriptableObject.CreateInstance <BlueprintCharacterClass>();
            var rogue    = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("299aa766dee3cbf4790da4efb8c72484");

            newClass.LocalizedName        = BlueprintUtil.MakeLocalized("Ninja");
            newClass.LocalizedDescription = BlueprintUtil.MakeLocalized("When the wealthy and the powerful need an enemy eliminated quietly and without fail, they call upon the ninja. When a general needs to sabotage the siege engines of his foes before they can reach the castle walls, he calls upon the ninja. And when fools dare to move against a ninja or her companions, they will find the ninja waiting for them while they sleep, ready to strike. These shadowy killers are masters of infiltration, sabotage, and assassination, using a wide variety of weapons, practiced skills, and mystical powers to achieve their goals.");
            //Archtypes cannot be duplicated accross classes because breats BlueprintArchetype.GetParentClass()
            //newClass.Archetypes = rogue.Archetypes;
            newClass.Archetypes              = new BlueprintArchetype[0];
            newClass.BaseAttackBonus         = rogue.BaseAttackBonus;
            newClass.ClassSkills             = rogue.ClassSkills;
            newClass.ComponentsArray         = rogue.ComponentsArray;
            newClass.DefaultBuild            = rogue.DefaultBuild;
            newClass.EquipmentEntities       = rogue.EquipmentEntities;
            newClass.FemaleEquipmentEntities = rogue.FemaleEquipmentEntities;
            newClass.FortitudeSave           = rogue.FortitudeSave;
            newClass.HideIfRestricted        = rogue.HideIfRestricted;
            newClass.HitDie                = rogue.HitDie;
            newClass.IsArcaneCaster        = rogue.IsArcaneCaster;
            newClass.IsArcaneCaster        = rogue.IsDivineCaster;
            newClass.MaleEquipmentEntities = rogue.MaleEquipmentEntities;
            newClass.m_Icon                = rogue.m_Icon;
            newClass.name = "NinjaClass";
            newClass.NotRecommendedAttributes = rogue.NotRecommendedAttributes;
            newClass.PrestigeClass            = rogue.PrestigeClass;
            newClass.PrimaryColor             = rogue.PrimaryColor;
            newClass.Progression           = rogue.Progression;
            newClass.RecommendedAttributes = rogue.RecommendedAttributes;
            newClass.ReflexSave            = rogue.ReflexSave;
            newClass.SecondaryColor        = rogue.SecondaryColor;
            newClass.SkillPoints           = rogue.SkillPoints;
            newClass.Spellbook             = rogue.Spellbook;
            newClass.StartingGold          = rogue.StartingGold;
            newClass.StartingItems         = rogue.StartingItems;
            newClass.WillSave = rogue.WillSave;
            BlueprintUtil.AddBlueprint(newClass, "7b9c8a62205d44cf8d1021ed0f4bf2da");
            //Note set progression parent ot newClass
            CopyProgression(newClass, rogue.Progression);
            //BlueprintPgoression.ExclusiveProgression = newClass
            //Check for Prerequisites that contain classblueprints
            return(newClass);
        }
Beispiel #7
0
        //TODO make spellResistance6plusCR
        static BlueprintFeatureBase SpellResistance()
        {
            var blueprints             = ResourcesLibrary.LibraryObject.BlueprintsByAssetId;
            var spellResistance5plusCR = (BlueprintFeature)blueprints["2378680aaca855840ba325c509f5d654"];
            var spellResistance6plusCR = ScriptableObject.CreateInstance <BlueprintFeature>();
            var addSpellResistance     = ScriptableObject.CreateInstance <AddSpellResistance>();

            addSpellResistance.AddCR = true;
            addSpellResistance.Value = new Kingmaker.UnitLogic.Mechanics.ContextValue()
            {
                Value = 6
            };
            spellResistance6plusCR.ComponentsArray = new BlueprintComponent[]
            {
                addSpellResistance
            };
            spellResistance6plusCR.name = "SpellResistance6plusCR";
            Traverse.Create(spellResistance6plusCR).Field("m_DisplayName").SetValue(BlueprintUtil.MakeLocalized("Spell Resistance"));
            Traverse.Create(spellResistance6plusCR).Field("m_Description").SetValue(BlueprintUtil.MakeLocalized("Drow possess spell resistance (SR) equal to 6 plus their total number of class levels."));
            BlueprintUtil.AddBlueprint(spellResistance6plusCR, "94cb101bb5e944bea2e1777e6627dc5c");
            return(spellResistance6plusCR);
        }
        public static BlueprintCharacterClass CreateClass()
        {
            var ranger          = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("cda0615668a6df14eb36ba19ee881af6");
            var rogue           = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("299aa766dee3cbf4790da4efb8c72484");
            var newClass        = ScriptableObject.CreateInstance <BlueprintCharacterClass>();
            var preRequeNoClass = ScriptableObject.CreateInstance <PrerequisiteNoClassLevel>(); //Slayer can't be AnimalClass

            preRequeNoClass.CharacterClass = ResourcesLibrary.TryGetBlueprint <BlueprintCharacterClass>("4cd1757a0eea7694ba5c933729a53920");
            newClass.ComponentsArray       = new BlueprintComponent[] { preRequeNoClass };
            newClass.name                 = "SlayerClass";
            newClass.LocalizedName        = BlueprintUtil.MakeLocalized("Slayer");
            newClass.LocalizedDescription = BlueprintUtil.MakeLocalized("Skilled at tracking down targets, slayers are consummate hunters, living for the chase and the deadly stroke that brings it to a close. Slayers spend most of their time honing their weapon skills, studying the habits and anatomy of foes, and practicing combat maneuvers.");
            newClass.HitDie               = Kingmaker.RuleSystem.DiceType.D10;
            newClass.SkillPoints          = 4;
            newClass.BaseAttackBonus      = ranger.BaseAttackBonus;
            newClass.FortitudeSave        = ranger.FortitudeSave;
            newClass.ReflexSave           = ranger.ReflexSave;
            newClass.WillSave             = ranger.WillSave;
            newClass.Archetypes           = new BlueprintArchetype[0]; //No Archtypes
            newClass.ClassSkills          = new StatType[]
            {
                StatType.SkillMobility,
                StatType.SkillAthletics,
                StatType.SkillPersuasion,
                StatType.SkillPerception,
                StatType.SkillStealth,
                StatType.SkillKnowledgeWorld
            };
            SetupClassApperance(newClass, rogue, ranger);
            SetupProgression(newClass);
            newClass.StartingGold          = 411;
            newClass.StartingItems         = new Kingmaker.Blueprints.Items.BlueprintItem[] { };
            newClass.RecommendedAttributes = new StatType[] { StatType.Dexterity };
            //newClass.DefaultBuild = rogue.DefaultBuild;
            BlueprintUtil.AddBlueprint(newClass, "38e7361d138f4a04bf03659e4204543e");
            BlueprintUtil.AddBlueprint(newClass.Progression, "d6bdd34d8f8f4295b6433a201c8e0605");
            return(newClass);
        }