예제 #1
0
        public DropInMultiplayerConfig(ConfigFile config)
        {
            // General
            AllowRespawn          = config.Bind("General", "AllowRespawn", true, "When enabled dead players who use the join as command will be immediately respawned");
            JoinAsRandomByDefault = config.Bind("General", "JoinAsRandomByDefault", false, "When enabled newly joined players will be spawned as random survivor by default");

            // Survivors
            AllowJoinAsHiddenSurvivors = config.Bind("Survivors", "AllowJoinAsHiddenSurvivors", true, "When enabled allows players to join as hidden characters, e.g. heretic");
            AllowJoinAsAllBodies       = config.Bind("General", "AllowJoinAsAllBodies", false, "When enabled using the join as command will attempt to match with any body, e.g. join_as beetle, WARNING: Very Untested!");

            // Items
            GiveCatchUpItems = config.Bind("Items", "GiveCatchUpItems", true, "When enabled players will be given catch up items when joining");
            GiveRejoiningPlayersCatchUpItems = config.Bind("Items", "GiveRejoiningPlayersCatchUpItems", true, "When enabled players who leave and rejoin will be given catchup items, WARNING: Can be exploited by giving all items to one player then leaving and rejoining");
            GiveCatchUpVoidItems             = config.Bind("Items", "GiveCatchUpVoidItems", false, "When enabled lunar items will be dropped when players start (requires GiveCatchUpItems enabled)");
            GiveCatchUpLunarItems            = config.Bind("Items", "GiveCatchUpLunarItems", false, "When enabled lunar items will be dropped when players start (requires GiveCatchUpItems enabled)");

            // Chat Messages
            SendWelcomeMessage   = config.Bind("Chat Messages", "SendWelcomeMessage", true, "Sends the welcome message when a new player joins.");
            CustomWelcomeMessage = config.Bind("Chat Messages", "CustomWelcomeMessage", DefaultWelcomeMessage,
                                               "Format of welcome message. {username} will be replaced with joining users name, and {survivorlist} will be replaced by list of availible survivors.");
        }
예제 #2
0
 static void Prefix(bool dontremove, bool random)
 {
     if (!random)
     {
         return;
     }
     useSeed   = seedConfig.Bind("General", "UseSeed", false, "Whether or not to use seeds when playing MYSTERY?");
     takenSeed = seedConfig.Bind("General", "SeedNum", defaultValue: seedVal, "This is the seed used to play MYSTERY?. Please insert numbers between 0 and 4,294,967,295 into this field.");
     rngHold   = UnityEngine.Random.state;
     if (useSeed.Value)
     {
         taken      = true;
         editedSeed = unchecked ((int)takenSeed.Value);
         UnityEngine.Random.InitState(editedSeed);
         System.Diagnostics.Debug.WriteLine("Initialized! The seed number is " + editedSeed);
     }
     else
     {
         System.Diagnostics.Debug.WriteLine("You didn't use seeds this run! (or the config file broke tremendously lol)");
     }
 }
예제 #3
0
        public bool Install(Harmony instance, ConfigFile config)
        {
            var s = config.Bind(KoikatuGameplayMod.ConfCatHScene, "Can be experienced from only one hole", true,
                                "Make it so you only need to max the girls' either vaginal caress/piston or anal caress/piston to achieve experienced state. By default you have to max out both front and rear to get the experienced status.\nChanges take effect after game restart.");

            if (s.Value)
            {
                instance.PatchAll(typeof(ExperienceLogicHooks));
            }

            return(true);
        }
예제 #4
0
 private static void AetheriumConfigs(ConfigFile Config)
 {
     AspectSanguineBaseDotAmp = Config.Bind(
         "2da-Sanguine Aspect", "sanguineBaseDotAmp", 0.20f,
         "DOT damage multiplier gained. Set to 0 to disable."
         );
     AspectSanguineStackDotAmp = Config.Bind(
         "2da-Sanguine Aspect", "sanguineAddedDotAmp", 0.10f,
         "DOT damage multiplier gained per stack."
         );
     AspectSanguineBleedDuration = Config.Bind(
         "2da-Sanguine Aspect", "sanguineBleedDuration", 4.0f,
         "Set bleed duration in seconds."
         );
     AspectSanguineBaseDamage = Config.Bind(
         "2da-Sanguine Aspect", "sanguineBaseTotalDamage", 1.2f,
         "Base total damage of bleed over duration. Set to 0 to disable."
         );
     AspectSanguineStackDamage = Config.Bind(
         "2da-Sanguine Aspect", "sanguineAddedTotalDamage", 0.6f,
         "Added total damage of bleed per stack."
         );
     AspectSanguineMonsterDamageMult = Config.Bind(
         "2da-Sanguine Aspect", "sanguineMonsterDamageMult", 1f,
         "Monster bleed damage multiplier."
         );
 }
