Inquiry on the feasability of hacking with the decomp directly

This is mostly for curiosity sake, but I feel like it’s a worthwhile question.

With the near completion of the decompilation, how feasible would it be to make a hack by directly modifying it ? My understanding is that current code insertion rely on lyn files, but being able to directly modify the code would allow for cleaner project (and as a programer, it just make more sense to me)

I believe this pr allows for shiftability:
https://github.com/FireEmblemUniverse/fireemblem8u/pull/744
E.g. you can increase the size of data/functions instead of hooking/repointing them into free space.

However, doing this will break compatibility with FEBuilder and most patches / engine hacks, which generally use fixed addresses. It is possible to find which function each hook uses and to modify it with the logic used, but this takes up extra time and effort. I’m not eager to be the first one to try and lead us into the era of shiftability, and my projects (pokemblem / self randos) are too far in to feasibly hop over.

Since lyn can autohook functions for us, I believe it’s a lot easier to use a buildfile and to replace functions as needed. You pretty much just copy paste a c function or c file from the decomp and make it part of your build process. I think Mokha’s C skillsystem is a great template if you want some of its features and you want to use make to build everything.

If you are not a fan of linux and extensive use of make, I made a simple guide on C code insertion for beginners:

This method allows easy replacement of functions in buildfiles and in binary febuilder hacking.
https://github.com/Veslyquix/Pokemblem/tree/master/Patches/FillAiDangerMap
For example, here I made the ai danger map use a unit’s weapon ranks instead of items.

tl;dr we’re in the era of C hacking, but not full shiftability imo

Thank you for the detailed reply

That was my assumption from the start, truth to be told. It would certainly be an undertaking (and I understand why existing project wont change course), but I think getting rid of fixed address would allow for greater flexibility. I’m going to play around with the pr you posted to test thing