Decompiled source of OutHard Gameplay Overhaul v6.10.14
OuthardCombat.dll
Decompiled 2 weeks agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace OutwardModTemplate; [BepInPlugin("DubsMod.NoCombatMusic", "NoCombatMusic", "1.0.0")] public class DubsNoCombatMod : BaseUnityPlugin { public const string GUID = "DubsMod.NoCombatMusic"; public const string NAME = "NoCombatMusic"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; internal void Awake() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) Log = ((BaseUnityPlugin)this).Logger; new Harmony("DubsMod.NoCombatMusic").PatchAll(); } } [HarmonyPatch(typeof(GlobalAudioManager), "CombatStarted")] public class GlobalAudioManagerNoCombatMusic { [HarmonyPrefix] private static bool Prefix(Character __instance) { return false; } } [BepInPlugin("com.outward.DubsPotions", "DubsPotions", "1.0")] public class DubsPotions : BaseUnityPlugin { [HarmonyPatch(typeof(Item), "StartEffectsCast")] private class Item_StartEffectsCast { [HarmonyPrefix] public static bool Prefix(Item __instance, Character _targetChar) { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Invalid comparison between Unknown and I4 //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) if (__instance.IsDrink) { int num = (int)methodGetCastSheathRequired.Invoke(__instance, new object[0]); SpellCastModifier val = (SpellCastModifier)1; SpellCastType val2 = __instance.ActivateEffectAnimType; if ((int)val2 == 28) { val2 = (SpellCastType)2; } _targetChar.CastSpell(val2, ((Component)__instance).gameObject, val, num, __instance.MobileCastMovementMult); return false; } return true; } } private const string ID = "com.outward.DubsPotions"; private const string NAME = "DubsPotions"; private const string VERSION = "1.0"; private static MethodInfo methodGetCastSheathRequired; internal void Awake() { //IL_0023: Unknown result type (might be due to invalid IL or missing references) methodGetCastSheathRequired = typeof(Item).GetMethod("GetCastSheathRequired", AccessTools.all); new Harmony("com.outward.DubsPotions").PatchAll(Assembly.GetExecutingAssembly()); } } public class DubsSkillLearner { }
OuthardEconomy.dll
Decompiled 2 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using SideLoader; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace UniqueDropToBoss; public class AdditionalItemDrops { public int ItemID; public int ItemAmount; } [BepInPlugin("dub.uniquedroptoboss", "Unique Drop To Boss", "1.0.0")] public class UniqueDropToBossPlugin : BaseUnityPlugin { public const string GUID = "dub.uniquedroptoboss"; public const string NAME = "Unique Drop To Boss"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; public static ConfigEntry<float> Item59200; public static ConfigEntry<float> Item59201; public static ConfigEntry<float> Item59202; public static ConfigEntry<float> Item59203; public static ConfigEntry<float> Item59204; public static ConfigEntry<float> Item59205; public static ConfigEntry<int> GoldMinDrop; public static ConfigEntry<int> GoldMaxDrop; public const int GoldCurrencyID = -59200; public static List<AdditionalItemDrops> ItemDrops; public static Dictionary<int, ConfigEntry<float>> Map; public static Sprite CustomSilverIcon; private List<string> enemies; private Random random; public static UniqueDropToBossPlugin Instance { get; private set; } internal void Awake() { //IL_020d: Unknown result type (might be due to invalid IL or missing references) //IL_0213: Expected O, but got Unknown Instance = this; Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello world from Unique Drop To Boss 1.0.0!"); Item59200 = ((BaseUnityPlugin)this).Config.Bind<float>("Dub Item Drop Chances", "Gold Coin Drop Chance", 50f, "Chance of gold coins dropping (0-100)"); Item59201 = ((BaseUnityPlugin)this).Config.Bind<float>("Dub Item Drop Chances", "Forgotten Knowledge Drop Chance", 50f, "Chance of forgotten knowledge dropping (0-100)"); Item59202 = ((BaseUnityPlugin)this).Config.Bind<float>("Dub Item Drop Chances", "Knowledge Scroll", 50f, "Chance of knowledge scroll dropping (0-100)"); Item59203 = ((BaseUnityPlugin)this).Config.Bind<float>("Dub Item Drop Chances", "Advanced Knowledge Scroll", 50f, "Chance of advanced knowledge scroll dropping (0-100)"); Item59204 = ((BaseUnityPlugin)this).Config.Bind<float>("Dub Item Drop Chances", "Attribute Scroll", 50f, "Chance of attribute scroll dropping (0-100)"); GoldMinDrop = ((BaseUnityPlugin)this).Config.Bind<int>("Dub Item Drop Chances", "Gold Drop Min", 5, "Minimum amount of gold to drop"); GoldMaxDrop = ((BaseUnityPlugin)this).Config.Bind<int>("Dub Item Drop Chances", "Gold Drop Max", 50, "Maximum amount of gold to drop"); Map.Clear(); Map.Add(-59200, Item59200); Map.Add(-59201, Item59201); Map.Add(-59202, Item59202); Map.Add(-59203, Item59203); Map.Add(-59204, Item59204); SL.OnSceneLoaded += SceneManager_sceneLoaded; SL.OnPacksLoaded += SL_OnPacksLoaded; random = new Random(); enemies = new List<string> { "Tyrant of the Hive", "The Royal Manticore", "The First Cannibal", "Rospa the Conqueror", "Balira", "Crock", "Guardian of the Compass" }; Harmony val = new Harmony("dub.uniquedroptoboss"); try { val.PatchAll(); Log.LogMessage((object)"Harmony patches applied successfully!"); foreach (MethodBase patchedMethod in val.GetPatchedMethods()) { ManualLogSource log = Log; string text = "Patched method: "; Type declaringType = patchedMethod.DeclaringType; log.LogMessage((object)(text + ((declaringType != null) ? declaringType.Name : null) + "." + patchedMethod.Name)); } } catch (Exception ex) { Log.LogError((object)("Failed to apply Harmony patches: " + ex.Message)); Log.LogError((object)("Stack trace: " + ex.StackTrace)); } } internal void SceneManager_sceneLoaded() { string sceneName = AreaManager.Instance.CurrentArea.SceneName; AddDropTable(sceneName); } private void AddDropTable(string scene) { Log.LogMessage((object)("Scene: " + scene)); if (scene == "LowMemory_TransitionScene" || scene == "MainMenu_Empty") { return; } Transform transform = ((Component)AISceneManager.Instance).gameObject.transform; Character[] componentsInChildren = ((Component)transform).GetComponentsInChildren<Character>(); if (componentsInChildren != null && componentsInChildren.Length != 0) { Character[] array = componentsInChildren; foreach (Character val in array) { if (!((Object)(object)val != (Object)null) || !enemies.Contains(val.Name) || !val.Alive) { continue; } int num = -59207; ItemContainer pouch = val.Inventory.Pouch; if (!((Object)(object)pouch != (Object)null)) { continue; } if ((Object)(object)pouch.GetItemFromID(num) == (Object)null) { int num2 = random.Next(350, 401); Item val2 = ItemManager.Instance.GenerateItemNetwork(num); if ((Object)(object)val2 != (Object)null) { try { val.Inventory.GenerateItem(val2, num2, false); Log.LogMessage((object)$"Successfully added drop: Expertise (x{num2}) to: {val.Name}."); } catch (Exception ex) { Log.LogError((object)$"Failed to add drop to {val.Name}: {ex.Message}"); } } else { Log.LogError((object)$"Could not generate item for ID: {num}"); } } else { Log.LogMessage((object)$"Boss {val.Name} already has expertise items, skipping."); } } } else { Log.LogMessage((object)"No characters found in the scene."); } } private void SL_OnPacksLoaded() { Log.LogMessage((object)"SL_OnPacksLoaded : OutHard_Gameplay_Overhaul"); SLPack sLPack = SL.GetSLPack("OutHard_Gameplay_Overhaul"); if (sLPack != null) { Texture2D val = sLPack.Texture2D["Influence"]; if ((Object)(object)val != (Object)null) { Log.LogMessage((object)"creating sprite from texture"); Log.LogMessage((object)CustomSilverIcon); } else { Log.LogMessage((object)"Could not find Texture named Influence"); } } else { Log.LogMessage((object)"Could not find SLPack : OutHard_Gameplay_Overhaul"); } } public static List<int> CanItemDrop(Character Character) { List<int> list = new List<int>(); foreach (AdditionalItemDrops itemDrop in ItemDrops) { float num = Random.Range(0, 100); if (Map.ContainsKey(itemDrop.ItemID) && num <= Map[itemDrop.ItemID].Value) { list.Add(itemDrop.ItemID); break; } } return list; } public static void GrantCharacterItems(List<int> Droppeditems, Character character) { if (Droppeditems == null || Droppeditems.Count <= 0) { return; } foreach (int Droppeditem in Droppeditems) { if (Droppeditem == -59200) { int num = Random.Range(GoldMinDrop.Value, GoldMaxDrop.Value); character.Inventory.GenerateItem(ItemManager.Instance.GenerateItemNetwork(Droppeditem), num, false); } else { character.Inventory.GenerateItem(ItemManager.Instance.GenerateItemNetwork(Droppeditem), 1, false); } } } static UniqueDropToBossPlugin() { ItemDrops = new List<AdditionalItemDrops>(); Map = new Dictionary<int, ConfigEntry<float>>(); CustomSilverIcon = null; } } [HarmonyPatch(typeof(Merchant), "RefreshInventory")] [HarmonyPriority(0)] public class MerchantRefreshInventoryPatch { private static void Postfix(Merchant __instance) { UniqueDropToBossPlugin.Log.LogMessage((object)("MerchantRefreshInventoryPatch: Removing silver from merchant: " + ((Object)__instance).name)); __instance.MerchantPouch.RemoveAllSilver(); __instance.AverageSilverOnRefresh = 0; UniqueDropToBossPlugin.Log.LogMessage((object)"MerchantRefreshInventoryPatch: Silver removed successfully"); } }
OuthardEnvironment.dll
Decompiled 2 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using UnityEngine; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("TavernBedNeeds")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TavernBedNeeds")] [assembly: AssemblyCopyright("Copyright © 2025")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("7db1cc17-cc20-4e02-90aa-033b185a6cbe")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace DisableRestFoodDrinkRestore; [BepInPlugin("com.yourname.outward.disablerestfooddrink", "Disable Rest Food/Drink Restore", "1.0.0")] public class DisableRestFoodDrinkRestorePlugin : BaseUnityPlugin { [HarmonyPatch(typeof(CharacterResting), "GetFoodRestored")] public class GetFoodRestored_Patch { private static bool Prefix(ref float __result) { if (!modEnabled.Value || !disableFoodRestore.Value) { return true; } __result = 0f; return false; } } [HarmonyPatch(typeof(CharacterResting), "GetPostRestFoodRestored")] public class GetPostRestFoodRestored_Patch { private static bool Prefix(ref float __result) { if (!modEnabled.Value || !disableFoodRestore.Value) { return true; } __result = 0f; return false; } } [HarmonyPatch(typeof(CharacterResting), "GetDrinkRestored")] public class GetDrinkRestored_Patch { private static bool Prefix(ref float __result) { if (!modEnabled.Value || !disableDrinkRestore.Value) { return true; } __result = 0f; return false; } } [HarmonyPatch(typeof(CharacterResting), "GetPostRestDrinkRestored")] public class GetPostRestDrinkRestored_Patch { private static bool Prefix(ref float __result) { if (!modEnabled.Value || !disableDrinkRestore.Value) { return true; } __result = 0f; return false; } } [HarmonyPatch(typeof(CharacterResting), "GetFoodConsumptionModifier")] public class GetFoodConsumptionModifier_Patch { private static void Postfix(CharacterResting __instance, ref float __result) { if (modEnabled.Value && disableFoodRestore.Value && __result == 0f && (Object)(object)__instance.RestContainer != (Object)null && __instance.RestContainer.IsInnsBed) { try { float num = CallGetStat(__instance, 0, 1); __result = ((num > 0f) ? num : forcedFoodConsumption.Value); } catch { __result = forcedFoodConsumption.Value; } logger.LogDebug((object)$"Food consumption modifier forced to: {__result}"); } } } [HarmonyPatch(typeof(CharacterResting), "GetDrinkConsumptionModifier")] public class GetDrinkConsumptionModifier_Patch { private static void Postfix(CharacterResting __instance, ref float __result) { if (modEnabled.Value && disableDrinkRestore.Value && __result == 0f && (Object)(object)__instance.RestContainer != (Object)null && __instance.RestContainer.IsInnsBed) { try { float num = CallGetStat(__instance, 0, 2); __result = ((num > 0f) ? num : forcedDrinkConsumption.Value); } catch { __result = forcedDrinkConsumption.Value; } logger.LogDebug((object)$"Drink consumption modifier forced to: {__result}"); } } } [HarmonyPatch(typeof(RestingMenu), "RefreshOverviews")] public static class RestingMenu_RefreshOverviews_Patch { private static void Postfix(RestingMenu __instance) { if (!modEnabled.Value || (!disableFoodRestore.Value && !disableDrinkRestore.Value)) { return; } CharacterManager instance = CharacterManager.Instance; Character val = ((instance != null) ? ((IEnumerable<Character>)instance.Characters.Values).FirstOrDefault((Func<Character, bool>)((Character c) => c.IsLocalPlayer)) : null); if (!((Object)(object)val == (Object)null) && !((Object)(object)val.CharacterResting == (Object)null)) { float totalRestTime = val.CharacterResting.TotalRestTime; FieldInfo fieldInfo = AccessTools.Field(typeof(RestingMenu), "m_imgFoodPrediction"); FieldInfo fieldInfo2 = AccessTools.Field(typeof(RestingMenu), "m_imgDrinkPrediction"); object? value = fieldInfo.GetValue(__instance); Image val2 = (Image)((value is Image) ? value : null); object? value2 = fieldInfo2.GetValue(__instance); Image val3 = (Image)((value2 is Image) ? value2 : null); if (disableFoodRestore.Value && (Object)(object)val2 != (Object)null) { float food = val.PlayerStats.Food; float num = val.PlayerStats.FoodDepleteRate * totalRestTime; float num2 = Mathf.Max(food - num, 0f); val2.overrideSprite = val.PlayerStats.GetEstimatedHungerIcon(num2); } if (disableDrinkRestore.Value && (Object)(object)val3 != (Object)null) { float drink = val.PlayerStats.Drink; float num3 = val.PlayerStats.DrinkDepleteRate * totalRestTime; float num4 = Mathf.Max(drink - num3, 0f); val3.overrideSprite = val.PlayerStats.GetEstimatedThirstIcon(num4); } } } } public const string PLUGIN_GUID = "com.yourname.outward.disablerestfooddrink"; public const string PLUGIN_NAME = "Disable Rest Food/Drink Restore"; public const string PLUGIN_VERSION = "1.0.0"; private static ManualLogSource logger; private static ConfigEntry<bool> modEnabled; private static ConfigEntry<bool> disableFoodRestore; private static ConfigEntry<bool> disableDrinkRestore; private static ConfigEntry<float> forcedFoodConsumption; private static ConfigEntry<float> forcedDrinkConsumption; private static MethodInfo getStatMethod; private void Awake() { //IL_00df: Unknown result type (might be due to invalid IL or missing references) logger = ((BaseUnityPlugin)this).Logger; modEnabled = ((BaseUnityPlugin)this).Config.Bind<bool>("General", "ModEnabled", true, "Enable/disable the mod"); disableFoodRestore = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "DisableFoodRestore", true, "Disable food restoration when resting"); disableDrinkRestore = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "DisableDrinkRestore", true, "Disable drink restoration when resting"); forcedFoodConsumption = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "ForcedFoodConsumption", 1f, "Food consumption rate when resting in inn beds"); forcedDrinkConsumption = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "ForcedDrinkConsumption", 1f, "Drink consumption rate when resting in inn beds"); getStatMethod = typeof(CharacterResting).GetMethod("GetStat", BindingFlags.Instance | BindingFlags.NonPublic); if (modEnabled.Value) { new Harmony("com.yourname.outward.disablerestfooddrink").PatchAll(); logger.LogInfo((object)"Plugin Disable Rest Food/Drink Restore 1.0.0 is loaded!"); } } private static float CallGetStat(CharacterResting instance, int compilationType, int compiledStat) { if (getStatMethod == null) { return 1f; } try { object[] parameters = new object[2] { compilationType, compiledStat }; return (float)getStatMethod.Invoke(instance, parameters); } catch (Exception arg) { logger.LogError((object)$"Error calling GetStat: {arg}"); return 1f; } } }
OuthardRunes.dll
Decompiled 2 weeks agousing System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; using SideLoader; using SideLoader.SaveData; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace HearthScrolls; [BepInPlugin("iggy.hearthscrolls", "HearthScrolls", "1.0.1")] public class HearthScrolls : BaseUnityPlugin { [HarmonyPatch(typeof(ResourcesPrefabManager), "Load")] public class ResourcesPrefabManager_Load { private static void Postfix() { } } public const string GUID = "iggy.hearthscrolls"; public const string NAME = "HearthScrolls"; public const string VERSION = "1.0.1"; internal static ManualLogSource Log; public static ConfigEntry<bool> ExampleConfig; public static HearthScrolls Instance { get; private set; } internal void Awake() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) Instance = this; RetreatCast.Init(); new Harmony("iggy.hearthscrolls").PatchAll(); } internal void Update() { } } public static class ItemIDs { public static int RetreatScroll; public static string retreatTag; static ItemIDs() { RetreatScroll = 6600224; retreatTag = "RetreatTag"; } } public class PlayerVisitSave : PlayerSaveExtension { public float TotalGainedXP; public List<string> VisitedCities = new List<string>(); public override void ApplyLoadedSave(Character character, bool isWorldHost) { RetreatCast.PlayerVisits = VisitedCities; } public override void Save(Character character, bool isWorldHost) { VisitedCities = RetreatCast.PlayerVisits; } } public static class RetreatCast { [HarmonyPatch(typeof(Item), "Use", new Type[] { typeof(Character) })] public class Item_Usage { [HarmonyPrefix] public static void Postfix(Item __instance, Character _character) { if (!_character.IsLocalPlayer || __instance.ItemID != ItemIDs.RetreatScroll) { return; } if (KnowsCity()) { if (_character.Inventory.BagWeightOver > 0f || _character.Inventory.PouchWeightOver > 0f) { _character.CharacterUI.ShowInfoNotification("Too heavy..."); } else { ((MonoBehaviour)HearthScrolls.Instance).StartCoroutine(checkRetreat(_character)); } } else { _character.CharacterUI.ShowInfoNotification("Regional City Unknown."); } } } public static List<string> PlayerVisits = new List<string>(); internal static void Init() { SL.OnGameplayResumedAfterLoading += CheckVisits; } private static void CheckVisits() { if (AreaManager.Instance.GetIsCurrentAreaTownOrCity() && !PlayerVisits.Contains(SceneManagerHelper.ActiveSceneName)) { PlayerVisits.Add(SceneManagerHelper.ActiveSceneName); } } private static IEnumerator checkRetreat(Character player) { player.Animator.speed = 0.12f; float castTime = 0f; yield return (object)new WaitForSeconds(0.3f); for (; castTime < 3f; castTime += 1f * Time.deltaTime) { if ((int)player.CurrentSpellCast != 15) { break; } if (((Vector2)(ref player.CharacterControl.m_moveInput)).magnitude > 0.1f) { player.Knock(false); break; } yield return (object)new WaitForSeconds(0.05f); } player.Animator.speed = 1f; if (castTime >= 2f) { player.StatusEffectMngr.AddStatusEffect(ItemIDs.retreatTag); player.Inventory.RemoveItem(ItemIDs.RetreatScroll, 1); NetworkLevelLoader.Instance.RequestSwitchArea(AreaManager.Instance.GetArea(SendArea()).SceneName, 0, 1.5f, false); } } private static bool KnowsCity() { string activeSceneName = SceneManagerHelper.ActiveSceneName; if (activeSceneName.Contains("Cierzo") || activeSceneName.Contains("Chersonese")) { if (PlayerVisits.Contains("CierzoNewTerrain") || PlayerVisits.Contains("CierzoDestroyed")) { return true; } } else if (activeSceneName.Contains("Berg") || activeSceneName.Contains("Emercar")) { if (PlayerVisits.Contains("Berg")) { return true; } } else if (activeSceneName.Contains("Levant") || activeSceneName.Contains("Abrassar")) { if (PlayerVisits.Contains("Levant")) { return true; } } else if (activeSceneName.Contains("Monsoon") || activeSceneName.Contains("Hallowed")) { if (PlayerVisits.Contains("Monsoon")) { return true; } } else if (activeSceneName.Contains("Harmattan") || activeSceneName.Contains("Antique")) { if (PlayerVisits.Contains("Harmattan")) { return true; } } else if ((activeSceneName.Contains("Sirocco") || activeSceneName.Contains("Caldera")) && PlayerVisits.Contains("NewSirocco")) { return true; } return false; } private static AreaEnum SendArea() { string activeSceneName = SceneManagerHelper.ActiveSceneName; if (activeSceneName.Contains("Cierzo") || activeSceneName.Contains("Chersonese")) { if (!QuestEventManager.Instance.HasQuestEvent(QuestEventDictionary.GetQuestEvent("lDHL_XMS7kKEs0uOqrLQjw"))) { return (AreaEnum)100; } return (AreaEnum)115; } if (!activeSceneName.Contains("Berg") && !activeSceneName.Contains("Emercar")) { if (!activeSceneName.Contains("Levant") && !activeSceneName.Contains("Abrassar")) { if (!activeSceneName.Contains("Monsoon") && !activeSceneName.Contains("Hallowed")) { if (!activeSceneName.Contains("Harmattan") && !activeSceneName.Contains("Antique")) { if (!activeSceneName.Contains("Sirocco") && !activeSceneName.Contains("Caldera")) { return (AreaEnum)101; } return (AreaEnum)601; } return (AreaEnum)400; } return (AreaEnum)200; } return (AreaEnum)300; } return (AreaEnum)500; } }
OuthardSkills.dll
Decompiled 2 weeks agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using SideLoader; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OutwardModTemplate")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OutwardModTemplate")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace OuthardAdditionsSkill; [BepInPlugin("OuthardAdditionsSkill", "OuthardAdditionsSkill", "1.0.0")] public class OuthardAdditionsSkill : BaseUnityPlugin { public const string GUID = "OuthardAdditionsSkill"; public const string NAME = "OuthardAdditionsSkill"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; public const int OuthardAdditionsSkillID = -59040; public Skill OuthardAdditions; public const int OuthardAdditions1SkillID = -59065; public Skill OuthardAdditions1; public const int OuthardAdditions2SkillID = -59237; public Skill OuthardAdditions2; public const int OuthardAdditions3SkillID = -59198; public Skill OuthardAdditions3; public const int OuthardAdditions4SkillID = -59197; public Skill OuthardAdditions4; public const int OuthardAdditions5SkillID = -59196; public Skill OuthardAdditions5; public const int OuthardAdditions6SkillID = -59195; public Skill OuthardAdditions6; public const int OuthardAdditions7SkillID = -59194; public Skill OuthardAdditions7; public const int OuthardAdditions8SkillID = -59199; public Skill OuthardAdditions8; public const int OuthardAdditions9SkillID = -59424; public Skill OuthardAdditions9; internal void Awake() { Log = ((BaseUnityPlugin)this).Logger; Log.LogMessage((object)"Hello world from OuthardAdditionsSkill 1.0.0!"); SL.OnSceneLoaded += OnSceneLoaded; } private void OnSceneLoaded() { try { foreach (Character value in CharacterManager.Instance.Characters.Values) { if (!value.IsAI && (Object)(object)value.Inventory != (Object)null && !value.Inventory.LearnedSkill((Item)(object)OuthardAdditions)) { value.Inventory.ReceiveSkillReward(-59040); value.Inventory.ReceiveSkillReward(-59065); value.Inventory.ReceiveSkillReward(-59237); value.Inventory.ReceiveSkillReward(-59198); value.Inventory.ReceiveSkillReward(-59197); value.Inventory.ReceiveSkillReward(-59196); value.Inventory.ReceiveSkillReward(-59195); value.Inventory.ReceiveSkillReward(-59194); value.Inventory.ReceiveSkillReward(-59199); value.Inventory.ReceiveSkillReward(-59424); } } } catch (Exception arg) { Log.LogMessage((object)$"Exception during PowerAdjustmentLearn.OnSceneLoaded: {arg}"); } } }
OuthardTrainers.dll
Decompiled 2 weeks agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using SideLoader_ExtendedEffects; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("OuthardAdditions")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("OuthardAdditions")] [assembly: AssemblyCopyright("Copyright © 2021")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("c5450fe0-edcf-483f-b9ea-4b1ef9d36da7")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace OuthardAdditions; [BepInPlugin("Outhard.Additions", "Outhard Additions", "1.0.0")] public class TrainerSkillTree : BaseUnityPlugin { public const string GUID = "Outhard.Additions"; public const string NAME = "Outhard Additions"; public const string VERSION = "1.0.0"; internal static ManualLogSource Log; internal void Awake() { Log = ((BaseUnityPlugin)this).Logger; ExtendedEffects.AddSkillTreeOverride("amNWoE86iEuFXwR0W0IN1g", "customritualistskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("T9WMtY19iE-xHgY8YvL-pg", "customsageskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("RDpO95DLnUCAbO2r6wFXWQ", "customspellbladeskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("COjwWffxskCCJArwPse8sg", "custommercenaryskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("sFByVx3FlkqcousWhBuMoQ", "customphilosopherskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("px5m8Zz0BkuxKlKqQ3WWVw", "custommonkskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("QLNeDTk4R06-FYBYH3-pFg", "customhermitskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("ib2QuU8At0ylS4xT_uOXMQ", "customrogueskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("YV9EcfuJ4Uak484H4nf98A", "customhunterskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("GopwgEoanEa888blVh8s6A", "customspeedsterskilltree-dub"); ExtendedEffects.AddSkillTreeOverride("awsiJhIN-UmoO6JxQuzjIA", "customhexskilltree-dub"); } }