Beispiel #1
0
        private void Main()
        {
            HarmonyWrapper.PatchAll(typeof(KK_EyeShaking));
            CharacterApi.RegisterExtraBehaviour <EyeShakingController>(GUID);

            Enabled = Config.GetSetting("Config", "Enabled", true, new ConfigDescription("When enabled, virgins in H scenes will appear to have shaking eye highlights"));
        }
        internal void Main()
        {
            Logger = base.Logger;

            PopulateUncensorLists();

#if KK
            _GenderBender = Config.AddSetting("Config", "Genderbender Allowed", true, "Whether or not genderbender characters are allowed. When disabled, girls will always have a female body with no penis, boys will always have a male body and a penis. Genderbender characters will still load in Studio for scene compatibility.");
#endif
            DefaultMaleBody           = Config.AddSetting("Config", "Default Male Body", "Random", new ConfigDescription("Body to use if the character does not have one set. The censored body will not be selected randomly if there are any alternatives.", new AcceptableValueList <string>(GetConfigBodyList())));
            DefaultMalePenis          = Config.AddSetting("Config", "Default Male Penis", "Random", new ConfigDescription("Penis to use if the character does not have one set. The mosaic penis will not be selected randomly if there are any alternatives.", new AcceptableValueList <string>(GetConfigPenisList())));
            DefaultMaleBalls          = Config.AddSetting("Config", "Default Male Balls", "Random", new ConfigDescription("Balls to use if the character does not have one set. The mosaic penis will not be selected randomly if there are any alternatives.", new AcceptableValueList <string>(GetConfigBallsList())));
            DefaultFemaleBody         = Config.AddSetting("Config", "Default Female Body", "Random", new ConfigDescription("Body to use if the character does not have one set. The censored body will not be selected randomly if there are any alternatives.", new AcceptableValueList <string>(GetConfigBodyList())));
            DefaultFemalePenis        = Config.AddSetting("Config", "Default Female Penis", "Random", new ConfigDescription("Penis to use if the character does not have one set. The mosaic penis will not be selected randomly if there are any alternatives.", new AcceptableValueList <string>(GetConfigPenisList())));
            DefaultFemaleBalls        = Config.AddSetting("Config", "Default Female Balls", "Random", new ConfigDescription("Balls to use if the character does not have one set. The mosaic penis will not be selected randomly if there are any alternatives.", new AcceptableValueList <string>(GetConfigBallsList())));
            DefaultFemaleDisplayBalls = Config.AddSetting("Config", "Default Female Balls Display", false, "Whether balls will be displayed on females if not otherwise configured.");

            MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;
            MakerAPI.MakerFinishedLoading        += MakerAPI_MakerFinishedLoading;
            CharacterApi.RegisterExtraBehaviour <UncensorSelectorController>(GUID);
#if !EC
            RegisterStudioControls();
#endif

            HarmonyWrapper.PatchAll(typeof(Hooks));
        }
Beispiel #3
0
        private void Start()
        {
            Logger = base.Logger;

            try
            {
                // Load male animation clips for overriding
                var ab   = AssetBundle.LoadFromFile(Application.dataPath + @"\..\abdata\animator\action\male\00.unity3d");
                var anim = ab.LoadAsset <RuntimeAnimatorController>("m_player.controller");
                MaleAnimations = anim.animationClips.ToArray();
                ab.Unload(false);
                Destroy(anim);
            }
            catch (Exception ex)
            {
                Logger.LogError("Failed to read male player animation data - " + ex);
            }

            if (MaleAnimations != null && MaleAnimations.Any())
            {
                CharacterApi.RegisterExtraBehaviour <ReverseTrapController>(GUID);

                MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;

                HarmonyWrapper.PatchAll(typeof(Hooks));
            }
        }
Beispiel #4
0
        internal void Main()
        {
            CharacterApi.RegisterExtraBehaviour <BetterPenetrationController>(BEHAVIOR);

            harmony = new Harmony("AI_Studio_BetterPenetration");
            harmony.PatchAll(typeof(AI_Studio_BetterPenetration));

            Console.WriteLine("Studio_BetterPenetration: Searching for Uncensor Selector");
            Chainloader.PluginInfos.TryGetValue("com.deathweasel.bepinex.uncensorselector", out PluginInfo pluginInfo);
            if (pluginInfo == null || pluginInfo.Instance == null)
            {
                return;
            }

            Type nestedType = pluginInfo.Instance.GetType().GetNestedType("UncensorSelectorController", AccessTools.all);

            if (nestedType == null)
            {
                return;
            }

            Console.WriteLine("Studio_BetterPenetration: UncensorSelector found, trying to patch");
            MethodInfo methodInfo = AccessTools.Method(nestedType, "ReloadCharacterPenis", null, null);

            if (methodInfo == null)
            {
                return;
            }

            harmony.Patch(methodInfo, new HarmonyMethod(typeof(AI_Studio_BetterPenetration), "BeforeDanCharacterReload"),
                          new HarmonyMethod(typeof(AI_Studio_BetterPenetration), "AfterDanCharacterReload"),
                          null, null);
            Console.WriteLine("Studio_BetterPenetration: ReloadCharacterPenis patched correctly");

            Console.WriteLine("Studio_BetterPenetration: Searching for NodeConstraints");
            Chainloader.PluginInfos.TryGetValue("com.joan6694.illusionplugins.nodesconstraints", out pluginInfo);
            if (pluginInfo == null || pluginInfo.Instance == null)
            {
                return;
            }

            Type pluginType = pluginInfo.Instance.GetType();

            if (pluginType == null)
            {
                return;
            }

            Console.WriteLine("Studio_BetterPenetration: NodeConstraints found, trying to patch");
            methodInfo = AccessTools.Method(pluginType, "AddConstraint", null, null);
            if (methodInfo == null)
            {
                return;
            }

            harmony.Patch(methodInfo, null,
                          new HarmonyMethod(typeof(AI_Studio_BetterPenetration), "AfterAddConstraint"),
                          null, null);
            Console.WriteLine("Studio_BetterPenetration: NodeConstraints patched correctly");
        }
        internal void Start()
        {
            CharacterApi.RegisterExtraBehaviour <InvisibleBodyCharaController>("KK_InvisibleBody");
            MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;

            HideHairAccessories = Config.GetSetting("Config", "Hide built-in hair accessories", true, new ConfigDescription("Whether or not to hide accesories (such as scrunchies) attached to back hairs."));
        }
Beispiel #6
0
        internal void Main()
        {
            Logger = base.Logger;
            CharacterApi.RegisterExtraBehaviour <ColliderController>(GUID);
            StudioSaveLoadApi.RegisterExtraBehaviour <ColliderSceneController>(GUID);

            ConfigBreastColliders = Config.Bind("Config", "Breast Colliders", true, new ConfigDescription("Whether breast colliders are enabled. Makes breasts interact and collide with arms, hands, etc.", null, new ConfigurationManagerAttributes {
                Order = 10
            }));
            ConfigFloorCollider = Config.Bind("Config", "Floor Collider", true, new ConfigDescription("Adds a floor collider so hair doesn't clip through the floor when laying down.", null, new ConfigurationManagerAttributes {
                Order = 1
            }));
            ConfigDefaultStudioSettings = Config.Bind("Config", "Default Studio Settings", DefaultStudioSettings.Off, new ConfigDescription("Default state of colliders for new characters in Studio or for older scenes.\nScenes made with this plugin will load with colliders enabled or disabled depending on how the character in scene was configured.", null, new ConfigurationManagerAttributes {
                Order = 0
            }));

            ConfigBreastColliders.SettingChanged += ConfigBreastColliders_SettingChanged;
            ConfigFloorCollider.SettingChanged   += ConfigFloorCollider_SettingChanged;

#if KK || KKS
            ConfigSkirtColliders = Config.Bind("Config", "Skirt Colliders", true, new ConfigDescription("Extra colliders for the legs to cause less skirt clipping.", null, new ConfigurationManagerAttributes {
                Order = 5
            }));
            ConfigSkirtColliders.SettingChanged += ConfigSkirtColliders_SettingChanged;

            Harmony.CreateAndPatchAll(typeof(Hooks));
#endif

            RegisterStudioControls();
        }
        private void Start()
        {
            PregnancyProgressionSpeed = Config.Bind("General", "Pregnancy progression speed", 4,
                                                    new ConfigDescription("How much faster does the in-game pregnancy progresses than the standard 40 weeks. " +
                                                                          "It also reduces the time characters leave school for after birth.\n\n" +
                                                                          "x1 is 40 weeks, x2 is 20 weeks, x4 is 10 weeks, x10 is 4 weeks.",
                                                                          new AcceptableValueList <int>(1, 2, 4, 10)));

            ConceptionEnabled = Config.Bind("General", "Enable conception", true,
                                            "Allows characters to get pregnant from vaginal sex. Doesn't affect already pregnant characters.");

            AnalConceptionEnabled = Config.Bind("General", "Enable anal conception", false,
                                                "Allows characters to get pregnant from anal sex. Doesn't affect already pregnant characters.");

            ShowPregnancyIconEarly = Config.Bind("General", "Show pregnancy icon early", false,
                                                 "By default pregnancy status icon in class roster is shown after a few days (the girl had a chance to do the test). " +
                                                 "Turning this on will make the icon show up at the end of the current day.");

            CharacterApi.RegisterExtraBehaviour <PregnancyCharaController>(GUID);
            GameAPI.RegisterExtraBehaviour <PregnancyGameController>(GUID);

            var hi = new Harmony(GUID);

            Hooks.InitHooks(hi);
            PregnancyGui.Init(hi, this);
        }
        internal void Main()
        {
            HarmonyWrapper.PatchAll(typeof(Hooks));
            CharacterApi.RegisterExtraBehaviour <EyeShakingController>(GUID);

            Enabled = Config.Bind("Config", "Enabled", true, "When enabled, virgins in H scenes will appear to have shaking eye highlights");
        }