예제 #5
0
        public PluginSettings(ConfigFile config)
        {
            RecyclingRate = config.Bind("General", "RecyclingRate", 0.5f,
                                        "Rate at which the resources are recycled. Value must be between 0 and 1.\n" +
                                        "The mod always rolls *down*, so if you were supposed to get 2.5 items, you would only receive 2.");
            UnstackableItemsAlwaysReturnAtLeastOneResource = config.Bind("General",
                                                                         "UnstackableItemsAlwaysReturnAtLeastOneResource", true,
                                                                         "If enabled and recycling a specific _unstackable_ item would yield 0 of a material,\n" +
                                                                         "instead you will receive 1. If disabled, you get nothing.");

            PreventZeroResourceYields = config.Bind("General", "PreventZeroResourceYields", true,
                                                    "If enabled and recycling an item would yield 0 of any material,\n" +
                                                    "instead you will receive 1. If disabled, you get nothing.");
            ContainerRecyclingEnabled = config.Bind("Recycling on containers", "ContainerRecyclingEnabled",
                                                    true, "If enabled, the mod will display the container recycling button");
            ContainerRecyclingButtonPositionJsonString = config.Bind("Recycling on containers",
                                                                     "ContainerButtonPosition",
                                                                     "{\"x\":502.42425537109377,\"y\":147.06060791015626,\"z\":-1.0}",
                                                                     "The last saved recycling button position stored in JSON");

            NotifyOnSalvagingImpediments = config.Bind("UI", "NotifyOnSalvagingImpediments", true,
                                                       "If enabled and recycling a specific item runs into any issues, the mod will print a message\n" +
                                                       "in the center of the screen (native Valheim notification). At the time of implementation,\n" +
                                                       "this happens in the following cases:\n" +
                                                       " - not enough free slots in the inventory to place the resulting resources\n" +
                                                       " - player does not know the recipe for the item\n" +
                                                       " - if enabled, cases when `PreventZeroResourceYields` kicks in and prevent the crafting");
        }
예제 #6
0
        /// <summary>
        /// プラグイン設定の取得
        /// </summary>
        /// <param name="config"></param>
        /// <param name="isSaveConfig"></param>
        /// <returns></returns>
        private static PluginConfig GetPluginConfig(ConfigFile config, out bool isSaveConfig)
        {
            isSaveConfig = false;
            var modVersionConfig = config.Bind <string>("Base", "ModVersion", InitializeModVersion, "Don't change.");

            if (modVersionConfig.Value == InitializeModVersion)
            {
                Logger.LogInfo("cleared config.");
                isSaveConfig           = true;
                modVersionConfig.Value = ModVersion;
            }
            else if (modVersionConfig.Value != ModVersion)
            {
                Logger.LogInfo($"add new config : Version ${modVersionConfig.Value} -> {ModVersion}.");
                isSaveConfig           = true;
                modVersionConfig.Value = ModVersion;
            }

            var pluginConfig = new PluginConfig(
                config.Bind <string>("Base", "ModVersion", ModVersion, "Don't change.").Value,
                config.Bind <bool>("Base", "EnableDecstructCursorReset", true).Value,
                config.Bind <int>("Base", "DestructCursor", 0, new ConfigDescription("DestructCursor Settable Value : 0, 1")).Value,
                config.Bind <string>("Base", "DestructChain", "false", "DestructChain Settable Value : true, false, keep").Value,
                config.Bind <bool>("Base", "EnableDestructFilterReset", false).Value,
                config.Bind <bool>("Base", "DestructFilterFactory", true).Value,
                config.Bind <bool>("Base", "DestructFilterBelt", true).Value,
                config.Bind <bool>("Base", "DestructFilterInserter", true).Value
                )
                               .CheckAndFixConfig(out var fixConfig);

            isSaveConfig |= fixConfig;

#if DEBUG
            Logger.LogInfo($"isSaveConfig : {isSaveConfig}");
            Logger.LogInfo($"Setting: EnableDecstructCursorReset : {pluginConfig.EnableDecstructCursorReset}");
            Logger.LogInfo($"Setting: DestructCursor : {pluginConfig.DestructCursor}");
            Logger.LogInfo($"Setting: DestructChainString : {pluginConfig.DestructChainString}");
            Logger.LogInfo($"Setting: DestructChain : {pluginConfig.DestructChain}");
            Logger.LogInfo($"Setting: EnableDestructFilterReset : {pluginConfig.EnableDestructFilterReset}");
            Logger.LogInfo($"Setting: DestructFilterFactory : {pluginConfig.DestructFilterFactory}");
            Logger.LogInfo($"Setting: DestructFilterBelt : {pluginConfig.DestructFilterBelt}");
            Logger.LogInfo($"Setting: DestructFilterInserter : {pluginConfig.DestructFilterInserter}");
#endif
            return(pluginConfig);
        }
