Project Zomboid

Project Zomboid

[v41] Mod Config Menu
54 Comments
mezz  [author] Dec 18, 2024 @ 3:40am 
I've updated the mod to v42: https://steamcommunity.com/sharedfiles/filedetails/?id=3386620985

It is now necessary to put MCM at the top of the load order, above any mod that uses it. Otherwise nothing about the implementation has changed.
Coldsteel Aug 8, 2024 @ 3:35am 
Can you add an option for just a button, which immediately invokes the callback when you press it with no arguments? I have an extremely complicated settings window which is completely unreasonable to implement in any modconfig mod so I have to make my own UI window, but I need a way to open it from the settings screen. Right now I'm doing it by hacking into the UI and adding a button there next to one of my options, but ideally it would be simply supported out of the box.
Revion Mar 17, 2024 @ 1:12am 
Makes sense. I found the checks that they use in Mod Options and they're very simple, so I think that should work for my needs.

Already had stuff running on apply, but broke things by running them in the main menu instead of inside the game.
mezz  [author] Mar 17, 2024 @ 12:49am 
If you want to run code when "apply" is pressed, you can simply put it in your commit function. You can run checks in there, whether you are in the menu or in the game and run what you want accordingly.
Revion Mar 16, 2024 @ 10:02pm 
Is there a function like OnApplyMainMenu or OnApplyInGame for this? They are functions that exist in "Mod Options"
Revion Mar 8, 2024 @ 12:45pm 
Really love how powerful this MCM is. Thank you for making this. Works mostly as expected and was able to get exactly what I wanted.
Raptorkoda Feb 15, 2024 @ 12:27pm 
work in game. on dedicated server?
mezz  [author] Dec 1, 2023 @ 9:42am 
If someone else wants to, they can fork MCM and take over maintaining it. I'm not particularly active in PZ atm and have some other things going on. I won't really be able to take care of it.
Captain Tofu Dec 1, 2023 @ 1:49am 
(since the pages pile up, maybe create a discussion topic on this. That is kinda critically important). you can do that at the top of the page, right between mod name and first mod picture
mezz  [author] Dec 1, 2023 @ 1:23am 
Due to the recent forced 2FA thing that Github does now, I privated any repos that nobody was gonna need anyway. Now that I am locked out of my account for good, I wasn't gonna maintain it there anyway. If you want to look at the code, you can simply download the workshop addon and take a peek inside.
Js Nov 30, 2023 @ 3:13pm 
The github link returns 404.
Captain Tofu Nov 29, 2023 @ 10:41am 
I wonder, what mods use MCM. Haven't seen it before
Djeguer May 14, 2023 @ 1:33am 
I don't have it on the menu
mezz  [author] May 13, 2023 @ 6:35am 
Disable MCM example mod
Djeguer May 13, 2023 @ 6:19am 
having integrated a pink text with "MCM Example mod" written roughly on the game window is really bad!
Jack Rossman Apr 18, 2023 @ 11:43am 
Alright. Big sadge.
mezz  [author] Apr 18, 2023 @ 11:42am 
MCM currently only supports clientside options, it is also unlikely that I will add any syncing in the near future, as I am not actively playing or modding PZ right now, however the source is up on github, if someone else wants to implement that.
Jack Rossman Apr 18, 2023 @ 11:38am 
Hello there. I've got a bit of a doozy question:
Say I want to use this to add some options to my mod. But say I want them synced from client to server in MP.
Is that at all possible?
mezz  [author] Jan 16, 2023 @ 3:13pm 
Can't really tell what the issue is with this little information, you may also want to try asking for help on that mod's page.
TheWimpyShrimp Jan 16, 2023 @ 1:03pm 
im confused I added this with the generator time to my multiplayer I also added this and it isn't working
star Oct 27, 2022 @ 7:39pm 
Also there are functions:
isClient() is true on clients,
isServer() is true on the server,
both are false in singleplayer and in main menu.
star Oct 27, 2022 @ 7:37pm 
Server load order:
1) shared
2) shared (mods)
3) server
4) server (mods)

Client load order:
1) shared
2) shared (mods)
3) client
4) client (mods)
5) server
6) server (mods)
mezz  [author] Oct 27, 2022 @ 3:25pm 
Howdy,

I don't really know exactly how PZ handles server/client/shared at all, I am also not really actively playing PZ currently. If you want to help extend MCM to work properly for MP you can contribute on the github page. Currently it is only guaranteed to work for SP.
Tyrir Oct 27, 2022 @ 3:21pm 
This looks quite good. Nice work!

Would it be possible to move the non-ui portion of the code to media/lua/shared/ so mods can retrieve the saved options within shared/ lua files (similar to what Mod Options does)?
Kind Sep 10, 2022 @ 11:04am 
Nice, thanks
mezz  [author] Sep 10, 2022 @ 10:47am 
At the moment all settings are saved clientside. They will be retained throughout enabling/disabling mods.
Kind Sep 10, 2022 @ 10:44am 
Say that I join a server and unsub from all mods, if I resubscribe will my settings set with this mod still be saved?
star Aug 26, 2022 @ 8:10am 
I'm glad you created this mod.
male g-spot 100% love Aug 12, 2022 @ 10:45pm 
forget about it

