Exemple #1
0
        internal override void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/huntressbody/AimArrowSnipe");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "CLASSICITEMS_SCEPHUNTRESS_BALLISTANAME";

            newDescToken = "CLASSICITEMS_SCEPHUNTRESS_BALLISTADESC";
            oldDescToken = oldDef.skillDescriptionToken;
            var namestr = "Rabauld";

            LanguageAPI.Add(nametoken, namestr);

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = newDescToken;
            myDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/huntress_ballistaicon.png");

            LoadoutAPI.AddSkillDef(myDef);

            var oldCtxDef = Resources.Load <SkillDef>("skilldefs/huntressbody/FireArrowSnipe");

            myCtxDef = CloneSkillDef(oldCtxDef);

            myCtxDef.skillName             = namestr;
            myCtxDef.skillNameToken        = nametoken;
            myCtxDef.skillDescriptionToken = newDescToken;
            myCtxDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/huntress_ballistaicon.png");

            LoadoutAPI.AddSkillDef(myCtxDef);
        }
        internal override void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/captainbody/PrepAirstrike");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "CLASSICITEMS_SCEPCAPTAIN_AIRSTRIKENAME";

            newDescToken = "CLASSICITEMS_SCEPCAPTAIN_AIRSTRIKEDESC";
            oldDescToken = oldDef.skillDescriptionToken;
            var namestr = "21-Probe Salute";

            LanguageAPI.Add(nametoken, namestr);

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = newDescToken;
            myDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/captain_airstrikeicon.png");

            LoadoutAPI.AddSkillDef(myDef);

            var oldCallDef = Resources.Load <SkillDef>("skilldefs/captainbody/CallAirstrike");

            myCallDef = CloneSkillDef(oldCallDef);
            myCallDef.baseMaxStock         = 21;
            myCallDef.mustKeyPress         = false;
            myCallDef.isBullets            = true;
            myCallDef.shootDelay           = 0.07f;
            myCallDef.baseRechargeInterval = 0.07f;
            myCallDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/captain_airstrikeicon.png");

            LoadoutAPI.AddSkillDef(myCallDef);
        }
        public override void SetupAttributes()
        {
            base.SetupAttributes();

            LanguageAPI.Add("BULLETSTORM_DODGEUTILITY_REPLACEMENT_NAME", "Dodge Roll");
            LanguageAPI.Add("BULLETSTORM_DODGEUTILITY_REPLACEMENT_DESCRIPTION", "Teaching of the Dodge Roll:\n" +
                            "Roll forward, gaining brief invulnerability.");

            LoadoutAPI.AddSkill(typeof(Lunar.TeleportUtilitySkillState));
            dodgeRollSkillDef = ScriptableObject.CreateInstance <SkillDef>();
            dodgeRollSkillDef.activationState            = new SerializableEntityStateType(typeof(Lunar.TeleportUtilitySkillState));
            dodgeRollSkillDef.activationStateMachineName = "Weapon";
            dodgeRollSkillDef.baseMaxStock                 = 1;
            dodgeRollSkillDef.baseRechargeInterval         = 8f;
            dodgeRollSkillDef.beginSkillCooldownOnSkillEnd = true;
            dodgeRollSkillDef.canceledFromSprinting        = false;
            dodgeRollSkillDef.fullRestockOnAssign          = true;
            dodgeRollSkillDef.interruptPriority            = InterruptPriority.Skill;
            dodgeRollSkillDef.isBullets             = false;
            dodgeRollSkillDef.isCombatSkill         = true;
            dodgeRollSkillDef.mustKeyPress          = false;
            dodgeRollSkillDef.noSprint              = true;
            dodgeRollSkillDef.rechargeStock         = 1;
            dodgeRollSkillDef.requiredStock         = 1;
            dodgeRollSkillDef.shootDelay            = 0f;
            dodgeRollSkillDef.stockToConsume        = 1;
            dodgeRollSkillDef.icon                  = Resources.Load <Sprite>("textures/difficultyicons/texDifficultyEclipse8Icon");
            dodgeRollSkillDef.skillDescriptionToken = "BULLETSTORM_DODGEUTILITY_REPLACEMENT_DESCRIPTION";
            dodgeRollSkillDef.skillName             = "BULLETSTORM_DODGEUTILITY_REPLACEMENT_NAME";
            dodgeRollSkillDef.skillNameToken        = "BULLETSTORM_DODGEUTILITY_REPLACEMENT_NAME";

            LoadoutAPI.AddSkillDef(dodgeRollSkillDef);
        }
        internal override void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/loaderbody/ChargeZapFist");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "CLASSICITEMS_SCEPLOADER_CHARGEZAPFISTNAME";

            newDescToken = "CLASSICITEMS_SCEPLOADER_CHARGEZAPFISTDESC";
            oldDescToken = oldDef.skillDescriptionToken;
            var namestr = "Thundercrash";

            LanguageAPI.Add(nametoken, namestr);

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = newDescToken;
            myDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/loader_chargezapfisticon.png");

            LoadoutAPI.AddSkillDef(myDef);

            projReplacer = Resources.Load <GameObject>("prefabs/projectiles/LoaderZapCone").InstantiateClone("CIScepLoaderThundercrash");
            var proxb = projReplacer.GetComponent <ProjectileProximityBeamController>();

            proxb.attackFireCount *= 3;
            proxb.maxAngleFilter   = 180f;
            projReplacer.transform.Find("Effect").localScale *= 3f;

            ProjectileCatalog.getAdditionalEntries += (list) => list.Add(projReplacer);
        }
        internal override void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/loaderbody/ChargeZapFist");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "ANCIENTSCEPTER_SCEPLOADER_CHARGEZAPFISTNAME";

            newDescToken = "ANCIENTSCEPTER_SCEPLOADER_CHARGEZAPFISTDESC";
            oldDescToken = oldDef.skillDescriptionToken;
            var namestr = "Thundercrash";

            LanguageAPI.Add(nametoken, namestr);

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = newDescToken;
            myDef.icon = Assets.mainAssetBundle.LoadAsset <Sprite>("texLoaderU2");

            LoadoutAPI.AddSkillDef(myDef);

            projReplacer = Resources.Load <GameObject>("prefabs/projectiles/LoaderZapCone").InstantiateClone("CIScepLoaderThundercrash");
            var proxb = projReplacer.GetComponent <ProjectileProximityBeamController>();

            proxb.attackFireCount *= 3;
            proxb.maxAngleFilter   = 180f;
            projReplacer.transform.Find("Effect").localScale *= 3f;

            ProjectileAPI.Add(projReplacer);
        }
        private static void CreatePrimary()
        {
            SkillDef primary = ScriptableObject.CreateInstance <SkillDef>();

            primary.activationState            = new SerializableEntityStateType(typeof(EntityStates.GrandParentBoss.GroundSwipe)); //You can also "steal" another skill by setting this to another skill, ex: "new SerializableEntityStateType(typeof(EntityStates.Commando.CombatDodge))
            primary.activationStateMachineName = "Weapon";                                                                          //Setting this to "Body" overrides your current movement
            primary.baseMaxStock                 = 1;                                                                               //How many charges you hold at once
            primary.baseRechargeInterval         = 0f;                                                                              //how long it takes to recharge a stock
            primary.beginSkillCooldownOnSkillEnd = true;
            primary.canceledFromSprinting        = false;                                                                           //if set to true, sprinting will immediately end the skill
            primary.fullRestockOnAssign          = true;
            primary.interruptPriority            = InterruptPriority.Skill;                                                         //The priority of the skill (If performing an important skill, lower priority skills won't activate)
            primary.isBullets             = false;                                                                                  //if set to true, when the cooldown ends it will reload ALL stock
            primary.isCombatSkill         = true;
            primary.mustKeyPress          = false;                                                                                  //If true, you MUST press the key each time for it to activate, otherwise it auto-fires
            primary.noSprint              = false;                                                                                  //Whether or not to stop sprinting when activating the attack
            primary.rechargeStock         = 1;
            primary.requiredStock         = 1;
            primary.shootDelay            = 0.1f;
            primary.stockToConsume        = 0;
            primary.skillDescriptionToken = "a";           //Description for the skill, you can use <style>'s to add colors
            primary.skillName             = "a";           //The game-readable name for the skill
            primary.skillNameToken        = "cumsick god"; //The visible name of the skill
            //primary.icon = Sprite.Create(this.HURT, new Rect(0, 0, this.HURT.width, this.HURT.height), new Vector2(.5f, .5f));

            LoadoutAPI.AddSkillDef(primary);
            SkillFamily primarySkillFamily = skillLocator.primary.skillFamily;

            primarySkillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = primary,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(primary.skillNameToken, false, null)
            };
        }
