Skip to content

Conversation

@hazre
Copy link
Member

@hazre hazre commented Sep 18, 2025

This adds Author and Link as optional attribute fields, meaning it's still valid if only the main 3 bepiex expects are present.

This should make prepatchers more consistent with normal plugins.

@github-actions
Copy link

Download the artifacts for this pull request:

Copy link

@EIA485 EIA485 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where do I access the list of prepatchers that ran at runtime?
if its not already available we should not merge this

@hazre
Copy link
Member Author

hazre commented Sep 18, 2025

where do I access the list of prepatchers that ran at runtime? if its not already available we should not merge this

public List<BasePatcher> PatcherPlugins { get; } = new();

public BepInPlugin(string GUID, string Name, string Version)
/// <param name="Author">The author of the plugin.</param>
/// <param name="Link">The link to the plugin's website or repository.</param>
public BepInPlugin(string GUID, string Name, string Version, string Author = null, string Link = null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaks binary compatibility, also makes no sense to do this since we already have a lot of mods which use ResonitePlugin from the shim, and you can't just delete the attribute from the shim without breaking all already released mods.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

theoretically we if all current plugins reference the shim's ResonitePlugin, we would just need to push an update to that and they would work

public PatcherPluginInfoAttribute(string GUID, string Name, string Version)
/// <param name="Author">The author of the plugin.</param>
/// <param name="Link">The link to the plugin's website or repository.</param>
public PatcherPluginInfoAttribute(string GUID, string Name, string Version, string Author = null, string Link = null)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also breaks binary compatibility

@art0007i
Copy link

In general I'm against merging this at all. I don't think we should be putting resonite specific stuff in bepinex codebase

Copy link

@NepuShiro NepuShiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really see this as needed

@hazre
Copy link
Member Author

hazre commented Sep 18, 2025

Okay so you guys are fine with doing two complete different things for plugin vs prepatchers?

[ResonitePlugin(PluginMetadata.GUID, PluginMetadata.NAME, PluginMetadata.VERSION, PluginMetadata.AUTHORS, PluginMetadata.REPOSITORY_URL)]
    public class Plugin : BepInPlugin
[PatcherPluginInfo(PluginMetadata.GUID, PluginMetadata.NAME, PluginMetadata.VERSION)]
    public class Patcher : BasePatcher

This is the inconsistency that I would like to fix while we can. There is only one or two mods that use PatcherPluginInfo attribute currently.

@EIA485
Copy link

EIA485 commented Sep 18, 2025

yes since we have no use for the metadata from prepatchers

@knackrack615
Copy link
Member

If this were to implemented it would only be implemented for the sake of consistency, there is no actual functionality gain by having metadata in prepatchers, they are not visible anywhere.

@hazre
Copy link
Member Author

hazre commented Sep 18, 2025

Just because it's not implemented right now, doesn't mean we wouldn't use it in the future. Prepatcher only mods are still valid use case. Like how yesterday I was trying to make a prepatcher mod that removes RML's mod settings.

@hazre
Copy link
Member Author

hazre commented Sep 18, 2025

We can only do this kind of breaking change right now, if we tomorrow release bepis, it would be impossible to do. That's why its a good idea to make them consistent and future proof it.

@EIA485
Copy link

EIA485 commented Sep 18, 2025

currently our only usecase for this metadata is showing it in the mod settings. prepatchers cant have configuration options.

@knackrack615
Copy link
Member

currently our only usecase for this metadata is showing it in the mod settings. prepatchers cant have configuration options.

I guess the argument here is if we ever decide in the future to list prepatchers or do something with them in any kind of UI, it'd be impossible to do.

@knackrack615
Copy link
Member

So after discussing this in Discord with everyone, we came to the conclusion that this is not needed as of right now as it is very unlikely to utilize the metadata, and this way we're not modifying original BepInEx behavior.

@hazre hazre deleted the extend-attributes branch September 18, 2025 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants