Code Modding Progress

While getting the Patreon rolling, I’ve also been planning out code mods. Specifically I’ve been reading up on Python’s import machinery and different approaches to monkey patching. Monkey patching is a much-derided programming technique where you rewrite or add to portions of the code while the program is running. If this sounds crazy, it sorta is, but it’d really give modders the run of the place. It’d be a good fall back for situations where more formal extension hooks don’t exist.

I’m looking to give modders @before, @after, and @instead decorators that would let them hook their own functions into existing methods, but reversibly and in the load order of the mod list. I’d publish a list of recommended places to override, of course.

I’ve also been preparing the data definitions (character types, transformations, all that stuff) to make it easier to turn them into data that I can load from files. This is going to benefit both modders and myself because it’ll give me a more convenient way to maintain both a patreon version and a non-patreon version.

Leave a Reply

Your email address will not be published. Required fields are marked *

Anti-Spam Quiz: