Пример #1
0
        private void DoText()
        {
            Languages.AddToken("REIN_ALTARTI_PASSIVE_NAME", "Elemental Intensity");
            Languages.AddToken("REIN_ALTARTI_PASSIVE_DESC", "Selecting <style=cIsUtility>Ice</style> skills <style=cIsUtility>freezes</style> nearby enemies on execute." + "\n" +
                               "Selecting <style=cIsUtility>Fire</style> skills increases <style=cIsDamage>Burning Damage</style> temporarily on casting a skill." + "\n" +
                               "Selecting <style=cIsUtility>Lightning</style> skills fires <style=cIsDamage>Homing Projectiles</style> on casting a skill.");

            Languages.AddToken("REIN_ALTARTI_LIGHTNING_SPECIAL_NAME", "Ion Surge");
            Languages.AddToken("REIN_ALTARTI_LIGHTNING_SPECIAL_DESC", "Repeatedly dash in any direction. Float in the air for a short time between each dash. 3 dashes in total.");
            Languages.AddToken("REIN_ALTARTI_ALTMASTERYSKIN_NAME", "[Insert cool name here]");
        }
Пример #2
0
        void Awake()
        {
            if (disablePoints.Value)
            {
                Languages.AddToken("STAT_POINTS_FORMAT", "");
                Languages.AddToken("STAT_TOTAL", "");
            }

            Logger.LogInfo($"Adding {statDefs.Count} stats.");
            foreach (DumbStat stat in statDefs)
            {
                Languages.AddToken(stat.Definition.displayToken, stat.FullText);
            }
            RoR2.Run.onRunStartGlobal += PickRunStats;
        }
Пример #3
0
        public void Awake()
        {
            //IL.RoR2.CharacterMaster.OnBodyDeath += (il) =>
            //{
            //    ILCursor c = new ILCursor(il);
            //    c.GotoNext(
            //        x => x.MatchLdarg(0),
            //        x => x.MatchLdfld<CharacterMaster>("destroyOnBodyDeath"),
            //        x => x.MatchBrfalse(out _),
            //        x => x.MatchLdarg(0),
            //        x => x.MatchCallOrCallvirt<Component>("get_gameObject"),
            //        x => x.MatchLdcR4(1),
            //        x => x.MatchCallOrCallvirt<UnityEngine.Object>("Destroy"));
            //    c.Index += 1;
            //    c.RemoveRange(7);
            //};
            //On.RoR2.HurtBoxGroup.OnDeathStart += (orig, self) =>
            //{
            //    Chat.AddMessage("yahoo");
            //};
            //On.RoR2.CharacterAI.BaseAI.OnBodyDeath += (orig, self, test) =>
            //{
            //    Chat.AddMessage("dead ai");
            //};
            //On.RoR2.CharacterAI.BaseAI.OnBodyLost += (orig, self, test) =>
            //{
            //    Chat.AddMessage("dead ai");
            //};
            //////On.RoR2.HurtBoxGroup.SetHurtboxesActive += (orig, self, test) =>
            //////{
            //////    Chat.AddMessage("yay");
            //////};
            ////On.RoR2.BullseyeSearch.CheckVisible += (orig, self, test) =>
            ////{
            ////    return false;
            ////};

            //On.RoR2.HurtBox.OnDisable += (orig, self) =>
            //{
            //    Chat.AddMessage("OnDisable");
            //};

            //IL.RoR2.CameraRigController.Update += (il) => {
            //    var c = new ILCursor(il);

            //    //We use GotoNext to locate the code we want to edit
            //    //Notice we can specify a block of instructions to match, rather than only a single instruction
            //    //This is preferable as it is less likely to break something else because of an update

            //    c.GotoNext(
            //        x => x.MatchLdloc(4),      // num14 *= 0.5f;
            //        x => x.MatchLdcR4(0.5f),   //
            //        x => x.MatchMul(),         //
            //        x => x.MatchStloc(4),      //
            //        x => x.MatchLdloc(5),      // num15 *= 0.5f;
            //        x => x.MatchLdcR4(0.5f),   //
            //        x => x.MatchMul(),         //
            //        x => x.MatchStloc(5));     //

            //    //When we GotoNext, the cursor is before the first instruction we match.
            //    //So we remove the next 8 instructions
            //    c.RemoveRange(8);

            //};

            // myCharacter should either be
            // Resources.Load<GameObject>("prefabs/characterbodies/BanditBody");
            // or BodyCatalog.FindBodyIndex("BanditBody");
            this.characterPrefab = Resources.Load <GameObject>("prefabs/characterbodies/HuntressBody");

            // If you're confused about the language tokens, they're the proper way to add any strings used by the game.
            // We use AssetPlus API for that
            Languages.AddToken("MYBANDIT_DESCRIPTION", "The description of my survivor" + Environment.NewLine);

            var mySurvivorDef = new SurvivorDef
            {
                //We're finding the body prefab here,
                bodyPrefab = this.characterPrefab,
                //Description
                descriptionToken = "MYBANDIT_DESCRIPTION",
                //Display
                displayPrefab = Resources.Load <GameObject>("prefabs/characterdisplays/CommandoDisplay"),
                //Color on select screen
                primaryColor = new Color(0.8039216f, 0.482352942f, 0.843137264f),
                //Unlockable name
                unlockableName = "",
            };

            SurvivorAPI.AddSurvivor(mySurvivorDef);

            // If you're confused about the language tokens, they're the proper way to add any strings used by the game.
            // We use AssetPlus API for that
            Languages.AddToken("CHARACTERNAME_SKILLSLOT_SKILLNAME_NAME", "The name of this skill");
            Languages.AddToken("CHARACTERNAME_SKILLSLOT_SKILLNAME_DESCRIPTION", "The description of this skill.");



            //If this is the default/first skill, copy this code and remove the //,
            //skillFamily.variants[0] = new SkillFamily.Variant
            //{
            //    skillDef = mySkillDef,
            //    unlockableName = "",
            //    viewableNode = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            //};

            this.SkillSetup();
        }
