diff --git a/AccuracyIndicator/README.md b/AccuracyIndicator/README.md index ee556db..7a29d68 100644 --- a/AccuracyIndicator/README.md +++ b/AccuracyIndicator/README.md @@ -7,7 +7,7 @@ By pressing `Ctrl + Shift + F7`, you can bring up a window that allows you to cu ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest version of Accuracy Indicator you want for your version of Clone Hero. diff --git a/BiendeoCHLib/README.md b/BiendeoCHLib/README.md index a652d5d..c49bd33 100644 --- a/BiendeoCHLib/README.md +++ b/BiendeoCHLib/README.md @@ -3,7 +3,7 @@ The common code for all of my mods. If you're a developer, you may also use this ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest version of Biendeo CH Lib you want for your version of Clone Hero. diff --git a/BiendeoCHLib/Wrappers/CacheWrapper.cs b/BiendeoCHLib/Wrappers/CacheWrapper.cs index 88cdde0..b950d61 100644 --- a/BiendeoCHLib/Wrappers/CacheWrapper.cs +++ b/BiendeoCHLib/Wrappers/CacheWrapper.cs @@ -162,10 +162,10 @@ public int Int1 { public CacheState State { get => (CacheState)stateField(Cache); - set => stateField(Cache) = value; + set => stateField(Cache) = (int)value; } [WrapperField("\u0314\u0314\u0313\u0311\u0311\u0314\u0318\u0314\u0311\u031C\u0312")] - private static readonly AccessTools.FieldRef stateField; + private static readonly AccessTools.FieldRef stateField; public string BadSongsPath { get => badSongsPathField(Cache); diff --git a/BiendeoCHLib/Wrappers/GameManagerWrapper.cs b/BiendeoCHLib/Wrappers/GameManagerWrapper.cs index e75cba4..fd9b921 100644 --- a/BiendeoCHLib/Wrappers/GameManagerWrapper.cs +++ b/BiendeoCHLib/Wrappers/GameManagerWrapper.cs @@ -104,6 +104,13 @@ public BasePlayerWrapper UnknownBasePlayer { [WrapperField("\u0316\u031C\u0312\u0312\u031C\u0315\u0314\u0310\u031A\u0314\u0317")] private static readonly AccessTools.FieldRef unknownBasePlayerField; + public bool ErrorWhileLoading { + get => errorWhileLoadingField(GameManager); + set => errorWhileLoadingField(GameManager) = value; + } + [WrapperField("\u0311\u0312\u0310\u031C\u0311\u031A\u031B\u030D\u0313\u030F\u030D")] + private static readonly AccessTools.FieldRef errorWhileLoadingField; + #endregion #region Methods @@ -126,6 +133,10 @@ public List GetNotesFromChart(CHPlayerWrapper player, bool recomput [WrapperMethod("\u0310\u030F\u0315\u030F\u0311\u0314\u0311\u0314\u0315\u0318\u0316")] private static readonly FastInvokeHandler onControllerDisconnectedMethod; + public void LoadSong() => loadSongMethod(GameManager); + [WrapperMethod("\u0316\u0319\u0312\u031B\u0316\u0316\u031A\u0316\u030D\u0318\u0318")] + private static readonly FastInvokeHandler loadSongMethod; + #endregion } } diff --git a/BiendeoCHLib/Wrappers/NoteWrapper.cs b/BiendeoCHLib/Wrappers/NoteWrapper.cs index 42fed42..9973507 100644 --- a/BiendeoCHLib/Wrappers/NoteWrapper.cs +++ b/BiendeoCHLib/Wrappers/NoteWrapper.cs @@ -90,17 +90,17 @@ public bool IsSustaining { public MoonNoteWrapper.NoteType NoteType { get => (MoonNoteWrapper.NoteType)noteTypeField(Note); - set => noteTypeField(Note) = value; + set => noteTypeField(Note) = (int)value; } [WrapperField("\u030F\u031A\u031B\u031B\u031A\u031A\u031C\u0310\u0315\u030E\u0319")] - private static readonly AccessTools.FieldRef noteTypeField; + private static readonly AccessTools.FieldRef noteTypeField; public NoteFlags Flags { get => (NoteFlags)flagsField(Note); - set => flagsField(Note) = value; + set => flagsField(Note) = (byte)value; } [WrapperField("\u030E\u031B\u0316\u0314\u031C\u0311\u031C\u030D\u0312\u0317\u0316")] - private static readonly AccessTools.FieldRef flagsField; + private static readonly AccessTools.FieldRef flagsField; public uint TickPosition { get => tickPositionField(Note); diff --git a/BiendeoCHLib/Wrappers/PlayerProfileWrapper.cs b/BiendeoCHLib/Wrappers/PlayerProfileWrapper.cs index 7d3152c..9a10db9 100644 --- a/BiendeoCHLib/Wrappers/PlayerProfileWrapper.cs +++ b/BiendeoCHLib/Wrappers/PlayerProfileWrapper.cs @@ -34,38 +34,38 @@ public string PlayerName { //? Different enum, there's more fields there public InstrumentType Instrument { get => (InstrumentType)instrumentField(PlayerProfile); - set => instrumentField(PlayerProfile) = value; + set => instrumentField(PlayerProfile) = (sbyte)value; } [WrapperField("\u030E\u031C\u0314\u031B\u030E\u031A\u0313\u030D\u0314\u0310\u031A")] - private static readonly AccessTools.FieldRef instrumentField; + private static readonly AccessTools.FieldRef instrumentField; public Difficulty Difficulty { get => (Difficulty)difficultyField(PlayerProfile); - set => difficultyField(PlayerProfile) = value; + set => difficultyField(PlayerProfile) = (sbyte)value; } [WrapperField("\u030E\u0310\u0312\u031C\u0314\u031A\u030E\u031A\u0312\u0318\u030E")] - private static readonly AccessTools.FieldRef difficultyField; + private static readonly AccessTools.FieldRef difficultyField; public NoteWrapper.Modifier Modifiers { get => (NoteWrapper.Modifier)modifiersField(PlayerProfile); - set => modifiersField(PlayerProfile) = value; + set => modifiersField(PlayerProfile) = (int)value; } [WrapperField("\u030E\u0315\u0317\u030F\u0312\u0316\u0313\u0311\u030E\u030D\u0318")] - private static readonly AccessTools.FieldRef modifiersField; + private static readonly AccessTools.FieldRef modifiersField; public SongWrapper.Instrument SongInstrument { get => (SongWrapper.Instrument)songInstrumentField(PlayerProfile); - set => songInstrumentField(PlayerProfile) = value; + set => songInstrumentField(PlayerProfile) = (int)value; } [WrapperField("\u0314\u0313\u0319\u0319\u030E\u0312\u031B\u0310\u0311\u030F\u0319")] - private static readonly AccessTools.FieldRef songInstrumentField; + private static readonly AccessTools.FieldRef songInstrumentField; public SongWrapper.Difficulty SongDifficulty { get => (SongWrapper.Difficulty)songDifficultyField(PlayerProfile); - set => songDifficultyField(PlayerProfile) = value; + set => songDifficultyField(PlayerProfile) = (int)value; } [WrapperField("\u0310\u030F\u0312\u031A\u0311\u031A\u0310\u0316\u0316\u0316\u0318")] - private static readonly AccessTools.FieldRef songDifficultyField; + private static readonly AccessTools.FieldRef songDifficultyField; public GameSettingWrapper NoteSpeed { get => GameSettingWrapper.Wrap(noteSpeedField(PlayerProfile)); diff --git a/BiendeoCHLib/Wrappers/README.md b/BiendeoCHLib/Wrappers/README.md index 08c8678..3308642 100644 --- a/BiendeoCHLib/Wrappers/README.md +++ b/BiendeoCHLib/Wrappers/README.md @@ -46,6 +46,9 @@ private static readonly ConstructorInfo defaultConstructor; - Inside this region, all fields of the class must be exposed as public properties with getters and setters if non-constant. - The type of the field properties must match the original type. If the type uses an obfuscated typename, the wrapper type must be used (with appropriate work in the wrapper property to wrap the returned value in the getter and pass in the wrapped value in the setter). If it is a collection of obfuscated objects, again, additional work must be done to ensure that a collection of wrappers is returned and passed in. If it is another class with a generic of an obfuscated type, panic because I haven't thought that far in advance. - The name of the field **must** be PascalCase naming, and the underlying FieldInfo must be camelCase with `Field` at the end of its name. +- For the underlying `FieldRef` objects, two generic parameters must be used: `T` and `F` respectively. + - The `T` parameter must be either the wrapped type is unobfuscated, or `object` if the wrapped type is obfuscated. + - The `F` parameter must match the field type as closely as possible. If any obfuscated types would appear in this type definition, then they should be replaced with `object`. Obfuscated enumerations however should be their underlying data type (e.g. `int`), but a cast should be used to turn a wrapper enumeration into that underlying value when setting the property. Field types with no obfuscation involved should match this value exactly. ```cs public int Int1 { get => int1Field(Cache); diff --git a/BiendeoCHLib/Wrappers/SongEntryWrapper.cs b/BiendeoCHLib/Wrappers/SongEntryWrapper.cs index 826b361..e6f0331 100644 --- a/BiendeoCHLib/Wrappers/SongEntryWrapper.cs +++ b/BiendeoCHLib/Wrappers/SongEntryWrapper.cs @@ -1,4 +1,5 @@ using BiendeoCHLib.Wrappers.Attributes; +using HarmonyLib; using System; using System.Collections.Generic; using System.Linq; @@ -28,5 +29,18 @@ public struct SongEntryWrapper { #endregion + #region Methods + + public bool ReadMetadataForSong() => (bool)readMetadataForSongMethod(SongEntry); + [WrapperMethod("\u0319\u031B\u0312\u0317\u0316\u0319\u0316\u0318\u030F\u0314\u0314")] + private static readonly FastInvokeHandler readMetadataForSongMethod; + + public SongWrapper GetSongObject(bool someBool = false) => SongWrapper.Wrap(getSongObjectMethod(SongEntry, someBool)); + [WrapperMethod("\u0310\u0314\u0316\u0318\u031A\u0317\u0312\u0311\u0315\u0310\u0311")] + private static readonly FastInvokeHandler getSongObjectMethod; + + + #endregion + } } diff --git a/ComboIndicator/README.md b/ComboIndicator/README.md index e18f546..df314a1 100644 --- a/ComboIndicator/README.md +++ b/ComboIndicator/README.md @@ -6,7 +6,7 @@ Get that Guitar Hero 3 nostalgia by having an animated note streak indicator pop ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest version of Combo Indicator you want for your version of Clone Hero. diff --git a/ExtraSongUI/README.md b/ExtraSongUI/README.md index 0912893..2293f8c 100644 --- a/ExtraSongUI/README.md +++ b/ExtraSongUI/README.md @@ -7,7 +7,7 @@ With this tweak, you can now see your song progress numerical, how many points y ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest version of Extra Song UI you want for your version of Clone Hero. diff --git a/LegacyModLoader/README.md b/LegacyModLoader/README.md index e42012e..2b1be54 100644 --- a/LegacyModLoader/README.md +++ b/LegacyModLoader/README.md @@ -5,7 +5,7 @@ An alternative mod loader for CHLoader compatible mods. ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest version of Legacy Mod Loader you want for your version of Clone Hero. diff --git a/MyCloneHeroTweaks.sln b/MyCloneHeroTweaks.sln index fd5cfb7..8380314 100644 --- a/MyCloneHeroTweaks.sln +++ b/MyCloneHeroTweaks.sln @@ -14,6 +14,8 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9E7FE218-A85D-4596-BAD8-B27249C1CE5A}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + appveyor.yml = appveyor.yml + LICENSE.md = LICENSE.md README.md = README.md versions.txt = versions.txt EndProjectSection diff --git a/PerfectMode/README.md b/PerfectMode/README.md index 2389c3a..d4ca262 100644 --- a/PerfectMode/README.md +++ b/PerfectMode/README.md @@ -9,7 +9,7 @@ By pressing `Ctrl + Shift + F6`, you can bring up a window that allows you to cu ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest version of Perfect Mode you want for your version of Clone Hero. diff --git a/README.md b/README.md index daf3e60..cb06620 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ A bunch of Clone Hero tweaks I have made! ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest versions of the mods you want for your version of Clone Hero. diff --git a/SplashTextEditor/README.md b/SplashTextEditor/README.md index 5e392c3..ba6e4bb 100644 --- a/SplashTextEditor/README.md +++ b/SplashTextEditor/README.md @@ -8,7 +8,7 @@ By pressing `Ctrl + Shift + F9`, you can bring up a window that allows you to cu ## How to install - You will need Clone Hero **v0.23.2.2**. You can use any version from the website (i.e. Win64, Win32, Mac, or Linux), but your mileage with the launcher version may vary. -- Install [BepInEx v5.3](https://github.com/BepInEx/BepInEx/releases/tag/v5.3) into your Clone Hero directory. +- Install [BepInEx v5.4.11](https://github.com/BepInEx/BepInEx/releases/tag/v5.4.11) into your Clone Hero directory. - Download the appropriate version and extract **all** of its files into your Clone Hero directory. - Please verify that BepInEx has initialised by running the game after extracting, and then checking that there are five folders and a `LogOutput.log` file inside the `BepInEx` folder. One of those folders will be named `plugins`, and you'll need that to run the mods. - Go to the [Releases page](https://github.com/Biendeo/My-Clone-Hero-Tweaks/releases) and download the latest version of Splash Text Editor you want for your version of Clone Hero. diff --git a/appveyor.yml b/appveyor.yml index 58833f6..484a42a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -10,7 +10,7 @@ branches: skip_tags: true cache: - - BepInEx-Libraries + #- BepInEx-Libraries - CH-Libraries install: @@ -25,8 +25,8 @@ install: - echo Downloading BepInEx - ps: | if (-not (Test-Path .\BepInEx-Libraries)) { - Start-FileDownload 'https://github.com/BepInEx/BepInEx/releases/download/v5.3/BepInEx_x64_5.3.0.0.zip' - 7z x BepInEx_x64_5.3.0.0.zip + Start-FileDownload 'https://github.com/BepInEx/BepInEx/releases/download/v5.4.11/BepInEx_x64_5.4.11.0.zip' + 7z x BepInEx_x64_5.4.11.0.zip New-Item -ItemType Directory -Path 'BepInEx-Libraries' Copy-Item -Path '.\BepInEx\core\*' -Destination 'BepInEx-Libraries' -Recurse }