Questions tagged [harmony]
17 questions
2
votes
1 answer
Use Internal Class in C# Harmony Patch
I'm pretty new to c#, and I'm using Harmony patches to make a mod for a video game. The method I'm trying to patch is a private method which takes an internal class instance as a parameter. I've been able to use reflection to handle private methods…

GeneralMike
- 2,951
- 3
- 28
- 56
1
vote
0 answers
C# Harmony Transpiler null field exception for one of two nearly identical calls
Here's my code. Question is at the bottom:
namespace DifficultyModNS
{
[HarmonyPatch(typeof(Boosterpack),nameof(Boosterpack.Clicked))]
public class OneVillagerChecks
{
public static Int32 frequency = 5;
public static…

jmucchiello
- 18,754
- 7
- 41
- 61
1
vote
0 answers
Why is my JavaScript Magic SDK front end integration unable to confirm transactions?
Magic RPC Error, unable to confirm transaction after 20 attempts
Two months ago, I wrote some JavaScript code for a front end integration of the Magic SDK to the Harmony testnet. I was able to send a transaction to a smart contract with the…

heximal
- 11
- 1
1
vote
1 answer
"ValueError: Unknown optimizer: momentum" binary_crossentropy. Please ensure this object is passed to the `custom_objects` argument
Building a model that uses harmony search algorithm for hyperparamenters tuning, combined with CNN-LSTM layer.
Setting the parameters seems okay, upon running it gives an error related to 'custom-objects' which is peculiar to tensorflow.
ValueError:…

allmen
- 21
- 1
1
vote
0 answers
Harmony package for R is missing
I have been trying to install the harmony package for R, but cannot. Here are the errors:
> install. Packages("harmony")
There is a binary version available but the source version is later:
binary source needs_compilation
harmony 0.1.0 …

Sinatra
- 11
- 1
1
vote
1 answer
How to do .NET runtime method patch on generic class's static non-generic method? (Harmony or MonoMod)
In this example, I want to patch PatchTarget.QSingleton\.get_Instance().
How to get it done with Harmony or MonoMod?
Harmony:
"Unhandled exception. System.NotSupportedException: Specified method
is not supported."
MonoMod:
"Unhandled…

user2771324
- 307
- 3
- 13
1
vote
0 answers
How to patch a private method defined in a serialized IEnumerable class with harmony?
The method I want to patch is something like this:
[Serializable]
public class Class1 : IEnumerable, IEnumerable
{
private void Method()
{//...
}
}
I tried
[HarmonyPostfix,HarmonyPatch(typeof(Class1), "Method")]
public static…

Daedra
- 111
- 1
1
vote
0 answers
How to patch a method with overloads in generic type, when the arguments are the same?
I want to patch a method like this:
public class DataManager : IDataProvider
{
protected virtual void ReadData(string path) where T : Item
{
}
protected virtual void ReadData(string path)
{
}
……
}
I have written code…

sky find
- 21
- 2
0
votes
1 answer
In C# Harmony patching. how do you compare the labels in CodeInstruction.labels to known label values
So I have a stream of IL code like this:
IL_0047: ldarg.0
IL_0048: ldc.i4.m1
IL_0049: stfld int32 classname/innerclassname::'<>1__state'
IL_004e: ldstr ""
IL_0053: call void classname::set_aProperty(string)
IL_0058: ldstr ""
…

jmucchiello
- 18,754
- 7
- 41
- 61
0
votes
0 answers
Harmony bootloader on SAME70 - no UART communication, debug not working
I'm experiencing difficulties with Harmony bootloader on SAME70N20B chip. I want to build simple bootloader to be able to flash firmware via UART4. I'm not able to use integrated SAMBA bootloader, because it operates on UART0 (maybe not UART0, not…

Thugmek
- 43
- 8
0
votes
0 answers
Harmony - add property to object, or similar effect
There's a class I can't edit directly with a method something like
BuildingSaveData {
public override BuildingSaveData SaveTheThing(Building b){
this.propOne = b.propOne;
//etc etc
return this;
}
public…

Randy Hall
- 7,716
- 16
- 73
- 151
0
votes
2 answers
Having issues with EEPROM storage. External EEPROM acks data transfer, but only returns 255 when read
I’m working on a project and for part of it I am trying to use the Harmony I2C driver library in order to send data to and from the eeprom using the SDA and SCL lines.
When reading the SDA and SCL lines with an oscilloscope, the correct sequence of…

bbeeb8
- 1
0
votes
0 answers
how do i get my coroutine to update every frame in my BepInEx plugin?
in this code, i am using bepinex and harmony to make a plugin for the game Sons of The Forest
code for my plugin
the goal of the code attached is to log the value of an in-game variable every second, but the value of the variables in the class…
0
votes
1 answer
Android app testing on huawei harmony based OS
an android devolveper can test apps via android studio by connecting huawei mobile based on harmony os?
I am a beginner and start learning Android development. In my place we can get huawei new devices at affordable prices that's why I want to…

Sahil
- 29
- 5
0
votes
0 answers
how to reference original class and patch class with same name separately
I'm trying to prefix patch a class with harmony, but in order for it to work, I need the new class to be the same name as the original. I can't get it to work without harmony being unable to find the original class.
Here's what the original and…

Scott Pickslay
- 25
- 4