Exemple #7
0
        internal static SkillDef CreateSkillDef(SkillDefInfo skillDefInfo)
        {
            SkillDef skillDef = ScriptableObject.CreateInstance <SkillDef>();

            skillDef.skillName             = skillDefInfo.skillName;
            skillDef.skillNameToken        = skillDefInfo.skillNameToken;
            skillDef.skillDescriptionToken = skillDefInfo.skillDescriptionToken;
            skillDef.icon = skillDefInfo.skillIcon;

            skillDef.activationState            = skillDefInfo.activationState;
            skillDef.activationStateMachineName = skillDefInfo.activationStateMachineName;
            skillDef.baseMaxStock                 = skillDefInfo.baseMaxStock;
            skillDef.baseRechargeInterval         = skillDefInfo.baseRechargeInterval;
            skillDef.beginSkillCooldownOnSkillEnd = skillDefInfo.beginSkillCooldownOnSkillEnd;
            skillDef.canceledFromSprinting        = skillDefInfo.canceledFromSprinting;
            skillDef.forceSprintDuringState       = skillDefInfo.forceSprintDuringState;
            skillDef.fullRestockOnAssign          = skillDefInfo.fullRestockOnAssign;
            skillDef.interruptPriority            = skillDefInfo.interruptPriority;
            skillDef.isBullets      = skillDefInfo.isBullets;
            skillDef.isCombatSkill  = skillDefInfo.isCombatSkill;
            skillDef.mustKeyPress   = skillDefInfo.mustKeyPress;
            skillDef.noSprint       = skillDefInfo.noSprint;
            skillDef.rechargeStock  = skillDefInfo.rechargeStock;
            skillDef.requiredStock  = skillDefInfo.requiredStock;
            skillDef.shootDelay     = skillDefInfo.shootDelay;
            skillDef.stockToConsume = skillDefInfo.stockToConsume;

            LoadoutAPI.AddSkillDef(skillDef);

            return(skillDef);
        }
Exemple #8
0
        internal override void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/captainbody/PrepAirstrike");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "ANCIENTSCEPTER_SCEPCAPTAIN_AIRSTRIKENAME";

            newDescToken = "ANCIENTSCEPTER_SCEPCAPTAIN_AIRSTRIKEDESC";
            oldDescToken = oldDef.skillDescriptionToken;
            var namestr = "21-Probe Salute";

            LanguageAPI.Add(nametoken, namestr);

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = newDescToken;
            myDef.icon = Assets.mainAssetBundle.LoadAsset <Sprite>("texCapU1");

            LoadoutAPI.AddSkillDef(myDef);

            var oldCallDef = Resources.Load <SkillDef>("skilldefs/captainbody/CallAirstrike");

            myCallDef = CloneSkillDef(oldCallDef);
            myCallDef.baseMaxStock            = 21;
            myCallDef.mustKeyPress            = false;
            myCallDef.resetCooldownTimerOnUse = true;
            myCallDef.baseRechargeInterval    = 0.07f;
            myCallDef.icon = Assets.mainAssetBundle.LoadAsset <Sprite>("texCapU2");

            LoadoutAPI.AddSkillDef(myCallDef);
        }
Exemple #9
0
        private static SkillDef NewSkillDef(SerializableEntityStateType state, string stateMachine, int stock, float cooldown, int stockConsumed)
        {
            SkillDef skillDef = ScriptableObject.CreateInstance <SkillDef>();

            skillDef.skillName             = "SKILL_LUNAR_PRIMARY_REPLACEMENT_NAME";
            skillDef.skillNameToken        = "SKILL_LUNAR_PRIMARY_REPLACEMENT_NAME";
            skillDef.skillDescriptionToken = "SKILL_LUNAR_PRIMARY_REPLACEMENT_DESCRIPTION";
            skillDef.icon = null;

            skillDef.activationState            = state;
            skillDef.activationStateMachineName = stateMachine;
            skillDef.baseMaxStock                 = stock;
            skillDef.baseRechargeInterval         = cooldown;
            skillDef.beginSkillCooldownOnSkillEnd = false;
            skillDef.canceledFromSprinting        = false;
            skillDef.forceSprintDuringState       = false;
            skillDef.fullRestockOnAssign          = true;
            skillDef.interruptPriority            = InterruptPriority.Any;
            skillDef.isBullets      = false;
            skillDef.isCombatSkill  = true;
            skillDef.mustKeyPress   = false;
            skillDef.noSprint       = true;
            skillDef.rechargeStock  = 1;
            skillDef.requiredStock  = 1;
            skillDef.shootDelay     = 0f;
            skillDef.stockToConsume = stockConsumed;

            LoadoutAPI.AddSkillDef(skillDef);

            return(skillDef);
        }
        internal static void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/commandobody/ThrowGrenade");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "CLASSICITEMS_SCEPCOMMANDO_GRENADENAME";
            var desctoken = "CLASSICITEMS_SCEPCOMMANDO_GRENADEDESC";
            var namestr   = "Carpet Bomb";

            LanguageAPI.Add(nametoken, namestr);
            LanguageAPI.Add(desctoken, Language.GetString(oldDef.skillDescriptionToken) + "\n<color=#d299ff>SCEPTER: Half damage and knockback; throw eight at once.</color>");

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = desctoken;
            myDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/commando_grenadeicon.png");

            LoadoutAPI.AddSkillDef(myDef);

            projReplacer = Resources.Load <GameObject>("prefabs/projectiles/CommandoGrenadeProjectile").InstantiateClone("CIScepCommandoGrenade");
            var pie = projReplacer.GetComponent <ProjectileImpactExplosion>();

            pie.blastDamageCoefficient *= 0.5f;
            pie.bonusBlastForce        *= 0.5f;

            ProjectileCatalog.getAdditionalEntries += (list) => list.Add(projReplacer);
        }