예제 #7
0
        private static void SpikeStripConfigs(ConfigFile Config)
        {
            AspectPlatedBaseArmorGain = Config.Bind(
                "2ba-AspectPlated", "platedBaseArmor", 30f,
                "Armor gained. Set to 0 to disable."
                );
            AspectPlatedStackArmorGain = Config.Bind(
                "2ba-AspectPlated", "platedAddedArmor", 15f,
                "Armor gained per stack."
                );



            AspectWarpedBaseCooldownGain = Config.Bind(
                "2bb-AspectWarped", "warpedBaseCooldown", 0.2f,
                "Cooldown reduction gained. Set to 0 to disable."
                );
            AspectWarpedStackCooldownGain = Config.Bind(
                "2bb-AspectWarped", "warpedAddedCooldown", 0.1f,
                "Cooldown reduction gained per stack."
                );
        }
예제 #8
0
        private static void AspectConfigs(ConfigFile Config)
        {
            AetheriumHooks = Config.Bind(
                "21-Mod Compatibility", "aetheriumHooks", true,
                "Allows modification of functions and values within the Aetherium mod."
                );

            RiskOfRainConfigs(Config);
            SpikeStripConfigs(Config);
            GoldenCoastPlusConfigs(Config);
            AetheriumConfigs(Config);
            BubbetConfigs(Config);
        }
예제 #9
0
        /// <summary>
        /// Bind GridIndex through the configuration file, allowing players to customize GridIndex in the event of conflict
        /// Execute after custom ID
        /// </summary>
        private static void GridIndexBind(Proto proto)
        {
            ConfigEntry <int> entry = null;

            if (proto is ItemProto item)
            {
                entry = CustomGridIndex.Bind(ProtoIndex.GetProtoName(proto), item.ID.ToString(), 0, $"Default Grid Index = {item.GridIndex}\nItem Name = {item.Name}");

                if (entry.Value != 0)
                {
                    item.GridIndex = entry.Value;
                }
            }
            else if (proto is RecipeProto recipe)
            {
                entry = CustomGridIndex.Bind(ProtoIndex.GetProtoName(proto), recipe.ID.ToString(), 0, $"Default Grid Index = {recipe.GridIndex}\nRecipe Name = {recipe.Name}");

                if (entry.Value != 0)
                {
                    recipe.GridIndex = entry.Value;
                }
            }

            if (entry == null)
            {
                return;
            }

            int index = ProtoIndex.GetIndex(proto);

            if (GridIndexDict[index].ContainsKey(proto.Name))
            {
                LDBToolPlugin.logger.LogError($"[CustomGridIndex] ID:{proto.ID} Name:{proto.Name} There is a conflict, please check.");
            }
            else
            {
                GridIndexDict[index].Add(proto.Name, entry);
            }
        }
예제 #10
0
        public FrameConfig(string section, ConfigFile config)
        {
            var c = new Vector4(255, 255, 255, 1);

            Recolor          = config.Bind(section, nameof(Recolor), c, "Color of the frame (RGBA)");
            RecolorIntensity = config.Bind(section, nameof(RecolorIntensity), 1f, "Color intensity of the recolor. Increase if the colors appear too dark");
            Roughness        = config.Bind(section, nameof(Roughness), 1f, "Roughness of the material. Decrease for a more mirrored finish.");
            Metallic         = config.Bind(section, nameof(Metallic), 1f, "Metallic value for the material. Decrease for a flatter more polymer look.");
            NormalStrength   = config.Bind(section, nameof(NormalStrength), 1f, "Strength of the normal maps. Increase this for a more rugged look or decrease for a smoother look.");
            Specularity      = config.Bind(section, nameof(Specularity), 1f, "Specularity for the material.");
            RemoveTexture    = config.Bind(section, nameof(RemoveTexture), false, "Enable to remove texture. This can allow cleaner finishes and better recoloring.");
        }
