NaixGames / Polycosmos

Mod for integrating Hades into AP Multiworld
MIT License
4 stars 3 forks source link

Organization & Cleanup #6

Closed doesboknow closed 6 months ago

doesboknow commented 6 months ago

After learning more about Hades modding, I reorganized some folders & cleaned up some code I already had.

In the future, we may want to more properly utilize enable/disable features https://github.com/SGG-Modding/Hades-Modding-Wiki/wiki/4.-Making-your-first-mod. This will help us not need to worry about running modimporter.exe every time you want to enable/disable Polycosmos as a whole, but would also prove useful if Reverse Heat becomes an option; then, you could have the code disable Reverse Extreme Heat if Reverse Heat is disabled, and other options. I haven't learned how to enable/disable parts of code yet though.

NaixGames commented 6 months ago

I still need to see the pull request; but we warned that using enable/disable to deal with reverse extreme measure wont work that easily. The reason is because you cannot make sure the client have loaded the player's options unto StyxScribe when you load the mod.

The proper way is to have a hook on the mod that reacts to when the Client has loaded the information (which sends a message with a prefix + "Data loaded") and see if we do anything to set the option for the mod there. However, for that the mod needs to be enable.

There is a bunch of design decision that may seem awkward, but they have to do exactly with making sure the Client has sent the information.

doesboknow commented 6 months ago

Added the Extreme Measures Troubleshoot item. the two Data files were failed attempts to use ModUtil. The two function files are not actually attempts to use ModUtil, but just copied functions that have the changes in there that make sense (I've commented where I added them).