Hats

Hats

24M Downloads

[Request] Better documentation for server configuration

spiritedsnowcat opened this issue ยท 3 comments

commented

Hi there,

I was running a server with the hats mod enabled, and things got really out of hand with every mob having a hat after a few hours of people logging in and logging out. Maybe that's a bug on its own, but 10% was too high of a spawn chance for our server. I wanted a simple way to reduce it to 0.5% chance, but couldn't find an options file for the mod in the forge config or mod folders. I read through the source code trying to figure out where the default file is before just uninstalling the mod. Some better documentation around that would be really helpful (I'd like to reintroduce the mod).

Thanks so much,
Spirited

commented

Hiya,

Every mob having a hat after a few hours seems like a bug indeed, mobs which have already spawned without a hat should not be re-allocated hats later on when they re-spawn, so I might have to look into this.

The problem with this issue is that configs existing in the server/world folder is a Forge feature, and although I've had my bad experiences with configs in the world folder in the past (way way long ago), it was the only Forge config type that would sync between servers and clients. Using the in-game config editor would have at least shown that there exists a server config, but unfortunately server-side there is no editor.

I could make a comment in the other configs informing users of the existence of the server config but at the same time I feel it's somewhat redundant to have to do so since this is a forge feature and many other mods also have configs stored on the server, if you know what I mean?

commented

Ahh, I see. That would explain why hats got so out of control. And thanks for the info about config files, I didn't know this mod was so separate from Forge's APIs in general. It makes sense now if there's no general approach that covers all server cases. Would it be possible to expose it as a game rule command or something similar? (Sorry if I'm just spitballing ideas).

commented

No, no, you misunderstand. Server side configs (the configs that are saved in the world folder), is part of the Forge feature set. I've just personally had bad experience with this in the past because everyone expects the config files to be in the config folder. This was years before Forge added server configs, and since forge supports it now, it's less of an issue as more people are aware of it.

I've not looked into adding game rules, so I'm unfortunately unfamiliar with them, but my configs use formats that are not supported by game rules (eg lists) so it's unlikely I'd switch to that.