Forge Config Screens [Forge & Fabric]

Forge Config Screens [Forge & Fabric]

13M Downloads

Custom Mod Config Support?

Speiger opened this issue · 14 comments

commented

Forges Config is less then ideal and sadly can easily break.
So there are other config types that exist out there.

Do you plan to provide a API that allows custom ConfigFile formats out there?
or does this stay hardcoded to forge?

commented

Hey there, I've heard that from other devs as well, so yeah, since there is some demand it seems to be a necessity and I'd be happy to work on an api.

I saw your comments / PR on the Configured project, is that still what you have in mind?
They approach in your PR also seemed quite complete already, so I'm also not quite sure what else I can provide beyond that. Although I'd be happy to adopt an approach based on that.

Previous complaints were more geared towards the ForgeConfigSpec implementation, asking for replacing it with a more flexible dependency on IConfigSpec, but you also want to move away from the whole ModConfig implementation if I'm getting that right?

Are you also interested in Fabric development? Since Config Menus for Forge also is available on Fabric (not as a release though atm), since I ported the Forge config system over there to be able to maintain my mods on both loaders more easily.

commented

I saw your comments / PR on the Configured project, is that still what you have in mind?
They approach in your PR also seemed quite complete already, so I'm also not quite sure what else I can provide beyond that. Although I'd be happy to adopt an approach based on that.

Honestly if you just take the idea from ConfiguredPR that I did that might just cover everything I would request.
I am honestly requesting it just so people who might be forced to drop forges configs because of issues or the limitations that exist with it.

Well the idea is that forges stuff gets still supported and has default implementation, but if someone wants to add their own configuration system (which I have for example) they can at least add it themselves.
So what I ask for is more: allow modders to not have to write their own entire gui system but a simple accessor implementation that your mod requires to function properly.

Some examples why forges configs can break:

  • If miss configured the config is no longer useable, (no room for errors anymore from the coders side)
  • If you have dynamic configs that depend on conditions or that load later then forges configs expect you are basically not able to use them. (Like have a plugin system that loads dynamically that you cant predict the outcome)
  • If you want to load your client/common configs earlier then when forge specifies (yes its hardcoded when they load) then you are also out of luck.
  • Also adding custom config entries is not possible either.

About fabric development,
Honestly fabric is not for me, I am thinking about supporting it with some of my mods, but I am not sure if that actually happens.

commented

I see, I'm quite familiar with most of those issues.
So you'd support both Configured and Config Menus for Forge then?

It would be great if you could make another PR for this project. I currently have my mind on other things, but I'd be happy to accept a PR of yours.

commented

Maybe. Your mod has a higher dependency on forge itself then Configured.
Also this version has no real motivation behind it since I am actively using configured.

Also it would be only 1.16.5.

It really depends on how big my itch is to fix it myself.
because right now i have a 3 giant mods to patch and soon to port to 1.18 too..
IC2Classic, ChunkPregenerator, UniqueEnchantments...

So might take a few weeks before i have room to breath again.

commented

Sure, no hurry. Looking forward to your ideas!

commented

No need to tell me haha, had to make this whole ˋhackˋ mod for the Better MC modpacks just to stop the daily reports of issues related to the config system: https://github.com/Fuzss/nightconfigfixes

commented

@Fuzss small info.
I decided to make my own config system + ui library since forges just sucks.
Also thank you for reminding me yours exists :)

Said config will include a lot of features forges just does not support :)

commented

Oh yeah small fun fact that a lot of people don't know (found it out during gui development)
Double.MIN_VALUE >= 0 returns true.
Because Double.MAX_VALUE == 9999999999999999999999999999
while Double.MIN_VALUE == 0.00000000000000000000001
(These are just example values to show a point, not exact values)

So if you want the lowest double number you have to do:
-Double.MAX_VALUE.

This is most likely the reason for a lot of issues with forges configs too xD

commented

Well that’s certainly interesting, thanks!

@Speiger Another question, the custom config api you outlined originally, I saw you PR‘d that into the Configured mod. I‘m planning to bring back this mod for 1.19.3+ soon (as a multi-loader project, mainly to be used with Forge Config API Port on Fabric).

Would you be ok with me also implementing your api?
It seems really great from what I‘ve seen and it would be awesome to be able to natively support mods that normally offer dedicated integration for Configured.

commented

Do you mean my new mod config?
If yes, yeah if you want to.
I plan to open source it once its ready :)

Though mine doesn't support configured, because configured can't support what i need.
Hence why mine comes with its own gui conifg. But provides a API where you can access all you need :)

commented

I‘m referring to this PR: MrCrayfish/Configured#44

It would be awesome if I could include the api you designed there in Config Menus for Forge, too, so that mods that already use it can be supported.

commented

To be fair all i did was just abstracting the Entire process.
I have build something very similar for my system too.
Since the mod is GNU i doubt there is much you need to exactly copy it.
But if you just make your own implementation of the "idea" like i did on a non GNU License project.
You should be fine.
Since ideas can't be copyrighted just the implementation :)

commented

@Fuzss are you still considering adding some kind of API for mods that aren't using Forge's built-in system?

It could be as simple as ConfigScreenAPI.registerCustomScreen("mod_id", MyConfigScreen::new)

EDIT: nevermind, completely missed that Forge does have a method for registering GUIs for mods and they won't be overwritten by this mod, as far as i can tell

commented

@Jamalam360 yeah most config mods just provide a framework and hook into common implementations.
That is also something i did with Carbon Config. Though technically if the API is provided you could make use of their systems.
The only thing you wouldn't be getting is auto loading, but that is rarely an issue.