예제 #11
0
 public static void Bind(ConfigFile config)
 {
     config.Bind("2. Commands", "__CommandsDrawer", false,
                 new ConfigDescription("Don't edit this! This has no effect. It's just used to draw the commands section in the ConfigurationManager window.", null,
                                       new ConfigurationManagerAttributes
     {
         Category          = "2. Commands",
         CustomDrawer      = DrawCommands,
         HideDefaultButton = true,
         HideSettingName   = true
     }
                                       )
                 );
 }
예제 #12
0
        public bool Install(Harmony instance, ConfigFile config)
        {
            if (KoikatuAPI.IsVR())
            {
                return(false);
            }

            _changeLewdAfterH = config.Bind(KoikatuGameplayMod.ConfCatHScene, "Change lewdness after H", false,
                                            "Decreases heroine's H bar after an H scene if satisfied, increases the bar if not.");

            GameAPI.EndH += UpdateLewdAfterH;

            return(true);
        }
예제 #13
0
 private static void InitializeSpearControlSetting(ConfigFile config)
 {
     spearThrowingType = config.Bind("Motion Control - Spear Throwing",
                                     "SpearThrowingMode",
                                     "DartType",
                                     new ConfigDescription("Change the throwing mode." +
                                                           "DartType - Throw by holding grab and trigger and then releasing trigger, Throw aim is based on first trigger pressed to release in a straight line, and throwing power is based on how fast you swing. " +
                                                           "TwoStagedThrowing - Throw aim is based on first grab and then aim is locked after pressing trigger, throw by releasing trigger while swinging, throw speed based on how fast you swing. " +
                                                           "SecondHandAiming - Throw by holding grab and trigger and then releasing trigger, Throw aim is based from your head to your left hand in a straight line, throw by releasing trigger while swinging, throw speed based on how fast you swing.",
                                                           new AcceptableValueList <string>(new string[] { "DartType", "TwoStagedThrowing", "SecondHandAiming" })));
     spearThrowSpeedDynamic = config.Bind("Motion Control - Spear Throwing",
                                          "SpearThrowSpeedDynamic",
                                          true,
                                          "Determine whether or not your throw power depends on swing speed, setting to false make the throw always on fixed speed.");
     useSpearDirectionGraphic = config.Bind("Motion Control - Spear Throwing",
                                            "UseSpearDirectionGraphic",
                                            true,
                                            "Use this to toggle the direction line of throwing when using the spear with VR controls.");
     spearTwoHanded = config.Bind("Motion Control - Spear Throwing",
                                  "TwoHandedSpear",
                                  false,
                                  "Use this to toggle controls of two handed spear (left hand grab while having spear) (experimental)");
 }
예제 #14
0
        internal static void UpdateCustomDataFile(ConfigFile file)
        {
            if (!file.ContainsKey(new ConfigDefinition("General", "Version")))
            {
                File.Copy(file.ConfigFilePath, file.ConfigFilePath + ".bak", true);
                file.Clear();
                ((Dictionary <ConfigDefinition, string>)OrphanedEntriesProp.GetValue(file)).Clear();
            }

            ConfigEntry <string> version = file.Bind("General", "Version", LDBToolPlugin.VERSION, "Version of LDB Tool which created this file. DO NOT EDIT THIS MANUALLY!");

            version.Value = LDBToolPlugin.VERSION;
            file.Save();
        }
예제 #15
0
        internal new static ManualLogSource Logger; // allow access to the logger across the plugin classes

        public void Awake()
        {
            Logger = base.Logger;
            var noHeal = new R2API.CustomBuff("noHeal", new BuffDef {
                buffColor = Color.red,
                canStack  = true,
                isDebuff  = true,
                name      = "NoHeal",
            });

            ConfigFile cfgFile = new ConfigFile(Path.Combine(Paths.ConfigPath, ModGuid + ".cfg"), true);

            EnemyChanceToStealItem = cfgFile.Bind(new ConfigDefinition("Global.VanillaTweaks", "EnemyChanceToStealItems"), 0.5, new ConfigDescription(
                                                      "Base chance in percent that enemys steal items from you (basechance*(itemcount/EnemyItemDivisor)"));
            EnemyItemDivisor = cfgFile.Bind(new ConfigDefinition("Global.VanillaTweaks", "EnemyItemDivisor"), 20, new ConfigDescription(
                                                "Enemy item devisior for stealing items from you (basechance*(itemcount/EnemyItemDivisor)"));
            PlayerChanceToStealItem = cfgFile.Bind(new ConfigDefinition("Global.VanillaTweaks", "PlayerChanceToStealItem"), 8.0, new ConfigDescription(
                                                       "Chance in percent that you steal items from the enemy"));

            indexNoHealBuff = BuffAPI.Add(noHeal);
            Assets.Init();
            Hooks.Init();
        }
