Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of ImpactfulSkills v0.26.0
plugins/ImpactfulSkills.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using ImpactfulSkills.common; using ImpactfulSkills.compatibility; using ImpactfulSkills.modules; using ImpactfulSkills.modules.Multiplant; using ImpactfulSkills.patches; using Jotunn.Configs; using Jotunn.Entities; using Jotunn.Extensions; using Jotunn.Managers; using Jotunn.Utils; using SimpleJson; using Splatform; using TMPro; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("ImpactfulSkills")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ImpactfulSkills")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("e3243d22-4307-4008-ba36-9f326008cde5")] [assembly: AssemblyFileVersion("0.26.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.26.0.0")] namespace ImpactfulSkills { internal class ValConfig { private const bool UseNumberedSections = false; public static ConfigFile cfg; public static ConfigEntry<bool> EnableDebugMode; public const string cfgFolder = "ImpactfulSkills"; public static bool AOEFeaturesEnabled = true; public static ConfigEntry<KeyboardShortcut> AOEToggleHotkey; public static ConfigEntry<bool> EnableUnlockMessages; public static ConfigEntry<bool> ShowUnlockMessages; public static ConfigEntry<bool> EnableWoodcutting; public static ConfigEntry<float> WoodCuttingDmgMod; public static ConfigEntry<float> WoodCuttingLootFactor; public static ConfigEntry<bool> WoodcuttingBonusesPastLevel100; public static ConfigEntry<bool> EnableMining; public static ConfigEntry<float> MiningDmgMod; public static ConfigEntry<float> MiningLootFactor; public static ConfigEntry<float> MiningAOERange; public static ConfigEntry<float> MiningAOELevel; public static ConfigEntry<bool> EnableMiningAOE; public static ConfigEntry<bool> EnableMiningRockBreaker; public static ConfigEntry<bool> ProtectLeviathansWhenMined; public static ConfigEntry<float> RockBreakerMaxChance; public static ConfigEntry<int> RockBreakerRequiredLevel; public static ConfigEntry<float> RockBreakerDamage; public static ConfigEntry<int> MinehitsPerInterval; public static ConfigEntry<float> ChanceForAOEOnHit; public static ConfigEntry<bool> SkillLevelBonusEnabledForMiningDropChance; public static ConfigEntry<bool> ChanceForAOEOnHitScalesWithSkill; public static ConfigEntry<bool> EnableMiningCritHit; public static ConfigEntry<int> RequiredLevelForMiningCrit; public static ConfigEntry<float> ChanceForMiningCritHit; public static ConfigEntry<float> CriticalHitDmgMult; public static ConfigEntry<bool> SkipNonRockDropIncreases; public static ConfigEntry<bool> ReducedChanceDropsForLowAmountDrops; public static ConfigEntry<float> DistanceMiningDropMultiplierChecks; public static ConfigEntry<float> RockbreakerSafetyResetTimeout; public static ConfigEntry<string> SkipNonRockDropPrefabs; public static ConfigEntry<bool> FractionalDropsAsChance; public static ConfigEntry<bool> MiningBonusesPastLevel100; public static ConfigEntry<bool> EnableStealth; public static ConfigEntry<float> SneakSpeedFactor; public static ConfigEntry<float> SneakNoiseReductionLevel; public static ConfigEntry<float> SneakNoiseReductionFactor; public static ConfigEntry<bool> EnableSneakBonusDamage; public static ConfigEntry<int> SneakBackstabBonusLevel; public static ConfigEntry<float> SneakBackstabBonusFactor; public static ConfigEntry<bool> SneakBonusesPastLevel100; public static ConfigEntry<bool> EnableRun; public static ConfigEntry<float> RunSpeedFactor; public static ConfigEntry<bool> RunBonusesPastLevel100; public static ConfigEntry<bool> EnableJump; public static ConfigEntry<float> JumpHeightFactor; public static ConfigEntry<float> JumpHeightRequiredLevel; public static ConfigEntry<bool> EnableFallDamageReduction; public static ConfigEntry<float> FallDamageReductionFactor; public static ConfigEntry<float> FallDamageReductionRequiredLevel; public static ConfigEntry<float> FallDamageHeightBonus; public static ConfigEntry<float> FallDamageHeightRequiredLevel; public static ConfigEntry<bool> EnableFallDamageHeightBonus; public static ConfigEntry<bool> JumpBonusesPastLevel100; public static ConfigEntry<bool> EnableAnimalWhisper; public static ConfigEntry<float> AnimalTamingSpeedFactor; public static ConfigEntry<float> TamedAnimalLootIncreaseFactor; public static ConfigEntry<float> AnimalHandlingLootRange; public static ConfigEntry<bool> AnimalHandlingFractionalDropsAsChance; public static ConfigEntry<int> BetterBeesLevel; public static ConfigEntry<bool> EnableBeeBonuses; public static ConfigEntry<int> BeeBiomeUnrestrictedLevel; public static ConfigEntry<bool> EnableBeeBiomeUnrestricted; public static ConfigEntry<float> BeeHoneyOutputIncreaseBySkill; public static ConfigEntry<float> BeeHarvestXP; public static ConfigEntry<float> AnimalBreedingXP; public static ConfigEntry<float> AnimalBreedingXPRange; public static ConfigEntry<bool> EnableAnimalBonusStar; public static ConfigEntry<int> AnimalBonusStarRequiredLevel; public static ConfigEntry<float> AnimalBonusStarChance; public static ConfigEntry<bool> EnableTamingProgressDisplay; public static ConfigEntry<float> TamingProgressDisplayRange; public static ConfigEntry<bool> EnableTamingCalm; public static ConfigEntry<int> TamingCalmLevel; public static ConfigEntry<float> TamingCalmAttackedCooldown; public static ConfigEntry<bool> EnableTamingHandFeeding; public static ConfigEntry<float> TamingHandFeedCooldown; public static ConfigEntry<float> TamingHandFeedMinPercent; public static ConfigEntry<float> TamingHandFeedMaxPercent; public static ConfigEntry<float> TamingHandFeedXP; public static ConfigEntry<bool> AnimalHandlingBonusesPastLevel100; public static ConfigEntry<bool> EnableGathering; public static ConfigEntry<bool> EnableGatheringAOE; public static ConfigEntry<float> GatheringRangeFactor; public static ConfigEntry<float> ScytheHarvestRangeMultiplier; public static ConfigEntry<int> FarmingRangeRequiredLevel; public static ConfigEntry<string> GatheringLuckLevels; public static ConfigEntry<string> GatheringDisallowedItems; public static ConfigEntry<string> GatheringAllowedItems; public static ConfigEntry<bool> EnableFarmingBiomeUnrestricted; public static ConfigEntry<int> FarmingBiomeUnrestrictedLevel; public static ConfigEntry<bool> EnableFarmingGrowthTimeDisplay; public static ConfigEntry<int> FarmingGrowthTimeDisplayLevel; public static ConfigEntry<bool> EnableFarmingMultiPlant; public static ConfigEntry<int> FarmingMultiplantRequiredLevel; public static ConfigEntry<int> FarmingMultiplantMaxPlantedAtOnce; public static ConfigEntry<int> FarmingMultiplantColumnCount; public static ConfigEntry<int> FarmingMultiplantCountIncrement; public static ConfigEntry<bool> FarmingMultiPlantSnapToExisting; public static ConfigEntry<float> FarmingMultiPlantBufferSpace; public static ConfigEntry<float> PlantingCostStaminaReduction; public static ConfigEntry<float> PlantingSnapDistance; public static ConfigEntry<float> PlantingAOEHarvestResetSafety; public static ConfigEntry<bool> PreferOtherPlantGrid; public static ConfigEntry<string> FarmingSnapStyle; public static ConfigEntry<bool> FarmingSnapPreferCardinal; public static ConfigEntry<bool> EnableSnappingToOtherPlants; public static ConfigEntry<float> FarmingMultiPlantDistanceBufferModifier; public static ConfigEntry<bool> FarmingMultiPlantPersistOrientation; public static ConfigEntry<bool> FarmingMultiPlantRandomRotation; public static ConfigEntry<bool> FarmingMultiPlantCenterRows; public static ConfigEntry<bool> FarmingMultiPlantCenterColumns; public static ConfigEntry<bool> FarmingBonusesPastLevel100; public static ConfigEntry<bool> EnableVoyager; public static ConfigEntry<int> VoyagerSkillXPCheckFrequency; public static ConfigEntry<float> VoyagerReduceCuttingStart; public static ConfigEntry<float> VoyagerCuttingMinAngle; public static ConfigEntry<float> VoyagerSailingSpeedFactor; public static ConfigEntry<float> VoyagerIncreaseExplorationRadius; public static ConfigEntry<float> VoyagerPaddleSpeedBonus; public static ConfigEntry<float> VoyagerPaddleSpeedBonusLevel; public static ConfigEntry<bool> EnableBoatDamageReduction; public static ConfigEntry<int> BoatDamageReductionLevel; public static ConfigEntry<float> VoyagerDamageReductionAmount; public static ConfigEntry<bool> VoyagerImpactResistance; public static ConfigEntry<int> VoyagerImpactResistanceLevel; public static ConfigEntry<bool> EnableFriendsRowSpeedBonus; public static ConfigEntry<float> MaxFriendsRowSpeedBonus; public static ConfigEntry<bool> VoyagerBonusesPastLevel100; public static ConfigEntry<bool> EnableWeaponSkill; public static ConfigEntry<float> WeaponSkillStaminaReduction; public static ConfigEntry<float> WeaponSkillBowDrawStaminaCostReduction; public static ConfigEntry<float> WeaponSkillParryBonus; public static ConfigEntry<float> WeaponSkillEquipSpeedFactor; public static ConfigEntry<int> WeaponSkillEquipRequiredLevel; public static ConfigEntry<bool> EnableCrossbowReloadPause; public static ConfigEntry<int> CrossbowReloadPauseLevel; public static ConfigEntry<bool> EnableMagicReloadPause; public static ConfigEntry<int> MagicReloadPauseLevel; public static ConfigEntry<bool> EnableCrossbowDistanceXP; public static ConfigEntry<float> CrossbowDistanceXPMaxBonus; public static ConfigEntry<float> CrossbowDistanceXPMaxDistance; public static ConfigEntry<bool> EnableBowDistanceXP; public static ConfigEntry<float> BowDistanceXPMaxBonus; public static ConfigEntry<float> BowDistanceXPMinDistance; public static ConfigEntry<float> BowDistanceXPMaxDistance; public static ConfigEntry<float> BowDistanceXPCurve; public static ConfigEntry<bool> WeaponSkillBonusesPastLevel100; public static ConfigEntry<bool> EnableCooking; public static ConfigEntry<bool> EnableCookingDegradeReduction; public static ConfigEntry<bool> EnableCookingBonusItems; public static ConfigEntry<float> ChanceForCookingBonusItems; public static ConfigEntry<int> RequiredLevelForBonusCookingItems; public static ConfigEntry<int> CookingBonusItemMaxAmount; public static ConfigEntry<float> CookingBurnReduction; public static ConfigEntry<bool> EnableCookingStreak; public static ConfigEntry<float> CookingStreakBonusPerFood; public static ConfigEntry<float> CookingStreakMaxBonus; public static ConfigEntry<float> CookingStreakTimeout; public static ConfigEntry<bool> CookingStreakShowText; public static ConfigEntry<bool> EnableCookingEatXP; public static ConfigEntry<float> CookingEatXPPerFoodStat; public static ConfigEntry<bool> EnableCookingStaminaRegen; public static ConfigEntry<int> CookingStaminaRegenRequiredLevel; public static ConfigEntry<float> CookingStaminaRegenFactor; public static ConfigEntry<bool> CookingBonusesPastLevel100; public static ConfigEntry<bool> EnableHauling; public static ConfigEntry<bool> EnableCarryWeightBonus; public static ConfigEntry<float> HaulingMaxWeightBonus; public static ConfigEntry<bool> EnableHaulingCartMassReduction; public static ConfigEntry<float> HaulingCartMassReduction; public static ConfigEntry<float> HaulingXPRate; public static ConfigEntry<int> HaulingXPCheckInterval; public static ConfigEntry<float> HaulingXPMinDistance; public static ConfigEntry<bool> EnableHaulingCarryWeightXP; public static ConfigEntry<float> HaulingCarryWeightXPMinWeight; public static ConfigEntry<float> HaulingCarryWeightXPRate; public static ConfigEntry<float> HaulingMaxLoadRatio; public static ConfigEntry<bool> HaulingBonusesPastLevel100; public static ConfigEntry<bool> EnableBloodMagic; public static ConfigEntry<float> BloodMagicXPForShieldDamageRatio; public static ConfigEntry<float> BloodMagicXP; public static ConfigEntry<bool> EnableBloodMagicShieldReset; public static ConfigEntry<int> BloodMagicShieldResetLevel; public static ConfigEntry<bool> EnableElementalMagic; public static ConfigEntry<bool> EnableElementalMagicSpreadReduction; public static ConfigEntry<int> ElementalMagicSpreadReductionLevel; public static ConfigEntry<float> ElementalMagicProjectileSpreadReduction; public static ConfigEntry<bool> EnableKnowledgeSharing; public static ConfigEntry<float> AnimalTamingSkillGainRate; public static ConfigEntry<float> VoyagerSkillGainRate; public static ConfigEntry<float> SharedKnowledgeSkillBonusRate; public static ConfigEntry<float> SharedKnowledgeCap; public static ConfigEntry<string> SharedKnowledgeIgnoreList; public static ConfigEntry<string> AdditionalSkillNames; public static ConfigEntry<bool> EnableCrafting; public static ConfigEntry<bool> EnableDurabilitySaves; public static ConfigEntry<bool> ScaleDurabilitySaveBySkillLevel; public static ConfigEntry<bool> EnableDurabilityLossPrevention; public static ConfigEntry<int> DurabilitySaveLevel; public static ConfigEntry<float> ChanceForDurabilityLossPrevention; public static ConfigEntry<int> CraftingMaxBonus; public static ConfigEntry<float> CraftingBonusChance; public static ConfigEntry<bool> EnableBonusItemCrafting; public static ConfigEntry<bool> EnableCraftBonusAsFraction; public static ConfigEntry<float> CraftBonusFractionOfCraftNumber; public static ConfigEntry<int> CraftingBonusCraftsLevel; public static ConfigEntry<bool> EnableMaterialReturns; public static ConfigEntry<int> CraftingMaterialReturnsLevel; public static ConfigEntry<float> MaxCraftingMaterialReturnPercent; public static ConfigEntry<float> ChanceForMaterialReturn; public static ConfigEntry<bool> RefundIdolsFromCrafting; public static ConfigEntry<bool> RefundForgeOfPotentialIdols; public static ConfigEntry<bool> ScaleCraftedEquipmentQuality; public static ConfigEntry<bool> CraftingBonusesPastLevel100; public static ConfigEntry<bool> EnableForging; public static ConfigEntry<bool> EnableStationBonusTier1; public static ConfigEntry<int> StationBonusTier1Level; public static ConfigEntry<string> StationBonusTier1Stations; public static ConfigEntry<int> StationBonusTier1Amount; public static ConfigEntry<bool> EnableStationBonusTier2; public static ConfigEntry<int> StationBonusTier2Level; public static ConfigEntry<string> StationBonusTier2Stations; public static ConfigEntry<int> StationBonusTier2Amount; public static ConfigEntry<bool> EnableRefinementBonus; public static ConfigEntry<int> RefinementBonusLevel; public static ConfigEntry<float> RefineSuccessChanceBonus; public static ConfigEntry<float> RefineBreakChanceReduction; public static ConfigEntry<float> RefineBreakRefundBonus; public static ConfigEntry<bool> EnableRefinementDecay; public static ConfigEntry<int> RefineDecayStartLevel; public static ConfigEntry<float> RefineDecayRate; public static ConfigEntry<bool> RollRefinementsWhenAttempted; public static ConfigEntry<bool> EnableMasterwork; public static ConfigEntry<int> MasterworkLevel; public static ConfigEntry<float> MasterworkStatBonus; public static ConfigEntry<bool> EnableLightweight; public static ConfigEntry<int> LightweightLevel; public static ConfigEntry<float> LightweightWeightReduction; public static ConfigEntry<float> LightweightMovementPenaltyReduction; public static ConfigEntry<float> LightweightNoPenaltyStatBonus; public static ConfigEntry<string> ForgingStationXPWeights; public static ConfigEntry<float> ForgingStationCraftXP; public static ConfigEntry<float> ForgingEquipmentCraftXP; public static ConfigEntry<float> ForgingUpgradeXP; public static ConfigEntry<float> ForgingRefineAttemptXP; public static ConfigEntry<float> ForgingRefineSuccessXPMultiplier; public static ConfigEntry<string> ForgingNoXPItems; public static ConfigEntry<string> ForgingMetalIngredients; public static ConfigEntry<float> ForgingNonMetalXPMultiplier; public static ConfigEntry<bool> ForgingBonusesPastLevel100; public static ConfigEntry<bool> EnableSwimming; public static ConfigEntry<int> SwimSpeedRequiredLevel; public static ConfigEntry<float> SwimmingSpeedFactor; public static ConfigEntry<bool> EnableSwimStaminaCostReduction; public static ConfigEntry<int> SwimStaminaReductionLevel; public static ConfigEntry<float> SwimStaminaCostReductionFactor; public static ConfigEntry<bool> SwimmingBonusesPastLevel100; public static ConfigEntry<bool> EnableBlocking; public static ConfigEntry<int> BlockPowerRequiredLevel; public static ConfigEntry<float> BlockPowerFactor; public static ConfigEntry<int> BlockStaminaGainRequiredLevel; public static ConfigEntry<float> BlockStaminaGainFactor; public static ConfigEntry<bool> EnableParryStaminaGain; public static ConfigEntry<bool> BlockingBonusesPastLevel100; public static ConfigEntry<bool> EnableQualityIngredientScaling; public static ConfigEntry<float> QualityIngredientOutputMultiplier; public static ConfigEntry<bool> RestrictQualityScalingToFish; public static ConfigEntry<bool> ScaleNonStackingCraftOutputs; public static ConfigEntry<bool> FishingBonusesPastLevel100; public static ConfigEntry<bool> EnableDodge; public static ConfigEntry<bool> DodgeBonusesPastLevel100; public static ConfigEntry<bool> EnableRide; public static ConfigEntry<bool> RideBonusesPastLevel100; public static ConfigEntry<bool> EnableExtraStamina; public static ConfigEntry<float> ExtraStaminaPerSkill; public static ConfigEntry<StatGains.BonusStaminaSkills> EnableExtraStaminaSkills; public static ConfigEntry<bool> EnableExtraEitr; public static ConfigEntry<float> ExtraEitrPerSkill; public static ConfigEntry<StatGains.BonusEitrSkills> EnableExtraEitrSkills; internal static CustomRPC SkillIncreaseXP; public ValConfig(ConfigFile cf) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown //IL_0059: Expected O, but got Unknown cfg = cf; BeginBatchBind(); CreateConfigValues(cf); EndBatchBind(save: true); Logger.setDebugLogging(EnableDebugMode.Value); SetupMainFileWatcher(); SkillIncreaseXP = NetworkManager.Instance.AddRPC("ISKILL_XP_GRANT", new CoroutineHandler(OnServerReceiveXPRequest), new CoroutineHandler(OnClientReceiveXPGrant)); } private void CreateConfigValues(ConfigFile Config) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Expected O, but got Unknown //IL_0058: Unknown result type (might be due to invalid IL or missing references) EnableDebugMode = ConfigFileExtensions.BindConfigInOrder<bool>(Config, "Client config", "EnableDebugMode", false, "Enables Debug logging.", false, false, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = true }); EnableDebugMode.SettingChanged += Logger.enableDebugLogging; AOEToggleHotkey = BindClientConfig("Client config", "AOEToggleHotkey", new KeyboardShortcut((KeyCode)110, Array.Empty<KeyCode>()), "Hotkey to toggle AOE harvesting, AOE mining and AOE planting on/off. In the crafting window it instead toggles whether what you craft is made lightweight, once your forging is high enough."); ShowUnlockMessages = BindClientConfig("Client config", "ShowUnlockMessages", value: true, "Shows a message in the middle of the screen when one of your skill level-ups unlocks one of this mod's features, if the server allows it with EnableUnlockMessages."); EnableUnlockMessages = BindServerConfig("Notifications", "EnableUnlockMessages", value: true, "Shows each player a message in the middle of the screen when a skill level-up unlocks one of this mod's features. Turning this off hides them for everyone; each player can also turn them off for themselves with ShowUnlockMessages."); EnableAnimalWhisper = BindServerConfig("AnimalHandling", "EnableAnimalWhisper", value: true, "Enable animal handling skill changes. While disabled the skill is hidden from the skills panel, and players keep their level for when it is enabled again."); AnimalTamingSpeedFactor = BindServerConfig("AnimalHandling", "AnimalTamingSpeedFactor", 6f, "How much your animal handling skill speeds up taming. This is the taming speed at level 100: 1 is vanilla (no bonus), 6 is 6x, so a creature that takes 30 minutes to tame takes 5. In multiplayer the skill of the player closest to the creature counts.", advanced: false, 1f, 10f); TamedAnimalLootIncreaseFactor = BindServerConfig("AnimalHandling", "TamedAnimalLootIncreaseFactor", 3f, "How much the animal handling skill improves your loot from tamed creatures. This multiplies the loot the creature would actually have dropped, so it includes its star level, the world resource rate and anything other loot mods change. 1 is vanilla (no bonus), 3 is 3x the loot at level 100", advanced: false, 1f, 10f); AnimalHandlingLootRange = BindServerConfig("AnimalHandling", "AnimalHandlingLootRange", 20f, "How close you must be to a tamed creature when it dies to gain the slaughter XP and the bonus loot.", advanced: false, 1f, 100f); AnimalHandlingFractionalDropsAsChance = BindServerConfig("AnimalHandling", "AnimalHandlingFractionalDropsAsChance", value: true, "When enabled, a bonus that works out to less than one item becomes a chance at one item. When disabled it is rounded to the nearest whole item, so small drops give nothing at low skill."); EnableBeeBonuses = BindServerConfig("AnimalHandling", "EnableBeeBonuses", value: true, "Enables Animal Handling bonuses related to Bees."); BetterBeesLevel = BindServerConfig("AnimalHandling", "BetterBeesLevel", 15, "The level at which Bee productivity traits kick in", advanced: false, 0, 100); BeeHoneyOutputIncreaseBySkill = BindServerConfig("AnimalHandling", "BeeHoneyOutputIncreaseBySkill", 1f, "At level 100 skill, and 1.0 this results in a 100% increase in honey gathered."); EnableBeeBiomeUnrestricted = BindServerConfig("AnimalHandling", "EnableBeeBiomeUnrestricted", value: true, "At the specified level, beeshives built by you can produce honey in any biome."); BeeBiomeUnrestrictedLevel = BindServerConfig("AnimalHandling", "BeeBiomeUnrestrictedLevel", 25, "At this level, if enabled, beehives built by you can produce honey in any biome.", advanced: false, 0, 100); BeeHarvestXP = BindServerConfig("AnimalHandling", "BeeHarvestXP", 2f, "The amount of xp for Animal handling provided by harvesting a single honey from a beehive", advanced: false, 0f, 20f); AnimalBreedingXP = BindServerConfig("AnimalHandling", "AnimalBreedingXP", 5f, "AnimalHandling XP granted to each nearby player when a tamed animal becomes pregnant or gives birth.", advanced: false, 0f, 50f); AnimalBreedingXPRange = BindServerConfig("AnimalHandling", "AnimalBreedingXPRange", 30f, "How close a player must be to a breeding animal to gain the breeding XP, and to give its offspring a chance at a bonus star.", advanced: false, 1f, 100f); EnableAnimalBonusStar = BindServerConfig("AnimalHandling", "EnableAnimalBonusStar", value: true, "At high Animal Handling, a creature you tame or breed has a chance to gain an extra star. The player closest to the creature rolls with their own skill. Creatures never go past 2 stars this way unless Star Level System is installed."); AnimalBonusStarRequiredLevel = BindServerConfig("AnimalHandling", "AnimalBonusStarRequiredLevel", 75, "The Animal Handling level needed before tamed and bred creatures can gain a bonus star.", advanced: false, 0, 100); AnimalBonusStarChance = BindServerConfig("AnimalHandling", "AnimalBonusStarChance", 0.25f, "The chance a creature you tame or breed gains a bonus star, at Animal Handling 100. Scales with your skill, so at level 75 it is three quarters of this.", advanced: false, 0f, 1f); EnableTamingProgressDisplay = BindClientConfig("AnimalHandling", "EnableTamingProgressDisplay", value: true, "Shows the taming progress of the creature you are taming above your stamina bar, so you can follow it from a distance. Shows the creature you are looking at, or else the closest one being tamed. This is a per player setting."); TamingProgressDisplayRange = BindClientConfig("AnimalHandling", "TamingProgressDisplayRange", 40f, "How far away, in meters, a creature being tamed can be and still have its taming progress shown. This is a per player setting.", advanced: false, 5f, 100f); EnableTamingCalm = BindServerConfig("AnimalHandling", "EnableTamingCalm", value: true, "Once you reach TamingCalmLevel, a creature being tamed is not frightened by you as long as it has food nearby or is still fed, and has not been attacked recently."); TamingCalmLevel = BindServerConfig("AnimalHandling", "TamingCalmLevel", 15, "The Animal Handling level at which creatures being tamed stay calm around you.", advanced: false, 0, 100); TamingCalmAttackedCooldown = BindServerConfig("AnimalHandling", "TamingCalmAttackedCooldown", 60f, "How many seconds after being attacked a creature being tamed ignores TamingCalmLevel and reacts to players normally. Near misses from arrows and other projectiles count as attacks.", advanced: false, 0f, 600f); EnableTamingHandFeeding = BindServerConfig("AnimalHandling", "EnableTamingHandFeeding", value: true, "Using a food a creature eats on it from your hotbar, while looking at it, feeds it by hand. This feeds it and adds to its taming progress. A frightened creature refuses the food."); TamingHandFeedCooldown = BindServerConfig("AnimalHandling", "TamingHandFeedCooldown", 30f, "How many seconds a creature must wait after being hand fed, by anyone, before it can be hand fed again. This does not change with skill level.", advanced: false, 5f, 300f); TamingHandFeedMinPercent = BindServerConfig("AnimalHandling", "TamingHandFeedMinPercent", 2f, "The taming progress, in percent of the full taming time, that a hand feeding gives at Animal Handling 0.", advanced: false, 0f, 50f); TamingHandFeedMaxPercent = BindServerConfig("AnimalHandling", "TamingHandFeedMaxPercent", 25f, "The taming progress, in percent of the full taming time, that a hand feeding gives at Animal Handling 100. It grows evenly from TamingHandFeedMinPercent as your skill rises.", advanced: false, 0f, 50f); TamingHandFeedXP = BindServerConfig("AnimalHandling", "TamingHandFeedXP", 3f, "The Animal Handling XP gained for each hand feeding.", advanced: false, 0f, 50f); AnimalHandlingBonusesPastLevel100 = BindServerConfig("AnimalHandling", "AnimalHandlingBonusesPastLevel100", value: false, PastLevel100Description("Animal Handling")); EnableBlocking = BindServerConfig("Blocking", "EnableBlocking", value: true, "Enable blocking skill changes."); BlockPowerRequiredLevel = BindServerConfig("Blocking", "BlockPowerRequiredLevel", 25, "The level that BlockPowerFactor start being applied based on your skill", advanced: true, 0, 100); BlockPowerFactor = BindServerConfig("Blocking", "BlockPowerFactor", 0.75f, "The factor that blocking power increases after reaching the BlockRequiredLevel. Vanilla is .5f", advanced: true, 0.5f, 2f); BlockStaminaGainRequiredLevel = BindServerConfig("Blocking", "BlockStaminaGainRequiredLevel", 40, "The level that BlockStaminaGainFactor starts being applied base on your skill", advanced: true, 0, 100); BlockStaminaGainFactor = BindServerConfig("Blocking", "BlockStaminaGainFactor", 0.5f, "How much of the stamina each block cost is given back, at blocking level 100. This is scaled by your blocking level. 0.5 gives back half of what a block cost at level 100, 2 gives back twice what it cost.", advanced: true, 0.5f, 2f); EnableParryStaminaGain = BindServerConfig("Blocking", "EnableParryStaminaGain", value: false, "Enable stamina gain on parry. Value based off BlockStaminaGainFactor"); BlockingBonusesPastLevel100 = BindServerConfig("Blocking", "BlockingBonusesPastLevel100", value: false, PastLevel100Description("Blocking")); EnableBloodMagic = BindServerConfig("BloodMagic", "EnableBloodMagic", value: true, "Enable blood magic skill changes."); BloodMagicXPForShieldDamageRatio = BindServerConfig("BloodMagic", "BloodMagicXPForShieldDamageRatio", 50f, "How much XP is gained for shield damage. 50 is once every 50 damage.", advanced: false, 1f, 200f); BloodMagicXP = BindServerConfig("BloodMagic", "BloodMagicXP", 1f, "How much XP is gained, used by other blood magic skill settings.", advanced: false, 0.1f, 10f); EnableBloodMagicShieldReset = BindServerConfig("BloodMagic", "EnableBloodMagicShieldReset", value: true, "Whether applying a new shield to someone who already has a shield will reset the total damage that the shield can absorb. In vanilla, refreshing a shield only extends the duration and does not reset total damage that it can absorb."); BloodMagicShieldResetLevel = BindServerConfig("BloodMagic", "BloodMagicShieldResetLevel", 50, "The minimum blood magic skill level required to be able to reset shield health when reapplying a shield. Has no effect if blood magic skill changes are not enabled or BloodMagicShieldReset is not enabled.", advanced: false, 1, 100); EnableElementalMagic = BindServerConfig("ElementalMagic", "EnableElementalMagic", value: true, "Enable elemental magic skill changes."); EnableElementalMagicSpreadReduction = BindServerConfig("ElementalMagic", "EnableElementalMagicSpreadReduction", value: true, "Enable reducing the spread of projectiles fired from weapons that use the elemental magic skill as your skill level increases."); ElementalMagicSpreadReductionLevel = BindServerConfig("ElementalMagic", "ElementalMagicSpreadReductionLevel", 25, "The elemental magic skill level at which projectile spread reduction starts being applied. Below this level elemental magic weapons have their normal spread.", advanced: false, 0, 100); ElementalMagicProjectileSpreadReduction = BindServerConfig("ElementalMagic", "ElementalMagicProjectileSpreadReduction", 0.5f, "How much the spread of projectiles is reduced based on your elemental magic skill level at level 100. 0.5 will make level 100 elemental magic weapons have 50% less spread. Vanilla is 0.0.", advanced: false, 0f, 1f); EnableCooking = BindServerConfig("Cooking", "EnableCooking", value: true, "Enable cooking skill changes."); EnableCookingDegradeReduction = BindServerConfig("Cooking", "EnableCookingDegradeReduction", value: true, "When enabled, cooking contributes to preventing food from degrading over time."); EnableCookingBonusItems = BindServerConfig("Cooking", "EnableCookingBonusItems", value: true, "Enables or disables getting bonuse food items."); RequiredLevelForBonusCookingItems = BindServerConfig("Cooking", "RequiredLevelForBonusCookingItems", 10, "Minimum level to start crafting bonus food items.", advanced: false, 0, 100); ChanceForCookingBonusItems = BindServerConfig("Cooking", "ChanceForCookingBonusItems", 0.4f, "The chance to craft bonus food items at level 100. 0.4 is a 40% chance.", advanced: false, 0f, 1f); CookingBonusItemMaxAmount = BindServerConfig("Cooking", "CookingBonusItemMaxAmount", 3, "The maximum number of cooked items you can recieve as a bonus, each item is an additional chance roll", advanced: true, 0, 10); CookingBurnReduction = BindServerConfig("Cooking", "CookingBurnReduction", 0.5f, "How much offset is applied to diminishing returns for food, scaled by the players cooking skill. At 1 and cooking 100 food never degrades.", advanced: false, 0.1f, 1f); EnableCookingStreak = BindServerConfig("Cooking", "EnableCookingStreak", value: true, "Enables the cooking streak. Cooking several foods in a row grants bonus cooking XP that ramps up with each food cooked. Crafting at the cauldron and taking cooked food off a cooking station or oven both count."); CookingStreakBonusPerFood = BindServerConfig("Cooking", "CookingStreakBonusPerFood", 0.1f, "How much bonus cooking XP each consecutive food adds to the next one cooked. 0.1 is 10% more XP per food in the streak.", advanced: false, 0f, 1f); CookingStreakMaxBonus = BindServerConfig("Cooking", "CookingStreakMaxBonus", 1f, "The largest bonus a cooking streak can reach. 1 is double XP.", advanced: false, 0f, 10f); CookingStreakTimeout = BindServerConfig("Cooking", "CookingStreakTimeout", 120f, "How many seconds you can go without cooking before the streak ends. Crafting other things or placing raw food on a station does not end it. 0 means the streak never ends.", advanced: false, 0f, 600f); CookingStreakShowText = BindClientConfig("Cooking", "CookingStreakShowText", value: true, "Shows a popup with the current cooking streak bonus as it climbs. This is a per player setting."); EnableCookingEatXP = BindServerConfig("Cooking", "EnableCookingEatXP", value: true, "Grants cooking XP when you eat food, scaled by the total health, stamina and eitr the food provides."); CookingEatXPPerFoodStat = BindServerConfig("Cooking", "CookingEatXPPerFoodStat", 0.01f, "Cooking XP gained per point of food stats (health + stamina + eitr) when eating. At 0.01 a 40 health 30 stamina food gives 0.7 XP, about the same as taking one item off a cooking station.", advanced: false, 0f, 1f); EnableCookingStaminaRegen = BindServerConfig("Cooking", "EnableCookingStaminaRegen", value: true, "Food that regenerates health also regenerates stamina once your cooking reaches CookingStaminaRegenRequiredLevel. This adds to your normal stamina regen, so it pauses and is boosted by the same things."); CookingStaminaRegenRequiredLevel = BindServerConfig("Cooking", "CookingStaminaRegenRequiredLevel", 25, "The cooking level at which food starts regenerating stamina.", advanced: false, 0, 100); CookingStaminaRegenFactor = BindServerConfig("Cooking", "CookingStaminaRegenFactor", 0.25f, "How much stamina per second the food you have eaten regenerates, as a share of its healing, at cooking level 100. Scales with your cooking level. 0.25 is a quarter, so food that heals 4 health every 10 seconds also regenerates 1 stamina every second.", advanced: false, 0f, 2f); CookingBonusesPastLevel100 = BindServerConfig("Cooking", "CookingBonusesPastLevel100", value: false, PastLevel100Description("Cooking")); EnableCrafting = BindServerConfig("Crafting", "EnableCrafting", value: true, "Enable crafting skill changes."); EnableDurabilityLossPrevention = BindServerConfig("Crafting", "EnableDurabilityLossPrevention", value: true, "Enables durability reduction prevention that can scale with player skill."); EnableDurabilitySaves = BindServerConfig("Crafting", "EnableDurabilitySaves", value: true, "Enables reducing how often you use durability for your items."); DurabilitySaveLevel = BindServerConfig("Crafting", "DurabilitySaveLevel", 25, "Level requirement to enable durability saves."); ChanceForDurabilityLossPrevention = BindServerConfig("Crafting", "ChanceForDurabilityLossPrevention", 0.25f, "Chance that you will not use durability on use.", advanced: false, 0f, 1f); ScaleDurabilitySaveBySkillLevel = BindServerConfig("Crafting", "ScaleDurabilitySaveBySkillLevel", value: true, "Reduces MaxChanceForDurabilityPreserveOnUse based on level, at lvl 50 crafting MaxChanceForDurabilityPreserveOnUse is 50% of its value."); EnableBonusItemCrafting = BindServerConfig("Crafting", "EnableBonusItemCrafting", value: true, "Enables crafting bonus items."); CraftingBonusCraftsLevel = BindServerConfig("Crafting", "CraftingBonusCraftsLevel", 50, "The level at which you can start getting bonus crafts.", advanced: false, 0, 100); CraftingMaxBonus = BindServerConfig("Crafting", "CraftingMaxBonus", 3, "The maximum number of additional bonus crafts you can get from crafting an item"); CraftingBonusChance = BindServerConfig("Crafting", "CraftingBonusChance", 0.3f, "The chance to get a bonus craft when crafting an item. 0.5 is a 50% chance to get a bonus craft at level 100. Bonus crafting success can stack up to the CraftingMaxBonus times.", advanced: false, 0f, 1f); EnableCraftBonusAsFraction = BindServerConfig("Crafting", "EnableCraftBonusAsFraction", value: true, "Enable crafting bonus as a fraction of the number crafted (for recipes where the result is more than 1). If disabled, the bonus is always 1 item."); CraftBonusFractionOfCraftNumber = BindServerConfig("Crafting", "CraftBonusFractionOfCraftNumber", 0.25f, "If the number of items crafted by the recipe is greater than 1, a percentage of the number crafted is used for the bonus. This determines that percentage. Eg: craft 20 arrows (1 craft) a .25 value would give you 5 arrows for 1 bonus craft."); EnableMaterialReturns = BindServerConfig("Crafting", "EnableMaterialReturns", value: true, "Enable material returns from crafting."); CraftingMaterialReturnsLevel = BindServerConfig("Crafting", "CraftingMaterialReturnsLevel", 75, "The level at which material returns start being applied based on your skill", advanced: false, 0, 100); MaxCraftingMaterialReturnPercent = BindServerConfig("Crafting", "MaxCraftingMaterialReturnPercent", 0.3f, "The maximum percentage of materials that can be returned from crafting. 0.5 is 50% at level 100.", advanced: false, 0f, 1f); ChanceForMaterialReturn = BindServerConfig("Crafting", "ChanceForMaterialReturn", 0.15f, "The chance to return materials when crafting an item. 0.25 is a 25% chance to return materials at level 100.", advanced: false, 0f, 1f); RefundIdolsFromCrafting = BindServerConfig("Crafting", "RefundIdolsFromCrafting", value: false, "Material returns from crafting a new item can also hand back the Forge of Potential idol its recipe lists. Crafting at a regular station never uses the idol up, so this hands out idols that were not spent. Upgrades never return the idol, they only return materials the upgrade cost."); RefundForgeOfPotentialIdols = BindServerConfig("Crafting", "RefundForgeOfPotentialIdols", value: false, "Refining an item at the Forge of Potential can trigger a material return, which only ever hands back the idol the refinement used. While disabled the Forge of Potential never triggers material returns."); ScaleCraftedEquipmentQuality = BindServerConfig("Crafting", "ScaleCraftedEquipmentQuality", value: true, "Recipes that consume an item carrying a quality level and produce equipment now craft that equipment at a higher quality instead of producing more of it. The quality granted is the average quality of the ingredients spent, rounded down, and is still capped by what your crafting station could normally build. The fishing hat made from twelve good fish comes out upgraded, and infusing an Ashlands weapon carries its star level over instead of resetting it to one. Crafting always spends the lowest quality ingredient that covers the recipe, so this never eats your best one when a worse one would do."); CraftingBonusesPastLevel100 = BindServerConfig("Crafting", "CraftingBonusesPastLevel100", value: false, PastLevel100Description("Crafting", "Can make crafting refunds hand back more materials than a craft costs.")); EnableDodge = BindServerConfig("Dodge", "EnableDodge", value: true, "Enable dodge skill changes."); DodgeBonusesPastLevel100 = BindServerConfig("Dodge", "DodgeBonusesPastLevel100", value: false, PastLevel100Description("Dodge")); EnableQualityIngredientScaling = BindServerConfig("Fishing", "EnableQualityIngredientScaling", value: true, "Recipes that take a whole fish now produce more when a higher quality fish is used, and always spend the lowest quality fish that can cover the recipe. Vanilla only pays out for fish quality when turning a fish into raw fish, and will otherwise happily consume your best catch for the same result a quality 1 fish gives."); QualityIngredientOutputMultiplier = BindServerConfig("Fishing", "QualityIngredientOutputMultiplier", 1f, "How strongly fish quality increases the crafted amount. 1 is one extra result per quality level above 1, so a quality 5 anglerfish makes 5 fish wraps instead of 1. Multiplies the recipes own quality result multiplier, so recipes tuned by other mods keep their own scaling.", advanced: false, 0f, 10f); RestrictQualityScalingToFish = BindServerConfig("Fishing", "RestrictQualityScalingToFish", value: true, "Only let fish earn extra output. This gates the bonus amount only - always spending the lowest quality ingredient that covers a recipe, and carrying ingredient quality into crafted equipment (ScaleCraftedEquipmentQuality), apply to everything regardless. Turning this off matters for the Ashlands weapons, which also carry a quality level, and for mods that give quality levels to other materials - in which case those recipes would start producing more as well."); ScaleNonStackingCraftOutputs = BindServerConfig("Fishing", "ScaleNonStackingCraftOutputs", value: true, "Also scale recipes whose result does not stack, such as the fish based mead bases. Vanilla skips its own bonus craft rolls for these. Crafting more than will fit is safe - the craft is refused with an inventory full message rather than losing items."); FishingBonusesPastLevel100 = BindServerConfig("Fishing", "FishingBonusesPastLevel100", value: false, PastLevel100Description("Fishing")); EnableForging = BindServerConfig("Forging", "EnableForging", value: true, "Enables the forging skill. While disabled the skill is hidden from the skills panel, and players keep their level for when it is enabled again."); EnableStationBonusTier1 = BindServerConfig("Forging", "EnableStationBonusTier1", value: true, "Enables the first crafting station level bonus."); StationBonusTier1Level = BindServerConfig("Forging", "StationBonusTier1Level", 25, "The forging level at which the first station bonus applies.", advanced: false, 0, 100); StationBonusTier1Stations = BindServerConfig("Forging", "StationBonusTier1Stations", "$piece_workbench,$piece_forge", "Comma separated list of crafting station names (eg: $piece_workbench) that get the first station bonus."); StationBonusTier1Amount = BindServerConfig("Forging", "StationBonusTier1Amount", 1, "How many levels the first station bonus adds to its stations.", advanced: false, 0, 10); EnableStationBonusTier2 = BindServerConfig("Forging", "EnableStationBonusTier2", value: true, "Enables the second crafting station level bonus."); StationBonusTier2Level = BindServerConfig("Forging", "StationBonusTier2Level", 50, "The forging level at which the second station bonus applies.", advanced: false, 0, 100); StationBonusTier2Stations = BindServerConfig("Forging", "StationBonusTier2Stations", "$piece_blackforge,$piece_magetable", "Comma separated list of crafting station names (eg: $piece_blackforge) that get the second station bonus. A station listed in both tiers gets both bonuses."); StationBonusTier2Amount = BindServerConfig("Forging", "StationBonusTier2Amount", 1, "How many levels the second station bonus adds to its stations.", advanced: false, 0, 10); EnableRefinementBonus = BindServerConfig("Forging", "EnableRefinementBonus", value: true, "Enables forging improving your odds at the Forge of Potential. The bonuses scale with your forging level, the full value applies at level 100."); RefinementBonusLevel = BindServerConfig("Forging", "RefinementBonusLevel", 0, "The forging level at which Forge of Potential bonuses start applying.", advanced: false, 0, 100); RefineSuccessChanceBonus = BindServerConfig("Forging", "RefineSuccessChanceBonus", 0.2f, "Added to the chance that a refinement succeeds, at forging level 100. Vanilla idols have a 0.65 chance, so 0.2 makes it 0.85.", advanced: false, 0f, 1f); RefineBreakChanceReduction = BindServerConfig("Forging", "RefineBreakChanceReduction", 1f, "How much of the chance that a failed refinement destroys the item is removed, at forging level 100. 1 means failures never destroy the item at level 100, they lower its level instead.", advanced: false, 0f, 1f); RefineBreakRefundBonus = BindServerConfig("Forging", "RefineBreakRefundBonus", 0.35f, "Added to the share of ingredients returned when a refinement destroys the item, at forging level 100. Vanilla idols return 0.35, so 0.35 makes it 0.7.", advanced: false, 0f, 1f); EnableRefinementDecay = BindServerConfig("Forging", "EnableRefinementDecay", value: true, "Refinements past RefineDecayStartLevel get harder with every level: a lower chance to succeed, fewer materials back when the item breaks, and forging's protection against breaking fades. Keeps items from being refined to absurd levels."); RefineDecayStartLevel = BindServerConfig("Forging", "RefineDecayStartLevel", 10, "Refining an item up to this level has the normal odds, every level beyond it is penalized by RefineDecayRate.", advanced: false, 1, 200); RefineDecayRate = BindServerConfig("Forging", "RefineDecayRate", 0.05f, "How much of the refinement odds is lost for each level past RefineDecayStartLevel, compounding. 0.05 leaves 95% one level past, 77% five levels past and 60% ten levels past. Applies to the success chance, the materials returned on a break and forging's protection against breaking.", advanced: false, 0f, 1f); RollRefinementsWhenAttempted = BindServerConfig("Forging", "RollRefinementsWhenAttempted", value: true, "The Forge of Potential decides each refinement with a fresh roll at the moment you attempt it. While disabled the game's own rolls are used, which are decided ahead of time for each character, item and level. Applies even while forging is disabled."); EnableMasterwork = BindServerConfig("Forging", "EnableMasterwork", value: true, "Enables masterwork equipment. Weapons, armor and shields crafted or upgraded by a skilled smith are improved."); MasterworkLevel = BindServerConfig("Forging", "MasterworkLevel", 75, "The forging level required to craft masterwork equipment.", advanced: false, 0, 100); MasterworkStatBonus = BindServerConfig("Forging", "MasterworkStatBonus", 0.1f, "How much masterwork improves damage (weapons), armor (armor) and block power (shields). 0.1 is 10%.", advanced: false, 0f, 2f); EnableLightweight = BindServerConfig("Forging", "EnableLightweight", value: true, "Enables lightweight equipment. Weapons, armor and shields crafted or upgraded by a skilled smith weigh less and slow you down less."); LightweightLevel = BindServerConfig("Forging", "LightweightLevel", 90, "The forging level required to craft lightweight equipment.", advanced: false, 0, 100); LightweightWeightReduction = BindServerConfig("Forging", "LightweightWeightReduction", 0.9f, "How much lightweight equipment reduces the item's weight. 0.9 makes it weigh 10% of normal.", advanced: false, 0f, 1f); LightweightMovementPenaltyReduction = BindServerConfig("Forging", "LightweightMovementPenaltyReduction", 0.5f, "How much lightweight equipment reduces the item's movement speed penalty while equipped. 0.5 halves it.", advanced: false, 0f, 1f); LightweightNoPenaltyStatBonus = BindServerConfig("Forging", "LightweightNoPenaltyStatBonus", 0.05f, "Lightweight equipment that has no movement speed penalty gets this much more damage, armor or block power instead. 0.05 is 5%.", advanced: false, 0f, 2f); ForgingStationXPWeights = BindServerConfig("Forging", "ForgingStationXPWeights", "$piece_workbench:1,$piece_forge:1.5,$piece_blackforge:2,$piece_magetable:2", "Comma separated list of crafting station names and XP multipliers (name:multiplier). Anything crafted at these stations gives forging XP, and equipment crafted or upgraded at them gives XP scaled by the multiplier. Equipment from other stations uses a multiplier of 1."); ForgingStationCraftXP = BindServerConfig("Forging", "ForgingStationCraftXP", 0.5f, "Forging XP for crafting anything at a station in ForgingStationXPWeights.", advanced: false, 0f, 20f); ForgingEquipmentCraftXP = BindServerConfig("Forging", "ForgingEquipmentCraftXP", 1f, "Forging XP for crafting a weapon, armor piece or shield. Scaled by the station multiplier and the recipe's minimum station level.", advanced: false, 0f, 20f); ForgingUpgradeXP = BindServerConfig("Forging", "ForgingUpgradeXP", 1f, "Forging XP for upgrading a weapon, armor piece or shield. Scaled by the station multiplier and the new quality level.", advanced: false, 0f, 20f); ForgingRefineAttemptXP = BindServerConfig("Forging", "ForgingRefineAttemptXP", 2f, "Forging XP for each refinement attempt at the Forge of Potential. Scaled by the quality level being attempted.", advanced: false, 0f, 20f); ForgingRefineSuccessXPMultiplier = BindServerConfig("Forging", "ForgingRefineSuccessXPMultiplier", 2f, "Multiplies the refinement XP when the attempt succeeds.", advanced: false, 1f, 10f); ForgingNoXPItems = BindServerConfig("Forging", "ForgingNoXPItems", "SwordWood,THSwordWood,AxeWood,BattleaxeWood,MaceWood,SledgeWood,SpearWood,AtgeirWood,KnifeWood,Club,AxeStone,AxeFlint,KnifeFlint,SpearFlint,Bow,PickaxeAntler,Hammer,Hoe,Torch,ShieldWood,ShieldWoodTower,ArmorRagsChest,ArmorRagsLegs,ArmorLeatherChest,ArmorLeatherLegs,HelmetLeather,CapeDeerHide,ArrowWood,ArrowFlint,ArrowFire", "Comma separated list of item prefab names that give no forging XP when crafted, upgraded or refined. End an entry with * to match every prefab starting with it."); ForgingMetalIngredients = BindServerConfig("Forging", "ForgingMetalIngredients", "Copper,CopperOre,CopperScrap,Tin,TinOre,Bronze,BronzeScrap,BronzeNails,Iron,IronOre,IronScrap,IronNails,Chain,Silver,SilverOre,BlackMetal,BlackMetalScrap,MechanicalSpring,Flametal,FlametalOre,FlametalNew,FlametalOreNew,Gold,GoldOre,AxeHead1,AxeHead2,Mold*", "Comma separated list of ingredient prefab names that count as metal. Items whose recipe uses none of them give ForgingNonMetalXPMultiplier of the usual forging XP. End an entry with * to match every prefab starting with it."); ForgingNonMetalXPMultiplier = BindServerConfig("Forging", "ForgingNonMetalXPMultiplier", 0.5f, "Multiplies the forging XP for items made without metal (see ForgingMetalIngredients).", advanced: false, 0f, 1f); ForgingBonusesPastLevel100 = BindServerConfig("Forging", "ForgingBonusesPastLevel100", value: false, PastLevel100Description("Forging", "Can keep forging's protection against breaking ahead of the refinement decay for many levels.")); EnableGathering = BindServerConfig("Farming", "EnableGathering", value: true, "Enable gathering skill changes."); EnableGatheringAOE = BindServerConfig("Farming", "EnableGatheringAOE", value: true, "Enable AOE gathering skill changes."); GatheringRangeFactor = BindServerConfig("Farming", "GatheringRangeFactor", 5f, "AOE gathering range you have at level 100.", advanced: false, 3f, 25f); ScytheHarvestRangeMultiplier = BindServerConfig("Farming", "ScytheHarvestRangeMultiplier", 3f, "How much farther the scythe reaches than AOE gathering by hand. The scythe's harvest radius at level 100 grows by GatheringRangeFactor times this, scaling up with your skill. 3 gives the scythe 17.5m of reach at level 100 with the default GatheringRangeFactor of 5, against 5m by hand. 0 leaves the scythe at its vanilla reach.", advanced: false, 0f, 10f); FarmingRangeRequiredLevel = BindServerConfig("Farming", "GatheringRangeRequiredLevel", 25, "The level that AOE gathering requires to activate.", advanced: false, 0, 100); GatheringLuckLevels = BindServerConfig("Farming", "GatheringLuckLevels", "50,70,90", "Higher values have a lower chance of dropping. Each comma seperated number entry (0-100) is a chance at an additional drop. Leave empty for no extra drops."); GatheringDisallowedItems = BindServerConfig("Farming", "GatheringDisallowedItems", Gathering.GetDefaultUnallowedPickablesString(), "Explicit list of items which can be picked, but do not get a luck roll for multiple loot and will not be auto-picked. Add things to this if they are getting luck rolls and should not be."); GatheringAllowedItems = BindServerConfig("Farming", "GatheringAllowedItems", "", "Comma separated list of items which always get a luck roll for multiple loot and can be auto-picked, for modded plants that are not detected on their own. Plants grown from a sapling, wild pickables that drop the same item, and pickables that drop food are detected automatically. GatheringDisallowedItems wins if an item is on both lists."); EnableFarmingBiomeUnrestricted = BindServerConfig("Farming", "EnableFarmingBiomeUnrestricted", value: true, "At the specified level, plants you have tended can grow in any biome."); FarmingBiomeUnrestrictedLevel = BindServerConfig("Farming", "FarmingBiomeUnrestrictedLevel", 50, "At this level, if enabled, plants you have tended ignore the biome they were planted in, along with the heat of the Ashlands and the cold of the Mountains and Deep North. They still need cultivated ground, sunlight and room to grow.", advanced: false, 0, 100); EnableFarmingGrowthTimeDisplay = BindClientConfig("Farming", "EnableFarmingGrowthTimeDisplay", value: true, "Shows roughly how long a healthy plant has left to grow when you look at it, once you reach FarmingGrowthTimeDisplayLevel. Turn this off if another mod already shows grow times."); FarmingGrowthTimeDisplayLevel = BindServerConfig("Farming", "FarmingGrowthTimeDisplayLevel", 12, "The Farming level at which plants start showing roughly how long they have left to grow.", advanced: false, 0, 100); EnableFarmingMultiPlant = BindServerConfig("Farming", "EnableFarmingMultiPlant", value: true, "Enables farming multi-planting"); FarmingMultiplantRequiredLevel = BindServerConfig("Farming", "FarmingMultiplantRequiredLevel", 25, "The level that Multiplant is enabled.", advanced: false, 0, 100); FarmingMultiplantMaxPlantedAtOnce = BindServerConfig("Farming", "FarmingMultiplantMaxPlantedAtOnce", 12, "The total number of plants that can be planted at once at maximum gathering."); FarmingMultiplantCountIncrement = BindServerConfig("Farming", "FarmingMultiplantCountIncrement", 2, "The step size the planting grid grows in as Farming rises. With the default of 2 the grid goes 1 -> 2 -> 4 -> 6 -> 8..., so the count stays even and lays out in tidy rows instead of leaving a ragged one. Set to 1 to grow one plant at a time.", advanced: false, 1, 12); FarmingMultiplantColumnCount = BindServerConfig("Farming", "FarmingMultiplantColumnCount", 4, "Maximum number of columns in the planting grid. The grid will form the closest square shape possible without exceeding this limit.", advanced: true, 1, 12); FarmingMultiPlantSnapToExisting = BindServerConfig("Farming", "FarmingMultiPlantSnapToExisting", value: true, "Automatically align new grid to nearby existing plants"); FarmingMultiPlantDistanceBufferModifier = BindClientConfig("Farming", "FarmingMultiPlantDistanceBufferModifier", 1.1f, "The increased distance that is applied to all plants requirements to ensure that they do not become unhealthy. A per-plant minimum derived from its grow radius and its collider, as a seedling and once grown, is always enforced on top, so lowering this cannot crowd a crop to death."); FarmingMultiPlantBufferSpace = BindClientConfig("Farming", "FarmingMultiPlantBufferSpace", 0.2f, "Additional space for all multiplanted plants to ensure they are healthy. A per-plant minimum is always enforced on top, so some plants (barley, flax, the seed crops, fir and pine) stay further apart than this setting alone would suggest.", advanced: true, 0f, 5f); PlantingCostStaminaReduction = BindServerConfig("Farming", "PlantingCostStaminaReduction", 1f, "At max level, the percentage reduction in stamina cost when planting or cultivating. Applies to every plant in a multiplanted grid as well as single plants. At 1 planting is free at Farming 100 and full price at Farming 0. 0.5 is what the game gives on its own, so that is the floor.", advanced: true, 0.5f, 1f); PlantingSnapDistance = BindClientConfig("Farming", "PlantingSnapDistance", 1f, "Extra margin (in meters) added beyond the planting grid's own extent when looking for nearby plants to snap to. The base search area already scales with the grid size and the plant's grow radius.", advanced: true, 0f, 10f); PlantingAOEHarvestResetSafety = BindServerConfig("Farming", "PlantingAOEHarvestResetSafety", 10f, "The number of seconds after an AOE harvest that harvesting will be re-enabled, even if it failed to reset."); FarmingSnapStyle = BindClientConfig("Farming", "FarmingSnapStyle", "Grid", "'Grid' detects the existing grid pattern and aligns to it; 'Legacy' snaps to the nearest plant position only.", new AcceptableValueList<string>(new string[2] { "Grid", "Legacy" }), advanced: true); FarmingSnapPreferCardinal = BindServerConfig("Farming", "FarmingSnapPreferCardinal", value: true, "Legacy snap style only: prefer axis-aligned (N/S/E/W) snap candidates over diagonal ones. Grid style is always lattice-aligned and ignores this.", null, advanced: true); EnableSnappingToOtherPlants = BindClientConfig("Farming", "EnableSnappingToOtherPlants", value: true, "When enabled, allows plant grid snapping to plants which are not the same kind as the currently planting one"); FarmingMultiPlantPersistOrientation = BindServerConfig("Farming", "FarmingMultiPlantPersistOrientation", value: true, "After planting, keep the same grid orientation for the next planting instead of resetting to the direction you're facing. Rotate (scroll) to change it."); FarmingMultiPlantRandomRotation = BindClientConfig("Farming", "FarmingMultiPlantRandomRotation", value: true, "Give each multiplanted crop its own random facing, the way vanilla planting does. Disable to have every crop in the grid face the same direction."); FarmingMultiPlantCenterRows = BindClientConfig("Farming", "FarmingMultiPlantCenterRows", value: true, "Center the planting grid on your cursor along the row (forward) axis. Disable to grow the grid forward from your cursor instead."); FarmingMultiPlantCenterColumns = BindClientConfig("Farming", "FarmingMultiPlantCenterColumns", value: true, "Center the planting grid on your cursor along the column (sideways) axis. Disable to grow the grid sideways from your cursor instead."); FarmingBonusesPastLevel100 = BindServerConfig("Farming", "FarmingBonusesPastLevel100", value: false, PastLevel100Description("Farming", "Can make multiplant grids larger than FarmingMultiplantMaxPlantedAtOnce.")); EnableHauling = BindServerConfig("Hauling", "EnableHauling", value: true, "Enables the hauling skill. While disabled the skill is hidden from the skills panel, and players keep their level for when it is enabled again."); EnableCarryWeightBonus = BindServerConfig("Hauling", "EnableCarryWeightBonus", value: true, "Enables the carry weight bonus from the hauling skill."); HaulingMaxWeightBonus = BindServerConfig("Hauling", "HaulingMaxWeightBonus", 50f, "The maximum carry weight bonus from the hauling skill (the value you get at skill level 100).", advanced: false, 0f, 300f); EnableHaulingCartMassReduction = BindServerConfig("Hauling", "EnableHaulingCartMassReduction", value: true, "Enables mass reduction for the cart (this makes the cart easier to move when heavily loaded)."); HaulingCartMassReduction = BindServerConfig("Hauling", "HaulingCartMassReduction", 0.8f, "The maximum reduction that a carts weight will recieve based on your hauling skill.", advanced: false, 0.01f, 1f); HaulingXPRate = BindServerConfig("Hauling", "HaulingXPRate", 0.2f, "The amount of XP that is gained each time with Hauling", advanced: false, 0.01f, 10f); HaulingXPCheckInterval = BindServerConfig("Hauling", "HaulingXPCheckInterval", 3, "How many seconds between checks for hauling XP while moving goods, both by cart and by carrying them.", advanced: false, 1, 60); HaulingXPCheckInterval.SettingChanged += HaulingXPTracker.OnIntervalChanged; HaulingXPMinDistance = BindServerConfig("Hauling", "HaulingXPMinDistance", 1f, "How far you must travel within the check interval to gain hauling XP. Set to 0 to gain hauling XP without moving.", advanced: false, 0f, 50f); EnableHaulingCarryWeightXP = BindServerConfig("Hauling", "EnableHaulingCarryWeightXP", value: true, "Enables gaining hauling XP while moving around with a heavily loaded inventory."); HaulingCarryWeightXPMinWeight = BindServerConfig("Hauling", "HaulingCarryWeightXPMinWeight", 275f, "The minimum total inventory weight you must be carrying to gain hauling XP from your load.", advanced: false, 0f, 2000f); HaulingCarryWeightXPRate = BindServerConfig("Hauling", "HaulingCarryWeightXPRate", 3f, "The amount of XP that is gained each interval while heavily loaded. This is scaled by how loaded you are.", advanced: false, 0.01f, 10f); HaulingMaxLoadRatio = BindServerConfig("Hauling", "HaulingMaxLoadRatio", 1.5f, "The maximum load ratio that hauling XP will scale with. Being over your carry weight grants bonus XP, this caps how much.", advanced: true, 1f, 5f); HaulingBonusesPastLevel100 = BindServerConfig("Hauling", "HaulingBonusesPastLevel100", value: false, PastLevel100Description("Hauling")); EnableJump = BindServerConfig("Jump", "EnableJump", value: true, "Enable jump skill changes."); JumpHeightFactor = BindServerConfig("Jump", "JumpHeightFactor", 125f, "Percentage of original jump height at skill level 100. 100 = no change, 50 = half height, 200 = double height.", advanced: false, 50f, 300f); JumpHeightRequiredLevel = BindServerConfig("Jump", "JumpHeightRequiredLevel", 10f, "Minimum jump skill level required to gain jump height bonuses.", advanced: false, 0f, 100f); EnableFallDamageReduction = BindServerConfig("Jump", "EnableFallDamageReduction", value: true, "Enable fall damage reduction based on jump skill."); FallDamageReductionFactor = BindServerConfig("Jump", "FallDamageReductionFactor", 0.5f, "How much fall damage is reduced at skill level 100. 0.5 means 50% reduction at max level.", advanced: false, 0f, 1f); FallDamageReductionRequiredLevel = BindServerConfig("Jump", "FallDamageReductionRequiredLevel", 15f, "Minimum jump skill level required to gain fall damage reduction.", advanced: false, 0f, 100f); EnableFallDamageHeightBonus = BindServerConfig("Jump", "EnableFallDamageHeightBonus", value: true, "Enables Jump skill impacting the distance you can fall without recieving any fall damage."); FallDamageHeightRequiredLevel = BindServerConfig("Jump", "FallDamageHeightRequiredLevel", 25f, "The required level to start getting an increase to the height at which you will not recieve any fall damage.", advanced: false, 0f, 100f); FallDamageHeightBonus = BindServerConfig("Jump", "FallDamageHeightBonus", 3f, "Bonus to max fall height before taking damage at skill level 100 (meters). Scales with skill level (default is 4, and this is added to that).", advanced: false, 0f, 50f); JumpBonusesPastLevel100 = BindServerConfig("Jump", "JumpBonusesPastLevel100", value: false, PastLevel100Description("Jump")); EnableMining = BindServerConfig("Mining", "EnableMining", value: true, "Enable mining skill changes."); MiningDmgMod = BindServerConfig("Mining", "MiningDmgMod", 1.2f, "How much your skill levels impact mining damage."); EnableMiningCritHit = BindServerConfig("Mining", "EnableMiningCritHit", value: true, "Enables mining critial hit strikes, must hit the required level for it to be active."); RequiredLevelForMiningCrit = BindServerConfig("Mining", "RequiredLevelForMiningCrit", 25, "Level the player must be for critical mining hits to activate", advanced: false, 0, 100); ChanceForMiningCritHit = BindServerConfig("Mining", "ChanceForMiningCritHit", 0.1f, "Chance for a critical hit when mining", advanced: false, 0f, 1f); CriticalHitDmgMult = BindServerConfig("Mining", "CriticalHitDmgMult", 3f, "Multipler for damage from a critical hit", advanced: false, 1f, 20f); MiningLootFactor = BindServerConfig("Mining", "MiningLootFactor", 2f, "How much the mining skill provides additional loot. 1 is vanilla (no bonus), 2 is 2x the loot at level 100.", advanced: false, 1f, 10f); EnableMiningAOE = BindServerConfig("Mining", "EnableMiningAOE", value: true, "Enable AOE mining skill changes."); ChanceForAOEOnHit = BindServerConfig("Mining", "ChanceForAOEOnHit", 0.3f, "Once AOE Mining is enabled, this is the chance for it to activate on any hit", advanced: false, 0f, 1f); ChanceForAOEOnHitScalesWithSkill = BindServerConfig("Mining", "ChanceForAOEOnHitScalesWithSkill", value: true, "Increases your chance for an AOE strike based on player skill"); MiningAOERange = BindServerConfig("Mining", "MiningAOERange", 2f, "How far away the mining AOE is applied. How far away an AOE hit is applied.", advanced: false, 0.5f, 10f); MiningAOELevel = BindServerConfig("Mining", "MiningAOELevel", 50f, "The level that AOE mining requires to activate. What skill level Mining AOE is enabled at.", advanced: false, 0f, 100f); EnableMiningRockBreaker = BindServerConfig("Mining", "EnableMiningRockBreaker", value: true, "Enable mining whole veins, by a (small) chance."); ProtectLeviathansWhenMined = BindServerConfig("Mining", "ProtectLeviathansWhenMined", value: true, "Keeps mined Leviathans (and LeviathanLava) from vanishing out from under you. Mining out the last ore node normally deletes the whole creature instantly, dropping you into the ocean or lava; with this enabled it starts its dive and sinks away instead. Rock breaker and AOE mining also stop rolling the dive reaction once per node."); RockBreakerMaxChance = BindServerConfig("Mining", "RockBreakerMaxChance", 0.05f, "The maximum chance to break a whole vein. 0.05 is 5% chance to break a whole vein at level 100. This is checked on each hit.", advanced: false, 0f, 1f); RockBreakerRequiredLevel = BindServerConfig("Mining", "RockBreakerRequiredLevel", 75, "The level that vein breaking requires to activate. What skill level whole rocks breaking is enabled at.", advanced: false, 0, 100); RockBreakerDamage = BindServerConfig("Mining", "RockBreakerDamage", 300f, "Veinbreakers damage, small damage numbers will mean triggering this will not destroy a whole vein, but massively weaken it. Large numbers will ensure the whole vein is destroyed.", advanced: false, 0f, 10000f); MinehitsPerInterval = BindServerConfig("Mining", "MinehitsPerInterval", 2, "The number of pieces per interval to break when mining large rocks.", advanced: true, 1, 100); SkillLevelBonusEnabledForMiningDropChance = BindServerConfig("Mining", "SkillLevelBonusEnabledForMiningDropChance", value: false, "Pickaxes skill level provides a bonus to drop chance for drops that are not gaurenteed (This can significantly increase muddy scrap-pile drops)."); SkipNonRockDropIncreases = BindServerConfig("Mining", "SkipNonRockDropIncreases", value: true, "When enabled, only ores/rocks will get the increased drops, this primarily impacts muddy scrap piles in vanilla."); SkipNonRockDropPrefabs = BindServerConfig("Mining", "SkipNonRockDropPrefabs", "LeatherScraps,WitheredBone", "List of prefabs which will not recieve increased mining drops. Should be comma seperated without spaces."); ReducedChanceDropsForLowAmountDrops = BindServerConfig("Mining", "ReducedChanceDropsForLowAmountDrops", value: false, "When Enabled, drops that have an amount increase below 1 will only have a chance to happen instead of being rounded up to 1, and always happening."); FractionalDropsAsChance = BindServerConfig("Mining", "FractionalDropsAsChance", value: true, "When enabled, drops that are less than 1 become a chance to drop one. When disabled drops below 1 will never result in drops."); DistanceMiningDropMultiplierChecks = BindServerConfig("Mining", "DistanceMiningDropMultiplierChecks", 20f, "How far away the loot multiplier will check when rocks are destroyed. Increasing this significantly can cause a performance impact.", advanced: true, 10f, 100f); RockbreakerSafetyResetTimeout = BindServerConfig("Mining", "RockbreakerSafetyResetTimeout", 30f, "How long to wait before re-enabling rock breaker after its last activation.", advanced: true, 10f, 120f); MiningBonusesPastLevel100 = BindServerConfig("Mining", "MiningBonusesPastLevel100", value: false, PastLevel100Description("Pickaxes")); EnableRide = BindServerConfig("Ride", "EnableRide", value: true, "Enable ride skill changes."); RideBonusesPastLevel100 = BindServerConfig("Ride", "RideBonusesPastLevel100", value: false, PastLevel100Description("Ride")); EnableRun = BindServerConfig("Run", "EnableRun", value: true, "Enable run skill changes."); RunSpeedFactor = BindServerConfig("Run", "RunSpeedFactor", 0.005f, "How much the run speed is increased based on your run level. Amount applied per level, 0.005 will make level 100 run give 50% faster running.", advanced: false, 0.001f, 0.06f); RunBonusesPastLevel100 = BindServerConfig("Run", "RunBonusesPastLevel100", value: false, PastLevel100Description("Run")); EnableStealth = BindServerConfig("Sneak", "EnableStealth", value: true, "Enable sneak skill changes."); SneakSpeedFactor = BindServerConfig("Sneak", "SneakSpeedFactor", 0.03f, "How much sneak speed is increased based on your sneak level. Amount applied per level, 0.03 will make level 100 sneak give normal walkspeed while sneaking.", advanced: false, 0.001f, 0.06f); SneakNoiseReductionLevel = BindServerConfig("Sneak", "SneakNoiseReductionLevel", 50f, "The level at which noise reduction starts being applied based on your skill", advanced: false, 0f, 100f); SneakNoiseReductionFactor = BindServerConfig("Sneak", "SneakNoiseReductionFactor", 0.5f, "How much noise is reduced based on your sneak level. Amount applied per level, 0.5 will make level 100 sneak give 50% less noise.", advanced: false, 0.1f, 1f); EnableSneakBonusDamage = BindServerConfig("Sneak", "EnableSneakBonusDamage", value: true, "Enable sneak bonus damage changes."); SneakBackstabBonusLevel = BindServerConfig("Sneak", "SneakBackstabBonusLevel", 25, "The level at which backstab damage starts being applied based on your skill", advanced: false, 0, 100); SneakBackstabBonusFactor = BindServerConfig("Sneak", "SneakBackstabBonusFactor", 2f, "How much backstab damage is increased based on your sneak level. 1 is a 100% bonus backstab damage at skill level 100.", advanced: false, 0.1f, 10f); SneakBonusesPastLevel100 = BindServerConfig("Sneak", "SneakBonusesPastLevel100", value: false, PastLevel100Description("Sneak")); EnableSwimming = BindServerConfig("Swimming", "EnableSwimming", value: true, "Enable swimming skill changes."); EnableSwimStaminaCostReduction = BindServerConfig("Swimming", "EnableSwimStaminaCostReduction", value: true, "Enables swim stamina cost reduction, at the level specified by SwimStaminaReductionLevel."); SwimSpeedRequiredLevel = BindServerConfig("Swimming", "SwimSpeedRequiredLevel", 25, "The level that swimming speed increases start being applied based on your skill", advanced: false, 0, 100); SwimmingSpeedFactor = BindServerConfig("Swimming", "SwimmingSpeedFactor", 3f, "How much swimming speed is increased based on your swimming level. This is modified by your characters swimming level. At skill level 100 the full value is in effect.", advanced: false, 0.1f, 10f); SwimStaminaReductionLevel = BindServerConfig("Swimming", "SwimStaminaReductionLevel", 50, "The level that swim stamina cost reductions start being applied based on your skill", advanced: false, 0, 100); SwimStaminaCostReductionFactor = BindServerConfig("Swimming", "SwimStaminaCostReductionFactor", 0.5f, "How much swim stamina cost is reduced based on your swimming level. This is modified by your characters swimming level. At skill level 100 the full value is in effect.", advanced: false, 0.1f, 1f); SwimmingBonusesPastLevel100 = BindServerConfig("Swimming", "SwimmingBonusesPastLevel100", value: false, PastLevel100Description("Swim")); EnableVoyager = BindServerConfig("Voyager", "EnableVoyager", value: true, "Enable voyager skill changes. While disabled the skill is hidden from the skills panel, and players keep their level for when it is enabled again."); VoyagerSkillXPCheckFrequency = BindServerConfig("Voyager", "VoyagerSkillXPCheckFrequency", 5, "How often Voyager skill can be increased while sailing. Rate varies based on your game physics engine speed.", advanced: false, 5, 200); VoyagerReduceCuttingStart = BindServerConfig("Voyager", "VoyagerReduceCuttingStart", 50f, "The level where your sails start catching wind closer to head-on, and the sailing penalty for other wind angles starts to shrink. Both improve gradually up to level 100.", advanced: false, 0f, 100f); VoyagerCuttingMinAngle = BindServerConfig("Voyager", "VoyagerCuttingMinAngle", 15f, "How close to head-on (in degrees off the bow) the wind can be while your sails still catch all of it, at level 100 Voyager. Vanilla is about 41. The ship HUD's wind ring shades in the angles you have won back.", advanced: false, 0f, 41f); VoyagerSailingSpeedFactor = BindServerConfig("Voyager", "VoyagerSailingSpeedFactor", 1.5f, "How much faster you sail at voyager level 100, scaling up with your level. 1.5 is 150% faster at level 100, 1 is double speed, 0.05 is only 5% faster, and 0 removes the bonus.", advanced: false, 0f, 20f); VoyagerIncreaseExplorationRadius = BindServerConfig("Voyager", "VoyagerIncreaseExplorationRadius", 3f, "How much the exploration radius is increased based on your voyager level. Amount applied per level, 1 will make level 100 voyager give 100% more exploration radius.", advanced: false, 0f, 20f); VoyagerPaddleSpeedBonus = BindServerConfig("Voyager", "VoyagerPaddleSpeedBonus", 2f, "How much the paddle speed is increased based on your voyager level. 1 is a 100% bonus at level 100", advanced: false, 0.01f, 5f); VoyagerPaddleSpeedBonusLevel = BindServerConfig("Voyager", "VoyagerPaddleSpeedBonusLevel", 25f, "The level that the player starts to get a bonus to paddle speed.", advanced: false, 0f, 100f); EnableFriendsRowSpeedBonus = BindServerConfig("Voyager", "EnableFriendsRowSpeedBonus", value: true, "Whether or not friends attached to the ship will provide a 'rowing' speed bonus."); MaxFriendsRowSpeedBonus = BindServerConfig("Voyager", "MaxFriendsRowSpeedBonus", 0.25f, "The maximum speed bonus percent that each player can contribute. Players contribution is based on their own Voyager skill level.", advanced: false, 0f, 2f); EnableBoatDamageReduction = BindServerConfig("Voyager", "EnableBoatDamageReduction", value: true, "Enable to reduce damage to your boat as Voyager skill level increases."); VoyagerDamageReductionAmount = BindServerConfig("Voyager", "VoyagerDamageReductionAmount", 0.9f, "The maximum percentage of damage reduction, at level 100 skill. Scaled to skill. 1 is 100% damage reduction at player skill level 100.", advanced: false, 0f, 1f); BoatDamageReductionLevel = BindServerConfig("Voyager", "BoatDamageReductionLevel", 35, "The level at which you start to recieve a damage reduction from damage taken while on the boat"); VoyagerImpactResistance = BindServerConfig("Voyager", "VoyagerImpactResistance", value: true, "Whether or not impact resistance is enabled."); VoyagerImpactResistanceLevel = BindServerConfig("Voyager", "VoyagerImpactResistanceLevel", 75, "The level at which impact resistance is enabled. This prevents the ship you are aboard from taking damage when it bumps into something."); VoyagerBonusesPastLevel100 = BindServerConfig("Voyager", "VoyagerBonusesPastLevel100", value: false, PastLevel100Description("Voyager")); EnableWoodcutting = BindServerConfig("Woodcutting", "EnableWoodcutting", value: true, "Enable woodcutting skill changes."); WoodCuttingDmgMod = BindServerConfig("Woodcutting", "WoodCuttingDmgMod", 1.2f, "How much skill levels impact your chop damage."); WoodCuttingLootFactor = BindServerConfig("Woodcutting", "WoodCuttingLootFactor", 3f, "How much the woodcutting skill provides additional loot. 1 is vanilla (no bonus), 2 is 2x the loot at level 100.", advanced: false, 1f, 10f); WoodcuttingBonusesPastLevel100 = BindServerConfig("Woodcutting", "WoodcuttingBonusesPastLevel100", value: false, PastLevel100Description("Woodcutting")); EnableWeaponSkill = BindServerConfig("WeaponSkills", "EnableWeaponSkill", value: true, "Enable weapon skill changes."); WeaponSkillStaminaReduction = BindServerConfig("WeaponSkills", "WeaponSkillStaminaReduction", 0.5f, "How much stamina is reduced based on your weapon skill level at level 100. 0.5 will make level 100 weapon skill give 50% less stamina cost.", advanced: false, 0f, 1f); WeaponSkillParryBonus = BindServerConfig("WeaponSkills", "WeaponSkillParryBonus", 1f, "How much extra XP you get for parrying an attack", advanced: false, 0f, 10f); WeaponSkillBowDrawStaminaCostReduction = BindServerConfig("WeaponSkills", "WeaponSkillBowDrawStaminaCostReduction", 0.5f, "How much the stamina drained while holding a bow drawn is reduced, at skill level 100. 0.5 will make level 100 bows drain 50% less stamina while drawn. Vanilla is .33, so lower values leave the game's own reduction in place.", advanced: false, 0f, 1f); WeaponSkillEquipRequiredLevel = BindServerConfig("WeaponSkills", "WeaponSkillEquipRequiredLevel", 45, "The level that equip speed bonuses start being applied based on your skill", advanced: true, 0, 100); WeaponSkillEquipSpeedFactor = BindServerConfig("WeaponSkills", "WeaponSkillEquipSpeedFactor", 2f, "How much faster your equipment is equipped based on your weapon skill.", advanced: true, 0f, 20f); EnableCrossbowReloadPause = BindServerConfig("WeaponSkills", "EnableCrossbowReloadPause", value: true, "Sprinting, jumping and dodging pause your crossbow reload instead of restarting it, once your crossbow skill reaches CrossbowReloadPauseLevel."); CrossbowReloadPauseLevel = BindServerConfig("WeaponSkills", "CrossbowReloadPauseLevel", 50, "The crossbow skill level at which sprinting, jumping and dodging pause your reload instead of restarting it.", advanced: false, 0, 100); EnableMagicReloadPause = BindServerConfig("WeaponSkills", "EnableMagicReloadPause", value: true, "Sprinting, jumping and dodging pause the reload of an elemental or blood magic weapon instead of restarting it, once the weapon's magic skill reaches MagicReloadPauseLevel."); MagicReloadPauseLevel = BindServerConfig("WeaponSkills", "MagicReloadPauseLevel", 50, "The elemental or blood magic skill level (whichever the weapon uses) at which sprinting, jumping and dodging pause its reload instead of restarting it.", advanced: false, 0, 100); EnableCrossbowDistanceXP = BindServerConfig("WeaponSkills", "EnableCrossbowDistanceXP", value: true, "Crossbow hits grant bonus XP based on how far away the target is."); CrossbowDistanceXPMaxBonus = BindServerConfig("WeaponSkills", "CrossbowDistanceXPMaxBonus", 5f, "The bonus crossbow XP for a hit at CrossbowDistanceXPMaxDistance or further, growing evenly from nothing at point blank. 5 is a 500% bonus (6x the XP).", advanced: false, 0f, 20f); CrossbowDistanceXPMaxDistance = BindServerConfig("WeaponSkills", "CrossbowDistanceXPMaxDistance", 150f, "The distance in meters from you to the hit at which the full CrossbowDistanceXPMaxBonus is reached.", advanced: false, 10f, 500f); EnableBowDistanceXP = BindServerConfig("WeaponSkills", "EnableBowDistanceXP", value: true, "Bow hits grant bonus XP based on how far the arrow travelled. Close shots gain little or nothing, long shots gain much more."); BowDistanceXPMaxBonus = BindServerConfig("WeaponSkills", "BowDistanceXPMaxBonus", 8f, "The bonus bow XP for a hit at BowDistanceXPMaxDistance or further. 8 is an 800% bonus (9x the XP).", advanced: false, 0f, 20f); BowDistanceXPMinDistance = BindServerConfig("WeaponSkills", "BowDistanceXPMinDistance", 15f, "Bow hits closer than this many meters gain no bonus XP. The bonus starts growing from here.", advanced: false, 0f, 100f); BowDistanceXPMaxDistance = BindServerConfig("WeaponSkills", "BowDistanceXPMaxDistance", 100f, "The distance in meters at which the full BowDistanceXPMaxBonus is reached. Should be further than BowDistanceXPMinDistance.", advanced: false, 10f, 500f); BowDistanceXPCurve = BindServerConfig("WeaponSkills", "BowDistanceXPCurve", 2f, "How sharply the bow bonus grows between the min and max distance. 1 grows evenly like crossbows, 2 keeps most of the bonus for the longest shots (halfway gives a quarter of it), higher is sharper still.", advanced: false, 1f, 5f); WeaponSkillBonusesPastLevel100 = BindServerConfig("WeaponSkills", "WeaponSkillBonusesPastLevel100", value: false, PastLevel100Description("weapon skill")); EnableKnowledgeSharing = BindServerConfig("SkillRates", "EnableKnowledgeSharing", value: true, "Enable shared knowledge, this allows you to gain faster experiance in low skills if you already have other high skills (eg switching primary weapon skill)."); AnimalTamingSkillGainRate = BindServerConfig("SkillRates", "AnimalTamingSkillGainRate", 1f, "How fast the skill is gained.", advanced: false, 0f, 50f); VoyagerSkillGainRate = BindServerConfig("SkillRates", "VoyagerSkillGainRate", 4f, "How fast the skill is gained.", advanced: false, 0f, 50f); SharedKnowledgeSkillBonusRate = BindServerConfig("SkillRates", "SharedKnowledgeSkillBonusRate", 1.5f, "How strong at maximum the xp bonus from shared knowledge will be when catching up skills lower than your highest.", advanced: false, 0f, 10f); SharedKnowledgeCap = BindServerConfig("SkillRates", "SharedKnowledgeCap", 5f, "The number of levels below your maximum skill that shared knowledge stops providing a bonus at. Eg: max skill 90, at 5 any skills 85+ will not recieve an xp bonus.", advanced: true, 0f, 50f); SharedKnowledgeIgnoreList = BindServerConfig("SkillRates", "SharedKnowledgeIgnoreList", "", "Comma separated list of skills to ignore when calculating shared knowledge. This is useful for skills that have vastly different XP curves or that you simply do not want an accelerated growth rate in. Invalid skill names will be ignored."); SharedKnowledgeIgnoreList.SettingChanged += SharedKnowledge.UnallowedSharedXPSkillTypesChanged; AdditionalSkillNames = BindServerConfig("SkillRates", "AdditionalSkillNames", "", "Comma separated list of extra skill names to create gain rate entries for. Skills added by other mods are detected automatically, so this is only needed when one is missed. Use the skill name (SkillManager) or the skill identifier (Jotunn) exactly as the other mod defines it. New entries appear after the next game start."); AdditionalSkillNames.SettingChanged += SkillRates.AdditionalSkillNamesChanged; EnableExtraStamina = BindServerConfig("Extra Stamina", "EnableExtraStamina", value: false, "Enable gaining extra base stamina as your non-combat physical skills level up."); ExtraStaminaPerSkill = BindServerConfig("Extra Stamina", "ExtraStaminaPerSkill", 10f, "The amount of extra base stamina provided by each skill when it is at level 100, the bonus scales linearly up to level 100.", advanced: false, 0f, 100f); EnableExtraStaminaSkills = BindServerConfig("Extra Stamina", "EnableExtraStaminaSkills", StatGains.AllStaminaSkills, "Which skills provide extra base stamina as they increase. A skill turned off by its own Enable setting gives none."); EnableExtraEitr = BindServerConfig("Extra Eitr", "EnableExtraEitr", value: false, "Enable gaining extra base eitr as your magic skills level up."); ExtraEitrPerSkill = BindServerConfig("Extra Eitr", "ExtraEitrPerSkill", 40f, "The amount of extra base eitr provided by each skill when it is at level 100, the bonus scales linearly up to level 100.", advanced: false, 0f, 100f); EnableExtraEitrSkills = BindServerConfig("Extra Eitr", "EnableExtraEitrSkills", StatGains.AllEitrSkills, "Which skills provide extra base eitr as they increase. A skill turned off by its own Enable setting gives none."); PreferOtherPlantGrid = BindServerConfig("Mod Compatibility", "PreferOtherPlantGrid", value: true, "When enabled, and an other planting grid mod is enabled (), Impactful skills planting grid will be disabled."); } private static string PastLevel100Description(string skill, string warning = null) { string text = "Lets " + skill + " bonuses keep growing past their level 100 values when gear, food or other mods boost the skill beyond 100. Off stops every bonus at its level 100 value, however far the skill is boosted. Level requirements always use the boosted level."; if (warning != null) { return text + " " + warning; } return text; } internal static void SetupMainFileWatcher() { FileSystemWatcher fileSystemWatcher = new FileSystemWatcher(); fileSystemWatcher.NotifyFilter = NotifyFilters.LastWrite; fileSystemWatcher.Path = Path.GetDirectoryName(cfg.ConfigFilePath); fileSystemWatcher.Filter = "MidnightsFX.ImpactfulSkills.cfg"; fileSystemWatcher.Changed += OnConfigFileChanged; fileSystemWatcher.SynchronizingObject = ThreadingHelper.SynchronizingObject; fileSystemWatcher.EnableRaisingEvents = true; } internal static void BeginBatchBind() { cfg.SaveOnConfigSet = false; } internal static void EndBatchBind(bool save) { cfg.SaveOnConfigSet = true; if (save) { cfg.Save(); } } private static void OnConfigFileChanged(object sender, FileSystemEventArgs e) { if (!((Object)(object)ZNet.instance == (Object)null) && ZNet.instance.IsServer()) { Logger.LogInfo("Configuration file has been changed, reloading settings."); cfg.Reload(); } } internal static void SendXPForSkillInArea(DataObjects.XPIncreaseRequest xp_increase) { //IL_0014: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)ZNet.instance == (Object)null) { return; } Logger.LogDebug($"Requesting {xp_increase.Skill} xp increase {xp_increase.Amount}"); ZPackage val = xp_increase.ToPackage(); if (ZNet.instance.IsServer()) { SendXPRequestToInRangePlayers(xp_increase, val); GrantLocalPlayerXP(xp_increase); return; } ZNetPeer serverPeer = ZNet.instance.GetServerPeer(); if (serverPeer != null) { SkillIncreaseXP.SendPackage(serverPeer.m_uid, val); } } private static void GrantLocalPlayerXP(DataObjects.XPIncreaseRequest xpdetails) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)Player.m_localPlayer == (Object)null) && Vector3.Distance(((Component)Player.m_localPlayer).transform.position, (Vector3)xpdetails.Location) <= xpdetails.Range) { ((Character)Player.m_localPlayer).RaiseSkill(xpdetails.Skill, xpdetails.Amount); } } internal static IEnumerator OnServerReceiveXPRequest(long sender, ZPackage pkg) { if (pkg != null) { DataObjects.XPIncreaseRequest xPIncreaseRequest = DataObjects.XPIncreaseRequest.FromPackage(pkg); SendXPRequestToInRangePlayers(xPIncreaseRequest, xPIncreaseRequest.ToPackage()); } yield break; } private static void SendXPRequestToInRangePlayers(DataObjects.XPIncreaseRequest xpdetails, ZPackage pkg) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) foreach (ZNetPeer item in Util.ServerGetPeersInArea(xpdetails.Location, xpdetails.Range)) { SkillIncreaseXP.SendPackage(item.m_uid, pkg); } } internal static IEnumerator OnClientReceiveXPGrant(long sender, ZPackage pkg) { if (pkg != null && (Object)(object)Player.m_localPlayer != (Object)null) { DataObjects.XPIncreaseRequest xPIncreaseRequest = DataObjects.XPIncreaseRequest.FromPackage(pkg); ((Character)Player.m_localPlayer).RaiseSkill(xPIncreaseRequest.Skill, xPIncreaseRequest.Amount); } yield break; } public static ConfigEntry<KeyboardShortcut> BindClientConfig(string category, string key, KeyboardShortcut value, string description, bool advanced = false) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<KeyboardShortcut>(cfg, category, key, value, description, false, false, true, (AcceptableValueBase)null, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<bool> BindClientConfig(string category, string key, bool value, string description, AcceptableValueBase acceptableValues = null, bool advanced = false) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<bool>(cfg, category, key, value, description, false, false, true, acceptableValues, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<float> BindClientConfig(string category, string key, float value, string description, bool advanced = false, float valmin = 0f, float valmax = 150f) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<float>(cfg, category, key, value, description, false, false, true, (AcceptableValueBase)(object)new AcceptableValueRange<float>(valmin, valmax), (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<string> BindClientConfig(string category, string key, string value, string description, AcceptableValueList<string> acceptableValues = null, bool advanced = false) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<string>(cfg, category, key, value, description, false, false, true, (AcceptableValueBase)(object)acceptableValues, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<T> BindClientConfig<T>(string category, string key, T value, string description, AcceptableValueBase acceptableValues = null, bool advanced = false) where T : Enum { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<T>(cfg, category, key, value, description, false, false, true, acceptableValues, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<float[]> BindServerConfig(string category, string key, float[] value, string description, bool advanced = false, float valmin = 0f, float valmax = 150f) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<float[]>(cfg, category, key, value, description, true, false, true, (AcceptableValueBase)(object)new AcceptableValueRange<float>(valmin, valmax), (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<T> BindServerConfig<T>(string category, string key, T value, string description, AcceptableValueBase acceptableValues = null, bool advanced = false) where T : Enum { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<T>(cfg, category, key, value, description, true, false, true, acceptableValues, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<bool> BindServerConfig(string category, string key, bool value, string description, AcceptableValueBase acceptableValues = null, bool advanced = false) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<bool>(cfg, category, key, value, description, true, false, true, acceptableValues, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<int> BindServerConfig(string category, string key, int value, string description, bool advanced = false, int valmin = 0, int valmax = 150) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<int>(cfg, category, key, value, description, true, false, true, (AcceptableValueBase)(object)new AcceptableValueRange<int>(valmin, valmax), (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<float> BindServerConfig(string category, string key, float value, string description, bool advanced = false, float valmin = 0f, float valmax = 150f) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<float>(cfg, category, key, value, description, true, false, true, (AcceptableValueBase)(object)new AcceptableValueRange<float>(valmin, valmax), (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } public static ConfigEntry<string> BindServerConfig(string category, string key, string value, string description, AcceptableValueList<string> acceptableValues = null, bool advanced = false) { //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Expected O, but got Unknown return ConfigFileExtensions.BindConfigInOrder<string>(cfg, category, key, value, description, true, false, true, (AcceptableValueBase)(object)acceptableValues, (Action<ConfigEntryBase>)null, new ConfigurationManagerAttributes { IsAdvanced = advanced }); } } internal static class IngredientQuality { internal enum CraftMode { None, Amount, ItemQuality } [HarmonyPatch(typeof(Player), "ConsumeResources")] internal static class ConsumeQualityIngredientTierPatch { private static readonly MethodInfo InventoryRemoveItemMethod = AccessTools.Method(typeof(Inventory), "RemoveItem", new Type[4] { typeof(string), typeof(int), typeof(int), typeof(bool) }, (Type[])null); private static readonly MethodInfo RemoveItemAtLowestTierMethod = AccessTools.Method(typeof(IngredientQuality), "RemoveItemAtLowestTier", (Type[])null, (Type[])null); [HarmonyTranspiler] [HarmonyPriority(0)] private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { List<CodeInstruction> list = new List<CodeInstruction>(instructions); List<CodeInstruction> list2 = list.FindAll((CodeInstruction instruction) => CodeInstructionExtensions.Calls(instruction, InventoryRemoveItemMethod)); if (list2.Count != 1) { Logger.LogWarning($"Unable to patch ingredient quality consumption. Expected 1 call to Inventory.RemoveItem in Player.ConsumeResources, found {list2.Count}, it was likely replaced by another mod. Skipping this patch, crafts will consume ingredients of any quality tier."); return list; } list2[0].opcode = OpCodes.Call; list2[0].operand = RemoveItemAtLowestTierMethod; return list; } } private static int[] TierCounts = new int[6]; internal static bool AnyFeatureEnabled { get { if (!ValConfig.EnableQualityIngredientScaling.Value) { return ValConfig.ScaleCraftedEquipmentQuality.Value; } return true; } } internal static bool HasQuality(Requirement requirement) { if (requirement == null || (Object)(object)requirement.m_resItem == (Object)null) { return false; } return requirement.m_resItem.m_itemData.m_shared.m_maxQuality > 1; } internal static bool CarriesQuality(Requirement requirement) { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Invalid comparison between Unknown and I4 if (!HasQuality(requirement)) { return false; } SharedData shared = requirement.m_resItem.m_itemData.m_shared; if (ValConfig.RestrictQualityScalingToFish.Value) { return (int)shared.m_itemType == 21; } return true; } internal static bool IsSpentAt(Requirement requirement, CraftingStation station) { if (requirement == null || (Object)(object)requirement.m_resItem == (Object)null) { return false; } if (!((Object)(object)station != (Object)null)) { return !requirement.m_upgraderResource; } return station.m_upgrader == requirement.m_upgraderResource; } internal static CraftMode Classify(Recipe recipe, CraftingStation station, out int amountIndex) { amountIndex = -1; if ((Object)(object)recipe == (Object)null || (Object)(object)recipe.m_item == (Object)null) { return CraftMode.None; } if (recipe.m_requireOnlyOneIngredient) { return CraftMode.None; } Requirement[] resources = recipe.m_resources; if (resources == null) { return CraftMode.None; } int num = 0; int num2 = 0; int num3 = -1; for (int i = 0; i < resources.Length; i++) { if (IsSpentAt(resources[i], station) && HasQuality(resources[i])) { num++; if (CarriesQuality(resources[i])) { num2++; num3 = i; } } } if (num == 0) { return CraftMode.None; } if (recipe.m_item.m_itemData.m_shared.m_maxQuality > 1) { if (!ValConfig.ScaleCraftedEquipmentQuality.Value) { return CraftMode.None; } return CraftMode.ItemQuality; } if (!ValConfig.EnableQualityIngredientScaling.Value) { return CraftMode.None; } if (num > 1 || num2 != 1) { return CraftMode.None; } if (recipe.m_item.m_itemData.m_shared.m_maxStackSize <= 1 && !ValConfig.ScaleNonStackingCraftOutputs.Value) { return CraftMode.None; } amountIndex = num3; return CraftMode.Amount; } internal static int PanelCraftMultiplier() { InventoryGui instance = InventoryGui.instance; if ((Object)(object)instance == (Object)null || ((RecipeDataPair)(ref instance.m_selectedRecipe)).ItemData != null) { return 1; } if (!ZInput.GetButton("AltPlace") && !ZInput.GetButton("JoyLStick")) { return 1; } return instance.m_multiCraftAmount; } internal static int SelectTier(Inventory inventory, ItemData prototype, int required) { if (prototype == null) { return 0; } return SelectTier(inventory, prototype.m_shared.m_name, prototype.m_shared.m_maxQuality, required); } internal static int SelectTier(Inventory inventory, string name, int maxQuality, int required) { if (inventory == null || name == null || required <= 0) { return 0; } if (maxQuality <= 1) { return 0; } if (TierCounts.Length < maxQuality + 1) { TierCounts = new int[maxQuality + 1]; } Array.Clear(TierCounts, 0, maxQuality + 1); foreach (ItemData item in inventory.m_inventory) { if (item != null && !(item.m_shared.m_name != name) && item.m_worldLevel >= Game.m_worldLevel && item.m_quality >= 1 && item.m_quality <= maxQuality) { TierCounts[item.m_qua