Posted October 25, 20168 yr I just tried to port my old configuration to the new annotation-based system and noticed two missing features: default values and categories. I understand the new system is still a WIP, so these may already be on the roadmap. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
October 25, 20168 yr Default values are the values from the static initializes of your fields. As for categories, you can make sub-objects. See here: https://github.com/MinecraftForge/Mercurius/blob/master/src/main/java/net/minecraftforge/mercurius/Config.java I'm not sure i want to move things into TOP level categories. I'd more rather change the top level from "general" to "ModID" or something. But I havent decided yet. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
October 25, 20168 yr Author Default values are the values from the static initializes of your fields. As for categories, you can make sub-objects. See here: https://github.com/MinecraftForge/Mercurius/blob/master/src/main/java/net/minecraftforge/mercurius/Config.java I'm not sure i want to move things into TOP level categories. I'd more rather change the top level from "general" to "ModID" or something. But I havent decided yet. Thanks, that makes sense. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
October 25, 20168 yr Just a note, this is my test suit for this. Not the best but shows all the different data types and sub-categories: https://gist.github.com/LexManos/ca57c1f29365bf492f207e4aa1a7865c I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
October 26, 20168 yr Author Can GuiConfig be used with the new system? Would you be able to answer my questions about this here? Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
October 26, 20168 yr Yes, but you have to use the internal config object that is created by the manager. The GUI is part that I haven't gotten around to doing quite yet. Using the GUI system is really easy it just needs to be glued together. https://github.com/MinecraftForge/Mercurius/blob/master/1.9.4/src/main/java/net/minecraftforge/mercurius/binding/ModConfigGui.java#L40 being the example of how to use it in this style setup. I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
October 26, 20168 yr Author Yes, but you have to use the internal config object that is created by the manager. The GUI is part that I haven't gotten around to doing quite yet. Using the GUI system is really easy it just needs to be glued together. https://github.com/MinecraftForge/Mercurius/blob/master/1.9.4/src/main/java/net/minecraftforge/mercurius/binding/ModConfigGui.java#L40 being the example of how to use it in this style setup. Thanks, I ended up with this. Is there a way to do this without using reflection to access ConfigManager#CONFIGS ? Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
October 29, 20168 yr Btw, have you thought about giving modders the option to separate "global" and "user" configs? That would be especially helpful for modpacks, since users could still change some settings (like the tooltip position for Waila/OneProbe) without getting them overwritten every time the modpack gets updated.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.