예제 #16
0
        public bool Install(Harmony instance, ConfigFile config)
        {
            if (KoikatuAPI.IsVR())
            {
                return(false);
            }

            _fastTravelTimePenalty = config.Bind(KoikatuGameplayMod.ConfCatMainGame, "Fast travel (F3) time cost", 50,
                                                 new ConfigDescription("Value is in seconds. One period has 500 seconds.", new AcceptableValueRange <int>(0, 200)));

            instance.PatchAll(typeof(FastTravelCostHooks));

            return(true);
        }
예제 #17
0
        public bool Install(Harmony instance, ConfigFile config)
        {
            if (KoikatuAPI.IsVR())
            {
                return(false);
            }

            _resetNoCondom = config.Bind(KoikatuGameplayMod.ConfCatHScene, "Make experienced girls ask for condom", true,
                                         "If enabled, sometimes a heroine will refuse raw insert on dangerous day until the second insert (once per day).\nIf disabled the default game logic is used (girl will never refuse if you did raw 5 times or more in total.)");

            GameAPI.DayChange += OnDayChanged;

            return(true);
        }
예제 #18
0
 public static void Awake(ConfigFile Config)
 {
     disableRandomClothChange = Config.Bind("QoL - Events", "Disable random clothchange", false, new ConfigDescription("Disable girls random changing clothes (eliminates lag spikes)"));
     disableRandomRevRape     = Config.Bind("QoL - Events", "Disable random reverse rape", false, new ConfigDescription("Disable girls random reverse rape"));
     disableRandomInvite      = Config.Bind("QoL - Events", "Disable random invites", false, new ConfigDescription("Disable girls random inviting"));
     disableRandomGift        = Config.Bind("QoL - Events", "Disable random gifts", false, new ConfigDescription("Disable girls random giving gifts"));
     disableRandomLes         = Config.Bind("QoL - Events", "Disable random lesbian", false, new ConfigDescription("Disable girls random lesbian (eliminates lag spikes)"));
     disableRandomMas         = Config.Bind("QoL - Events", "Disable random masturbation", false, new ConfigDescription("Disable girls random masturbation (eliminates lag spikes)"));
 }
예제 #19
0
 protected override void CreateConfig(ConfigFile config)
 {
     equipmentRecharge = config.Bind <float>("Equipment : " + EquipmentName, "Recharge time", 140f, "Amount in seconds for this equipment to be available again. For comparison, the highest cooldown is 140s (Preon). Royal Capacitor stands at 20s.").Value;
     consumeEquipment  = config.Bind <bool>("Equipment : " + EquipmentName, "Equipment use if failed", true, "Whenever to consume the equipment and put it on cooldown even if it failed to perform its task.").Value;
     maxRange          = config.Bind <float>("Equipment : " + EquipmentName, "Maximum range", 80f, "Maximum range the item will search for a target when doing the raycast.").Value;
     attackCount       = config.Bind <int>("Equipment : " + EquipmentName, "Number of attacks", 1, "Number of attacks per use that this equipment performs.").Value;
     enemyMultiplier   = config.Bind <float>("Equipment : " + EquipmentName, "Extra damage per enemy", 4.3f, "The total enemy team count will get multiplied by this value, i.e if theres one enemy, the base damage will be multiplied by 5.").Value;
     baseMultiplier    = config.Bind <float>("Equipment : " + EquipmentName, "Owners extra damage", 2.00f, "The owners current base damage will be multiplied by this value.").Value;
 }
