Elin
Better Gene Modification
Error in the LogOutput.log file
The mod doesnt appear to be working, i set : GeneSynthesisTimeMultiplier = 0 but the gene time in the game is still the same as vanilla.

Output log file has this error :

[Info :BetterGeneModification] BetterGeneModification Card_DamageHP_Patch Transpiler
[Error : HarmonyX] Failed to patch void Card::DamageHP(int dmg, int ele, int eleP, AttackSource attackSource, Card origin, bool showEffect): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
at System.Collections.Generic.List`1[T].RemoveRange (System.Int32 index, System.Int32 count) [0x00020] in <7e05db41a20b45108859fa03b97088d4>:0
at HarmonyLib.CodeMatcher.RemoveInstructions (System.Int32 count) [0x0000c] in <78c1d5ebcc984a739a6da61ee5e07d42>:0
at Card_DamageHP_Patch.Transpiler (System.Collections.Generic.IEnumerable`1[T] instructions) [0x0010a] in <2236903ae8b64a4eb0d42e59fa4aae89>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <7e05db41a20b45108859fa03b97088d4>:0
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <7e05db41a20b45108859fa03b97088d4>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <7e05db41a20b45108859fa03b97088d4>:0
at HarmonyLib.Internal.Patching.ILManipulator.ApplyTranspilers (System.Reflection.Emit.ILGenerator il, System.Reflection.MethodBase original, System.Func`2[T,TResult] getLocal, System.Func`1[TResult] defineLabel) [0x00093] in <78c1d5ebcc984a739a6da61ee5e07d42>:0
at HarmonyLib.Internal.Patching.ILManipulator.WriteTo (Mono.Cecil.Cil.MethodBody body, System.Reflection.MethodBase original) [0x00066] in <78c1d5ebcc984a739a6da61ee5e07d42>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteTranspilers () [0x00084] in <78c1d5ebcc984a739a6da61ee5e07d42>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x0002b] in <78c1d5ebcc984a739a6da61ee5e07d42>:0
Last edited by Question; 14 Jan @ 12:05pm
< >
Showing 1-5 of 5 comments
zwa73  [developer] 15 Jan @ 7:43am 
It looks like the patch might have failed, triggering Harmony's fallback behavior, which caused the function to revert to its original state. The primary issue appears to be related to this error, but I haven't been able to reproduce it myself.

It might be necessary to recompile. I'll send you a new version soon. You can try unsubscribing and then re-subscribing to test it out again.

Additionally, this error might be related to the following options:
ModifyMetalDamageCalculation
ModifyDefensiveInstinct

You could try changing these options to see if it resolves the issue. If doing so fixes the problem, we can better pinpoint the cause.
Question 15 Jan @ 11:15am 
I did some testing and i realised that setting ModifyDefensiveInstinct to true was causing the problem, and then i remembered i had another mod that did the same thing called "KK Free Lay on Hands".

So it was probably a mod conflict that was causing your mod to break, sorry for that. Its working now.

Btw, do you think it would be possible to add some kind of gene crafting to the mod in the sense that you can add/remove memories from an existing gene? Its particularly annoying when you get a good gene but its got some useless modifiers on it that are jacking up the feat cost.
zwa73  [developer] 27 Jan @ 10:19am 
Originally posted by Question:
Btw, do you think it would be possible to add some kind of gene crafting to the mod in the sense that you can add/remove memories from an existing gene? Its particularly annoying when you get a good gene but its got some useless modifiers on it that are jacking up the feat cost.


Actually, I think tolerating any random gene effect while normalizing gene feat cost is a better approach, and it can currently be done in this mod.

In my opinion, if we were to "craft" a gene like EquipModify, it would simply be another way to bypass the "gene slot" and "feat cost" restrictions.

Moreover, considering the current gene slot calculation method, gene effects without additional slots will always occupy only one slot, no matter how many are stacked, which is obviously completely unreasonable. Therefore, I personally believe that it's unnecessary.
Question 28 Jan @ 4:21am 
Uh, im not sure if we are on the same page here.

I wasnt talking about removing gene slot or feat cost restrictions. But genes are often generated with useless stats that ramp up the slot and feat costs.

So for example, lets say you have a gene with the following stats :

Memory of long sword
Memory of scythe
Memory of wil
Memory of finger

And it costs a LOT of feat points. You want the memory of finger and maybe 1 other stat, but not the rest. So being able to modify the gene via crafting to remove the useless stats would be really useful.
zwa73  [developer] 28 Jan @ 7:00am 
Originally posted by Question:
And it costs a LOT of feat points. You want the memory of finger and maybe 1 other stat, but not the rest. So being able to modify the gene via crafting to remove the useless stats would be really useful.
I think my previous response might have focused more on the "adding" memories aspect, whereas you’re more concerned with "removing" them. Here's a clearer explanation of my opinion:

Let's say you have a basic gene:
Memory of finger
Consumes 1 slot, 1 feat point

If we modify the gene to:
Memory of finger
Memory of hand
Memory of head
Memory of foot
And 10 other body parts
The result is that it consumes 1 slot but 14 feat points.

Clearly, a gene like this shouldn't be considered as just a single-slot gene even if it consumes more feat points, as it’s still unfairly overpowered.

So, I believe we shouldn’t make changes to add or remove memories.
If the goal is to reduce feat point consumption, using a mechanism to "delete" memories feels cumbersome and not very impactful.
Instead, you can directly lower the feat point consumption using the existing "Multiplier for gene feat points" feature and set a lower value.
This way, you can reduce the cost without removing memories, while understanding that the memories you want to delete are mostly meaningless to the character. So, my suggestion is to boldly reduce the feat point cost rather than trying to remove parts of the memory, making the gene system more balanced and less tedious.
< >
Showing 1-5 of 5 comments
Per page: 1530 50