public void Awake()
        {
            tweaks.Add(new Tweak()
            {
                title = "ChanceShrineChanges", description = "Chance shrines have slightly randomized values on load, and the more you fail the better the outcome.", startMethod = ChanceShrineChanges.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "DeathRewards", description = "Elite Teleporter Bosses have a 25% chance to drop an elite affix, normal enemies have a 0.5% chance.", startMethod = DeathRewards.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "MultiElites", description = "Elite enemies can gain multiple elite types if the game had the ability to spawn them naturally.", startMethod = MultiElites.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "NoAutoPickup", description = "In multiplayer you won't automatically pick up items.", startMethod = NoAutoPickup.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "SizeTweaks", description = "Tweaks the size of bosses and elite enemies to feel more scary and natural.", startMethod = SizeTweaks.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "MultiShopNoDuplicates", description = "Makes it much less likely for a multishop to have duplicates.", startMethod = MultiShopNoDuplicates.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "TurrentInheritance", description = "Deployables, such as turrets, recieve your elite affix.", startMethod = TurretInheritance.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "TrueSuicideNullVoid", description = "In the Null Sector, enemies will not revive with Dio's after the round is finished.", startMethod = TrueSuicideVoidSector.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "NoScavengerGhostReset", description = "If a scavenger becomes a ghost through Happiest Mask, it won't reset it's items.", startMethod = NoScavengerResetGhost.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "SolidIceWall", description = "Makes artificer's ice wall solid.", startMethod = SolidIceWall.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "BetterPrototypeMovement", description = "Makes the Prototype drone less wonky when it flies and bumps into things", startMethod = BetterPrototypeMovement.Init
            });



            foreach (Tweak tweak in tweaks)
            {
                if (myConfig.Bind <bool>(new ConfigDefinition("Vanilla Tweaks", tweak.title, tweak.description), true).Value)
                {
                    tweak.startMethod();
                }
            }
        }
Exemple #2
0
        public void Awake()
        {
            //Taken from https://github.com/Legendsmith/ThunderDownUnder/blob/master/SolidIceWall/SolidIceWallLoader.cs
            GameObject pillarprefab = Resources.Load <GameObject>("prefabs/projectiles/mageicewallpillarprojectile");

            pillarprefab.layer = 11;

            On.RoR2.ArenaMissionController.EndRound += TrueSuicideOnNullVoid;

            On.RoR2.MultiShopController.CreateTerminals += MultishopNoDuplicates;

            On.RoR2.ScavengerItemGranter.Start += ScavengerNoResetGhost;

            On.RoR2.CharacterMaster.AddDeployable += TurretEliteInheritance;

            tweaks.Add(new Tweak()
            {
                title = "Aurelionite Tweaks", description = "Adds progression to Aurelionite and adds a small chance for a natural gold portal", startMethod = AurelioniteTweaks.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "ChanceShrineChanges", description = "Chance shrines have slightly randomized values on load, and the more you fail the better the outcome.", startMethod = ChanceShrineChanges.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "ShrineCanvas", description = "Adds a networked display of chances to the shrine of chance", startMethod = ShrineCanvasTweak.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "DeathRewards", description = "Elite Teleporter Champion Bosses have a 25% chance to drop an elite affix, normal enemies have a 0.5% chance", startMethod = DeathRewards.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "MultiElites", description = "Elite enemies can gain multiple elite types if the game had the ability to spawn them naturally", startMethod = MultiElites.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "NoAutoPickup", description = "In multiplayer you won't automatically pick up items", startMethod = NoAutoPickup.Init
            });
            tweaks.Add(new Tweak()
            {
                title = "SizeTweaks", description = "Tweaks the size of bosses and elite enemies to feel more scary and natural", startMethod = SizeTweaks.Init
            });


            foreach (Tweak tweak in tweaks)
            {
                if (myConfig.Bind <bool>(new ConfigDefinition("Vanilla Tweaks", tweak.title, tweak.description), true).Value)
                {
                    tweak.startMethod();
                }
            }
        }