예제 #20
0
        public ItemDisplayConfigSection(ConfigFile file, string sectionName, bool isEnabledByDefault = false)
        {
            SectionName       = RemoveInvalidCharacters(sectionName);
            SectionEnabled    = file.Bind(SectionName, nameof(SectionEnabled), isEnabledByDefault, "Should rules in this section be applied");
            ItemListType      = file.Bind(SectionName, nameof(ItemListType), ListType.Blacklist, "Blacklist - show everything except selected items. Whitelist - show only selected items");
            EquipmentListType = file.Bind(SectionName, nameof(EquipmentListType), ListType.Blacklist, "Blacklist - show everything except selected items. Whitelist - show only selected items");
            ItemList          = file.Bind(SectionName, nameof(ItemList), "", "Selected items for this section");
            EquipmentList     = file.Bind(SectionName, nameof(EquipmentList), "", "Selected equipment for this section");

            try
            {
                Items.Clear();
                Items.AddRange(ItemList.Value
                               .Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                               .Select(el => el.Trim())
                               .Distinct());
            }
            catch (Exception e)
            {
                PartialItemDisplayPlugin.InstanceLogger.LogWarning("Failed to parse `ItemList` config");
                PartialItemDisplayPlugin.InstanceLogger.LogError(e);
            }

            try
            {
                Equipments.Clear();
                Equipments.AddRange(EquipmentList.Value
                                    .Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries)
                                    .Select(el => el.Trim())
                                    .Distinct());
            }
            catch (Exception e)
            {
                PartialItemDisplayPlugin.InstanceLogger.LogWarning("Failed to parse `EquipmentList` config");
                PartialItemDisplayPlugin.InstanceLogger.LogError(e);
            }
        }
예제 #21
0
        private static void HeadHunterConfigs(ConfigFile Config)
        {
            HeadHunterBaseDuration = Config.Bind(
                "1a-Headhunter", "hunterBaseBuffDuration", 20f,
                "Base duration of buff effect."
                );
            HeadHunterStackDuration = Config.Bind(
                "1a-Headhunter", "hunterAddedBuffDuration", 10f,
                "Added duration of buff effect per stack."
                );



            HeadHunterBuffEnable = Config.Bind(
                "1b-HeadhunterBuff", "hunterBuffEnable", true,
                "Killing elites also grants stat buffs."
                );
            HeadHunterBuffHealth = Config.Bind(
                "1b-HeadhunterBuff", "hunterIncreasedHealth", 0.05f,
                "Increased health per headhunter buff."
                );
            HeadHunterBuffArmor = Config.Bind(
                "1b-HeadhunterBuff", "hunterIncreasedArmor", 2f,
                "Increased armor per headhunter buff."
                );
            HeadHunterBuffMovementSpeed = Config.Bind(
                "1b-HeadhunterBuff", "hunterIncreasedMovementSpeed", 0.05f,
                "Increased movement speed per headhunter buff."
                );
            HeadHunterBuffDamage = Config.Bind(
                "1b-HeadhunterBuff", "hunterIncreasedDamage", 0.02f,
                "Increased damage per headhunter buff."
                );
            HeadHunterBuffAttackSpeed = Config.Bind(
                "1b-HeadhunterBuff", "hunterIncreasedAttackSpeed", 0.02f,
                "Increased attack speed per headhunter buff."
                );
            HeadHunterBuffCritChance = Config.Bind(
                "1b-HeadhunterBuff", "hunterIncreasedCritChance", 2f,
                "Increased crit chance per headhunter buff."
                );
        }
예제 #22
0
        public static void Awake(ConfigFile Config)
        {
            Enabled = Config.Bind(SECTION, "#是否启用", true, DESCRIPTION_ENABLED);

            CaressKey      = Config.Bind(SECTION, /*"Caress"*/ "01.爱抚", new KeyboardShortcut(KeyCode.Keypad4));
            ServiceKey     = Config.Bind(SECTION, /*"Service"*/ "02.侍奉", new KeyboardShortcut(KeyCode.Keypad5));
            IntercourseKey = Config.Bind(SECTION, /*"Intercourse"*/ "03.插入", new KeyboardShortcut(KeyCode.Keypad6));
            SpecialKey     = Config.Bind(SECTION, /*"Special"*/ "04.特殊", new KeyboardShortcut(KeyCode.Keypad1));
            LesbianKey     = Config.Bind(SECTION, /*"Lesbian"*/ "05.百合", new KeyboardShortcut(KeyCode.Keypad2));
            GroupKey       = Config.Bind(SECTION, /*"Group"*/ "06.多人", new KeyboardShortcut(KeyCode.Keypad3));

            Subscription.Subscribe(typeof(HMacro), Enabled, Update);
        }
