tModLoader / tModLoader

A mod to make and play Terraria mods. Supports Terraria 1.4 (and earlier) installations
https://www.tmodloader.net/
MIT License
4.09k stars 1.86k forks source link

[1.4 Alpha] ReLogic MonoMod HookGen #1754

Closed steviegt6 closed 3 years ago

steviegt6 commented 3 years ago

Is there an existing suggestion for this?

Do you intend to personally contribute/program this feature?

No

Description

Generating hooks for the ReLogic assembly similarly to how we generate hooks for Terraria (see: TerrariaHooks) would aid in modifying some more specific stuff that isn't directly attached to Terraria.

What does this proposal attempt to solve or improve?

I recently had to create a bunch of detours for DynamicSpriteFont manually, which would have been sped up greatly if we had access to generated hooks. I could have generated them myself but those tend to waste space and memory. This would open up ease-of-use for users who aren't familiar with manually creating hooks, as well.

Which (other) solutions should be considered?

N/A, it's just supplying users with generated hooks so we don't have to make them ourselves.

Chicken-Bones commented 3 years ago

Honestly, if you have reason to hook ReLogic.dll then tModLoader could probably benefit from whatwver you're building. Particularly if it's font related.

You'll note we've also left Terraria.ModLoader hooks out of the hookgen'd assemblies for a similar reason. We support monomod being used to make gameplay changes more than engine changes.