Exemple #11
0
        private static void SetupSkills()
        {
            var skillLocator    = myCharacter.GetComponent <SkillLocator>();
            var skillFamily     = skillLocator.secondary.skillFamily;
            var defaultSkillDef = skillFamily.variants[(int)skillFamily.defaultVariantIndex].skillDef;
            var mySkillDef      = ScriptableObject.CreateInstance <SkillDef>();

            mySkillDef.activationState            = new SerializableEntityStateType(typeof(JellyShockSkill));
            mySkillDef.activationStateMachineName = defaultSkillDef.activationStateMachineName;
            mySkillDef.baseMaxStock                 = 1;
            mySkillDef.baseRechargeInterval         = 1f;
            mySkillDef.beginSkillCooldownOnSkillEnd = defaultSkillDef.beginSkillCooldownOnSkillEnd;
            mySkillDef.canceledFromSprinting        = defaultSkillDef.canceledFromSprinting;
            mySkillDef.fullRestockOnAssign          = true;
            mySkillDef.interruptPriority            = defaultSkillDef.interruptPriority;
            mySkillDef.isCombatSkill                = true;
            mySkillDef.mustKeyPress                 = true;
            mySkillDef.rechargeStock                = 1;
            mySkillDef.requiredStock                = 1;
            mySkillDef.stockToConsume               = 1;
            mySkillDef.icon = Resources.Load <Sprite>("textures/bufficons/texBuffLunarShellIcon");
            mySkillDef.skillDescriptionToken = "DESTROYEDCLONE_JELLYFISHSHOCK_DESCRIPTION";
            mySkillDef.skillName             = "DESTROYEDCLONE_JELLYFISHSHOCK_NAME";
            mySkillDef.skillNameToken        = mySkillDef.skillName;

            mySkillDef.cancelSprintingOnActivation = false;
            mySkillDef.dontAllowPastMaxStocks      = false;
            mySkillDef.forceSprintDuringState      = false;
            mySkillDef.keywordTokens           = new string[] { };
            mySkillDef.resetCooldownTimerOnUse = false;

            LoadoutAPI.AddSkillDef(mySkillDef);

            skillFamily.variants[(int)skillFamily.defaultVariantIndex].skillDef = mySkillDef;
        }
        internal static void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/huntressbody/AimArrowSnipe");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "CLASSICITEMS_SCEPHUNTRESS_BALLISTANAME";
            var desctoken = "CLASSICITEMS_SCEPHUNTRESS_BALLISTADESC";
            var namestr   = "Rabauld";

            LanguageAPI.Add(nametoken, namestr);
            LanguageAPI.Add(desctoken, Language.GetString(oldDef.skillDescriptionToken) + "\n<color=#d299ff>SCEPTER: Fires quick bursts of five extra projectiles for 2.5x TOTAL damage.</color>");

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = desctoken;
            myDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/huntress_ballistaicon.png");

            LoadoutAPI.AddSkillDef(myDef);

            var oldCtxDef = Resources.Load <SkillDef>("skilldefs/huntressbody/FireArrowSnipe");

            myCtxDef = CloneSkillDef(oldCtxDef);

            myCtxDef.skillName             = namestr;
            myCtxDef.skillNameToken        = nametoken;
            myCtxDef.skillDescriptionToken = desctoken;
            myCtxDef.icon = Resources.Load <Sprite>("@ClassicItems:Assets/ClassicItems/icons/scepter/huntress_ballistaicon.png");

            LoadoutAPI.AddSkillDef(myCtxDef);
        }
Exemple #13
0
        private static void CreateUtility()
        {
            SkillDef utilitySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            utilitySkillDef.activationState            = new SerializableEntityStateType(typeof(Weapon.MegaMushroom.InPlant));
            utilitySkillDef.activationStateMachineName = "Weapon";
            utilitySkillDef.baseMaxStock                 = 1;
            utilitySkillDef.baseRechargeInterval         = 3f;
            utilitySkillDef.beginSkillCooldownOnSkillEnd = true;
            utilitySkillDef.canceledFromSprinting        = true;
            utilitySkillDef.fullRestockOnAssign          = true;
            utilitySkillDef.interruptPriority            = InterruptPriority.PrioritySkill;
            utilitySkillDef.isBullets             = false;
            utilitySkillDef.isCombatSkill         = false;
            utilitySkillDef.mustKeyPress          = false;
            utilitySkillDef.noSprint              = false;
            utilitySkillDef.rechargeStock         = 1;
            utilitySkillDef.requiredStock         = 1;
            utilitySkillDef.shootDelay            = 0.5f;
            utilitySkillDef.stockToConsume        = 1;
            utilitySkillDef.skillDescriptionToken = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
            utilitySkillDef.skillName             = "AAAAAAAAAAAAAA";
            utilitySkillDef.skillNameToken        = "AAAAAAAAAAAA";

            LoadoutAPI.AddSkillDef(utilitySkillDef);
            SkillFamily utilitySkillFamily = skillLocator.utility.skillFamily;

            utilitySkillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = utilitySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(utilitySkillDef.skillNameToken, false, null)
            };
        }
Exemple #14
0
        private static void SpecialSetup()
        {
            SkillLocator component = WispSurvivor.characterPrefab.GetComponent <SkillLocator>();

            LanguageAPI.Add("EXAMPLESURVIVOR_SPECIAL_BURST_NAME", "Burst");
            LanguageAPI.Add("EXAMPLESURVIVOR_SPECIAL_BURST_DESCRIPTION", "Shatter your barrier for <style=cIsDamage>700-800%</style> damage. " +
                            "If tethered, duplicate explosion on target.");

            // set up your primary skill def here!

            SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            mySkillDef.activationState            = new SerializableEntityStateType(typeof(EntityStates.WispSurvivorStates.WispBurst));
            mySkillDef.activationStateMachineName = "Weapon";
            mySkillDef.baseMaxStock                 = 1;
            mySkillDef.baseRechargeInterval         = 7f;
            mySkillDef.beginSkillCooldownOnSkillEnd = true;
            mySkillDef.canceledFromSprinting        = false;
            mySkillDef.fullRestockOnAssign          = true;
            mySkillDef.interruptPriority            = InterruptPriority.Skill;
            mySkillDef.isBullets             = false;
            mySkillDef.isCombatSkill         = true;
            mySkillDef.mustKeyPress          = true;
            mySkillDef.noSprint              = false;
            mySkillDef.rechargeStock         = 1;
            mySkillDef.requiredStock         = 1;
            mySkillDef.shootDelay            = 1f;
            mySkillDef.stockToConsume        = 1;
            mySkillDef.icon                  = Assets.icon4;
            mySkillDef.skillDescriptionToken = "EXAMPLESURVIVOR_SPECIAL_BURST_DESCRIPTION";
            mySkillDef.skillName             = "EXAMPLESURVIVOR_SPECIAL_BURST_NAME";
            mySkillDef.skillNameToken        = "EXAMPLESURVIVOR_SPECIAL_BURST_NAME";

            LoadoutAPI.AddSkillDef(mySkillDef);
            component.special = WispSurvivor.characterPrefab.AddComponent <GenericSkill>();
            SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();

            newFamily.variants = new SkillFamily.Variant[1];
            LoadoutAPI.AddSkillFamily(newFamily);
            component.special.SetFieldValue("_skillFamily", newFamily);
            SkillFamily skillFamily = component.special.skillFamily;

            skillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = mySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            };


            // add this code after defining a new skilldef if you're adding an alternate skill

            /*Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
             * skillFamily.variants[skillFamily.variants.Length - 1] = new SkillFamily.Variant
             * {
             *  skillDef = newSkillDef,
             *  unlockableName = "",
             *  viewableNode = new ViewablesCatalog.Node(newSkillDef.skillNameToken, false, null)
             * };*/
        }
Exemple #15
0
        void PrimarySetup()
        {
            SkillLocator component = characterPrefab.GetComponent <SkillLocator>();

            LanguageAPI.Add("EXAMPLESURVIVOR_PRIMARY_CROSSBOW_NAME", "Crossbow");
            LanguageAPI.Add("EXAMPLESURVIVOR_PRIMARY_CROSSBOW_DESCRIPTION", "Fire an arrow, dealing <style=cIsDamage>200% damage</style>.");

            // set up your primary skill def here!

            SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            mySkillDef.activationState            = new SerializableEntityStateType(typeof(ExampleSurvivorFireArrow));
            mySkillDef.activationStateMachineName = "Weapon";
            mySkillDef.baseMaxStock                 = 1;
            mySkillDef.baseRechargeInterval         = 0f;
            mySkillDef.beginSkillCooldownOnSkillEnd = false;
            mySkillDef.canceledFromSprinting        = false;
            mySkillDef.fullRestockOnAssign          = true;
            mySkillDef.interruptPriority            = InterruptPriority.Any;
            mySkillDef.isBullets             = false;
            mySkillDef.isCombatSkill         = true;
            mySkillDef.mustKeyPress          = false;
            mySkillDef.noSprint              = true;
            mySkillDef.rechargeStock         = 1;
            mySkillDef.requiredStock         = 1;
            mySkillDef.shootDelay            = 0f;
            mySkillDef.stockToConsume        = 1;
            mySkillDef.icon                  = Assets.icon1;
            mySkillDef.skillDescriptionToken = "EXAMPLESURVIVOR_PRIMARY_CROSSBOW_DESCRIPTION";
            mySkillDef.skillName             = "EXAMPLESURVIVOR_PRIMARY_CROSSBOW_NAME";
            mySkillDef.skillNameToken        = "EXAMPLESURVIVOR_PRIMARY_CROSSBOW_NAME";

            LoadoutAPI.AddSkillDef(mySkillDef);

            component.primary = characterPrefab.AddComponent <GenericSkill>();
            SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();

            newFamily.variants = new SkillFamily.Variant[1];
            LoadoutAPI.AddSkillFamily(newFamily);
            component.primary.SetFieldValue("_skillFamily", newFamily);
            SkillFamily skillFamily = component.primary.skillFamily;

            skillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = mySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            };


            // add this code after defining a new skilldef if you're adding an alternate skill

            /*Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
             * skillFamily.variants[skillFamily.variants.Length - 1] = new SkillFamily.Variant
             * {
             *  skillDef = newSkillDef,
             *  unlockableName = "",
             *  viewableNode = new ViewablesCatalog.Node(newSkillDef.skillNameToken, false, null)
             * };*/
        }
Exemple #16
0
        internal override void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/huntressbody/AimArrowSnipe");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "ANCIENTSCEPTER_SCEPHUNTRESS_BALLISTANAME";

            newDescToken = "ANCIENTSCEPTER_SCEPHUNTRESS_BALLISTADESC";
            oldDescToken = oldDef.skillDescriptionToken;
            var namestr = "Rabauld";

            LanguageAPI.Add(nametoken, namestr);

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = newDescToken;
            myDef.icon = Assets.mainAssetBundle.LoadAsset <Sprite>("texHuntressR2");

            LoadoutAPI.AddSkillDef(myDef);

            var oldCtxDef = Resources.Load <SkillDef>("skilldefs/huntressbody/FireArrowSnipe");

            myCtxDef = CloneSkillDef(oldCtxDef);

            myCtxDef.skillName             = namestr;
            myCtxDef.skillNameToken        = nametoken;
            myCtxDef.skillDescriptionToken = newDescToken;
            myCtxDef.icon = Assets.mainAssetBundle.LoadAsset <Sprite>("texHuntressR2");

            LoadoutAPI.AddSkillDef(myCtxDef);
        }
Exemple #17
0
        internal static SkillDef CreatePrimarySkillDef(SerializableEntityStateType state, string stateMachine, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, bool agile)
        {
            SkillDef skillDef = ScriptableObject.CreateInstance <SkillDef>();

            skillDef.skillName             = skillNameToken;
            skillDef.skillNameToken        = skillNameToken;
            skillDef.skillDescriptionToken = skillDescriptionToken;
            skillDef.icon = skillIcon;

            skillDef.activationState            = state;
            skillDef.activationStateMachineName = stateMachine;
            skillDef.baseMaxStock                 = 1;
            skillDef.baseRechargeInterval         = 0;
            skillDef.beginSkillCooldownOnSkillEnd = false;
            skillDef.canceledFromSprinting        = false;
            skillDef.forceSprintDuringState       = false;
            skillDef.fullRestockOnAssign          = true;
            skillDef.interruptPriority            = InterruptPriority.Any;
            skillDef.isBullets      = false;
            skillDef.isCombatSkill  = true;
            skillDef.mustKeyPress   = false;
            skillDef.noSprint       = !agile;
            skillDef.rechargeStock  = 1;
            skillDef.requiredStock  = 0;
            skillDef.shootDelay     = 0f;
            skillDef.stockToConsume = 0;

            LoadoutAPI.AddSkillDef(skillDef);

            return(skillDef);
        }
        internal override void SetupAttributes()
        {
            var oldDef = Resources.Load <SkillDef>("skilldefs/commandobody/ThrowGrenade");

            myDef = CloneSkillDef(oldDef);

            var nametoken = "ANCIENTSCEPTER_SCEPCOMMANDO_GRENADENAME";

            newDescToken = "ANCIENTSCEPTER_SCEPCOMMANDO_GRENADEDESC";
            oldDescToken = oldDef.skillDescriptionToken;
            var namestr = "Carpet Bomb";

            LanguageAPI.Add(nametoken, namestr);

            myDef.skillName             = namestr;
            myDef.skillNameToken        = nametoken;
            myDef.skillDescriptionToken = newDescToken;
            myDef.icon = Assets.mainAssetBundle.LoadAsset <Sprite>("texCommandoR2");

            LoadoutAPI.AddSkillDef(myDef);

            projReplacer = Resources.Load <GameObject>("prefabs/projectiles/CommandoGrenadeProjectile").InstantiateClone("CIScepCommandoGrenade");
            var pie = projReplacer.GetComponent <ProjectileImpactExplosion>();

            pie.blastDamageCoefficient *= 0.5f;
            pie.bonusBlastForce        *= 0.5f;

            ProjectileAPI.Add(projReplacer);
        }