예제 #23
0
        public static void Awake(ConfigFile Config)
        {
            Enabled = Config.Bind(SECTION, "__Enabled", true, DESCRIPTION_ENABLED);

            CaressKey      = Config.Bind(SECTION, "Caress", new KeyboardShortcut(KeyCode.Keypad4));
            ServiceKey     = Config.Bind(SECTION, "Service", new KeyboardShortcut(KeyCode.Keypad5));
            IntercourseKey = Config.Bind(SECTION, "Intercourse", new KeyboardShortcut(KeyCode.Keypad6));
            SpecialKey     = Config.Bind(SECTION, "Special", new KeyboardShortcut(KeyCode.Keypad1));
            LesbianKey     = Config.Bind(SECTION, "Lesbian", new KeyboardShortcut(KeyCode.Keypad2));
            GroupKey       = Config.Bind(SECTION, "Group", new KeyboardShortcut(KeyCode.Keypad3));

            Subscription.Subscribe(typeof(HMacro), Enabled, Update);
        }
예제 #24
0
        public static void SetupConfig(ConfigFile config)
        {
            ShotSpread_EnableDML = config.Bind(CategoryNameShotSpread, "Disposable Missile Launcher", true, "If enabled, Shot Spread will affect the Disposable Missile Launcher. " +
                                               "\nThis tends to make it fire forwards rather than vertically, but shouldn't affect its homing.").Value;
            ShotSpread_EnableLoader         = config.Bind(CategoryNameShotSpread, "Loader Hooks", false, "If enabled, Shot Spread will affect Loader's Hooks.").Value;
            ShotSpread_WhitelistProjectiles = config.Bind(CategoryNameShotSpread, "Whitelisted Projectiles", true, "If enabled, Shot Spread will only tighten the spread of SPECIFIC projectiles." +
                                                          "\nIt is HIGHLY recommended not to disable, because alot of projectiles could break otherwise.").Value;
            AutoDownloadUpdates = config.Bind(CategoryNameShotSpread, "Autodownload updates",
                                              true, "If enabled, then the mod will autodownload the latest modded projectile names on startup. These are added manually.").Value;

            if (ShotSpread_EnableDML)
            {
                WhitelistedProjectiles.Add(Resources.Load <GameObject>("Prefabs/Projectiles/MissileProjectile"));
            }
            if (ShotSpread_EnableLoader)
            {
                WhitelistedProjectiles.Add(Resources.Load <GameObject>("prefabs/projectiles/LoaderHook"));
                WhitelistedProjectiles.Add(Resources.Load <GameObject>("prefabs/projectiles/LoaderYankHook"));
            }
            if (AutoDownloadUpdates)
            {
                DownloadNewProjectileNames();
            }
        }
예제 #25
0
 protected override void CreateConfig(ConfigFile config)
 {
     deathChanceInitial = config.Bind <float>("Item: " + ItemName, "Initial death chance", 3f, "Death % chance when getting the item for the first time.").Value;
     deathChanceStack   = config.Bind <float>("Item: " + ItemName, "Stack death chance", 3f, "Added death % chance when stacking the item.").Value;
     dupeChanceInitial  = config.Bind <float>("Item: " + ItemName, "Initial duplication chance", 8f, "Duplication % chance when getting the item for the first time.").Value;
     dupeChanceStack    = config.Bind <float>("Item: " + ItemName, "Stack duplication chance", 2.5f, "Added duplication % chance when stacking the item.").Value;
     //this is like doing just a if check but im kinda lazy to do it. useLuck = config.Bind<bool>("Item: " + ItemName, "Use luck", true, "Should master's luck affect the chances of instant death.").Value;
     onlySacrifice = config.Bind <bool>("Item: " + ItemName, "Sacrifice rolls with sacrifice on", true, "Whenever or not enemy drops from killing enemies should take place outside Sacrifice being activated. Turning it false would turn it into a clover-like effect.").Value;
     easyModo      = config.Bind <bool>("Item: " + ItemName, "Easy mode", false, "Should the item ignore damage sources like DoT and fall damage before rolling to see if the player should get obliterated.").Value;
 }
