Project Zomboid

Project Zomboid

[v41] Mod Config Menu
54 条留言
mezz  [作者] 2024 年 12 月 18 日 上午 3:40 
I've updated the mod to v42: https://psteamcommunity.yuanyoumao.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 2024 年 8 月 8 日 上午 3:35 
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 2024 年 3 月 17 日 上午 1:12 
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  [作者] 2024 年 3 月 17 日 上午 12:49 
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 2024 年 3 月 16 日 下午 10:02 
Is there a function like OnApplyMainMenu or OnApplyInGame for this? They are functions that exist in "Mod Options"
Revion 2024 年 3 月 8 日 下午 12:45 
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 2024 年 2 月 15 日 下午 12:27 
work in game. on dedicated server?
mezz  [作者] 2023 年 12 月 1 日 上午 9:42 
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 2023 年 12 月 1 日 上午 1:49 
(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  [作者] 2023 年 12 月 1 日 上午 1:23 
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.
Lina 2023 年 11 月 30 日 下午 3:13 
The github link returns 404.
Captain Tofu 2023 年 11 月 29 日 上午 10:41 
I wonder, what mods use MCM. Haven't seen it before
Djeguer 2023 年 5 月 14 日 上午 1:33 
I don't have it on the menu
mezz  [作者] 2023 年 5 月 13 日 上午 6:35 
Disable MCM example mod
Djeguer 2023 年 5 月 13 日 上午 6:19 
having integrated a pink text with "MCM Example mod" written roughly on the game window is really bad!
Jack Rossman 2023 年 4 月 18 日 上午 11:43 
Alright. Big sadge.
mezz  [作者] 2023 年 4 月 18 日 上午 11:42 
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 2023 年 4 月 18 日 上午 11:38 
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  [作者] 2023 年 1 月 16 日 下午 3:13 
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 2023 年 1 月 16 日 下午 1:03 
im confused I added this with the generator time to my multiplayer I also added this and it isn't working
star 2022 年 10 月 27 日 下午 7:39 
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 2022 年 10 月 27 日 下午 7:37 
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  [作者] 2022 年 10 月 27 日 下午 3:25 
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 2022 年 10 月 27 日 下午 3:21 
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)?
Transnoosent 2022 年 9 月 10 日 上午 11:04 
Nice, thanks
mezz  [作者] 2022 年 9 月 10 日 上午 10:47 
At the moment all settings are saved clientside. They will be retained throughout enabling/disabling mods.
Transnoosent 2022 年 9 月 10 日 上午 10:44 
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 2022 年 8 月 26 日 上午 8:10 
I'm glad you created this mod.
god loves satan 2022 年 8 月 12 日 下午 10:45 
forget about it

i had it disabled..............
god loves satan 2022 年 8 月 12 日 下午 10:40 
sorry this is my first time using mods like this.

where can i find the options for this mod?
R4ZH0R 2022 年 6 月 22 日 下午 12:49 
Thank you. Mod options is really frustating... Hope more creators support that mod!
DasMartin 2022 年 6 月 22 日 上午 7:03 
works like a charm, thanks a bunch!
mezz  [作者] 2022 年 6 月 21 日 上午 2:24 
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 2022 年 6 月 10 日 下午 2:09 
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  [作者] 2022 年 6 月 10 日 下午 1:26 
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  [作者] 2022 年 6 月 10 日 下午 1:23 
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 2022 年 6 月 10 日 下午 12:21 
@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 2022 年 6 月 8 日 下午 10:45 
thank you, much appreciated <3
mezz  [作者] 2022 年 6 月 8 日 下午 2:35 
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 2022 年 6 月 8 日 上午 8:10 
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 2022 年 6 月 7 日 下午 9:05 
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  [作者] 2022 年 6 月 7 日 下午 1:25 
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 2022 年 6 月 7 日 下午 12:07 
can this effectively replace MCM or are modders going to have to individually add support to this mod themselves?
mezz  [作者] 2022 年 6 月 5 日 上午 10:03 
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 2022 年 6 月 5 日 上午 9:52 
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  [作者] 2022 年 6 月 5 日 上午 9:48 
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 2022 年 6 月 5 日 上午 9:37 
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  [作者] 2022 年 6 月 5 日 上午 9:07 
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  [作者] 2022 年 6 月 5 日 上午 8:32 
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 2022 年 6 月 5 日 上午 7:53 
Actually, I would make my mods to support this one if this one works in MP and automatic legacy ModOption override