Exemple #19
0
        private static void CreateSpecial()
        {
            SkillDef specialSkillDef = ScriptableObject.CreateInstance <SkillDef>();

            //specialSkillDef.activationState = new SerializableEntityStateType(typeof(PortalJump));
            specialSkillDef.activationStateMachineName = "Weapon";
            specialSkillDef.baseMaxStock                 = 1;
            specialSkillDef.baseRechargeInterval         = 12f;
            specialSkillDef.beginSkillCooldownOnSkillEnd = false;
            specialSkillDef.canceledFromSprinting        = false;
            specialSkillDef.fullRestockOnAssign          = false;
            specialSkillDef.interruptPriority            = InterruptPriority.Any;
            specialSkillDef.isBullets             = false;
            specialSkillDef.isCombatSkill         = true;
            specialSkillDef.mustKeyPress          = false;
            specialSkillDef.noSprint              = false;
            specialSkillDef.rechargeStock         = 1;
            specialSkillDef.requiredStock         = 1;
            specialSkillDef.shootDelay            = 1f;
            specialSkillDef.stockToConsume        = 1;
            specialSkillDef.skillDescriptionToken = "AAAAAAAAAAAAAAAAAAAA";
            specialSkillDef.skillName             = "AAAAAAAAAAAAA";
            specialSkillDef.skillNameToken        = "AAAAAAAAAAAAAA";

            LoadoutAPI.AddSkillDef(specialSkillDef);
            SkillFamily specialSkillFamily = skillLocator.special.skillFamily;


            specialSkillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = specialSkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(specialSkillDef.skillNameToken, false, null)
            };
        }
Exemple #20
0
        private void CreateDefaultSpecial()
        {
            var skillDef = ScriptableObject.CreateInstance <ReactivatableSkillDef>();
            var variant  = new SkillFamily.Variant
            {
                skillDef       = skillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node("SniperDefaultSpecial", false)
            };
            var skillLoc = this.sniperBody.GetComponent <SkillLocator>();
            var ind      = skillLoc.special.skillFamily.variants.Length;

            Array.Resize <SkillFamily.Variant>(ref skillLoc.special.skillFamily.variants, ind + 1);
            skillLoc.special.skillFamily.variants[ind] = variant;
            LoadoutAPI.AddSkillDef(skillDef);
            LoadoutAPI.AddSkill(typeof(SniperKnife));
            LoadoutAPI.AddSkill(typeof(SniperKnifeBlink));
            LoadoutAPI.AddSkill(typeof(SniperKnifeSlash));

            skillDef.activationState            = new SerializableEntityStateType(typeof(SniperKnife));
            skillDef.activationStateMachineName = "Weapon";
            skillDef.interruptPriority          = InterruptPriority.PrioritySkill;
            skillDef.icon = Resources.Load <Sprite>("NotAPath");

            skillDef.reactivationState             = new SerializableEntityStateType(typeof(SniperKnifeBlink));
            skillDef.reactivationInterruptPriority = InterruptPriority.PrioritySkill;
            skillDef.reactivationIcon = Resources.Load <Sprite>("NotAPath");

            skillDef.skillName             = "SniperKnife";
            skillDef.skillNameToken        = "SNIPER_SPECIAL_NAME";
            skillDef.skillDescriptionToken = "SNIPER_SPECIAL_DESC";

            skillDef.isBullets = false;
            skillDef.beginSkillCooldownOnSkillEnd = false;
            skillDef.isCombatSkill         = true;
            skillDef.noSprint              = true;
            skillDef.canceledFromSprinting = false;
            skillDef.mustKeyPress          = true;
            skillDef.fullRestockOnAssign   = true;

            skillDef.reactivationNoSprint         = false;
            skillDef.reactivationRestartsCooldown = false;

            skillDef.baseMaxStock   = 1;
            skillDef.rechargeStock  = 1;
            skillDef.requiredStock  = 1;
            skillDef.stockToConsume = 1;

            skillDef.reactivationRequiredStock  = 0;
            skillDef.reactivationStockToConsume = 0;

            skillDef.baseRechargeInterval = 10f;
            skillDef.shootDelay           = 0.1f;

            skillDef.reactivationDelay  = 0.2f;
            skillDef.reactivationWindow = 5f;
        }
Exemple #21
0
        internal static void UltSetup()
        {
            {
                SkillLocator component = characterPrefab.GetComponent <SkillLocator>();

                LanguageAPI.Add("ROCKETEER_ULT_NAME", "Big Booma Cannon");
                LanguageAPI.Add("ROCKETEER_ULT_DESCRIPTION", "Ready to go, Boss. " +
                                "Each rocket does <style=cIsDamage>1500% damage</style> and takes <style=cIsDamage>12 seconds</style> to recharge. " +
                                "When launched each rocket increases the damage of all rockets additively by <style=cIsDamage>175%</style>. Hold up to <style=cIsDamage>5</style>.");

                // set up your primary skill def here!

                chargeUltDef = ScriptableObject.CreateInstance <SkillDef>();
                chargeUltDef.activationState            = new SerializableEntityStateType(typeof(RocketeerChargeUlt));
                chargeUltDef.activationStateMachineName = "Weapon";
                chargeUltDef.baseMaxStock                 = 5;
                chargeUltDef.baseRechargeInterval         = 12f;
                chargeUltDef.beginSkillCooldownOnSkillEnd = true;
                chargeUltDef.canceledFromSprinting        = false;
                chargeUltDef.fullRestockOnAssign          = true;
                chargeUltDef.interruptPriority            = InterruptPriority.Skill;
                chargeUltDef.isCombatSkill                = true;
                chargeUltDef.mustKeyPress                 = false;
                chargeUltDef.rechargeStock                = 1;
                chargeUltDef.requiredStock                = 1;
                chargeUltDef.stockToConsume               = 0;
                chargeUltDef.icon = Resources.Load <Sprite>("Textures/MiscIcons/texMysteryIcon");
                chargeUltDef.skillDescriptionToken = "ROCKETEER_ULT_DESCRIPTION";
                chargeUltDef.skillName             = "ROCKETEER_ULT_NAME";
                chargeUltDef.skillNameToken        = "ROCKETEER_ULT_NAME";

                LoadoutAPI.AddSkillDef(chargeUltDef);

                component.special = characterPrefab.AddComponent <GenericSkill>();
                SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();
                newFamily.variants = new SkillFamily.Variant[1];
                LoadoutAPI.AddSkillFamily(newFamily);
                component.special.SetFieldValue("_skillFamily", newFamily);
                SkillFamily skillFamily = component.special.skillFamily;

                skillFamily.variants[0] = new SkillFamily.Variant
                {
                    skillDef       = chargeUltDef,
                    unlockableName = "",
                    viewableNode   = new ViewablesCatalog.Node(chargeUltDef.skillNameToken, false, null)
                };


                // add this code after defining a new skilldef if you're adding an alternate skill


                ContentPacks.skillDefs.Add(chargeUltDef);
                ContentPacks.skillFamilies.Add(newFamily);
            }
        }
