diff --git a/Projects/Escapists2/Escapists2.sln b/Projects/Escapists2/Escapists2.sln new file mode 100644 index 0000000..b650b64 --- /dev/null +++ b/Projects/Escapists2/Escapists2.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Escapists2", "Escapists2\Escapists2.csproj", "{20F983A2-1743-4E96-BFDB-CF5A4F134D2D}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {20F983A2-1743-4E96-BFDB-CF5A4F134D2D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20F983A2-1743-4E96-BFDB-CF5A4F134D2D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20F983A2-1743-4E96-BFDB-CF5A4F134D2D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20F983A2-1743-4E96-BFDB-CF5A4F134D2D}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/Projects/Escapists2/Escapists2.sln.DotSettings.user b/Projects/Escapists2/Escapists2.sln.DotSettings.user new file mode 100644 index 0000000..78c0dfd --- /dev/null +++ b/Projects/Escapists2/Escapists2.sln.DotSettings.user @@ -0,0 +1,6 @@ + + True + True + True + True + True \ No newline at end of file diff --git a/Projects/Escapists2/Escapists2/Class1.cs b/Projects/Escapists2/Escapists2/Class1.cs new file mode 100644 index 0000000..ce6989f --- /dev/null +++ b/Projects/Escapists2/Escapists2/Class1.cs @@ -0,0 +1,95 @@ +using System.Linq; +using BepInEx; +using BepInEx.Configuration; +using HarmonyLib; +using HarmonyLib.Tools; + +namespace Escapists2 { + [BepInPlugin(pluginGuid, pluginName, pluginVersion)] + public class Main : BaseUnityPlugin { + private const string pluginGuid = "CykaMod"; + private const string pluginName = "CykaMod"; + private const string pluginVersion = "1.0.0"; + + public static ConfigEntry xpMultiplier; + + public void Awake() { + xpMultiplier = Config.Bind("General", "XP Multiplier", 1f, new ConfigDescription("XP Multiplier", new AcceptableValueRange(1f, 32f))); + // moneyMultiplier = Config.Bind("General", "Money Multiplier", 1f, + // new ConfigDescription("Money Multiplier", new AcceptableValueRange(1f, 32f))); + // energyGenMultiplier = Config.Bind("General", "Energy Generation Multiplier", 1f, + // new ConfigDescription("Energy Generation Multiplier", new AcceptableValueRange(1f, 64f))); + // heartbeatIntervalMultiplier = Config.Bind("General", "Heartbeat Interval Multiplier", 1f, + // new ConfigDescription("Heartbeat Interval Multiplier", new AcceptableValueRange(0.1f, 2f))); + // + // shootingSpeedMultiplier = Config.Bind("Weapons", "Shooting Speed Multiplier", 1f, + // new ConfigDescription("Shooting Speed Multiplier", new AcceptableValueRange(0.2f, 8f))); + // muzzleVelocityMultiplier = Config.Bind("Weapons", "Muzzle Velocity Multiplier", 1f, + // new ConfigDescription("Muzzle Velocity Multiplier", new AcceptableValueRange(0.2f, 32f))); + // seekingProjectileVisionConeAngleMultiplier = Config.Bind("Weapons", "Seeking Projectile Cone Vision Angle Multiplier", 1f, + // new ConfigDescription("Seeking Projectile Cone Vision Angle Multiplier", new AcceptableValueRange(0.2f, 32f))); + // seekingProjectileVisionRangeMultiplier = Config.Bind("Weapons", "Seeking Projectile Vision Range Multiplier", 1f, + // new ConfigDescription("Seeking Projectile Vision Range Multiplier", new AcceptableValueRange(0.2f, 32f))); + // seekingProjectileTurningSpeedMultiplier = Config.Bind("Weapons", "Seeking Projectile Turn Speed Multiplier", 1f, + // new ConfigDescription("Seeking Projectile Turn Speed Multiplier", new AcceptableValueRange(0.2f, 32f))); + // + // magnetStrenghtMultiplier = Config.Bind("Attractors", "Magnet Strength Multiplier", 1f, + // new ConfigDescription("Magnet Strength Multiplier", new AcceptableValueRange(1f, 16f))); + // magnetRadiusMultiplier = Config.Bind("Attractors", "Magnet Radius Multiplier", 1f, + // new ConfigDescription("Magnet Radius Multiplier", new AcceptableValueRange(1f, 16f))); + // beamStrenghtMultiplier = Config.Bind("Attractors", "Beam Strength Multiplier", 1f, + // new ConfigDescription("Beam Strength Multiplier", new AcceptableValueRange(1f, 16f))); + // beamRadiusMultiplier = Config.Bind("Attractors", "Beam Radius Multiplier", 1f, + // new ConfigDescription("Beam Radius Multiplier", new AcceptableValueRange(1f, 16f))); + // + // wirelessChargingRadiusMultiplier = Config.Bind("Power", "Wireless Charger Radius Multiplier", 1f, + // new ConfigDescription("Wireless Charger Radius Multiplier", new AcceptableValueRange(0.2f, 16f))); + // wirelessChargingArcFiringIntervalMultiplier = Config.Bind("Power", "Wireless Charger Arc Firing Interval", 1f, + // new ConfigDescription("Wireless Charger Arc Firing Interval", new AcceptableValueRange(0.02f, 16f))); + // wirelessChargingPowerPerArcMultiplier = Config.Bind("Power", "Wireless Charger Power Per Arc", 1f, + // new ConfigDescription("Wireless Charger Power Per Arc", new AcceptableValueRange(0.2f, 16f))); + // + // fuelTankRefillMultiplier = Config.Bind("Propulsion", "Fuel Tank Refill Rate Multiplier", 1f, + // new ConfigDescription("Fuel Tank Refill Rate Multiplier", new AcceptableValueRange(1f, 32f))); + // fuelTankCapacityMultiplier = Config.Bind("Propulsion", "Fuel Tank Capacity Multiplier", 1f, + // new ConfigDescription("Fuel Tank Capacity Multiplier", new AcceptableValueRange(1f, 32f))); + // wheelTorqueMultiplier = Config.Bind("Propulsion", "Wheel Torque Multiplier", 1f, + // new ConfigDescription("Wheel Torque Multiplier", new AcceptableValueRange(1f, 32f))); + // wheelSpeedMultiplier = Config.Bind("Propulsion", "Wheel Max RPM Multiplier", 1f, + // new ConfigDescription("Wheel Max RPM Multiplier", new AcceptableValueRange(1f, 32f))); + // jetThrustMultiplier = Config.Bind("Propulsion", "Jet Thrust Multiplier", 1f, + // new ConfigDescription("Jet Thrust Multiplier", new AcceptableValueRange(1f, 32f))); + // + // minerGroundArea = Config.Bind("Production", "Miner Ground Deposit Scan Area", 1f, + // new ConfigDescription("Miner Ground Deposit Scan Area", new AcceptableValueRange(1f, 32f))); + // minerMiningSpeed = Config.Bind("Production", "Miner Mining Speed", 1f, + // new ConfigDescription("Miner Mining Speed", new AcceptableValueRange(1f, 32f))); + // + // allProjectilesHoming = Config.Bind("General", "Make All Projectiles Home", false); + + // shootingSpeedMultiplier.SettingChanged += (sender, args) => WeaponPropertiesManager.DoPatch(); + // energyGenMultiplier.SettingChanged += (sender, args) => GeneratorPropertiesManager.DoPatch(); + // magnetStrenghtMultiplier.SettingChanged += (sender, args) => MagnetPropertiesManager.DoPatch(); + // magnetRadiusMultiplier.SettingChanged += (sender, args) => MagnetPropertiesManager.DoPatch(); + // beamStrenghtMultiplier.SettingChanged += (sender, args) => BeamPropertiesManager.DoPatch(); + // beamRadiusMultiplier.SettingChanged += (sender, args) => BeamPropertiesManager.DoPatch(); + // fuelTankRefillMultiplier.SettingChanged += (sender, args) => FuelPropertiesManager.DoPatch(); + // fuelTankCapacityMultiplier.SettingChanged += (sender, args) => FuelPropertiesManager.DoPatch(); + // wheelTorqueMultiplier.SettingChanged += (sender, args) => WheelPropertiesManager.DoPatch(); + // wheelSpeedMultiplier.SettingChanged += (sender, args) => WheelPropertiesManager.DoPatch(); + // jetThrustMultiplier.SettingChanged += (sender, args) => ThrusterPropertiesManager.DoPatch(); + // minerGroundArea.SettingChanged += (sender, args) => MinerPropertiesManager.DoPatch(); + // minerMiningSpeed.SettingChanged += (sender, args) => MinerPropertiesManager.DoPatch(); + // wirelessChargingPowerPerArcMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch(); + // wirelessChargingArcFiringIntervalMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch(); + // wirelessChargingRadiusMultiplier.SettingChanged += (sender, args) => WirelessChargerPropertiesManager.DoPatch(); + + Logger.LogInfo("Cyka mod loaded"); + HarmonyFileLog.Enabled = true; + Harmony harmony = new Harmony(pluginGuid); + harmony.PatchAll(); + var originalMethods = harmony.GetPatchedMethods(); + Logger.LogInfo("Patched " + originalMethods.Count() + " methods"); + } + } +} \ No newline at end of file diff --git a/Projects/Escapists2/Escapists2/Escapists2.csproj b/Projects/Escapists2/Escapists2/Escapists2.csproj new file mode 100644 index 0000000..8ef58ff --- /dev/null +++ b/Projects/Escapists2/Escapists2/Escapists2.csproj @@ -0,0 +1,69 @@ + + + + + Debug + AnyCPU + {20F983A2-1743-4E96-BFDB-CF5A4F134D2D} + Library + Properties + Escapists2 + Escapists2 + v4.0 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + libs\0Harmony.dll + + + libs\Assembly-CSharp.dll + + + libs\BepInEx.dll + + + libs\ConfigurationManager.dll + + + + + + + libs\UnityEngine.dll + + + + + + + + + + + diff --git a/Projects/Escapists2/Escapists2/Properties/AssemblyInfo.cs b/Projects/Escapists2/Escapists2/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..116e5a4 --- /dev/null +++ b/Projects/Escapists2/Escapists2/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Escapists2")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Escapists2")] +[assembly: AssemblyCopyright("Copyright © 2023")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("20F983A2-1743-4E96-BFDB-CF5A4F134D2D")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/Projects/Escapists2/Escapists2/XPPatch.cs b/Projects/Escapists2/Escapists2/XPPatch.cs index 806cd53..48611c0 100644 --- a/Projects/Escapists2/Escapists2/XPPatch.cs +++ b/Projects/Escapists2/Escapists2/XPPatch.cs @@ -1,5 +1,12 @@ +using HarmonyLib; + namespace Escapists2 { + [HarmonyPatch] public class XPPatch { - + [HarmonyPrefix] + [HarmonyPatch(typeof(CharacterStats), "ModifyStat_Internal")] + static void XPMulti(ref float change, ref HiddenFloat stat, ref float max) { + change *= Main.xpMultiplier.Value; + } } } \ No newline at end of file diff --git a/Projects/Escapists2/Escapists2/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs b/Projects/Escapists2/Escapists2/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs new file mode 100644 index 0000000..5d01041 --- /dev/null +++ b/Projects/Escapists2/Escapists2/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")] diff --git a/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.AssemblyReference.cache b/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.AssemblyReference.cache new file mode 100644 index 0000000..9092ba7 Binary files /dev/null and b/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.AssemblyReference.cache differ diff --git a/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.CopyComplete b/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.CoreCompileInputs.cache b/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..d60b30f --- /dev/null +++ b/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +09ea03cdb969439a4f3eb3dedfa28a8d8654a867 diff --git a/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.FileListAbsolute.txt b/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..458e449 --- /dev/null +++ b/Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.FileListAbsolute.txt @@ -0,0 +1,12 @@ +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\bin\Debug\Escapists2.dll +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\bin\Debug\Escapists2.pdb +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\obj\Debug\Escapists2.csproj.AssemblyReference.cache +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\obj\Debug\Escapists2.csproj.CoreCompileInputs.cache +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\obj\Debug\Escapists2.dll +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\obj\Debug\Escapists2.pdb +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\bin\Debug\0Harmony.dll +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\bin\Debug\Assembly-CSharp.dll +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\bin\Debug\BepInEx.dll +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\bin\Debug\ConfigurationManager.dll +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\bin\Debug\UnityEngine.dll +C:\Users\Administrator\RiderProjects\Bepinex\Projects\Escapists2\Escapists2\obj\Debug\Escapists2.csproj.CopyComplete