From 78f9a4d702fd0b6840d3420040219a176b75064d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Majdand=C5=BEi=C4=87?= Date: Wed, 17 Apr 2024 13:23:17 +0200 Subject: [PATCH] Add escapists 2 mods? --- Projects/Escapists2/Escapists2.sln | 16 +++ .../Escapists2.sln.DotSettings.user | 6 ++ Projects/Escapists2/Escapists2/Class1.cs | 95 ++++++++++++++++++ .../Escapists2/Escapists2/Escapists2.csproj | 69 +++++++++++++ .../Escapists2/Properties/AssemblyInfo.cs | 35 +++++++ Projects/Escapists2/Escapists2/XPPatch.cs | 9 +- ...amework,Version=v4.0.AssemblyAttributes.cs | 4 + .../Escapists2.csproj.AssemblyReference.cache | Bin 0 -> 4735 bytes .../obj/Debug/Escapists2.csproj.CopyComplete | 0 .../Escapists2.csproj.CoreCompileInputs.cache | 1 + .../Escapists2.csproj.FileListAbsolute.txt | 12 +++ 11 files changed, 246 insertions(+), 1 deletion(-) create mode 100644 Projects/Escapists2/Escapists2.sln create mode 100644 Projects/Escapists2/Escapists2.sln.DotSettings.user create mode 100644 Projects/Escapists2/Escapists2/Class1.cs create mode 100644 Projects/Escapists2/Escapists2/Escapists2.csproj create mode 100644 Projects/Escapists2/Escapists2/Properties/AssemblyInfo.cs create mode 100644 Projects/Escapists2/Escapists2/obj/Debug/.NETFramework,Version=v4.0.AssemblyAttributes.cs create mode 100644 Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.AssemblyReference.cache create mode 100644 Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.CopyComplete create mode 100644 Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.CoreCompileInputs.cache create mode 100644 Projects/Escapists2/Escapists2/obj/Debug/Escapists2.csproj.FileListAbsolute.txt 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 0000000000000000000000000000000000000000..9092ba71721055ac52718612cdee44956ab80f0f GIT binary patch literal 4735 zcmd5=%}*0S6yH%qL{US4NFoWwi!rc^6{8Z-NC72^Y4}iM){kv>C?nIEGP|qRi^iKL z{{sI2k4B^M@5xzIww%dY~)+J#M-O0@G_V?cYe($}Zm9!d$L2hP7 z?0JtW&pz+wm|&i-9A7GXhPhOwl)OtbzGsioJQMVRU0#^*GEN>2dkH%--UN8t6|3+z%8T6*PbV z@qzwSkmf9Ni5BMM5*4E&05gbK2NfL6c^RqTP1;f1sU6x;T+|^lNE=MwKD4j)4*z^w zUWSnEo-KGj&6!E5DA^7>J8-vVY}8o$v=q`z(hTGJwe4W1WdpWSEAJ1ky!&_ykLo`J zU>#^{TDs=E&$vf=!mYm25j+c{7Fuz&Vy3%fW+o6m%h7S_%Rn`4uC*Ah{|vhZ-hM9u zAOFPA$;3&6xUuWxyywwenimF>vx|<(SLD(=_ww0`FDRFNHD`)cDMc`R;$pRG_@=3* z22VshlQmlv4S{|d)X;wP2$(-Fm|vI>Sx7x=dX538N3Sg^#CT{*NMFkF7Z;dtnaG+` zQm~A9gXPT`>INC=>hz0Q7Q=VsFvhDm>P4+5YBtGPK2OzUNM`@~4E5}_he_;uj{m1J z3E3N=g*iXfG^V|&Md?d%T$?*SPB0H@Ex|Kdnd!YGBA z@L#6ta=y1li-QYHd4AsUyrxZdMG29TypWhvtm)8q&N{g~r%4WwfL6*;g{E!wMCova z`uC+;0x>jguVc({uSw-jGVW8Q*@~t4&jG_Y^rWaB{9T_F`b1Uzuw$XMovfNFp7ZHqM-*7Hms?>)Q=CGMK)=-nR6I=l| zw`gvUrEbO4UBy*r;%pq(zXTvl8xE#f?SmjyP_Wkp<_D4QLK;U zDyb*nS6nKJAv0){Rh8vV?BtJD)bb_XzkZgy`HY;e>&0rSLyNje_xKvDVU-z+ELVu# p_)P@w+gq2{@z8QLqq@^f*yA)EWbq$AO*I+XXtc>FX$v=S`~^J|Rq+4- literal 0 HcmV?d00001 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