Exemple #3
0
        public void Awake()
        {
            floatProperties.Add("_Cull");
            floatProperties.Add("_BlueChannelBias");
            floatProperties.Add("_BlueChannelSmoothness");
            floatProperties.Add("_ColorsOn");
            floatProperties.Add("_DecalLayer");
            floatProperties.Add("_Depth");
            floatProperties.Add("_DitherOn");
            floatProperties.Add("_EliteBrightnessMax");
            floatProperties.Add("_EliteBrightnessMin");
            floatProperties.Add("_EliteIndex");
            floatProperties.Add("_EmPower");
            floatProperties.Add("_EnableCutout");
            floatProperties.Add("_Fade");
            floatProperties.Add("_FadeBias");
            floatProperties.Add("_FlowEmissionStrength");
            floatProperties.Add("_FlowHeightBias");
            floatProperties.Add("_FlowHeightPower");
            floatProperties.Add("_FlowMaskStrength");
            floatProperties.Add("_FlowNormalStrength");
            floatProperties.Add("_FlowSpeed");
            floatProperties.Add("_FlowTextureScaleFactor");
            floatProperties.Add("_FlowmapOn");
            floatProperties.Add("_ForceSpecOn");
            floatProperties.Add("_FresnelBoost");
            floatProperties.Add("_FresnelPower");
            floatProperties.Add("_GreenChannelBias");
            floatProperties.Add("_GreenChannelSmoothness");
            floatProperties.Add("_LimbPrimeMask");
            floatProperties.Add("_LimbRemovalOn");
            floatProperties.Add("_NormalStrength");
            floatProperties.Add("_PrintBias");
            floatProperties.Add("_PrintBoost");
            floatProperties.Add("_PrintDirection");
            floatProperties.Add("_PrintEmissionToAlbedoLerp");
            floatProperties.Add("_PrintOn");
            floatProperties.Add("_RampInfo");
            floatProperties.Add("_SliceAlphaDepth");
            floatProperties.Add("_SliceBandHeight");
            floatProperties.Add("_SliceHeight");
            floatProperties.Add("_Smoothness");
            floatProperties.Add("_SpecularExponent");
            floatProperties.Add("_SpecularStrength");
            floatProperties.Add("_SplatmapOn");
            floatProperties.Add("_SplatmapTileScale");
            floatProperties.Add("_FEON");
            floatProperties.Add("_SrcBlend");
            floatProperties.Add("_DstBlend");
            floatProperties.Add("_InvFade");
            floatProperties.Add("_AlphaBias");
            floatProperties.Add("_AlphaBoost");
            floatProperties.Add("_Boost");
            floatProperties.Add("_CalcTextureAlphaOn");
            floatProperties.Add("_CloudOffsetOn");
            floatProperties.Add("_CloudsOn");
            floatProperties.Add("_DisableRemapOn");
            floatProperties.Add("_ExternalAlpha");
            floatProperties.Add("_FadeCloseDistance");
            floatProperties.Add("_FadeCloseOn");
            floatProperties.Add("_FresnelOn");
            floatProperties.Add("_InternalSimpleBlendMode");
            floatProperties.Add("_OffsetAmount");
            floatProperties.Add("_UseUV1On");
            floatProperties.Add("_VertexAlphaOn");
            floatProperties.Add("_VertexColorOn");
            floatProperties.Add("_VertexOffsetOn");

            colorProperties.Add("_EmColor");

            directory = Application.dataPath;
            directory = System.IO.Path.GetFullPath(System.IO.Path.Combine(directory, @"..\BepInEx\skins"));


            myConfig = new ConfigFile(@"BepInEx\skins\RyanSkinAPI.cfg", true);

            On.RoR2.SurvivorCatalog.Init += (orig) =>
            {
                orig();

                foreach (SurvivorDef survivorDef in SurvivorCatalog.allSurvivorDefs)
                {
                    //Skip 'finished'  prefabs. This is for custom survivors that do skins differently in an incompatible way to the RyanSkinAPI.
                    if (survivorDef.bodyPrefab && survivorDef.bodyPrefab.CompareTag("Finish"))
                    {
                        continue;
                    }

                    AddComponents(survivorDef);

                    if (myConfig.Bind <bool>(new ConfigDefinition("", "DumpBoilerplates"), false).Value)
                    {
                        base.Logger.LogInfo("Dumping " + survivorDef.name);

                        DumpDefaultSkins(survivorDef.bodyPrefab.gameObject);
                    }
                }

                foreach (string ModFolder in Directory.EnumerateDirectories(directory))
                {
                    foreach (string SkinFolder in Directory.EnumerateDirectories(ModFolder))
                    {
                        foreach (string SkinConfig in Directory.EnumerateFiles(SkinFolder))
                        {
                            if (SkinConfig.EndsWith("Skin.cfg"))
                            {
                                string[] newpath = SkinConfig.Split(new string[] { @"\" }, StringSplitOptions.RemoveEmptyEntries);

                                string     RelativePath = @"BepInEx\skins\" + newpath[newpath.Length - 3] + @"\" + newpath[newpath.Length - 2] + @"\" + newpath[newpath.Length - 1];
                                ConfigFile config       = new ConfigFile(RelativePath, false);
                                string     body         = config.Bind <string>("", "CharacterBodyName", "null").Value;

                                pendingSkins.Add(new PendingSkin()
                                {
                                    config = config, bodyName = body, SkinFolder = SkinFolder
                                });
                            }
                        }
                    }
                }
                ;

                foreach (SurvivorDef survivorDef in SurvivorCatalog.allSurvivorDefs)
                {
                    //Skip finished bodies.
                    if (survivorDef.bodyPrefab.CompareTag("Finish"))
                    {
                        continue;
                    }

                    foreach (PendingSkin pendingSkin in pendingSkins)
                    {
                        if (survivorDef.bodyPrefab.name == pendingSkin.bodyName)
                        {
                            AddSkin(survivorDef, pendingSkin.SkinFolder, pendingSkin.config);
                        }
                    }
                }
            };
        }