Add escapists 2 mods?

This commit is contained in:
2024-04-17 13:23:17 +02:00
parent 2715a04f32
commit 78f9a4d702
11 changed files with 246 additions and 1 deletions

View File

@@ -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

View File

@@ -0,0 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CEscapists2_005CEscapists2_005Clibs_005C0Harmony_002Edll/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CEscapists2_005CEscapists2_005Clibs_005CAssembly_002DCSharp_002Edll/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CEscapists2_005CEscapists2_005Clibs_005CBepInEx_002Edll/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CEscapists2_005CEscapists2_005Clibs_005CConfigurationManager_002Edll/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/AddReferences/RecentPaths/=C_003A_005CUsers_005CAdministrator_005CRiderProjects_005CBepinex_005CProjects_005CEscapists2_005CEscapists2_005Clibs_005CUnityEngine_002Edll/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

View File

@@ -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<float> xpMultiplier;
public void Awake() {
xpMultiplier = Config.Bind("General", "XP Multiplier", 1f, new ConfigDescription("XP Multiplier", new AcceptableValueRange<float>(1f, 32f)));
// moneyMultiplier = Config.Bind("General", "Money Multiplier", 1f,
// new ConfigDescription("Money Multiplier", new AcceptableValueRange<float>(1f, 32f)));
// energyGenMultiplier = Config.Bind("General", "Energy Generation Multiplier", 1f,
// new ConfigDescription("Energy Generation Multiplier", new AcceptableValueRange<float>(1f, 64f)));
// heartbeatIntervalMultiplier = Config.Bind("General", "Heartbeat Interval Multiplier", 1f,
// new ConfigDescription("Heartbeat Interval Multiplier", new AcceptableValueRange<float>(0.1f, 2f)));
//
// shootingSpeedMultiplier = Config.Bind("Weapons", "Shooting Speed Multiplier", 1f,
// new ConfigDescription("Shooting Speed Multiplier", new AcceptableValueRange<float>(0.2f, 8f)));
// muzzleVelocityMultiplier = Config.Bind("Weapons", "Muzzle Velocity Multiplier", 1f,
// new ConfigDescription("Muzzle Velocity Multiplier", new AcceptableValueRange<float>(0.2f, 32f)));
// seekingProjectileVisionConeAngleMultiplier = Config.Bind("Weapons", "Seeking Projectile Cone Vision Angle Multiplier", 1f,
// new ConfigDescription("Seeking Projectile Cone Vision Angle Multiplier", new AcceptableValueRange<float>(0.2f, 32f)));
// seekingProjectileVisionRangeMultiplier = Config.Bind("Weapons", "Seeking Projectile Vision Range Multiplier", 1f,
// new ConfigDescription("Seeking Projectile Vision Range Multiplier", new AcceptableValueRange<float>(0.2f, 32f)));
// seekingProjectileTurningSpeedMultiplier = Config.Bind("Weapons", "Seeking Projectile Turn Speed Multiplier", 1f,
// new ConfigDescription("Seeking Projectile Turn Speed Multiplier", new AcceptableValueRange<float>(0.2f, 32f)));
//
// magnetStrenghtMultiplier = Config.Bind("Attractors", "Magnet Strength Multiplier", 1f,
// new ConfigDescription("Magnet Strength Multiplier", new AcceptableValueRange<float>(1f, 16f)));
// magnetRadiusMultiplier = Config.Bind("Attractors", "Magnet Radius Multiplier", 1f,
// new ConfigDescription("Magnet Radius Multiplier", new AcceptableValueRange<float>(1f, 16f)));
// beamStrenghtMultiplier = Config.Bind("Attractors", "Beam Strength Multiplier", 1f,
// new ConfigDescription("Beam Strength Multiplier", new AcceptableValueRange<float>(1f, 16f)));
// beamRadiusMultiplier = Config.Bind("Attractors", "Beam Radius Multiplier", 1f,
// new ConfigDescription("Beam Radius Multiplier", new AcceptableValueRange<float>(1f, 16f)));
//
// wirelessChargingRadiusMultiplier = Config.Bind("Power", "Wireless Charger Radius Multiplier", 1f,
// new ConfigDescription("Wireless Charger Radius Multiplier", new AcceptableValueRange<float>(0.2f, 16f)));
// wirelessChargingArcFiringIntervalMultiplier = Config.Bind("Power", "Wireless Charger Arc Firing Interval", 1f,
// new ConfigDescription("Wireless Charger Arc Firing Interval", new AcceptableValueRange<float>(0.02f, 16f)));
// wirelessChargingPowerPerArcMultiplier = Config.Bind("Power", "Wireless Charger Power Per Arc", 1f,
// new ConfigDescription("Wireless Charger Power Per Arc", new AcceptableValueRange<float>(0.2f, 16f)));
//
// fuelTankRefillMultiplier = Config.Bind("Propulsion", "Fuel Tank Refill Rate Multiplier", 1f,
// new ConfigDescription("Fuel Tank Refill Rate Multiplier", new AcceptableValueRange<float>(1f, 32f)));
// fuelTankCapacityMultiplier = Config.Bind("Propulsion", "Fuel Tank Capacity Multiplier", 1f,
// new ConfigDescription("Fuel Tank Capacity Multiplier", new AcceptableValueRange<float>(1f, 32f)));
// wheelTorqueMultiplier = Config.Bind("Propulsion", "Wheel Torque Multiplier", 1f,
// new ConfigDescription("Wheel Torque Multiplier", new AcceptableValueRange<float>(1f, 32f)));
// wheelSpeedMultiplier = Config.Bind("Propulsion", "Wheel Max RPM Multiplier", 1f,
// new ConfigDescription("Wheel Max RPM Multiplier", new AcceptableValueRange<float>(1f, 32f)));
// jetThrustMultiplier = Config.Bind("Propulsion", "Jet Thrust Multiplier", 1f,
// new ConfigDescription("Jet Thrust Multiplier", new AcceptableValueRange<float>(1f, 32f)));
//
// minerGroundArea = Config.Bind("Production", "Miner Ground Deposit Scan Area", 1f,
// new ConfigDescription("Miner Ground Deposit Scan Area", new AcceptableValueRange<float>(1f, 32f)));
// minerMiningSpeed = Config.Bind("Production", "Miner Mining Speed", 1f,
// new ConfigDescription("Miner Mining Speed", new AcceptableValueRange<float>(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");
}
}
}

View File

@@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{20F983A2-1743-4E96-BFDB-CF5A4F134D2D}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Escapists2</RootNamespace>
<AssemblyName>Escapists2</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>libs\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>libs\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>libs\BepInEx.dll</HintPath>
</Reference>
<Reference Include="ConfigurationManager">
<HintPath>libs\ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>libs\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Class1.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="XPPatch.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -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")]

View File

@@ -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;
}
}
}

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]

View File

@@ -0,0 +1 @@
09ea03cdb969439a4f3eb3dedfa28a8d8654a867

View File

@@ -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