Exemple #22
0
        private void CreateUtility()
        {
            //LoadoutAPI.AddSkill(typeof(BeginOverclock));

            SkillDef utilitySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            //utilitySkillDef.activationState = new SerializableEntityStateType(typeof(DeepClean));
            utilitySkillDef.activationStateMachineName = "Weapon";
            utilitySkillDef.baseMaxStock                 = 1;
            utilitySkillDef.baseRechargeInterval         = 5f;
            utilitySkillDef.beginSkillCooldownOnSkillEnd = true;
            utilitySkillDef.canceledFromSprinting        = false;
            utilitySkillDef.fullRestockOnAssign          = false;
            utilitySkillDef.interruptPriority            = InterruptPriority.Skill;
            utilitySkillDef.isBullets             = false;
            utilitySkillDef.isCombatSkill         = true;
            utilitySkillDef.mustKeyPress          = false;
            utilitySkillDef.noSprint              = false;
            utilitySkillDef.rechargeStock         = 1;
            utilitySkillDef.requiredStock         = 1;
            utilitySkillDef.shootDelay            = 0.08f;
            utilitySkillDef.stockToConsume        = 1;
            utilitySkillDef.skillDescriptionToken = "HENRY_UTILITY_DESCRIPTION";
            utilitySkillDef.skillName             = "aaa";
            utilitySkillDef.skillNameToken        = "HENRY_UTILITY_NAME";
            utilitySkillDef.icon          = Assets.mainAssetBundle.LoadAsset <Sprite>("texUtilityIcon");
            utilitySkillDef.keywordTokens = new string[] {
                "KEYWORD_STUNNING",
                "KEYWORD_WEIGHTLESS"
            };

            LanguageAPI.Add(utilitySkillDef.skillNameToken, "Dash Parry");
            LanguageAPI.Add(utilitySkillDef.skillDescriptionToken, "Dash forward, deflecting any projectiles that hit you.");

            LoadoutAPI.AddSkillDef(utilitySkillDef);
            SkillFamily utilitySkillFamily = skillLocator.utility.skillFamily;

            utilitySkillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = utilitySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(utilitySkillDef.skillNameToken, false, null)
            };

            /*SkillFamily.Variant variant = new SkillFamily.Variant();
             *
             * variant.skillDef = utilitySkillDef2;
             * variant.unlockableName = "";
             *
             * int prevLength = utilitySkillFamily.variants.Length;
             * Array.Resize<SkillFamily.Variant>(ref utilitySkillFamily.variants, prevLength + 1);
             * utilitySkillFamily.variants[prevLength] = variant;*/
        }
Exemple #23
0
        void SecondarySkills()
        {
            {
                SkillLocator skillLocator = myCharacter.GetComponent <SkillLocator>();

                skillLocator.secondary = myCharacter.AddComponent <GenericSkill>();
                SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();
                newFamily.variants = new SkillFamily.Variant[1];

                LoadoutAPI.AddSkillFamily(newFamily);
                skillLocator.secondary.SetFieldValue("_skillFamily", newFamily);
            }

            {
                GameObject   gameObject  = myCharacter;
                SkillLocator component   = gameObject.GetComponent <SkillLocator>();
                SkillFamily  skillFamily = component.secondary.skillFamily;

                SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();
                mySkillDef.activationState            = new SerializableEntityStateType(typeof(EntityStates.Drone.DroneWeapon.FireTwinRocket));
                mySkillDef.activationStateMachineName = "WeaponRocket";
                mySkillDef.baseMaxStock                 = 2;
                mySkillDef.baseRechargeInterval         = 4f;
                mySkillDef.beginSkillCooldownOnSkillEnd = true;
                mySkillDef.canceledFromSprinting        = false;
                mySkillDef.fullRestockOnAssign          = false;
                mySkillDef.interruptPriority            = InterruptPriority.PrioritySkill;
                mySkillDef.isBullets             = false;
                mySkillDef.isCombatSkill         = false;
                mySkillDef.mustKeyPress          = false;
                mySkillDef.noSprint              = true;
                mySkillDef.rechargeStock         = 1;
                mySkillDef.requiredStock         = 1;
                mySkillDef.shootDelay            = 0.25f;
                mySkillDef.stockToConsume        = 1;
                mySkillDef.icon                  = Resources.Load <GameObject>("Prefabs/CharacterBodies/engibody").GetComponent <SkillLocator>().primary.skillFamily.variants[0].skillDef.icon;
                mySkillDef.skillDescriptionToken = "Fire two large rockets";
                mySkillDef.skillName             = "PP_PLAYABLETC_SPECIAL";
                mySkillDef.skillNameToken        = "Explosive Ordenance";

                LoadoutAPI.AddSkillDef(mySkillDef);


                skillFamily.variants[0] =
                    new SkillFamily.Variant
                {
                    skillDef       = mySkillDef,
                    unlockableName = "",
                    viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
                };
            }
        }
Exemple #24
0
        void PrimarySkills()
        {
            {
                SkillLocator skillLocator = myCharacter.GetComponent <SkillLocator>();

                skillLocator.primary = myCharacter.AddComponent <GenericSkill>();
                SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();
                newFamily.variants = new SkillFamily.Variant[1];
                LoadoutAPI.AddSkillFamily(newFamily);
                skillLocator.primary.SetFieldValue("_skillFamily", newFamily);
            }

            {
                GameObject   gameObject  = myCharacter;
                SkillLocator component   = gameObject.GetComponent <SkillLocator>();
                SkillFamily  skillFamily = component.primary.skillFamily;

                SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();
                mySkillDef.activationState            = new SerializableEntityStateType(typeof(EntityStates.Drone.DroneWeapon.FireMegaTurret));
                mySkillDef.activationStateMachineName = "WeaponGun";
                mySkillDef.baseMaxStock                 = 1;
                mySkillDef.baseRechargeInterval         = 2f;
                mySkillDef.beginSkillCooldownOnSkillEnd = false;
                mySkillDef.canceledFromSprinting        = false;
                mySkillDef.fullRestockOnAssign          = true;
                mySkillDef.interruptPriority            = InterruptPriority.Any;
                mySkillDef.isBullets             = false;
                mySkillDef.isCombatSkill         = true;
                mySkillDef.mustKeyPress          = false;
                mySkillDef.noSprint              = false;
                mySkillDef.rechargeStock         = 1;
                mySkillDef.requiredStock         = 1;
                mySkillDef.shootDelay            = 1f;
                mySkillDef.stockToConsume        = 1;
                mySkillDef.icon                  = Resources.Load <GameObject>("Prefabs/CharacterBodies/commandobody").GetComponent <SkillLocator>().special.skillFamily.variants[0].skillDef.icon;
                mySkillDef.skillDescriptionToken = "Spray bullets in the direction of enemies";
                mySkillDef.skillName             = "PP_PLAYABLETC_PRIMARY";
                mySkillDef.skillNameToken        = "Supressive Fire";

                LoadoutAPI.AddSkillDef(mySkillDef);


                skillFamily.variants[0] =
                    new SkillFamily.Variant
                {
                    skillDef       = mySkillDef,
                    unlockableName = "",
                    viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
                };
            }
        }
