besteon / Ironmon-Tracker

A Lua script for the Bizhawk/mGBA emulator compatible with Pokemon Fire Red, Leaf Green, Ruby, Sapphire, and Emerald that tracks relevant data for the IronMon challenge.
MIT License
123 stars 44 forks source link

Tracker Customization Support #342

Closed UTDZac closed 1 year ago

UTDZac commented 1 year ago

This feature adds support for code customizations to be added to the Tracker by anyone. By default, the Tracker will not have any custom code files or custom code execution.

To obtain this, developers need to install the Custom Code add-on which is a single file. This file allows the developer to hook into specific areas of the Tracker to execute code, similar to an API, but with a bit more control on our end.

Since this is an add-on, this feature is upgrade safe. This means that upgrading that tracker will not overwrite or directly break the custom code support. Also worth noting that this is a first attempt at offering custom code to be used within the Tracker, and as such it is unlikely that this captures every possible use-case that a developer might want. Future updates to this add-on are possible, but will require developers to make those updates to their own custom code file to obtain them.

In short, this feature:

Things to do after this:

UTDZac commented 1 year ago

Going to change this up in a bit to work better for sharing custom code.

UTDZac commented 1 year ago

Done. Thanks for waiting. The CustomCode.lua file is now included in the actual tracker project. I separated out the parts that devs will change into the add-on specific code files, which are attached to this message.