override protected void Initialize() { _areasToggle = CreateSetting(nameof(_areasToggle), false); _areasMode = CreateSetting(nameof(_areasMode), ResetMode.Timer); _areasTimer = CreateSetting(nameof(_areasTimer), AREAS_RESET_HOURS.Div(TIME_UNIT).Round(), IntRange(0, 100)); _areasTimerSinceReset = CreateSetting(nameof(_areasTimerSinceReset), AREAS_RESET_HOURS.Div(TIME_UNIT).Round(), IntRange(0, 100)); _areasResetLayers = CreateSetting(nameof(_areasResetLayers), (AreasResetLayers)((1 << 8) - 1)); _fixUnarmedBandits = CreateSetting(nameof(_fixUnarmedBandits), WeaponSet.Disabled); _fixUnarmedBanditsDurabilityRatio = CreateSetting(nameof(_fixUnarmedBanditsDurabilityRatio), 100, IntRange(0, 100)); _gatherablesToggle = CreateSetting(nameof(_gatherablesToggle), false); _gatheringMode = CreateSetting(nameof(_gatheringMode), ResetMode.Timer); _gatheringTimer = CreateSetting(nameof(_gatheringTimer), PICKUP_RESET_HOURS.Div(TIME_UNIT).Round(), IntRange(1, 100)); _miningMode = CreateSetting(nameof(_miningMode), ResetMode.Timer); _miningTimer = CreateSetting(nameof(_miningTimer), PICKUP_RESET_HOURS.Div(TIME_UNIT).Round(), IntRange(1, 100)); _fishingMode = CreateSetting(nameof(_fishingMode), ResetMode.Timer); _fishingTimer = CreateSetting(nameof(_fishingTimer), FISHING_RESET_HOURS.Div(TIME_UNIT).Round(), IntRange(1, 100)); _merchantsToggle = CreateSetting(nameof(_merchantsToggle), false); _merchantsMode = CreateSetting(nameof(_merchantsMode), ResetMode.Timer); _merchantsTimer = CreateSetting(nameof(_merchantsTimer), MERCHANTS_RESET_HOURS.Div(TIME_UNIT).Round(), IntRange(1, 100)); _areasTimer.AddEvent(() => _areasTimerSinceReset.Value = _areasTimerSinceReset.Value.ClampMin(_areasTimer)); _areasTimerSinceReset.AddEvent(() => _areasTimer.Value = _areasTimer.Value.ClampMax(_areasTimerSinceReset)); }
static void Gatherable_StartInit_Post(Gatherable __instance) { #region quit if (!_gatherablesToggle) { return; } #endregion // Choose appropriate mode and timer ModSetting <ResetMode> mode = _gatheringMode; ModSetting <int> timer = _gatheringTimer; if (__instance.RequiredItem != null) { if (__instance.RequiredItem.ItemID == MINING_PICK_ID) { mode = _miningMode; timer = _miningTimer; } else if (__instance.RequiredItem.ItemID == FISHING_HARPOON_ID) { mode = _fishingMode; timer = _fishingTimer; } } // Calculat reset time based on mode float resetTime = 1 / 300f; // 500ms in realtime if (mode == ResetMode.Never) { resetTime = float.PositiveInfinity; } else if (mode == ResetMode.Timer) { resetTime = timer * TIME_UNIT; } // Execute foreach (var dropable in __instance.m_drops) { foreach (var dropTable in dropable.m_mainDropTables) { SimpleRandomChance dropAmount = dropTable.m_dropAmount; if (dropAmount.ChanceRegenDelay > 1) { dropAmount.m_chanceRegenDelay = resetTime; } foreach (var itemDropChance in dropTable.m_itemDrops) { if (itemDropChance.ChanceRegenDelay > 1) { itemDropChance.ChanceRegenDelay = resetTime; } } } } }
override protected void Initialize() { _meleeDistance = CreateSetting(nameof(_meleeDistance), 20, IntRange(0, 100)); _rangedDistance = CreateSetting(nameof(_rangedDistance), 20, IntRange(0, 100)); _huntersEyeDistance = CreateSetting(nameof(_huntersEyeDistance), 40, IntRange(0, 100)); _rangedEquipmentTypes = CreateSetting(nameof(_rangedEquipmentTypes), RangedTypes.Bow); _autoTargetActions = CreateSetting(nameof(_autoTargetActions), AutoTargetActions.None); _targetingPitchOffset = CreateSetting(nameof(_targetingPitchOffset), 0f, FloatRange(0, 1)); }
override protected void Initialize() { _separateLimits = CreateSetting(nameof(_separateLimits), false); _skillsLimit = CreateSetting(nameof(_skillsLimit), 20, IntRange(1, 100)); _passiveSkillsLimit = CreateSetting(nameof(_passiveSkillsLimit), 5, IntRange(1, 25)); _activeSkillsLimit = CreateSetting(nameof(_activeSkillsLimit), 15, IntRange(1, 75)); _limitedSkillTypes = CreateSetting(nameof(_limitedSkillTypes), (LimitedSkillTypes) ~0); _freePostBreakthroughBasicSkills = CreateSetting(nameof(_freePostBreakthroughBasicSkills), false); }
override protected void Initialize() { _key = CreateSetting(nameof(_key), "LeftAlt"); _walkSpeed = CreateSetting(nameof(_walkSpeed), 35, IntRange(0, 100)); _doubleTapToToggle = CreateSetting(nameof(_doubleTapToToggle), true); _doubleTapWaitTime = CreateSetting(nameof(_doubleTapWaitTime), 500, IntRange(0, 1000)); _modifier = 1f; _lastKeyPressTime = float.NegativeInfinity; }
override protected void Initialize() { _preserveDurability = CreateSetting(nameof(_preserveDurability), false); _autoLearnCrystalPowderRecipe = CreateSetting(nameof(_autoLearnCrystalPowderRecipe), true); _restoreMissingDurability = CreateSetting(nameof(_restoreMissingDurability), 50, IntRange(0, 100)); _limitedManualCrafting = CreateSetting(nameof(_limitedManualCrafting), false); _limitedManulCraftingExceptions = CreateSetting(nameof(CraftingExceptions), (CraftingExceptions) ~0); _extraResultsMultiplier = CreateSetting(nameof(_extraResultsMultiplier), 100, IntRange(0, 200)); _crystalPowderRecipe = FindCrystalPowderRecipe(); }
override protected void Initialize() { _enemyDetectionModifier = CreateSetting(nameof(_enemyDetectionModifier), 0, IntRange(-100, +100)); _preventInfighting = CreateSetting(nameof(_preventInfighting), (TargetingGroups)0); _changeTargetOnHit = CreateSetting(nameof(_changeTargetOnHit), 50, IntRange(0, 100)); _walkTowardsPlayerOnSpawn = CreateSetting(nameof(_walkTowardsPlayerOnSpawn), 50, IntRange(0, 100)); _changeTargetWhenTooFar = CreateSetting(nameof(_changeTargetWhenTooFar), false); _changeTargetCheckFrequency = CreateSetting(nameof(_changeTargetCheckFrequency), 2, IntRange(1, 10)); _changeTargetChancePerCheck = CreateSetting(nameof(_changeTargetChancePerCheck), 25, IntRange(1, 100)); _changeTargetCurrentToNearestRatio = CreateSetting(nameof(_changeTargetCurrentToNearestRatio), 1.5f, FloatRange(1f, 2f)); _changeTargetDetectAllPlayers = CreateSetting(nameof(_changeTargetDetectAllPlayers), true); }
private void CreateMainToggle() { _mainToggle = new ModSetting <Toggles>(SectionName, nameof(_mainToggle), Toggles.None) { SectionOverride = SectionOverride, DisplayResetButton = false, Description = Description, }; _mainToggle.Format(ModName ?? SectionName.SplitCamelCase()); _mainToggle.AddEvent(OnTogglesChanged); _previousMainToggle = _mainToggle; }
override protected void Initialize() { _moreGatheringTools = CreateSetting(nameof(_moreGatheringTools), false); _gatheringDurabilityCost = CreateSetting(nameof(_gatheringDurabilityCost), new Vector2(0f, 5f)); _chanceToBreakFlintAndSteel = CreateSetting(nameof(_chanceToBreakFlintAndSteel), 0, IntRange(0, 100)); _waterskinCapacity = CreateSetting(nameof(_waterskinCapacity), 5, IntRange(1, 18)); _remapBackpackCapacities = CreateSetting(nameof(_remapBackpackCapacities), new Vector2(PRIMITIVE_SATCHEL_CAPACITY, TRADER_BACKPACK)); _torchesTemperatureRadius = CreateSetting(nameof(_torchesTemperatureRadius), 1f, FloatRange(0, 10)); _torchesDecayOnGround = CreateSetting(nameof(_torchesDecayOnGround), false); _lightsRange = CreateSetting(nameof(_lightsRange), 100, IntRange(50, 200)); _twoPersonBeds = CreateSetting(nameof(_twoPersonBeds), false); }
override protected void Initialize() { _groundInteractions = CreateSetting(nameof(_groundInteractions), GroundInteractions.None); _singleHoldsToPresses = CreateSetting(nameof(_singleHoldsToPresses), false); _holdInteractionsDuration = CreateSetting(nameof(_holdInteractionsDuration), GameInput.HOLD_THRESHOLD + GameInput.HOLD_DURATION, FloatRange(0.1f + GameInput.HOLD_THRESHOLD, 5f)); _takeAnimations = CreateSetting(nameof(_takeAnimations), false); _swapWaterInteractions = CreateSetting(nameof(_swapWaterInteractions), false); _disallowedInCombat = CreateSetting(nameof(_disallowedInCombat), DisallowedInCombat.None); _highlightsToggle = CreateSetting(nameof(_highlightsToggle), false); _highlightsIntensity = CreateSetting(nameof(_highlightsIntensity), 100, IntRange(0, 200)); _highlightsDistance = CreateSetting(nameof(_highlightsDistance), 30, IntRange(0, 50)); _highlightsColored = CreateSetting(nameof(_highlightsColored), false); }
override protected void Initialize() { _contextualSkillQuickslots = CreateSetting(nameof(_contextualSkillQuickslots), false); _replaceQuickslotsOnEquip = CreateSetting(nameof(_replaceQuickslotsOnEquip), false); _assingByUsingFreeQuickslot = CreateSetting(nameof(_assingByUsingFreeQuickslot), false); _extraGamepadQuickslots = CreateSetting(nameof(_extraGamepadQuickslots), false); _skillContextsByID = new Dictionary <int, SkillContext>(); foreach (var group in SKILL_CONTEXT_GROUPS) { foreach (var skillByType in group.Value) { _skillContextsByID.Add(skillByType.Value, group.Key); } } }
static private void CreateSetting(List <AMod> mods) { List <string> names = new List <string>(); foreach (var preset in Utility.GetEnumValues <Preset>()) { names.Add(PresetToName(preset)); } _presetToLoad = new ModSetting <string>("", nameof(_presetToLoad), PresetToName(Preset.None), new AcceptableValueList <string>(names.ToArray())); _presetToLoad.Format("Load preset"); _presetToLoad.IsAdvanced = true; _presetToLoad.DisplayResetButton = false; _presetToLoad.AddEvent(() => LoadChosenPreset(mods)); }
override protected void Initialize() { _playersToggle = CreateSetting(nameof(_playersToggle), false); _playersHealthDamage = CreateSetting(nameof(_playersHealthDamage), 100, IntRange(0, 200)); _playersStabilityDamage = CreateSetting(nameof(_playersStabilityDamage), 100, IntRange(0, 200)); _playersFriendlyFireToggle = CreateSetting(nameof(_playersFriendlyFireToggle), false); _playersFriendlyFireHealthDamage = CreateSetting(nameof(_playersFriendlyFireHealthDamage), 100, IntRange(0, 200)); _playersFriendlyFireStabilityDamage = CreateSetting(nameof(_playersFriendlyFireStabilityDamage), 100, IntRange(0, 200)); _enemiesToggle = CreateSetting(nameof(_enemiesToggle), false); _enemiesHealthDamage = CreateSetting(nameof(_enemiesHealthDamage), 100, IntRange(0, 200)); _enemiesStabilityDamage = CreateSetting(nameof(_enemiesStabilityDamage), 100, IntRange(0, 200)); _enemiesFriendlyFireToggle = CreateSetting(nameof(_enemiesFriendlyFireToggle), false); _enemiesFriendlyFireHealthDamage = CreateSetting(nameof(_enemiesFriendlyFireHealthDamage), 100, IntRange(0, 200)); _enemiesFriendlyFireStabilityDamage = CreateSetting(nameof(_enemiesFriendlyFireStabilityDamage), 100, IntRange(0, 200)); }
override protected void Initialize() { _trapsArmDelay = CreateSetting(nameof(_trapsArmDelay), 0f, FloatRange(0f, 5f)); _trapsFriendlyFire = CreateSetting(nameof(_trapsFriendlyFire), false); _wireTrapDepth = CreateSetting(nameof(_wireTrapDepth), 0.703f, FloatRange(0f, 5f)); _pressureTrapRadius = CreateSetting(nameof(_pressureTrapRadius), 1.1f, FloatRange(0f, 5f)); _runicTrapRadius = CreateSetting(nameof(_runicTrapRadius), 2.5f, FloatRange(0f, 5f)); _trapsArmDelay.AddEvent(() => { if (_trapsArmDelay == 0) { _trapsFriendlyFire.Value = false; } }); }
override protected void Initialize() { _pricesCurve = CreateSetting(nameof(_pricesCurve), 100, IntRange(50, 100)); _sellModifier = CreateSetting(nameof(_sellModifier), DEFAULT_SELL_MODIFIER.Mul(100f).Round(), IntRange(0, 100)); _pricesPerTypeToggle = CreateSetting(nameof(_pricesPerTypeToggle), false); _pricesWeapons = CreateSetting(nameof(_pricesWeapons), 100, IntRange(0, 200)); _pricesArmors = CreateSetting(nameof(_pricesArmors), 100, IntRange(0, 200)); _pricesIngestibles = CreateSetting(nameof(_pricesIngestibles), 100, IntRange(0, 200)); _pricesRecipes = CreateSetting(nameof(_pricesRecipes), 100, IntRange(0, 200)); _pricesOther = CreateSetting(nameof(_pricesOther), 100, IntRange(0, 200)); _pricesGold = CreateSetting(nameof(_pricesGold), 100f.ToVector2()); _randomizePricesExtent = CreateSetting(nameof(_randomizePricesExtent), 0, IntRange(0, 100)); _randomizePricesPerDays = CreateSetting(nameof(_randomizePricesPerDays), 7, IntRange(1, 100)); _randomizePricesPerItem = CreateSetting(nameof(_randomizePricesPerItem), true); _randomizePricesPerArea = CreateSetting(nameof(_randomizePricesPerArea), true); }
override protected void Initialize() { _gameToggle = CreateSetting(nameof(_gameToggle), false); _defaultGameSpeed = CreateSetting(nameof(_defaultGameSpeed), 100, IntRange(0, 200)); _speedHackMultiplier = CreateSetting(nameof(_speedHackMultiplier), 300, IntRange(0, 500)); _speedHackKey = CreateSetting(nameof(_speedHackKey), ""); _playersToggle = CreateSetting(nameof(_playersToggle), false); _playersAnimationSpeed = CreateSetting(nameof(_playersAnimationSpeed), 100, IntRange(0, 200)); _playersMovementSpeed = CreateSetting(nameof(_playersMovementSpeed), 100, IntRange(0, 200)); _playersAttackSpeed = CreateSetting(nameof(_playersAttackSpeed), 100, IntRange(0, 200)); _enemiesToggle = CreateSetting(nameof(_enemiesToggle), false); _enemiesAnimationSpeed = CreateSetting(nameof(_enemiesAnimationSpeed), 100, IntRange(0, 200)); _enemiesMovementSpeed = CreateSetting(nameof(_enemiesMovementSpeed), 100, IntRange(0, 200)); _enemiesAttackSpeed = CreateSetting(nameof(_enemiesAttackSpeed), 100, IntRange(0, 200)); AddEventOnConfigClosed(UpdateDefaultGameSpeed); }
override protected void Initialize() { _campingSpots = CreateSetting(nameof(_campingSpots), (CampingSpots) ~0); _butterfliesSpawnChance = CreateSetting(nameof(_butterfliesSpawnChance), 100, IntRange(0, 100)); _butterfliesRadius = CreateSetting(nameof(_butterfliesRadius), 25, IntRange(5, 50)); _campingActivities = CreateSetting(nameof(_campingActivities), (CampingActivities) ~0); _campingSpots.AddEvent(() => { if (_campingSpots.Value.HasFlag(CampingSpots.OpenRegions)) { _campingSpots.SetSilently(_campingSpots.Value | CampingSpots.Butterflies); } }); AddEventOnConfigClosed(SetButterfliesRadius); _safeZoneColliders = new List <SphereCollider>(); }
static void ItemDetailsDisplay_RefreshDetails_Post(ItemDetailsDisplay __instance) { Item item = __instance.m_lastItem; GameObject durabilityHolder = __instance.m_durabilityHolder; #region quit if (!_barsToggle || item == null || durabilityHolder == null) { return; } #endregion // Cache RectTransform rectTransform = durabilityHolder.GetComponent <RectTransform>(); bool isFood = item.m_perishScript != null && item.IsNot <Equipment>(); ModSetting <int> barSize = isFood ? _freshnessBarSize : _durabilityBarSize; float curve = isFood ? FRESHNESS_BAR_SCALING_CURVE : DURABILITY_BAR_SCALING_CURVE; // Calculate automated values float rawSize = float.NaN; if (_freshnessTiedToLifespan && isFood) { float decayRate = item.PerishScript.m_baseDepletionRate; float decayTime = 100f / (decayRate * 24f); rawSize = decayTime / FRESHNESS_LIFESPAN_MAX; } else if (_durabilityTiedToMax && !isFood) { rawSize = item.MaxDurability / DURABILITY_MAX_MAX; } if (!rawSize.IsNaN()) { barSize.Value = rawSize.Pow(curve).MapFrom01(0, 100f).Round(); } // Assign float sizeOffset = barSize / 100f * BAR_MAX_SIZE.x - 1f; rectTransform.pivot = BAR_PIVOT; rectTransform.localScale = new Vector2(1f + sizeOffset, _barThickness / 100f * BAR_MAX_SIZE.y); }
override protected void Initialize() { _enableCheats = CreateSetting(nameof(_enableCheats), false); _enableCheatsHotkey = CreateSetting(nameof(_enableCheatsHotkey), ""); _skipStartupVideos = CreateSetting(nameof(_skipStartupVideos), false); _armorSlotsToHide = CreateSetting(nameof(_armorSlotsToHide), ArmorSlots.None); _removeCoopScaling = CreateSetting(nameof(_removeCoopScaling), false); _removeDodgeInvulnerability = CreateSetting(nameof(_removeDodgeInvulnerability), false); _healEnemiesOnLoad = CreateSetting(nameof(_healEnemiesOnLoad), false); _multiplicativeStacking = CreateSetting(nameof(_multiplicativeStacking), false); _armorTrainingPenaltyReduction = CreateSetting(nameof(_armorTrainingPenaltyReduction), 50, IntRange(0, 100)); _applyArmorTrainingToManaCost = CreateSetting(nameof(_applyArmorTrainingToManaCost), false); _loadArrowsFromInventory = CreateSetting(nameof(_loadArrowsFromInventory), false); _baseStaminaRegen = CreateSetting(nameof(_baseStaminaRegen), 2.4f, FloatRange(0, 10)); _titleScreenRandomize = CreateSetting(nameof(_titleScreenRandomize), (TitleScreens)0); _titleScreenHideCharacters = CreateSetting(nameof(_titleScreenHideCharacters), TitleScreenCharacterVisibility.Enable); _craftFromStash = CreateSetting(nameof(_craftFromStash), false); _displayStashAmount = CreateSetting(nameof(_displayStashAmount), false); _displayPricesInStash = CreateSetting(nameof(_displayPricesInStash), false); _itemActionDropOne = CreateSetting(nameof(_displayStashAmount), false); _temperatureToggle = CreateSetting(nameof(_temperatureToggle), false); _temperatureDataByEnum = new Dictionary <TemperatureSteps, ModSetting <Vector2> >(); foreach (var step in Utility.GetEnumValues <TemperatureSteps>()) { if (step != TemperatureSteps.Count) { _temperatureDataByEnum.Add(step, CreateSetting(nameof(_temperatureDataByEnum) + step, DEFAULT_TEMPERATURE_DATA_BY_ENUM[step])); } } _enableCheats.AddEvent(() => Global.CheatsEnabled = _enableCheats); AddEventOnConfigClosed(() => { foreach (var player in Players.Local) { UpdateBaseStaminaRegen(player.Stats); } TryUpdateTemperatureData(); }); }
override protected void Initialize() { _details = CreateSetting(nameof(_details), Details.None); _equipmentToggle = CreateSetting(nameof(_equipmentToggle), false); _displayRelativeAttackSpeed = CreateSetting(nameof(_displayRelativeAttackSpeed), false); _normalizeImpactDisplay = CreateSetting(nameof(_normalizeImpactDisplay), false); _moveBarrierBelowProtection = CreateSetting(nameof(_moveBarrierBelowProtection), false); _hideNumericalDurability = CreateSetting(nameof(_hideNumericalDurability), false); _barsToggle = CreateSetting(nameof(_barsToggle), false); _durabilityTiedToMax = CreateSetting(nameof(_durabilityTiedToMax), false); _durabilityBarSize = CreateSetting(nameof(_durabilityBarSize), (100 / BAR_MAX_SIZE.x).Round(), IntRange(0, 100)); _freshnessTiedToLifespan = CreateSetting(nameof(_freshnessTiedToLifespan), false); _freshnessBarSize = CreateSetting(nameof(_freshnessBarSize), (100 / BAR_MAX_SIZE.x).Round(), IntRange(0, 100)); _barThickness = CreateSetting(nameof(_barThickness), (100 / BAR_MAX_SIZE.y).Round(), IntRange(0, 100)); _addBackgrounds = CreateSetting(nameof(_addBackgrounds), false); AddEventOnConfigClosed(() => SetBackgrounds(_addBackgrounds)); _rowsCache = new RowsCache(); }
override protected void Initialize() { _interactionToggle = CreateSetting(nameof(_interactionToggle), false); _interactionDuration = CreateSetting(nameof(_interactionDuration), GameInput.HOLD_THRESHOLD + GameInput.HOLD_DURATION, FloatRange(0.1f + GameInput.HOLD_THRESHOLD, 5f)); _interactionDistance = CreateSetting(nameof(_interactionDistance), ITEM_INTERACT_RADIUS + PLAYER_INTERACT_RADIUS, FloatRange(0.1f + PLAYER_INTERACT_RADIUS, 5f)); _interactionPrioritize = CreateSetting(nameof(_interactionPrioritize), false); _maxVitalsToggle = CreateSetting(nameof(_maxVitalsToggle), false); _maxHealthLost = CreateSetting(nameof(_maxHealthLost), -50, IntRange((int)(-100 * HEALTH_STAMINA_BURN_MAX_RATIO), -0)); _maxStaminaLost = CreateSetting(nameof(_maxStaminaLost), -0, IntRange((int)(-100 * HEALTH_STAMINA_BURN_MAX_RATIO), -0)); _maxManaLost = CreateSetting(nameof(_maxManaLost), -0, IntRange((int)(-100 * MANA_BURN_MAX_RATIO), -0)); _vitalsToggle = CreateSetting(nameof(_vitalsToggle), false); _newHealth = CreateSetting(nameof(_newHealth), +100, IntRange(+1, +100)); _newStamina = CreateSetting(nameof(_newStamina), +100, IntRange(+0, +100)); _manaLost = CreateSetting(nameof(_manaLost), -0, IntRange(-100, -0)); _needsToggle = CreateSetting(nameof(_needsToggle), false); _foodLost = CreateSetting(nameof(_foodLost), -0, IntRange((int)(-100 * NEED_LOST_ON_REVIVE_MAX_RATIO), -0)); _drinkLost = CreateSetting(nameof(_drinkLost), -0, IntRange((int)(-100 * NEED_LOST_ON_REVIVE_MAX_RATIO), -0)); _sleepLost = CreateSetting(nameof(_sleepLost), -0, IntRange((int)(-100 * NEED_LOST_ON_REVIVE_MAX_RATIO), -0)); _corruptionGained = CreateSetting(nameof(_corruptionGained), +0, IntRange(+0, +100)); }
override protected void Initialize() { _lossMultipliers = CreateSetting(nameof(_lossMultipliers), false); _lossWeapons = CreateSetting(nameof(_lossWeapons), 100, IntRange(0, 200)); _lossArmors = CreateSetting(nameof(_lossArmors), 100, IntRange(0, 200)); _lossLights = CreateSetting(nameof(_lossLights), 100, IntRange(0, 200)); _lossIngestibles = CreateSetting(nameof(_lossIngestibles), 100, IntRange(0, 200)); _campingRepairToggle = CreateSetting(nameof(_campingRepairToggle), false); _repairDurabilityPerHour = CreateSetting(nameof(_repairDurabilityPerHour), 0, IntRange(0, 100)); _repairDurabilityPercentPerHour = CreateSetting(nameof(_repairDurabilityPercentPerHour), 10, IntRange(0, 100)); _repairPercentReference = CreateSetting(nameof(_repairPercentReference), RepairPercentReference.OfMaxDurability); _multiRepairBehaviour = CreateSetting(nameof(_multiRepairBehaviour), MultiRepairBehaviour.UseFixedValueForAllItems); _fastMaintenanceMultiplier = CreateSetting(nameof(_fastMaintenanceMultiplier), 150, IntRange(100, 200)); _effectivenessAffectsAllStats = CreateSetting(nameof(_effectivenessAffectsAllStats), false); _effectivenessAffectsPenalties = CreateSetting(nameof(_effectivenessAffectsPenalties), false); _linearEffectiveness = CreateSetting(nameof(_linearEffectiveness), false); _minNonBrokenEffectiveness = CreateSetting(nameof(_minNonBrokenEffectiveness), 50, IntRange(0, 100)); _brokenEffectiveness = CreateSetting(nameof(_brokenEffectiveness), 15, IntRange(0, 100)); _smithRepairsOnlyEquipped = CreateSetting(nameof(_smithRepairsOnlyEquipped), false); _minStartingDurability = CreateSetting(nameof(_minStartingDurability), 100, IntRange(0, 100)); }
override protected void Initialize() { _formulaToggle = CreateSetting(nameof(_formulaToggle), false); _formulaCoeffsByLevel = new Dictionary <SlotLevel, ModSetting <Vector4> >(); foreach (var level in Utility.GetEnumValues <SlotLevel>()) { Vector4 initialPrice = Vector4.zero; switch (level) { case SlotLevel.Basic: initialPrice.x = 50; break; case SlotLevel.Breakthrough: initialPrice.x = 500; break; case SlotLevel.Advanced: initialPrice.x = 600; break; } _formulaCoeffsByLevel.Add(level, CreateSetting(nameof(_formulaCoeffsByLevel) + level, initialPrice)); } _formulaType = CreateSetting(nameof(_formulaType), FormulaType.Linear); _learnMutuallyExclusiveSkills = CreateSetting(nameof(_learnMutuallyExclusiveSkills), false); _exclusiveSkillCostsTsar = CreateSetting(nameof(_exclusiveSkillCostsTsar), false); _exclusiveSkillCostMultiplier = CreateSetting(nameof(_exclusiveSkillCostMultiplier), 300, IntRange(100, 500)); _exclusiveSkillRequirement = new SkillRequirement("Tsar Stone"); }
public void Format(string displayName, ModSetting <bool> toggle) => Format(displayName, toggle, true);
public void Format <T>(string displayName, ModSetting <T> controller, T value, bool positiveTest = true) where T : struct { Format(displayName); AddVisibilityControl(controller, value, positiveTest); }
override protected void Initialize() { _betterStashNavigation = CreateSetting(nameof(_betterStashNavigation), false); }