Beispiel #9
0
        internal void Main()
        {
            Logger = base.Logger;

            Female1GuideObject = Config.Bind("Keyboard Shortcuts", "Show Female 1 Guide Object", new KeyboardShortcut(KeyCode.O), new ConfigDescription("Show the guide object for adjusting girl 1 position", null, new ConfigurationManagerAttributes {
                Order = 6
            }));
            Female2GuideObject = Config.Bind("Keyboard Shortcuts", "Show Female 2 Guide Object", new KeyboardShortcut(KeyCode.P), new ConfigDescription("Show the guide object for adjusting girl 2 position", null, new ConfigurationManagerAttributes {
                Order = 5
            }));
            MaleGuideObject = Config.Bind("Keyboard Shortcuts", "Show Male Guide Object", new KeyboardShortcut(KeyCode.I), new ConfigDescription("Show the guide object for adjusting the boy's position", null, new ConfigurationManagerAttributes {
                Order = 4
            }));
            Female1GuideObjectReset = Config.Bind("Keyboard Shortcuts", "Reset Female 1 Position", new KeyboardShortcut(KeyCode.O, KeyCode.RightControl), new ConfigDescription("Reset adjustments for girl 1 position", null, new ConfigurationManagerAttributes {
                Order = 3
            }));
            Female2GuideObjectReset = Config.Bind("Keyboard Shortcuts", "Reset Female 2 Position", new KeyboardShortcut(KeyCode.P, KeyCode.RightControl), new ConfigDescription("Reset adjustments for girl 2 position", null, new ConfigurationManagerAttributes {
                Order = 2
            }));
            MaleGuideObjectReset = Config.Bind("Keyboard Shortcuts", "Reset Male Position", new KeyboardShortcut(KeyCode.I, KeyCode.RightControl), new ConfigDescription("Reset adjustments for girl 2 position", null, new ConfigurationManagerAttributes {
                Order = 1
            }));

            Harmony.CreateAndPatchAll(typeof(Hooks));
            CharacterApi.RegisterExtraBehaviour <HCharaAdjustmentController>(GUID);
        }
Beispiel #10
0
 internal void Main()
 {
     CharacterApi.RegisterExtraBehaviour <ProfileController>("KK_Profile");
     MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;
     MakerAPI.MakerFinishedLoading        += MakerAPI_MakerFinishedLoading;
     MakerAPI.MakerExiting += MakerAPI_MakerExiting;
 }
Beispiel #11
0
        public void Start()
        {
            DetectMoreAccessories();
            if (MoreAccessoriesInstance == null || MoreAccessoriesType == null)
            {
                this.enabled = false;
                throw new Exception("More Accessories Required and Not Found");
            }

            // UI
            gameObject.AddComponent <AdditionalAccessoryUI>();
            gameObject.AddComponent <AdditionalCoordinateUI>();
            gameObject.AddComponent <AdditionalAccessoryAdvancedParentUI>();
            CharacterApi.RegisterExtraBehaviour <AdditionalAccessoryControlsController>(GUID);
            MakerAPI.MakerStartedLoading += SetupMakerControls;
            MakerAPI.MakerExiting        += CleanupMakerControls;

            // Hooks
            AdditionalAccessoryHooks.PatchMe();
            if (StudioAPI.InsideStudio)
            {
                AdditionalAccessoryStudioHooks.PatchMe();
            }

            if (StudioAPI.InsideStudio)
            {
                SceneManager.sceneUnloaded += OnSceneUnloaded;
                SceneManager.sceneLoaded   += OnSceneLoaded;
            }

            UpdateBodyPositionEveryNFrames.SettingChanged  += UpdateBodyMeshSettings;
            BodyPositionHistoryFrames.SettingChanged       += UpdateBodyMeshSettings;
            BodyPositionFastActionThreshold.SettingChanged += UpdateBodyMeshSettings;
        }