예제 #26
0
        public static void Patch(AssemblyDefinition assembly)
        {
            var config             = new ConfigFile(Utility.CombinePaths(Paths.ConfigPath, Common.GUID + ".cfg"), false);
            var disableNsfwSetting = config.Bind("General", "Disable NSFW content", false,
                                                 "Turn off content that can be considered NSFW. Changes take effect after game restart. Characters made in this mode work with no issues if NSFW is turned on and vice-versa." +
                                                 "\nDisables: free H, taking off underwear, genitalia, main game, NSFW items in maker and studio, some plugins." +
                                                 "\nPlease note that some NSFW or questionable content might still be accessible if this plugin doesn't know about it, of if this plugins encounters an issue. Always excercise caution, there is no warranty on this plugin and you are responsible for any bad outcomes when using this plugin.");

            var disableNsfw = disableNsfwSetting.Value;

            try
            {
                const string sfwPluginDll  = "KK_SFW_Plugin.dll";
                var          sfwPluginPath = Path.Combine(Paths.PluginPath, sfwPluginDll);

                if (disableNsfw)
                {
                    LogInfo("Enabling KK_SFW plugin");

                    File.Delete(sfwPluginPath);
                    File.WriteAllBytes(sfwPluginPath, ResourceUtils.GetEmbeddedResource(sfwPluginDll, typeof(SfwPatcher).Assembly));
                }
                else
                {
                    LogInfo("Disabling KK_SFW plugin");

                    File.Delete(sfwPluginPath);
                }
            }
            catch (UnauthorizedAccessException)
            {
                // Happens when another copy of the game is using the plugin already, safe to ignore
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }

            try
            {
                SetUpPlugins(disableNsfw);
                SetUpZipmods(disableNsfw);
            }
            catch (Exception e)
            {
                LogInfo("Failed to disable/enable plugins or mods - " + e);
            }
        }
예제 #27
0
 protected override void CreateConfig(ConfigFile config)
 {
     itemsToGive     = config.Bind <int>("Item: " + ItemName, "Available items per stack", 1, "Number of unique items each stack will give to a drone.").Value;
     itemAddStack    = config.Bind <int>("Item: " + ItemName, "Added items per stack", 3, "Maximum amount of stacks of the selected item the drone will get.").Value;
     itemGivingCap   = config.Bind <int>("Item: " + ItemName, "Max number of items given to a drone", -1, "Maximum number of items a drone can get from you, set to -1 for no limit.").Value;
     itemStackingCap = config.Bind <int>("Item: " + ItemName, "Max stack of items given to a drone", -1, "Maximum number of stacls a drone can get from you, set to -1 for no limit.").Value;
     //squidAllowed = config.Bind<bool>("Item: " + ItemName, "Combat Squids allowed", true, "Whenever to give combat squids items or not.").Value;
     useOrbs           = config.Bind <bool>("Item: " + ItemName, "Orb item transfer", true, "Whenever to create item orbs when transfering items.").Value;
     cappedByInventory = config.Bind <bool>("Item: " + ItemName, "Limited by inventory count", true, "Whenever drones should NOT get more unique items than you currently have.").Value;
 }
예제 #28
0
        public static void Initialize()
        {
            var config  = new ConfigFile(Path.Combine(Paths.ConfigPath, "CtorShotgun.cfg"), true);
            var targets = config.Bind("General", "Targets", "UnityEngine.dll, Assembly-CSharp.dll", "A comma delimited list of assemblies that will be patched");

            TargetDLLs = targets.Value.Split(',').Select(x => x.Trim()).ToArray();

            var filename = Path.GetFullPath($"cctors_{DateTime.Now.Ticks}.log");

            Trace.TraceInformation($"Writing cctor dump to {filename}");

            StreamWriter fs = File.CreateText(filename);

            fs.AutoFlush = true;
            tickWriter   = fs;
        }
        public static KeyValuePair <string, float> BindStationRange(string stationName)
        {
            KeyValuePair <string, float> stationNameRangePair = new KeyValuePair <string, float>(
                stationName,
                Math.Abs(config.Bind(
                             "CraftingStationRange",
                             stationName,
                             (float)0.0,
                             "This crafting stations range."
                             ).Value)
                );

            stationRanges.Add(stationNameRangePair);

            return(stationNameRangePair);
        }
예제 #30
0
            public static void Init(ConfigFile config)
            {
                const string name = "ToolKit";

                Enabled          = config.Bind(name, "Enabled", true, "Activate the VHToolKit");
                InfiniteStamina  = config.Bind(name, "InfiniteStamina", true, "Inifinite Stamina");
                NotEncumbered    = config.Bind(name, "NotEncumbered", true, "Never Encumbered");
                PreserveSkills   = config.Bind(name, "PreserveSkills", true, "Preserve skills after death");
                WaterWalker      = config.Bind(name, "WaterWalk", true, "Walking on water");
                VHToolkit_Hotkey = config.Bind(name, "VHToolkit_Hotkey", "F4", "VHToolkit hotkey");
            }