Exemple #25
0
        private static void PrimarySetup(GameObject bodyPrefab)
        {
            SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            mySkillDef.activationState            = new SerializableEntityStateType(typeof(PaladinMod.States.Slash));
            mySkillDef.activationStateMachineName = "Weapon";
            mySkillDef.baseMaxStock                 = 1;
            mySkillDef.baseRechargeInterval         = 0f;
            mySkillDef.beginSkillCooldownOnSkillEnd = false;
            mySkillDef.canceledFromSprinting        = false;
            mySkillDef.fullRestockOnAssign          = true;
            mySkillDef.interruptPriority            = InterruptPriority.Any;
            mySkillDef.isBullets             = false;
            mySkillDef.isCombatSkill         = true;
            mySkillDef.mustKeyPress          = false;
            mySkillDef.noSprint              = true;
            mySkillDef.rechargeStock         = 1;
            mySkillDef.requiredStock         = 1;
            mySkillDef.shootDelay            = 0.5f;
            mySkillDef.stockToConsume        = 1;
            mySkillDef.icon                  = Assets.icon1;
            mySkillDef.skillDescriptionToken = "PALADIN_PRIMARY_SLASH_DESCRIPTION";
            mySkillDef.skillName             = "PALADIN_PRIMARY_SLASH_NAME";
            mySkillDef.skillNameToken        = "PALADIN_PRIMARY_SLASH_NAME";
            mySkillDef.keywordTokens         = new string[] {
                "KEYWORD_SWORDBEAM"
            };

            if (bodyPrefab.name == "LunarKnightBody")
            {
                mySkillDef.activationState            = new SerializableEntityStateType(typeof(PaladinMod.States.LunarKnight.MaceSlam));
                mySkillDef.activationStateMachineName = "Body";
            }

            LoadoutAPI.AddSkillDef(mySkillDef);

            skillLocator.primary = bodyPrefab.AddComponent <GenericSkill>();
            SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();

            newFamily.variants = new SkillFamily.Variant[1];
            LoadoutAPI.AddSkillFamily(newFamily);
            skillLocator.primary._skillFamily = newFamily;
            SkillFamily skillFamily = skillLocator.primary.skillFamily;

            skillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = mySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            };
        }
        private void UtilitySetup()
        {
            SkillLocator component = myCharacter.GetComponent <SkillLocator>();

            string desc = "<style=cIsUtility>Leap</style> a short distance.";

            LanguageAPI.Add("GROVETENDER_UTILITY_DODGE_NAME", "Sidestep");
            LanguageAPI.Add("GROVETENDER_UTILITY_DODGE_DESCRIPTION", desc);

            SkillDef tempDef    = Resources.Load <GameObject>("Prefabs/CharacterBodies/CrocoBody").GetComponentInChildren <SkillLocator>().utility.skillFamily.variants[1].skillDef;
            SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            mySkillDef.activationState            = new SerializableEntityStateType(typeof(EntityStates.Croco.ChainableLeap));
            mySkillDef.activationStateMachineName = "Body";
            mySkillDef.baseRechargeInterval       = 8;
            mySkillDef.baseMaxStock = 1;
            mySkillDef.beginSkillCooldownOnSkillEnd = tempDef.beginSkillCooldownOnSkillEnd;
            mySkillDef.canceledFromSprinting        = false;
            mySkillDef.fullRestockOnAssign          = tempDef.fullRestockOnAssign;
            mySkillDef.interruptPriority            = tempDef.interruptPriority;
            mySkillDef.isBullets             = tempDef.isBullets;
            mySkillDef.isCombatSkill         = true;
            mySkillDef.mustKeyPress          = tempDef.mustKeyPress;
            mySkillDef.noSprint              = false;
            mySkillDef.rechargeStock         = tempDef.rechargeStock;
            mySkillDef.requiredStock         = tempDef.requiredStock;
            mySkillDef.shootDelay            = tempDef.shootDelay;
            mySkillDef.stockToConsume        = tempDef.stockToConsume;
            mySkillDef.icon                  = tempDef.icon;
            mySkillDef.skillDescriptionToken = "GROVETENDER_UTILITY_DODGE_DESCRIPTION";
            mySkillDef.skillName             = "GROVETENDER_UTILITY_DODGE_NAME";
            mySkillDef.skillNameToken        = "GROVETENDER_UTILITY_DODGE_NAME";

            LoadoutAPI.AddSkillDef(mySkillDef);

            component.utility = myCharacter.AddComponent <GenericSkill>();
            SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();

            newFamily.variants = new SkillFamily.Variant[1];
            LoadoutAPI.AddSkillFamily(newFamily);
            component.utility.SetFieldValue("_skillFamily", newFamily);
            SkillFamily skillFamily = component.utility.skillFamily;

            skillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = tempDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            };
        }
