More Plug&Play modules:
Plug&Play Modules v1.1:
ft_linkft_marthft_pitft_ikeft_lucario(
Credit to Dantarion for his documentation of the modules on OpenSA.com)
I've also made a new revision to the Plug&Play model. Most of it was just to make the modules a bit easier to deal with on my end, but the new modules also now cover any bugs related to entry and result screen files as well as a few other character related flags. I've also disabled Kirby Hats for all cloned characters to avoid possible complications involving character resources (
They can still be enabled, but you get the original character's hat).
As far as I've tested, all 5 of these modules work perfectly in game (
Including Lucario, who's Aura Sphere now properly shows up). However, the bugs concerning when graphical and sound files get loaded and unloaded still remains. Also, while the modules do patch the soundbanks, the soundbanks actually get read before the module is loaded - so the first time you load them, they won't have the proper soundbank loaded.
I've also added a small tweak to the Module Editor 3 to make it easier to change the modules between characters.
Module Editor v3.2To change a module, simply open it up in the editor and make the following changes:
- Change the module Id of the file to the target module Id.
- Open Section[8] in the memory viewer and change the first value to the target character Id.
The list of module and character Ids is here:
As far as how these modules work: simply put, they are just doing the same thing that codes do, but they make things a whole lot simpler by exploiting the powerful nature of relocations as well as the fact that modules are programs that can be run when they're loaded up.
For each module, I've added a simple program in Section[7] that gets called first during the module's _prolog function. Section[7] is identical across all of the Plug&Play modules. The actual changes and associated data are stored in Section[8] of the module. These are hex strings that are used to patch the game files when the module is loaded; this includes things like constants and color flags as well as any changes that need to be made to sora_melee. One final block in Section[8] is responsible for identifying what changes need to be made inside the module itself in order for it to function properly.
It's really quite a simple, but elegant solution to the whole mess of dealing with modules and how they integrate with sora_melee along with other global data. Making them isn't that hard - it's just tedious given the tools currently available to edit modules. The hardest part is finding the areas in sora_melee that actually need to be patched to have the cloned characters run properly.