commit f691f648f236bf3b4990b918cdb08df2e2b2f3ad Author: dave Date: Fri Sep 27 19:10:05 2024 +0000 Initial commit diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9d962a5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +*.zip filter=lfs diff=lfs merge=lfs -text +*.exe filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba66cca --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*/obj +*/bin +**/.idea diff --git a/MelonLoader.Installer.exe b/MelonLoader.Installer.exe new file mode 100644 index 0000000..dbf6f25 --- /dev/null +++ b/MelonLoader.Installer.exe @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad3015fcf72af7fa32386e2d584ddc00ba10fef82e84b4f57adafb6183177542 +size 738304 diff --git a/MelonTemplate.sln b/MelonTemplate.sln new file mode 100644 index 0000000..fcb577f --- /dev/null +++ b/MelonTemplate.sln @@ -0,0 +1,16 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MelonTemplate", "MelonTemplate\MelonTemplate.csproj", "{DA9D274E-486F-4F82-84FF-CD9388CB0B09}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/MelonTemplate/.editorconfig b/MelonTemplate/.editorconfig new file mode 100644 index 0000000..7e98c67 --- /dev/null +++ b/MelonTemplate/.editorconfig @@ -0,0 +1,6 @@ +# CSharp formatting rules: +[*.cs] +csharp_new_line_before_open_brace = none +csharp_new_line_before_else = false +csharp_new_line_before_catch = false +csharp_new_line_before_finally = false \ No newline at end of file diff --git a/MelonTemplate/MelonTemplate.cs b/MelonTemplate/MelonTemplate.cs new file mode 100644 index 0000000..4a9f551 --- /dev/null +++ b/MelonTemplate/MelonTemplate.cs @@ -0,0 +1,40 @@ +using System.Linq; +using MelonLoader; + +namespace MelonTemplate { + public class MelonTemplateMod : MelonMod { + public override void OnInitializeMelon() { + LoggerInstance.Msg("Phat Melon mod loaded"); + HarmonyLib.Harmony harmony = HarmonyInstance; + harmony.PatchAll(); + var originalMethods = harmony.GetPatchedMethods(); + var methodBases = originalMethods.ToList(); + LoggerInstance.Msg("Patched " + methodBases.Count() + " methods"); + foreach (var method in methodBases) { + LoggerInstance.Msg("Patched " + method.Name); + } + } + } + + [HarmonyLib.HarmonyPatch] + public class Patches { + // [HarmonyLib.HarmonyPrefix] + // [HarmonyLib.HarmonyPatch(typeof(TavernModel), "ChangeMoney")] + // public static void PrefixMoney(ref int value) { + // if (Main.debug.Value) + // Console.WriteLine($"Money is {value}"); + // if (value > 0) { + // value = (int)(value * Main.moneyMultiplier.Value); + // if (Main.debug.Value) + // Console.WriteLine($"Money modified to {value}"); + // } + // } + + // [HarmonyLib.HarmonyPostfix] + // [HarmonyLib.HarmonyPatch(typeof(TechTreeModel), nameof(TechTreeModel.GetBonusPeoplePerMinute))] + // public static void PostfixPeoplePerMinute(ref float __result) { + // __result *= Main.peoplePerMinuteMultiplier.Value; + // __result += Main.peoplePerMinuteOffset.Value; + // } + } +} \ No newline at end of file diff --git a/MelonTemplate/MelonTemplate.csproj b/MelonTemplate/MelonTemplate.csproj new file mode 100644 index 0000000..495baff --- /dev/null +++ b/MelonTemplate/MelonTemplate.csproj @@ -0,0 +1,60 @@ + + + + + C:/Games/Arms Trade Tycoon Tanks + + $(GAME_DIR)/MelonLoader + $(GAME_MELON)/Il2CppAssemblies + Debug + AnyCPU + {DA9D274E-486F-4F82-84FF-CD9388CB0B09} + Library + Properties + MelonTemplate + MelonTemplate + v4.8.1 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + $(GAME_MELON)/net6/MelonLoader.dll + + + $(GAME_MELON)/net6/0Harmony.dll + + + $(GAME_MANAGED)/Assembly-CSharp.dll + + + $(GAME_MANAGED)/UnityEngine.dll + + + $(GAME_MANAGED)/UnityEngine.CoreModule.dll + + + + diff --git a/MelonTemplate/Properties/AssemblyInfo.cs b/MelonTemplate/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..d762300 --- /dev/null +++ b/MelonTemplate/Properties/AssemblyInfo.cs @@ -0,0 +1,39 @@ +using System.Reflection; +using System.Runtime.InteropServices; +using MelonLoader; +using MelonTemplate; + +// 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: MelonInfo(typeof(MelonTemplateMod), "Phat Melon Mod", "1.0.0", "Phat Phuck Dave")] +[assembly: MelonGame("Game Developer", "Game Name")] +[assembly: AssemblyTitle("Phat Melon Mod")] +[assembly: AssemblyProduct("Phat Melon Mod")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[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("DA9D274E-486F-4F82-84FF-CD9388CB0B09")] + +// 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/Quick Start.pdf b/Quick Start.pdf new file mode 100644 index 0000000..1a96fed Binary files /dev/null and b/Quick Start.pdf differ diff --git a/UnityExplorer.MelonLoader.IL2CPP.zip b/UnityExplorer.MelonLoader.IL2CPP.zip new file mode 100644 index 0000000..aa59f22 --- /dev/null +++ b/UnityExplorer.MelonLoader.IL2CPP.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c1bac4df8321e61323bc8c506e7253aa12eaf04efa6c6e30d0fad9f6f031c127 +size 6147659 diff --git a/UnityExplorer.MelonLoader.Mono.zip b/UnityExplorer.MelonLoader.Mono.zip new file mode 100644 index 0000000..eccc9ef --- /dev/null +++ b/UnityExplorer.MelonLoader.Mono.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4f36882f83a35831ef6f67ac61c29523076eec37320a76ffd801562340cbce0f +size 3384040