i had it disabled..............
male g-spot 100% love Aug 12, 2022 @ 10:40pm 
sorry this is my first time using mods like this.

where can i find the options for this mod?
R4ZH0R Jun 22, 2022 @ 12:49pm 
Thank you. Mod options is really frustating... Hope more creators support that mod!
DasMartin Jun 22, 2022 @ 7:03am 
works like a charm, thanks a bunch!
mezz  [author] Jun 21, 2022 @ 2:24am 
I pushed a small update to introduce scrolling now. Sorry it took a while, I've discovered a bug while implementing it.

Checkboxes for some reason just stop working beyond a certain scroll height. I haven't figured out why yet, but if anyone knows why this is happening let me know, so I can fix it.
digitalbarrito Jun 10, 2022 @ 2:09pm 
Fair enough. To that length I can just hope that TIS implements a proper Mod Options tab into the base game for modders to use instead.
mezz  [author] Jun 10, 2022 @ 1:26pm 
Also just in general, I am not awfully invested in MCM "gaining traction". I made it first and foremost, because I needed a config solution that was better than Mod Options for my own mod, MCM is the result of that need. Others are free to use it aswell if they prefer, but I am not going to lose any sleep if it doesn't become widely used.
mezz  [author] Jun 10, 2022 @ 1:23pm 
Nope, still not doing it. I don't think it's worth investing the time in remaking Mod Options, when Mod Options already exists and doesn't actively conflict with MCM. I dont think end users particularly care about having two mod config managers running concurrently, they will just install whatever the workshop tells them to install, and as long as it works, they will not mind.

Modders also don't have to support to both, they can make their mods work with whichever solution they personally prefer, and both will work.
digitalbarrito Jun 10, 2022 @ 12:21pm 
@mezz I know you've expressed you have no intent to, but if it's possible, I think you should genuinely consider some way to offer a compatibility/replacement layer. Mod Options hasn't updated in nearly a year, and doesn't appear like it's going to any time soon. Might also help this gain traction.

My main concern is modders being unwilling to support two different mod configuring mods, or even knowing there's an alternative existing, and End Users might get put off by needing two separate configuration mods installed especially if both mods add their own tab to the options menu. (Entirely unsure if you're just hooking into the same Tab Mod Options creates or if you're creating your own tab, so might not even be a valid concern)
DasMartin Jun 8, 2022 @ 10:45pm 
thank you, much appreciated <3
mezz  [author] Jun 8, 2022 @ 2:35pm 
Oh, I'm sorry, that's an oversight on my end, I haven't even thought about scrolling at all. I'll be looking into it as soon as I can find time.
DasMartin Jun 8, 2022 @ 8:10am 
Hey mezz, thanks for the great mod! I am currently trying to integrate it with my own mod and ran into an issue: I am creating ~40 settings and they don't fit into the menu tab. could you make the tab scrolling, like the mod tab or the one the antibodies mod creates? alternatively, if I am being stupid and there is something I should be doing differently on my end, please let me know!
Nobody Jun 7, 2022 @ 9:05pm 
I have given this mod awards, Favorited and liked it. This is a very nicely written mod, and I really want to see it thrive.
mezz  [author] Jun 7, 2022 @ 1:25pm 
I do not plan on writing a replacement or compatibility layer for Mod Options in MCM. Both of them can coexist and shouldn't interfere with one another. Modders who want to switch to MCM will have to replace their configuration manually.
158 Jun 7, 2022 @ 12:07pm 
can this effectively replace MCM or are modders going to have to individually add support to this mod themselves?
mezz  [author] Jun 5, 2022 @ 10:03am 
Ahh I see, makes sense. Yea, something like MCM is probably going to outlive me, I don't want its development to be bottlenecked by my own motivation or lack thereof in the future.
digitalbarrito Jun 5, 2022 @ 9:52am 
Oh, no I'm aware, I more meant you "put up the source" in that you've put it on Github so people can directly contribute which is something Mod Options lacks.
mezz  [author] Jun 5, 2022 @ 9:48am 
The source was already available from the workshop, lua scripts aren't distributed in compiled form and can be simply read and edited by anyone.
digitalbarrito Jun 5, 2022 @ 9:37am 
Yeah, now I really hope this gets picked up by the community, can be run alongside Mod Options, and this chad put up the source. C'mon folks, pick it up pls <3
mezz  [author] Jun 5, 2022 @ 9:07am 
Btw, if anyone with better knowledge than mine regarding MP wants to help, I've published MCM on github, I'll gladly accept contributions:

https://github.com/MerelyMezz/PZModConfigMenu
mezz  [author] Jun 5, 2022 @ 8:32am 
Mod Options can be run concurrently with MCM, you can simply switch and not worry if players have it installed.

As for MP support, I haven't looked into it yet (I dont play awfully much MP), but you could just try to implement MCM and see if it works anyway. I suspect that atleast clientside options will be correctly retained.
Black Tea Za rebel1324 Jun 5, 2022 @ 7:53am 
Actually, I would make my mods to support this one if this one works in MP and automatic legacy ModOption override