Exemple #27
0
        private void secondarySetup()
        {
            SkillLocator component = characterPrefab.GetComponent <SkillLocator>();

            LanguageAPI.Add("EXAMPLESURVIVOR_PRIMARY_CROSSBOW_NAME", "Crossbow");
            LanguageAPI.Add("EXAMPLESURVIVOR_PRIMARY_CROSSBOW_DESCRIPTION", "Fire an arrow, dealing <style=cIsDamage>200% damage</style>.");
            var skillGutsSwordAttack = ScriptableObject.CreateInstance <SkillDef>();

            skillGutsSwordAttack.activationState            = new SerializableEntityStateType(typeof(GutsSwordAttack));
            skillGutsSwordAttack.activationStateMachineName = "Weapon";
            skillGutsSwordAttack.baseMaxStock                 = 1;
            skillGutsSwordAttack.baseRechargeInterval         = 0f;
            skillGutsSwordAttack.beginSkillCooldownOnSkillEnd = false;
            skillGutsSwordAttack.canceledFromSprinting        = false;
            skillGutsSwordAttack.fullRestockOnAssign          = true;
            skillGutsSwordAttack.interruptPriority            = InterruptPriority.Any;
            skillGutsSwordAttack.isBullets      = false;
            skillGutsSwordAttack.isCombatSkill  = true;
            skillGutsSwordAttack.mustKeyPress   = false;
            skillGutsSwordAttack.noSprint       = true;
            skillGutsSwordAttack.rechargeStock  = 1;
            skillGutsSwordAttack.requiredStock  = 1;
            skillGutsSwordAttack.shootDelay     = 0f;
            skillGutsSwordAttack.stockToConsume = 1;
            skillGutsSwordAttack.icon           = Assets.icon1;
            //skillGutsSwordAttack.skillDescriptionToken = "EXAMPLESURVIVOR_PRIMARY_CROSSBOW_DESCRIPTION";
            //skillGutsSwordAttack.skillName = "EXAMPLESURVIVOR_PRIMARY_CROSSBOW_NAME";
            //skillGutsSwordAttack.skillNameToken = "EXAMPLESURVIVOR_PRIMARY_CROSSBOW_NAME";

            LoadoutAPI.AddSkillDef(skillGutsSwordAttack);
            component.secondary = characterPrefab.AddComponent <GenericSkill>();
            SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();

            newFamily.variants = new SkillFamily.Variant[1];
            LoadoutAPI.AddSkillFamily(newFamily);
            component.secondary.SetFieldValue("_skillFamily", newFamily);
            SkillFamily skillFamily = component.secondary.skillFamily;

            component.secondary.SetFieldValue("_skillFamily", newFamily);


            skillFamily = component.secondary.skillFamily;

            skillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = skillGutsSwordAttack,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(skillGutsSwordAttack.skillNameToken, false, null)
            };
        }
        private static void SetupSkills2()
        {
            var mycharacter = Resources.Load <GameObject>("prefabs/characterbodies/Bandit2");
            var mySkillDef  = ScriptableObject.CreateInstance <ReloadSkillDef>();

            // ADD: some comment about how the machines work
            // ADD: some comment about looking at the prefabs for the name of the machine
            //      (EntityStateMachine) in the prefabs
            mySkillDef.graceDuration         = 0.4f;
            mySkillDef.skillDescriptionToken = "BANDIT2_PRIMARYRBS_DESC";
            mySkillDef.skillName             = "FireShotgun2RBS";
            mySkillDef.skillNameToken        = "BANDIT2_PRIMARYRBS_NAME";
            mySkillDef.icon                        = Resources.Load <Sprite>("textures/achievementicons/texAttackSpeedIcon");
            mySkillDef.activationState             = new SerializableEntityStateType(typeof(FireShotgunRBS));
            mySkillDef.interruptPriority           = InterruptPriority.Skill;
            mySkillDef.baseRechargeInterval        = 0f;
            mySkillDef.baseMaxStock                = 4;
            mySkillDef.rechargeStock               = 0;
            mySkillDef.requiredStock               = 1;
            mySkillDef.stockToConsume              = 1;
            mySkillDef.resetCooldownTimerOnUse     = false;
            mySkillDef.fullRestockOnAssign         = true;
            mySkillDef.dontAllowPastMaxStocks      = false;
            mySkillDef.cancelSprintingOnActivation = true;
            mySkillDef.forceSprintDuringState      = false;
            mySkillDef.canceledFromSprinting       = false;
            mySkillDef.isCombatSkill               = true;
            mySkillDef.mustKeyPress                = true;
            mySkillDef.icon                        = Resources.Load <Sprite>("textures/achievementicons/texAttackSpeedIcon");
            mySkillDef.keywordTokens               = new string[] { "KEYWORD_RAPIDFIRE" };

            LanguageAPI.Add("BANDIT2_PRIMARYRBS_NAME", "Burst (Bulletstorm)");
            LanguageAPI.Add("BANDIT2_PRIMARYRBS_DESC", "This is a variant that allows Risk of Bulletstorm accuracy modifiers to properly affect it.");

            if (mySkillDef)
            {
                LoadoutAPI.AddSkillDef(mySkillDef);

                var skillLocator = myCharacter.GetComponent <SkillLocator>();
                var skillFamily  = skillLocator.primary.skillFamily;

                Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
                skillFamily.variants[skillFamily.variants.Length - 1] = new SkillFamily.Variant
                {
                    skillDef      = mySkillDef,
                    unlockableDef = null,
                    viewableNode  = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
                };
            }
        }
        private void SecondarySetup()
        {
            SkillLocator component = myCharacter.GetComponent <SkillLocator>();

            string desc = "Fire a <style=cIsUtility>piercing Wisp</style> that deals <style=cIsDamage>" + HealingWisp.damageCoefficient * 100f + "% damage</style>.";

            LanguageAPI.Add("GROVETENDER_SECONDARY_HEAL_NAME", "Piercing Wisp");
            LanguageAPI.Add("GROVETENDER_SECONDARY_HEAL_DESCRIPTION", desc);

            SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            mySkillDef.activationState            = new SerializableEntityStateType(typeof(HealingWisp));
            mySkillDef.activationStateMachineName = "Weapon";
            mySkillDef.baseMaxStock                 = 1;
            mySkillDef.baseRechargeInterval         = 5f;
            mySkillDef.beginSkillCooldownOnSkillEnd = false;
            mySkillDef.canceledFromSprinting        = false;
            mySkillDef.fullRestockOnAssign          = true;
            mySkillDef.interruptPriority            = InterruptPriority.Skill;
            mySkillDef.isBullets             = false;
            mySkillDef.isCombatSkill         = true;
            mySkillDef.mustKeyPress          = false;
            mySkillDef.noSprint              = false;
            mySkillDef.rechargeStock         = 1;
            mySkillDef.requiredStock         = 1;
            mySkillDef.shootDelay            = 0f;
            mySkillDef.stockToConsume        = 1;
            mySkillDef.icon                  = Assets.icon2;
            mySkillDef.skillDescriptionToken = "GROVETENDER_SECONDARY_HEAL_DESCRIPTION";
            mySkillDef.skillName             = "GROVETENDER_SECONDARY_HEAL_NAME";
            mySkillDef.skillNameToken        = "GROVETENDER_SECONDARY_HEAL_NAME";

            LoadoutAPI.AddSkillDef(mySkillDef);

            component.secondary = myCharacter.AddComponent <GenericSkill>();
            SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();

            newFamily.variants = new SkillFamily.Variant[1];
            LoadoutAPI.AddSkillFamily(newFamily);
            component.secondary.SetFieldValue("_skillFamily", newFamily);
            SkillFamily skillFamily = component.secondary.skillFamily;

            skillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = mySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            };
        }
        private void SpecialSetup()
        {
            SkillLocator component = myCharacter.GetComponent <SkillLocator>();

            string desc = "Fire a burst of <style=cIsUtility>chains</style> that deal <style=cIsDamage>8x" + FireShotgun.projectileDamageCoefficient * 100f + "% damage</style> and <style=cIsUtility>pull</style> enemies hit.";

            LanguageAPI.Add("GROVETENDER_SPECIAL_CHAINS_NAME", "Scorched Shotgun");
            LanguageAPI.Add("GROVETENDER_SPECIAL_CHAINS_DESCRIPTION", desc);

            SkillDef mySkillDef = ScriptableObject.CreateInstance <SkillDef>();

            mySkillDef.activationState            = new SerializableEntityStateType(typeof(PrepShotgun));
            mySkillDef.activationStateMachineName = "Body";
            mySkillDef.baseMaxStock                 = 1;
            mySkillDef.baseRechargeInterval         = 8;
            mySkillDef.beginSkillCooldownOnSkillEnd = true;
            mySkillDef.canceledFromSprinting        = false;
            mySkillDef.fullRestockOnAssign          = true;
            mySkillDef.interruptPriority            = InterruptPriority.PrioritySkill;
            mySkillDef.isBullets             = true;
            mySkillDef.isCombatSkill         = true;
            mySkillDef.mustKeyPress          = true;
            mySkillDef.noSprint              = true;
            mySkillDef.rechargeStock         = 1;
            mySkillDef.requiredStock         = 1;
            mySkillDef.shootDelay            = 0f;
            mySkillDef.stockToConsume        = 1;
            mySkillDef.icon                  = Assets.icon4;
            mySkillDef.skillDescriptionToken = "GROVETENDER_SPECIAL_CHAINS_DESCRIPTION";
            mySkillDef.skillName             = "GROVETENDER_SPECIAL_CHAINS_NAME";
            mySkillDef.skillNameToken        = "GROVETENDER_SPECIAL_CHAINS_NAME";

            LoadoutAPI.AddSkillDef(mySkillDef);

            component.special = myCharacter.AddComponent <GenericSkill>();
            SkillFamily newFamily = ScriptableObject.CreateInstance <SkillFamily>();

            newFamily.variants = new SkillFamily.Variant[1];
            LoadoutAPI.AddSkillFamily(newFamily);
            component.special.SetFieldValue("_skillFamily", newFamily);
            SkillFamily skillFamily = component.special.skillFamily;

            skillFamily.variants[0] = new SkillFamily.Variant
            {
                skillDef       = mySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            };
        }