Beispiel #12
0
        private void Start()
        {
            Instance = this;

            if (!KKAPI.KoikatuAPI.CheckRequiredPlugin(this, KKAPI.KoikatuAPI.GUID, new Version(KKAPI.KoikatuAPI.VersionConst)))
            {
                return;
            }

            if (File.Exists(Path.Combine(Paths.PluginPath, "KKABMPlugin.dll")) || File.Exists(Path.Combine(Paths.PluginPath, "KKABMGUI.dll")))
            {
                Log(LogLevel.Message | LogLevel.Error, "Old version of ABM found! Remove KKABMPlugin.dll and KKABMGUI.dll and restart the game.");
                return;
            }

            XyzMode                 = new ConfigWrapper <bool>("XYZ-Scale-Mode", this, false);
            RaiseLimits             = new ConfigWrapper <bool>("RaiseLimits", this, false);
            XyzMode.SettingChanged += KKABMX_GUI.OnIsAdvancedModeChanged;

            gameObject.AddComponent <KKABMX_GUI>();

            CharacterApi.RegisterExtraBehaviour <BoneController>(ExtDataGUID);

            Hooks.Init();
        }
        private void Start()
        {
            EnableBld         = new ConfigWrapper <bool>(nameof(EnableBld), this, true);
            EnableBldAlways   = new ConfigWrapper <bool>(nameof(EnableBldAlways), this, false);
            EnableCum         = new ConfigWrapper <bool>(nameof(EnableCum), this, true);
            EnableSwt         = new ConfigWrapper <bool>(nameof(EnableSwt), this, true);
            EnableTear        = new ConfigWrapper <bool>(nameof(EnableTear), this, true);
            EnableDrl         = new ConfigWrapper <bool>(nameof(EnableDrl), this, true);
            EnablePersistance = new ConfigWrapper <bool>(nameof(EnablePersistance), this, true);

            Hooks.InstallHook();

            CharacterApi.RegisterExtraBehaviour <SkinEffectsController>(GUID);
            GameAPI.RegisterExtraBehaviour <SkinEffectGameController>(GUID);

            SkinEffectsGui.Init(this);

            if (KoikatuAPI.GetCurrentGameMode() != GameMode.Studio)
            {
                SceneManager.sceneLoaded += (arg0, mode) =>
                {
                    // Preload effects for H scene in case they didn't get loaded yet to prevent freeze on first effect appearing
                    if (arg0.name == "H")
                    {
                        TextureLoader.InitializeTextures();
                    }
                };
            }
        }
Beispiel #14
0
        private void Start()
        {
            Logger             = base.Logger;
            Util.Logger.logger = Logger;

            IsVerbose = Config.Bind("Heelz", "Heelz Verbose Mode", false,
                                    new ConfigDescription("Make Heelz Plugin print all of debug messages in console. Useless for most of users."));
            LoadDevXML = Config.Bind("Heelz", "Load Developer XML", false,
                                     new ConfigDescription("Make Heelz Plugin load heel_manifest.xml file from game root folder. Useful for developing heels. Useless for most of users."));
            CharacterApi.RegisterExtraBehaviour <HeelsController>(GUID);
            HarmonyWrapper.PatchAll(typeof(HSHeelz));

            Logger.LogInfo("[Heelz] Heels mode activated: destroy all foot");
            var loadedManifests = Sideloader.Sideloader.Manifests.Values;

            foreach (var manifest in loadedManifests)
            {
                XMLLoader.LoadXML(manifest.manifestDocument);
            }

            if (LoadDevXML.Value)
            {
                XMLLoader.StartWatchDevXML();
            }
        }
Beispiel #15
0
 private void Main()
 {
     Logger = base.Logger;
     AnimationControllerHotkey = Config.GetSetting("Keyboard Shortcuts", "Toggle Animation Controller Window", new KeyboardShortcut(KeyCode.Minus), new ConfigDescription("Show or hide the Animation Controller window in Studio"));
     CharacterApi.RegisterExtraBehaviour <AnimationControllerCharaController>(GUID);
     StudioSaveLoadApi.RegisterExtraBehaviour <AnimationControllerSceneController>(GUID);
 }
