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);
        }
예제 #2
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);
        }