Do a Barrel Roll

Do a Barrel Roll

5M Downloads

Migrate to a different config library, seeing as Cloth Config is effectively depricated.

enjarai opened this issue · 7 comments

commented

image
image

commented

The alternative would likely be owo-lib's config module. I'm open to alternative suggestions.

commented

Are nested objects supported? How does it handle default values for those? I've had issues with cloth not liking it when I specify default values for nested objects as constructor arguments instead of putting them in the class directly.

No, they are not, as that would dramatically increase the file size and it's used so rarely that I don't think it's a necessity for a config library focused on size.

commented

I'm a bit biased on that, but MidnightLib is focused on being very small for JiJ usage, while still providing a full config experience, all in literally only 60KB.
Also, it's just so easy to create config entries, it's literally done in one line, which helps me in a lot of debugging scenarios where I need to try some different values, but don't want to recompile to mod to change it.
Despite of it's small file size, it still provides some other nice features, like color utilities, automatic ModMenu integration and cosmetic hats for modders, which I think is a great way us modders can get rewarded for all the hard work we do.
If you don't like the extra features however, you can also literally use the MidnightConfig class on it's own, as it basically contains the entire config system.

commented

I prefer something annotation-based, its very convenient to be able to add a few lines and have everything just work™.

commented

I prefer something annotation-based, its very convenient to be able to add a few lines and have everything just work™.

Yeah, that's exactly what MidnightConfig is, an annotation-based config library that just works.

commented

Oh really? For some reason I was under the impression that it's builder-based. I'm not a huge fan of the bundled cosmetics idea, but as its possible to use only the config parts, I'll take a look.

Are nested objects supported? How does it handle default values for those? I've had issues with cloth not liking it when I specify default values for nested objects as constructor arguments instead of putting them in the class directly.

commented

If possible, it would be great if you just had the MidnightConfig class built into the mod,
as then it would no longer require any separate dependencies.