Beispiel #16
0
        internal void Main()
        {
            Logger = base.Logger;

            PopulateUncensorLists();

#if KK || KKS
            _GenderBender = Config.Bind("Config", "Genderbender Allowed", true, new ConfigDescription("Whether or not genderbender characters are allowed. When disabled, girls will always have a female body with no penis, boys will always have a male body and a penis. Genderbender characters will still load in Studio for scene compatibility.", null, new ConfigurationManagerAttributes {
                Order = 29
            }));
#endif
#if !EC
            SeparateStudioExclusions = Config.Bind("Config", "Use separate exclusions for studio", false, new ConfigDescription("Whether separate exclusion lists will be used for studio (requires restart)", null, new ConfigurationManagerAttributes {
                Order = 0
            }));
            SeparateStudioExclusions.SettingChanged += (s, e) => Logger.LogMessage("Restart required for updated setting to take effect.");
#endif
            InitUncensorConfigs("Male", "Body", BodyDictionary, GetConfigBodyList(), 19, out var defaultConf, out var excludeConf);
            DefaultMaleBody        = defaultConf;
            RandomExcludedMaleBody = excludeConf;
            InitUncensorConfigs("Male", "Penis", PenisDictionary, GetConfigPenisList(), 18, out defaultConf, out excludeConf);
            DefaultMalePenis        = defaultConf;
            RandomExcludedMalePenis = excludeConf;
            InitUncensorConfigs("Male", "Balls", BallsDictionary, GetConfigBallsList(), 17, out defaultConf, out excludeConf);
            DefaultMaleBalls        = defaultConf;
            RandomExcludedMaleBalls = excludeConf;
            InitUncensorConfigs("Female", "Body", BodyDictionary, GetConfigBodyList(), 9, out defaultConf, out excludeConf);
            DefaultFemaleBody        = defaultConf;
            RandomExcludedFemaleBody = excludeConf;
            InitUncensorConfigs("Female", "Penis", PenisDictionary, GetConfigPenisList(), 8, out defaultConf, out excludeConf);
            DefaultFemalePenis        = defaultConf;
            RandomExcludedFemalePenis = excludeConf;
            InitUncensorConfigs("Female", "Balls", BallsDictionary, GetConfigBallsList(), 7, out defaultConf, out excludeConf);
            DefaultFemaleBalls        = defaultConf;
            RandomExcludedFemaleBalls = excludeConf;

            DefaultFemaleDisplayBalls = Config.Bind("Config", "Default Female Balls Display", false, new ConfigDescription("Whether balls will be displayed on females if not otherwise configured.", null, new ConfigurationManagerAttributes {
                Order = 6
            }));

            MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;
            MakerAPI.MakerFinishedLoading        += MakerAPI_MakerFinishedLoading;
            CharacterApi.RegisterExtraBehaviour <UncensorSelectorController>(GUID);
#if !EC
            RegisterStudioControls();
#endif

            var harmony = Harmony.CreateAndPatchAll(typeof(Hooks));

#if KK
            Type       loadAsyncIterator         = typeof(ChaControl).GetNestedTypes(AccessTools.all).First(x => x.Name.StartsWith("<LoadAsync>c__Iterator"));
            MethodInfo loadAsyncIteratorMoveNext = loadAsyncIterator.GetMethod("MoveNext");
            harmony.Patch(loadAsyncIteratorMoveNext, null, null, new HarmonyMethod(typeof(Hooks).GetMethod(nameof(Hooks.LoadAsyncTranspiler), AccessTools.all)));
#elif KKS
            var tpl = new HarmonyMethod(typeof(Hooks), nameof(Hooks.LoadAsyncTranspiler));
            harmony.PatchMoveNext(AccessTools.Method(typeof(ChaControl), nameof(ChaControl.LoadAsync)), transpiler: tpl);
            harmony.Patch(AccessTools.Method(typeof(ChaControl), nameof(ChaControl.LoadNoAsync)), transpiler: tpl);
#endif
        }
Beispiel #17
0
        internal static void Setup()
        {
            Logger.LogDebug($"{typeof(Configuration).FullName}.{nameof(Setup)}");
            var harmony = Hooks.SetupHooks();

            CharacterApi.RegisterExtraBehaviour <Controller>(GUID);
            GameSpecificSetup(harmony);
        }
        internal void Start()
        {
            CharacterApi.RegisterExtraBehaviour <InvisibleBodyCharaController>("KK_InvisibleBody");
            MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;

            HideHairAccessories = Config.AddSetting("Config", "Hide built-in hair accessories", true, "Whether or not to hide accesories (such as scrunchies) attached to back hairs.");
            HarmonyWrapper.PatchAll(typeof(InvisibleBody));
        }
Beispiel #19
0
        private void Main()
        {
            var harmony = HarmonyInstance.Create(GUID);

            harmony.PatchAll(typeof(KK_EyeShaking));
            CharacterApi.RegisterExtraBehaviour <EyeShakingController>(GUID);
            Enabled = new ConfigWrapper <bool>("Enabled", PluginNameInternal, true);
        }