Пример #4
0
 private void AddLanguageTokens()
 {
     Languages.AddToken("UNO_ENGIPLUS_PLASMOIDS_NAME", "Plasmoid Launchers");
     Languages.AddToken("UNO_ENGIPLUS_PLASMOIDS_DESC", "Charge and fire alternating plasma shots for <style=cIsDamage>350% damage</style> each.");
 }
Пример #5
0
        public void Awake()
        {
            //SkillModifierManager.LoadSkillModifiers();

            //Until I figure out how to make an assetbundle for the characters. #HELP
            var myChar = Resources.Load <GameObject>("prefabs/characterbodies/CommandoBody");

            Languages.AddToken("DVA_DESCRIPTION", "짜증나!" + Environment.NewLine);

            var mySurvivorDef = new SurvivorDef
            {
                bodyPrefab       = myChar,
                descriptionToken = "DVA_DESCRIPTION",
                displayPrefab    = Resources.Load <GameObject>("Prefabs/Characters/CommandoDisplay"),
                primaryColor     = new Color(0.98046875f, 0.12890625f, 0.9765625f),
                unlockableName   = "",
            };

            SurvivorAPI.AddSurvivor(mySurvivorDef);

            //TOKKI PRIMARY: FUSION CANNONS
            #region
            Languages.AddToken("TOKKI_PRIMARY_FUSIONCANNONS_NAME", "Fusion Cannons");
            Languages.AddToken("TOKKI_PRIMARY_FUSIONCANNONS_DESCRIPTION", "D.Va's mech is equipped with twin short-range rotating cannons. They lay down continuous, high-damage fire without needing to reload, but slow D.Va’s movement while they’re active.");

            var mySkillDef = ScriptableObject.CreateInstance <SkillDef>();
            mySkillDef.activationState            = new SerializableEntityStateType(typeof(GoofballGames.TokkiEntityStates.Tokki_FusionCannons));
            mySkillDef.activationStateMachineName = "Weapon";
            mySkillDef.baseMaxStock                 = 0;
            mySkillDef.baseRechargeInterval         = 0f;
            mySkillDef.beginSkillCooldownOnSkillEnd = true;
            mySkillDef.canceledFromSprinting        = true;
            mySkillDef.fullRestockOnAssign          = true;
            mySkillDef.interruptPriority            = InterruptPriority.Frozen;
            mySkillDef.isBullets      = true;
            mySkillDef.isCombatSkill  = true;
            mySkillDef.mustKeyPress   = false;
            mySkillDef.noSprint       = true;
            mySkillDef.rechargeStock  = 0;
            mySkillDef.requiredStock  = 0;
            mySkillDef.shootDelay     = 0.15f;
            mySkillDef.stockToConsume = 0;
            //mySkillDef.icon = Resources.Load<Sprite>("");  Gotta figure out bundles, I think... #HELP
            mySkillDef.skillDescriptionToken = "TOKKI_PRIMARY_FUSIONCANNONS_DESCRIPTION";
            mySkillDef.skillName             = "TOKKI_PRIMARY_FUSIONCANNONS_NAME";
            mySkillDef.skillNameToken        = "TOKKI_PRIMARY_FUSIONCANNONS_NAME";

            var skillLocator = myChar.GetComponent <SkillLocator>();

            //Note; if your character does not originally have a skill family for this, use the following:
            //skillLocator.special = gameObject.AddComponent<GenericSkill>();
            //var newFamily = ScriptableObject.CreateInstance<SkillFamily>();
            //LoadoutAPI.AddSkillFamily(newFamily);
            //skillLocator.special.SetFieldValue("_skillFamily", newFamily);
            //var specialSkillFamily = skillLocator.special.skillFamily;


            //Note; you can change component.primary to component.secondary , component.utility and component.special
            var skillFamily = skillLocator.primary.skillFamily;

            //If this is an alternate skill, use this code.
            // Here, we add our skill as a variant to the exisiting Skill Family.
            Array.Resize(ref skillFamily.variants, skillFamily.variants.Length + 1);
            skillFamily.variants[skillFamily.variants.Length - 1] = new SkillFamily.Variant
            {
                skillDef       = mySkillDef,
                unlockableName = "",
                viewableNode   = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            };

            //Note; if your character does not originally have a skill family for this, use the following:
            //skillFamily.variants = new SkillFamily.Variant[1]; // substitute 1 for the number of skill variants you are implementing

            //If this is the default/first skill, copy this code and remove the //,
            //skillFamily.variants[0] = new SkillFamily.Variant
            //{
            //    skillDef = mySkillDef,
            //    unlockableName = "",
            //    viewableNode = new ViewablesCatalog.Node(mySkillDef.skillNameToken, false, null)
            //};
            #endregion
        }