Memoria icon indicating copy to clipboard operation
Memoria copied to clipboard

Harmony & Mod Support

Open Caledor opened this issue 4 years ago • 2 comments

Following from #121

Never heard of Harmony before but sounds just like what we need, since it allows for modding without ever touching the original Assembly-CSharp.dll, which is definitively the end goal.

If we're moving to a "mod folders" configuration like tirlititi suggested, maybe we can have some kind of harmony template in there, which can be edited by modders, compiled into a dll and injected at runtime just like the battle scripts.

Correct me if i said anything wrong, i barely glanced over how Harmony works.

To sum it up: I'm all for Harmony support, modders should never have to add their custom Assembly-CSharp.dll within their own package.

Caledor avatar May 26 '20 16:05 Caledor

That's right.

Write some examples of what you want to do in the game, and how you would do it now. This is needed to make a few examples using Harmony.

Albeoris avatar May 27 '20 08:05 Albeoris

Easy stuff i did is tweaking the numbers or small changes. Like multipliers for MP Attack, Killer abilities etc, or making Defend halve damage from magic as well... or changing the value for decide_meteor. Go into the method, tweak the numbers and it's done.

Slightly more difficult stuff i did was tweaking Boost and Accuracy+. The former to only avoid the damage reduction, without enforcing full length animation and the latter not to skip the "trytohit" check completely (so it wouldn't powercreep Clear Eyes). They are pretty similar, since they both bypass some code written inside an IF clause, so what i did is redistribute the ability check within the IF it used to bypass.

And then there's the Mag Elem Null change you already know.

Still, for detailed examples i think that the Mag Elem null one coupled with one of the easy stuff earlier should be enough. You'd have both the basic example and the harder one. Which can also be coded in two ways, by changing the multiplier (replace method) or to simply apply another multiplier on top of the original (do harmony stuff and let the original method still occur).

Caledor avatar May 27 '20 11:05 Caledor