Beispiel #20
0
        internal void Main()
        {
            CharacterApi.RegisterExtraBehaviour <ColliderController>("com.deathweasel.bepinex.colliders");
            HarmonyWrapper.PatchAll(typeof(KK_Colliders));

            BreastColliders = Config.AddSetting("Config", "Breast Colliders", true, "Whether breast colliders are enabled. Makes breasts interact and collide with arms, hands, etc.");
            SkirtColliders  = Config.AddSetting("Config", "Skirt Colliders", true, "Whether breast colliders are enabled. Makes breasts interact and collide with legs, hands, etc.");
        }
Beispiel #21
0
        internal void Main()
        {
            Logger = base.Logger;
            Directory.CreateDirectory(ExportPath);

            UIScale = Config.Bind("Config", "UI Scale", 1.75f, new ConfigDescription("Controls the size of the window.", new AcceptableValueRange <float>(1f, 3f), new ConfigurationManagerAttributes {
                Order = 3
            }));
            UIWidth = Config.Bind("Config", "UI Width", 0.3f, new ConfigDescription("Controls the size of the window.", new AcceptableValueRange <float>(0f, 1f), new ConfigurationManagerAttributes {
                Order = 2, ShowRangeAsPercent = false
            }));
            UIHeight = Config.Bind("Config", "UI Height", 0.3f, new ConfigDescription("Controls the size of the window.", new AcceptableValueRange <float>(0f, 1f), new ConfigurationManagerAttributes {
                Order = 1, ShowRangeAsPercent = false
            }));

            UIScale.SettingChanged  += UISettingChanged;
            UIWidth.SettingChanged  += UISettingChanged;
            UIHeight.SettingChanged += UISettingChanged;

            MakerAPI.MakerBaseLoaded                   += MakerAPI_MakerBaseLoaded;
            MakerAPI.RegisterCustomSubCategories       += MakerAPI_RegisterCustomSubCategories;
            AccessoriesApi.SelectedMakerAccSlotChanged += AccessoriesApi_SelectedMakerAccSlotChanged;
            AccessoriesApi.AccessoryKindChanged        += AccessoriesApi_AccessoryKindChanged;
            AccessoriesApi.AccessoryTransferred        += AccessoriesApi_AccessoryTransferred;

            CharacterApi.RegisterExtraBehaviour <MaterialEditorCharaController>(GUID);

#if KK || AI
            SceneManager.sceneLoaded += (s, lsm) => InitStudioUI(s.name);
            StudioSaveLoadApi.RegisterExtraBehaviour <MaterialEditorSceneController>(GUID);
#endif
#if KK
            AccessoriesApi.AccessoriesCopied += AccessoriesApi_AccessoriesCopied;
#endif

            LoadXML();
            var harmony = HarmonyWrapper.PatchAll(typeof(Hooks));

#if KK || EC
            //Hooks for transfering accessories (MoreAccessories compatibility)
            foreach (var method in typeof(ChaCustom.CvsAccessoryChange).GetMethods(AccessTools.all).Where(x => x.Name.Contains("<Start>m__4")))
            {
                harmony.Patch(method, new HarmonyMethod(typeof(Hooks).GetMethod(nameof(Hooks.AccessoryTransferHook), AccessTools.all)));
            }
#elif AI
            //Hooks for changing clothing pattern
            foreach (var method in typeof(CharaCustom.CustomClothesPatternSelect).GetMethods(AccessTools.all).Where(x => x.Name.Contains("<ChangeLink>")))
            {
                harmony.Patch(method, new HarmonyMethod(typeof(Hooks).GetMethod(nameof(Hooks.ClothesColorChangeHook), AccessTools.all)));
            }

            //hooks for changing clothing color
            foreach (var method in typeof(CharaCustom.CustomClothesColorSet).GetMethods(AccessTools.all).Where(x => x.Name.StartsWith("<Initialize>")))
            {
                harmony.Patch(method, new HarmonyMethod(typeof(Hooks).GetMethod(nameof(Hooks.ClothesColorChangeHook), AccessTools.all)));
            }
#endif
        }
        private void Start()
        {
            Logger = base.Logger;

            PregnancyProgressionSpeed = Config.Bind("General", "Pregnancy progression speed", 4,
                                                    new ConfigDescription("How much faster does the in-game pregnancy progresses than the standard 40 weeks. " +
                                                                          "It also reduces the time characters leave school for after birth.\n\n" +
                                                                          "x1 is 40 weeks, x2 is 20 weeks, x4 is 10 weeks, x10 is 4 weeks.",
                                                                          new AcceptableValueList <int>(1, 2, 4, 10)));

            ConceptionEnabled = Config.Bind("General", "Enable conception", true,
                                            "Allows characters to get pregnant from vaginal sex. Doesn't affect already pregnant characters.");

            FertilityOverride = Config.Bind("General", "Minimum fertility level", 0f,
                                            new ConfigDescription("If a character has a lower fertility level than this set, this level will be used instead. \n\n" +
                                                                  "0 - The value saved in the character card is used (30% by default)\n" +
                                                                  "30%, 50%, 75%, 100% - If the character card's saved value is lower, it will be raised to this level in HScenes.",
                                                                  new AcceptableValueList <float>(0f, 0.3f, 0.5f, 0.75f, 1f)));

            AnalConceptionEnabled = Config.Bind("General", "Enable anal conception", false,
                                                "Allows characters to get pregnant from anal sex. Doesn't affect already pregnant characters.");

            ShowPregnancyIconEarly = Config.Bind("General", "Show pregnancy icon early", false,
                                                 "By default pregnancy status icon in class roster is shown after a few days or weeks (the character had a chance to do the test or noticed something is wrong).\n" +
                                                 "Turning this on will always make the icon show up at the end of the current day.");

            HSceneMenstrIconOverride = Config.Bind("General", "Use custom safe/risky icons in H Scenes", true,
                                                   "Replaces the standard safe/risky indicators with custom indicators that can also show pregnancy and unknown status. " +
                                                   "If the status is unknown you will have to listen for the voice cues instead.\nChanges take effect after game restart.");

            InflationEnable = Config.Bind("Inflation", "Enable inflation", true, "Turn on the inflation effect.");

            InflationSpeed = Config.Bind("Inflation", "Inflation speed modifier", 1,
                                         new ConfigDescription("How quickly the belly will inflate/deflate compared to normal (1x, 2x, 3x as fast).", new AcceptableValueList <int>(1, 2, 3)));

            InflationOpenClothAtMax = Config.Bind("Inflation", "Open clothes at max inflation", true,
                                                  "If clothes are fully on, open them when inflation reaches the max value (they 'burst' open).");

            InflationMaxCount = Config.Bind("Inflation", "Cum count until full", 8,
                                            new ConfigDescription("How many times you have to let out inside to reach the maximum belly size.", new AcceptableValueRange <int>(2, 15)));

            LactationEnabled = Config.Bind("Lactation", "Enable lactation", true,
                                           "Enable the lactation effect. For the effect to work the character has to be pregnant, or the override setting has to be enabled.");

            LactationFillTime = Config.Bind("Lactation", "Time to fully refill", 5,
                                            new ConfigDescription("How many minutes it takes to fully refill the milk. 0 is always fully refilled.", new AcceptableValueRange <int>(0, 10)));

            LactationForceMaxCapacity = Config.Bind("Lactation", "Force max milk capacity", false,
                                                    "If enabled, all characters will lactate and have full capacity. If off, capacity depends on the pregnancy progress.");

            CharacterApi.RegisterExtraBehaviour <PregnancyCharaController>(GUID);
            GameAPI.RegisterExtraBehaviour <PregnancyGameController>(GUID);

            var hi = new Harmony(GUID);

            Hooks.InitHooks(hi);
            PregnancyGui.Init(hi, this);
        }
        internal void Main()
        {
            Logger = base.Logger;

            MakerAPI.MakerBaseLoaded      += MakerAPI_MakerBaseLoaded;
            MakerAPI.MakerFinishedLoading += MakerAPI_MakerFinishedLoading;
            CharacterApi.RegisterExtraBehaviour <EyeControlCharaController>(GUID);
            Hooks.ApplyHooks();
        }
        internal void Start()
        {
            Logger = base.Logger;

            CharacterApi.RegisterExtraBehaviour <InvisibleBodyCharaController>(PluginNameInternal);
            MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;

            HarmonyWrapper.PatchAll(typeof(Hooks));
        }
Beispiel #25
0
        internal void Main()
        {
            Logger = base.Logger;
            Directory.CreateDirectory(ExportPath);

            MakerAPI.MakerExiting += (s, e) => UI.Visible = false;
            CharacterApi.RegisterExtraBehaviour <MaterialEditorCharaController>(GUID);
            AccessoriesApi.SelectedMakerAccSlotChanged += AccessoriesApi_SelectedMakerAccSlotChanged;
            AccessoriesApi.AccessoryKindChanged        += AccessoriesApi_AccessoryKindChanged;
            AccessoriesApi.AccessoryTransferred        += AccessoriesApi_AccessoryTransferred;
#if KK
            AccessoriesApi.AccessoriesCopied += AccessoriesApi_AccessoriesCopied;
#endif

            UIScale = Config.Bind("Config", "UI Scale", 1.75f, new ConfigDescription("Controls the size of the window.", new AcceptableValueRange <float>(1f, 3f), new ConfigurationManagerAttributes {
                Order = 5
            }));
            UIWidth = Config.Bind("Config", "UI Width", 0.3f, new ConfigDescription("Controls the size of the window.", new AcceptableValueRange <float>(0f, 1f), new ConfigurationManagerAttributes {
                Order = 4, ShowRangeAsPercent = false
            }));
            UIHeight = Config.Bind("Config", "UI Height", 0.3f, new ConfigDescription("Controls the size of the window.", new AcceptableValueRange <float>(0f, 1f), new ConfigurationManagerAttributes {
                Order = 3, ShowRangeAsPercent = false
            }));
            WatchTexChanges = Config.Bind("Config", "Watch File Changes", true, new ConfigDescription("Watch for file changes and reload textures on change. Can be toggled in the UI.", null, new ConfigurationManagerAttributes {
                Order = 2
            }));
            ShaderOptimization = Config.Bind("Config", "Shader Optimization", true, new ConfigDescription("Replaces every loaded shader with the MaterialEditor copy of the shader. Reduces the number of copies of shaders loaded which reduces RAM usage and improves performance.", null, new ConfigurationManagerAttributes {
                Order = 1
            }));
            WatchTexChanges.SettingChanged += WatchTexChanges_SettingChanged;

            var harmony = Harmony.CreateAndPatchAll(typeof(Hooks));

#if KK || EC
            //Hooks for transfering accessories (MoreAccessories compatibility)
            foreach (var method in typeof(ChaCustom.CvsAccessoryChange).GetMethods(AccessTools.all).Where(x => x.Name.Contains("<Start>m__4")))
            {
                harmony.Patch(method, new HarmonyMethod(typeof(Hooks).GetMethod(nameof(Hooks.AccessoryTransferHook), AccessTools.all)));
            }
#elif AI || HS2
            //Hooks for changing clothing pattern
            foreach (var method in typeof(CharaCustom.CustomClothesPatternSelect).GetMethods(AccessTools.all).Where(x => x.Name.Contains("<ChangeLink>")))
            {
                harmony.Patch(method, new HarmonyMethod(typeof(Hooks).GetMethod(nameof(Hooks.ClothesColorChangeHook), AccessTools.all)));
            }

            //hooks for changing clothing color
            foreach (var method in typeof(CharaCustom.CustomClothesColorSet).GetMethods(AccessTools.all).Where(x => x.Name.StartsWith("<Initialize>")))
            {
                harmony.Patch(method, new HarmonyMethod(typeof(Hooks).GetMethod(nameof(Hooks.ClothesColorChangeHook), AccessTools.all)));
            }
#endif
            StartCoroutine(LoadXML());
            StartCoroutine(GetUncensorSelectorParts());

            ResourceRedirection.RegisterAssetLoadedHook(HookBehaviour.OneCallbackPerResourceLoaded, AssetLoadedHook);
        }
        void Awake()
        {
            WindowID = Config.Bind(SECTION_GENERAL, "窗口ID(__Window ID):", 23967);

            Key = Config.Bind(SECTION_GENERAL, "快捷键", new KeyboardShortcut(KeyCode.KeypadEnter));

            CharacterApi.RegisterExtraBehaviour <StatsController>(BEHAVIOR);
            HarmonyWrapper.PatchAll(typeof(AgentTrainer));
        }
        private void Start()
        {
            Logger = base.Logger;

            CharacterApi.RegisterExtraBehaviour <InvisibleBodyCharaController>("KK_InvisibleBody"); //Intentionally left as KK because changing it would break extended save data
            MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;

            Harmony.CreateAndPatchAll(typeof(Hooks));
        }
Beispiel #28
0
        internal void Start()
        {
            Instance = this;
            Logger   = base.Logger;

            CharacterApi.RegisterExtraBehaviour <CharaController>(PluginDataID);

            HarmonyWrapper.PatchAll(typeof(Hooks));
        }
Beispiel #29
0
        private void Main()
        {
            CharacterApi.RegisterExtraBehaviour <ColliderController>("com.deathweasel.bepinex.colliders");
            var harmony = HarmonyInstance.Create(GUID);

            harmony.PatchAll(typeof(KK_Colliders));

            BreastColliders = new ConfigWrapper <bool>("BreastColliders", PluginNameInternal, true);
            SkirtColliders  = new ConfigWrapper <bool>("SkirtColliders", PluginNameInternal, true);
        }
Beispiel #30
0
        private void Main()
        {
            sha = CommonLib.LoadAsset <Shader>("chara/goo.unity3d", "goo.shader");
            var harmony = HarmonyInstance.Create(GUID);

            harmony.PatchAll(typeof(KK_BodyShaders));

            CharacterApi.RegisterExtraBehaviour <BodyShadersCharaController>(GUID);
            MakerAPI.RegisterCustomSubCategories += MakerAPI_RegisterCustomSubCategories;
        }